summaryrefslogtreecommitdiff
path: root/apps/plugins/chip8.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/chip8.c')
-rw-r--r--apps/plugins/chip8.c35
1 files changed, 30 insertions, 5 deletions
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index 0f7e24b551..e00e4213e8 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -1079,16 +1079,41 @@ STATIC void chip8 (void)
1079 1079
1080#elif (CONFIG_KEYPAD == COWOND2_PAD) 1080#elif (CONFIG_KEYPAD == COWOND2_PAD)
1081#define CHIP8_OFF BUTTON_POWER 1081#define CHIP8_OFF BUTTON_POWER
1082#define CHIP8_KEY2 BUTTON_DOWN
1083#define CHIP8_KEY4 BUTTON_LEFT
1084#define CHIP8_KEY5 BUTTON_SELECT
1085#define CHIP8_KEY6 BUTTON_RIGHT
1086#define CHIP8_KEY8 BUTTON_UP
1087 1082
1088#else 1083#else
1089#error No keymap defined! 1084#error No keymap defined!
1090#endif 1085#endif
1091 1086
1087#ifdef HAVE_TOUCHPAD
1088#ifndef CHIP8_OFF
1089#define CHIP8_OFF BUTTON_TOPLEFT
1090#endif
1091#ifndef CHIP8_KEY1
1092#define CHIP8_KEY1 BUTTON_TOPRIGHT
1093#endif
1094#ifndef CHIP8_KEY2
1095#define CHIP8_KEY2 BUTTON_TOPMIDDLE
1096#endif
1097#ifndef CHIP8_KEY3
1098#define CHIP8_KEY3 BUTTON_BOTTOMLEFT
1099#endif
1100#ifndef CHIP8_KEY4
1101#define CHIP8_KEY4 BUTTON_MIDLEFT
1102#endif
1103#ifndef CHIP8_KEY5
1104#define CHIP8_KEY5 BUTTON_CENTER
1105#endif
1106#ifndef CHIP8_KEY6
1107#define CHIP8_KEY6 BUTTON_MIDRIGHT
1108#endif
1109#ifndef CHIP8_KEY7
1110#define CHIP8_KEY7 BUTTON_BOTTOMRIGHT
1111#endif
1112#ifndef CHIP8_KEY8
1113#define CHIP8_KEY8 BUTTON_BOTTOMMIDDLE
1114#endif
1115#endif
1116
1092static byte chip8_virtual_keys[16]; 1117static byte chip8_virtual_keys[16];
1093static byte chip8_keymap[16]; 1118static byte chip8_keymap[16];
1094 1119