Build the remaining plugins for Gigabeat S and straigten out the fake IRAM in the codecs and plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17303 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/codecs/libmad/mad_iram.h b/apps/codecs/libmad/mad_iram.h
index b4dadd8..ffa6be8 100644
--- a/apps/codecs/libmad/mad_iram.h
+++ b/apps/codecs/libmad/mad_iram.h
@@ -31,7 +31,7 @@
mpegplayer on the PP5002. S3C2440 doesn't have any IRAM available for
codecs */
#if defined(CPU_PP502x) || (CONFIG_CPU == PP5002 && defined(MPEGPLAYER)) || \
- (CONFIG_CPU==S3C2440)
+ (CONFIG_CPU==S3C2440) || (CONFIG_CPU==IMX31L)
#define ICODE_SECTION_MPA_ARM .text
#define ICODE_ATTR_MPA_SYNTH
#else
@@ -39,7 +39,7 @@
#define ICODE_ATTR_MPA_SYNTH ICODE_ATTR
#endif
-#if CONFIG_CPU == S3C2440
+#if CONFIG_CPU == S3C2440 || CONFIG_CPU == IMX31L
#define IBSS_SECTION_MPA_ARM .bss
#else
#define IBSS_SECTION_MPA_ARM .ibss
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index d3d92f5..ca162f4 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -1,4 +1,4 @@
-#if !defined(IRIVER_IFP7XX_SERIES) && !defined(GIGABEAT_S)
+#if !defined(IRIVER_IFP7XX_SERIES)
/* For all targets */
shortcuts
diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h
index 7a7baf6..672baca 100644
--- a/apps/plugins/chessbox/chessbox_pgn.h
+++ b/apps/plugins/chessbox/chessbox_pgn.h
@@ -152,6 +152,21 @@
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
+#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
+#define CB_SELECT BUTTON_SELECT
+#define CB_UP BUTTON_UP
+#define CB_DOWN BUTTON_DOWN
+#define CB_LEFT BUTTON_LEFT
+#define CB_RIGHT BUTTON_RIGHT
+#define CB_PLAY BUTTON_PLAY
+#define CB_LEVEL BUTTON_MENU
+#define CB_MENU BUTTON_POWER
+
+#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
+#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
+#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
+#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
+
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define CB_SELECT BUTTON_REW
#define CB_UP BUTTON_SCROLL_UP
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 117c2b9..cb6d967 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -214,6 +214,17 @@
#define DOOMBUTTON_ENTER BUTTON_SELECT
#define DOOMBUTTON_WEAPON BUTTON_VOL_DOWN
#define DOOMBUTTON_MAP BUTTON_VOL_UP
+#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
+#define DOOMBUTTON_UP BUTTON_UP
+#define DOOMBUTTON_DOWN BUTTON_DOWN
+#define DOOMBUTTON_LEFT BUTTON_LEFT
+#define DOOMBUTTON_RIGHT BUTTON_RIGHT
+#define DOOMBUTTON_SHOOT BUTTON_PLAY
+#define DOOMBUTTON_OPEN BUTTON_MENU
+#define DOOMBUTTON_ESC BUTTON_POWER
+#define DOOMBUTTON_ENTER BUTTON_SELECT
+#define DOOMBUTTON_WEAPON BUTTON_VOL_DOWN
+#define DOOMBUTTON_MAP BUTTON_VOL_UP
#elif CONFIG_KEYPAD == MROBE500_PAD
#define DOOMBUTTON_ESC BUTTON_POWER
#define DOOMBUTTON_UP BUTTON_RC_PLAY
diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c
index f99fafc..e97d7ac 100644
--- a/apps/plugins/midi/midiplay.c
+++ b/apps/plugins/midi/midiplay.c
@@ -72,6 +72,15 @@
#define BTN_PLAY BUTTON_A
+#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
+#define BTN_QUIT BUTTON_POWER
+#define BTN_RIGHT BUTTON_RIGHT
+#define BTN_LEFT BUTTON_LEFT
+#define BTN_UP BUTTON_UP
+#define BTN_DOWN BUTTON_DOWN
+#define BTN_PLAY BUTTON_PLAY
+
+
#elif (CONFIG_KEYPAD == SANSA_E200_PAD)
#define BTN_QUIT BUTTON_POWER
#define BTN_RIGHT BUTTON_RIGHT
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index 4d9e562..06083df 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -54,6 +54,16 @@
#define MPEG_START_TIME_RC_DOWN BUTTON_RC_VOL_DOWN
#define MPEG_START_TIME_RC_EXIT (BUTTON_RC_PLAY | BUTTON_REPEAT)
+#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
+#define MPEG_START_TIME_SELECT BUTTON_SELECT
+#define MPEG_START_TIME_LEFT BUTTON_LEFT
+#define MPEG_START_TIME_RIGHT BUTTON_RIGHT
+#define MPEG_START_TIME_UP BUTTON_UP
+#define MPEG_START_TIME_DOWN BUTTON_DOWN
+#define MPEG_START_TIME_SCROLL_DOWN BUTTON_VOL_DOWN
+#define MPEG_START_TIME_SCROLL_UP BUTTON_VOL_UP
+#define MPEG_START_TIME_EXIT BUTTON_POWER
+
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define MPEG_START_TIME_SELECT BUTTON_PLAY
#define MPEG_START_TIME_LEFT BUTTON_LEFT
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index e63246b..8e46b24 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -157,6 +157,18 @@
#define MPEG_RC_RW BUTTON_RC_REW
#define MPEG_RC_FF BUTTON_RC_FF
+#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
+#define MPEG_MENU BUTTON_MENU
+#define MPEG_STOP BUTTON_POWER
+#define MPEG_PAUSE BUTTON_SELECT
+#define MPEG_PAUSE2 BUTTON_PLAY
+#define MPEG_VOLDOWN BUTTON_LEFT
+#define MPEG_VOLUP BUTTON_RIGHT
+#define MPEG_VOLDOWN2 BUTTON_VOL_DOWN
+#define MPEG_VOLUP2 BUTTON_VOL_UP
+#define MPEG_RW BUTTON_UP
+#define MPEG_FF BUTTON_DOWN
+
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define MPEG_MENU BUTTON_LEFT
#define MPEG_STOP BUTTON_POWER
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index 8350e4e..55ae5b8 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -76,6 +76,17 @@
#define PACMAN_COIN BUTTON_A
#define PACMAN_MENU BUTTON_MENU
+#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
+
+#define PACMAN_UP BUTTON_UP
+#define PACMAN_DOWN BUTTON_DOWN
+#define PACMAN_LEFT BUTTON_LEFT
+#define PACMAN_RIGHT BUTTON_RIGHT
+#define PACMAN_1UP BUTTON_SELECT
+#define PACMAN_2UP BUTTON_POWER
+#define PACMAN_COIN BUTTON_PLAY
+#define PACMAN_MENU BUTTON_MENU
+
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
#define PACMAN_UP BUTTON_RIGHT
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index 4a0ad73..92365c6 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -67,9 +67,10 @@
#define IRAMSIZE 4K
#define IRAM DRAM
#elif CONFIG_CPU == IMX31L
-#define DRAMORIG 0x0
-#define IRAMORIG 0x1FFFC000
+#define DRAMORIG 0x0 + STUBOFFSET
+#define IRAMORIG DRAMORIG
#define IRAMSIZE 0x4000
+#define IRAM DRAM
#elif CONFIG_CPU==DM320
#define DRAMORIG 0x00900000 + STUBOFFSET
#define IRAMORIG DRAMORIG
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h
index d1cea9c..4bfb861 100644
--- a/apps/plugins/reversi/reversi-gui.h
+++ b/apps/plugins/reversi/reversi-gui.h
@@ -86,6 +86,15 @@
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
#define REVERSI_BUTTON_MENU BUTTON_MENU
+#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
+#define REVERSI_BUTTON_QUIT BUTTON_POWER
+#define REVERSI_BUTTON_UP BUTTON_UP
+#define REVERSI_BUTTON_DOWN BUTTON_DOWN
+#define REVERSI_BUTTON_LEFT BUTTON_LEFT
+#define REVERSI_BUTTON_RIGHT BUTTON_RIGHT
+#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
+#define REVERSI_BUTTON_MENU BUTTON_MENU
+
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
#define REVERSI_BUTTON_QUIT BUTTON_POWER
#define REVERSI_BUTTON_UP BUTTON_SCROLL_UP
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index 44a1aec..58696a1 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -204,6 +204,15 @@
options.MENU=BUTTON_POWER;
#elif CONFIG_KEYPAD == COWOND2_PAD
+#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
+ options.UP=BUTTON_UP;
+ options.DOWN=BUTTON_DOWN;
+
+ options.A=BUTTON_VOL_UP;
+ options.B=BUTTON_VOL_DOWN;
+ options.START=BUTTON_PLAY;
+ options.SELECT=BUTTON_SELECT;
+ options.MENU=BUTTON_MENU;
#else
#error No Keymap Defined!
#endif
diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h
index 2cd9198..f9737a9 100644
--- a/apps/plugins/sudoku/sudoku.h
+++ b/apps/plugins/sudoku/sudoku.h
@@ -101,6 +101,16 @@
#define SUDOKU_BUTTON_MENU BUTTON_MENU
#define SUDOKU_BUTTON_POSSIBLE BUTTON_A
+#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD)
+#define SUDOKU_BUTTON_QUIT BUTTON_POWER
+#define SUDOKU_BUTTON_UP BUTTON_UP
+#define SUDOKU_BUTTON_DOWN BUTTON_DOWN
+#define SUDOKU_BUTTON_LEFT BUTTON_LEFT
+#define SUDOKU_BUTTON_RIGHT BUTTON_RIGHT
+#define SUDOKU_BUTTON_TOGGLE BUTTON_SELECT
+#define SUDOKU_BUTTON_MENU BUTTON_MENU
+#define SUDOKU_BUTTON_POSSIBLE BUTTON_PLAY
+
#elif (CONFIG_KEYPAD == IRIVER_H10_PAD)
#define SUDOKU_BUTTON_QUIT BUTTON_POWER
#define SUDOKU_BUTTON_UP BUTTON_SCROLL_UP
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h
index 49156c2..ca9d209 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -28,6 +28,15 @@
#define ZX_SELECT BUTTON_SELECT
#define ZX_MENU BUTTON_MENU
+#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
+
+#define ZX_UP BUTTON_UP
+#define ZX_DOWN BUTTON_DOWN
+#define ZX_LEFT BUTTON_LEFT
+#define ZX_RIGHT BUTTON_RIGHT
+#define ZX_SELECT BUTTON_SELECT
+#define ZX_MENU BUTTON_MENU
+
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
#define ZX_RIGHT BUTTON_RIGHT
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c
index 33d4451..b1abab3 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -90,6 +90,15 @@
#define KBD_UP BUTTON_UP
#define KBD_DOWN BUTTON_DOWN
+#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
+
+#define KBD_SELECT BUTTON_SELECT
+#define KBD_ABORT BUTTON_POWER
+#define KBD_LEFT BUTTON_LEFT
+#define KBD_RIGHT BUTTON_RIGHT
+#define KBD_UP BUTTON_UP
+#define KBD_DOWN BUTTON_DOWN
+
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
/* TODO: Check keyboard mappings */