summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-05-31 08:48:06 +0000
committerJens Arnold <amiconn@rockbox.org>2008-05-31 08:48:06 +0000
commit02aadebd5f16740687d6a135581712a1719301c9 (patch)
treee873ff6cb21b88a4c9f5e197ac56ae843c65b6b2 /apps
parent023cd578fad93a299424cf38bc85a64d0865decc (diff)
downloadrockbox-02aadebd5f16740687d6a135581712a1719301c9.tar.gz
rockbox-02aadebd5f16740687d6a135581712a1719301c9.tar.bz2
rockbox-02aadebd5f16740687d6a135581712a1719301c9.zip
Make ZXBox work on the m:robe 100, and fix the linker script and loader to make it work again on archos. Put Menu on F1 for recorders in order to avoid accidental poweroff on v1. ZXBox on archos is very slow, but that's not different from rockboy which is also included for recorders. (Patch by Marianne Arnold and me).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17666 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/SOURCES1
-rw-r--r--apps/plugins/SUBDIRS6
-rw-r--r--apps/plugins/zxbox.c2
-rw-r--r--apps/plugins/zxbox/archos.lds17
-rw-r--r--apps/plugins/zxbox/keymaps.h10
-rw-r--r--apps/plugins/zxbox/zxbox.c2
-rw-r--r--apps/plugins/zxbox/zxbox_keyb.c3
7 files changed, 24 insertions, 17 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 58543c0b54..86d7055db2 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -96,6 +96,7 @@ chessbox.c
#if CONFIG_KEYPAD == RECORDER_PAD
rockboy.c
#endif
+zxbox.c
#endif
/* not support recorder models for now */
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index ca162f4047..94614e2f12 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -19,12 +19,10 @@ rockboy
chessbox
sudoku
reversi
-#endif
-
-/* For all 2bpp and colour targets */
-#if (LCD_DEPTH >= 2) && !defined(OLYMPUS_MROBE_500)
+#ifndef OLYMPUS_MROBE_500
zxbox
#endif
+#endif
/* For all the colour targets, iriver H1x0 and iAudio M5 */
#if defined(HAVE_LCD_COLOR) && !defined (SANSA_C200)\
diff --git a/apps/plugins/zxbox.c b/apps/plugins/zxbox.c
index 14f8b0911b..2b7ada3429 100644
--- a/apps/plugins/zxbox.c
+++ b/apps/plugins/zxbox.c
@@ -26,6 +26,6 @@ PLUGIN_HEADER
/* this is the plugin entry point */
enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
{
- return run_overlay(api, parameter, PLUGIN_APPS_DIR "/zxbox.ovl", "ZXBox");
+ return run_overlay(api, parameter, VIEWERS_DIR "/zxbox.ovl", "ZXBox");
}
#endif
diff --git a/apps/plugins/zxbox/archos.lds b/apps/plugins/zxbox/archos.lds
index 319b9eb626..5b4db7dc3e 100644
--- a/apps/plugins/zxbox/archos.lds
+++ b/apps/plugins/zxbox/archos.lds
@@ -1,6 +1,6 @@
#include "config.h"
-/* linker script for chessbox as an overlay,
+/* linker script for zxbox as an overlay,
* only used/ necessary for SH-based archos targets */
OUTPUT_FORMAT(elf32-sh)
@@ -8,7 +8,7 @@ OUTPUT_FORMAT(elf32-sh)
#define DRAMORIG 0x09000000
#define PLUGIN_LENGTH PLUGIN_BUFFER_SIZE
-#define OVERLAY_LENGTH 0x80000
+#define OVERLAY_LENGTH 0x48000
#define OVERLAY_ORIGIN (DRAMORIG + (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH - OVERLAY_LENGTH)
MEMORY
@@ -20,26 +20,23 @@ SECTIONS
{
.header : {
_plugin_start_addr = .;
- *(.header)
+ KEEP(*(.header))
} > OVERLAY_RAM
.text : {
- *(.text)
- *(.text.*)
+ *(.text*)
} > OVERLAY_RAM
.rodata : {
- *(.rodata)
- *(.rodata.*)
+ *(.rodata*)
} > OVERLAY_RAM
.data : {
- *(.data)
+ *(.data*)
} > OVERLAY_RAM
.bss : {
- *(.bss)
- *(.bss.*)
+ *(.bss*)
*(COMMON)
. = ALIGN(0x4);
_plugin_end_addr = .;
diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h
index ca9d2093b5..932c360991 100644
--- a/apps/plugins/zxbox/keymaps.h
+++ b/apps/plugins/zxbox/keymaps.h
@@ -48,7 +48,7 @@
#elif CONFIG_KEYPAD == RECORDER_PAD
#define ZX_SELECT BUTTON_PLAY
-#define ZX_MENU BUTTON_OFF
+#define ZX_MENU BUTTON_F1
#define ZX_LEFT BUTTON_LEFT
#define ZX_RIGHT BUTTON_RIGHT
#define ZX_UP BUTTON_UP
@@ -103,6 +103,14 @@
#define ZX_SELECT BUTTON_RC_MODE
#define ZX_MENU (BUTTON_POWER | BUTTON_REL)
+#elif CONFIG_KEYPAD == MROBE100_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_M3_PAD
#define ZX_UP BUTTON_RC_VOL_UP
#define ZX_DOWN BUTTON_RC_VOL_DOWN
diff --git a/apps/plugins/zxbox/zxbox.c b/apps/plugins/zxbox/zxbox.c
index 873ecdf6c3..91e5af166c 100644
--- a/apps/plugins/zxbox/zxbox.c
+++ b/apps/plugins/zxbox/zxbox.c
@@ -64,7 +64,9 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
PLUGIN_IRAM_INIT(api)
rb = api;
+#if LCD_DEPTH > 1
rb->lcd_set_backdrop(NULL);
+#endif
rb->splash(HZ, "Welcome to ZXBox");
diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c
index b1abab3d90..184d2ef4b5 100644
--- a/apps/plugins/zxbox/zxbox_keyb.c
+++ b/apps/plugins/zxbox/zxbox_keyb.c
@@ -111,7 +111,8 @@
#define KBD_DOWN BUTTON_SCROLL_DOWN
#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
-(CONFIG_KEYPAD == SANSA_C200_PAD)
+(CONFIG_KEYPAD == SANSA_C200_PAD) || \
+(CONFIG_KEYPAD == MROBE100_PAD)
/* TODO: Check keyboard mappings */