Synth with C64 like sounds. Played on two piezo buzzers with a PS/2 keyboard. Implemented on FRDM-KL46Z
Dependencies: PS2 TSI beep2 mbed
keys.h@4:0f73a5d06177, 2014-01-24 (annotated)
- Committer:
- alexanderh
- Date:
- Fri Jan 24 10:13:23 2014 +0000
- Revision:
- 4:0f73a5d06177
- Parent:
- 0:00eec4d97228
Doxygen docs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alexanderh | 4:0f73a5d06177 | 1 | /** @file C64Synth.cpp */ |
alexanderh | 0:00eec4d97228 | 2 | |
alexanderh | 0:00eec4d97228 | 3 | //Modifiers |
alexanderh | 0:00eec4d97228 | 4 | |
alexanderh | 0:00eec4d97228 | 5 | #define Break_fn 0xf0 |
alexanderh | 0:00eec4d97228 | 6 | #define Mod_fn 0xe0 |
alexanderh | 0:00eec4d97228 | 7 | |
alexanderh | 0:00eec4d97228 | 8 | |
alexanderh | 0:00eec4d97228 | 9 | //Row1 |
alexanderh | 0:00eec4d97228 | 10 | #define A_key (0x1c) |
alexanderh | 0:00eec4d97228 | 11 | #define S_key (0x1b) |
alexanderh | 0:00eec4d97228 | 12 | #define D_key (0x23) |
alexanderh | 0:00eec4d97228 | 13 | #define F_key (0x2b) |
alexanderh | 0:00eec4d97228 | 14 | #define G_key (0x34) |
alexanderh | 0:00eec4d97228 | 15 | #define H_key (0x33) |
alexanderh | 0:00eec4d97228 | 16 | #define J_key (0x3b) |
alexanderh | 0:00eec4d97228 | 17 | #define K_key (0x42) |
alexanderh | 0:00eec4d97228 | 18 | #define L_key (0x4b) |
alexanderh | 0:00eec4d97228 | 19 | #define OE_key (0x4c) |
alexanderh | 0:00eec4d97228 | 20 | #define AE_key (0x52) |
alexanderh | 0:00eec4d97228 | 21 | |
alexanderh | 0:00eec4d97228 | 22 | //Row2 |
alexanderh | 0:00eec4d97228 | 23 | #define Q_key (0x15) |
alexanderh | 0:00eec4d97228 | 24 | #define W_key (0x1d) |
alexanderh | 0:00eec4d97228 | 25 | #define E_key (0x24) |
alexanderh | 0:00eec4d97228 | 26 | #define R_key (0x2d) |
alexanderh | 0:00eec4d97228 | 27 | #define T_key (0x2c) |
alexanderh | 0:00eec4d97228 | 28 | #define Y_key (0x35) |
alexanderh | 0:00eec4d97228 | 29 | #define U_key (0x3c) |
alexanderh | 0:00eec4d97228 | 30 | #define I_key (0x43) |
alexanderh | 0:00eec4d97228 | 31 | #define O_key (0x44) |
alexanderh | 0:00eec4d97228 | 32 | #define P_key (0x4d) |
alexanderh | 0:00eec4d97228 | 33 | #define AO_key (0x54) |
alexanderh | 0:00eec4d97228 | 34 | |
alexanderh | 0:00eec4d97228 | 35 | //Row3 |
alexanderh | 0:00eec4d97228 | 36 | #define Z_key (0x1a) |
alexanderh | 0:00eec4d97228 | 37 | #define X_key (0x22) |
alexanderh | 0:00eec4d97228 | 38 | #define C_key (0x21) |
alexanderh | 0:00eec4d97228 | 39 | #define V_key (0x2a) |
alexanderh | 0:00eec4d97228 | 40 | #define B_key (0x32) |
alexanderh | 0:00eec4d97228 | 41 | #define N_key (0x31) |
alexanderh | 0:00eec4d97228 | 42 | #define M_key (0x3a) |
alexanderh | 0:00eec4d97228 | 43 | #define Comma_key (0x41) |
alexanderh | 0:00eec4d97228 | 44 | #define Period_key (0x49) |
alexanderh | 0:00eec4d97228 | 45 | |
alexanderh | 0:00eec4d97228 | 46 | //arrow keys |
alexanderh | 0:00eec4d97228 | 47 | #define Left_key (0x6b) |
alexanderh | 0:00eec4d97228 | 48 | #define Right_key (0x74) |
alexanderh | 0:00eec4d97228 | 49 | #define Up_key (0x75) |
alexanderh | 0:00eec4d97228 | 50 | #define Down_key (0x72) |
alexanderh | 0:00eec4d97228 | 51 | |
alexanderh | 0:00eec4d97228 | 52 | //Function keys |
alexanderh | 0:00eec4d97228 | 53 | #define Pgup_key (0x7d) |
alexanderh | 0:00eec4d97228 | 54 | #define Pgdown_key (0x7a) |
alexanderh | 0:00eec4d97228 | 55 | #define End_key (0x69) |
alexanderh | 0:00eec4d97228 | 56 | |
alexanderh | 0:00eec4d97228 | 57 | |
alexanderh | 0:00eec4d97228 | 58 | #define Minus_key (0x4e) |
alexanderh | 0:00eec4d97228 | 59 | #define Plus_key (0x55) |
alexanderh | 0:00eec4d97228 | 60 | |
alexanderh | 0:00eec4d97228 | 61 | #define Space_key (0x29) |