summaryrefslogtreecommitdiffstats
path: root/apps/plugins/chip8.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-12-14 01:31:37 +0000
committerDave Chapman <dave@dchapman.com>2005-12-14 01:31:37 +0000
commit54d44c893f0d0ed4403ae7af220224e6646f6dda (patch)
treeb5665adfe8b496dfbce73ce65d4f8151495b0c9b /apps/plugins/chip8.c
parentc75425511ea8d0bfdb77d4336117ec7114ef87c8 (diff)
downloadrockbox-54d44c893f0d0ed4403ae7af220224e6646f6dda.tar.gz
rockbox-54d44c893f0d0ed4403ae7af220224e6646f6dda.zip
iPod: Initial attempt at button mappings for plugins. All plugins now compile, but more work is needed with the more complex ones to make them iPod friendly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8233 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/chip8.c')
-rw-r--r--apps/plugins/chip8.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index a92fc4d13c..295ac35dc3 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -946,6 +946,7 @@ STATIC void chip8 (void)
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD /* only 9 out of 16 chip8 buttons */
+#define CHIP8_OFF BUTTON_OFF
#define CHIP8_KEY1 BUTTON_F1
#define CHIP8_KEY2 BUTTON_UP
#define CHIP8_KEY3 BUTTON_F3
@@ -957,6 +958,7 @@ STATIC void chip8 (void)
#define CHIP8_KEY9 BUTTON_ON
#elif CONFIG_KEYPAD == ONDIO_PAD /* even more limited */
+#define CHIP8_OFF BUTTON_OFF
#define CHIP8_KEY2 BUTTON_UP
#define CHIP8_KEY4 BUTTON_LEFT
#define CHIP8_KEY5 BUTTON_MENU
@@ -965,12 +967,21 @@ STATIC void chip8 (void)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || \
(CONFIG_KEYPAD == IRIVER_H300_PAD)
+#define CHIP8_OFF BUTTON_OFF
#define CHIP8_KEY2 BUTTON_UP
#define CHIP8_KEY4 BUTTON_LEFT
#define CHIP8_KEY5 BUTTON_SELECT
#define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY8 BUTTON_DOWN
+#elif (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_NANO_PAD)
+#define CHIP8_OFF BUTTON_MENU
+#define CHIP8_KEY2 BUTTON_SCROLL_BACK
+#define CHIP8_KEY4 BUTTON_LEFT
+#define CHIP8_KEY5 BUTTON_PLAY
+#define CHIP8_KEY6 BUTTON_RIGHT
+#define CHIP8_KEY8 BUTTON_SCROLL_FWD
+
#endif
static byte chip8_virtual_keys[16];
@@ -1076,7 +1087,7 @@ static void chip8_keyboard(void)
int button = rb->button_get(false);
switch (button)
{
- case BUTTON_OFF: /* Abort Emulator */
+ case CHIP8_OFF: /* Abort Emulator */
chip8_running = 0;
break;