summaryrefslogtreecommitdiff
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
parent023cd578fad93a299424cf38bc85a64d0865decc (diff)
downloadrockbox-02aadebd5f16740687d6a135581712a1719301c9.tar.gz
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
-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
96#if CONFIG_KEYPAD == RECORDER_PAD 96#if CONFIG_KEYPAD == RECORDER_PAD
97rockboy.c 97rockboy.c
98#endif 98#endif
99zxbox.c
99#endif 100#endif
100 101
101/* not support recorder models for now */ 102/* 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
19chessbox 19chessbox
20sudoku 20sudoku
21reversi 21reversi
22#endif 22#ifndef OLYMPUS_MROBE_500
23
24/* For all 2bpp and colour targets */
25#if (LCD_DEPTH >= 2) && !defined(OLYMPUS_MROBE_500)
26zxbox 23zxbox
27#endif 24#endif
25#endif
28 26
29/* For all the colour targets, iriver H1x0 and iAudio M5 */ 27/* For all the colour targets, iriver H1x0 and iAudio M5 */
30#if defined(HAVE_LCD_COLOR) && !defined (SANSA_C200)\ 28#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
26/* this is the plugin entry point */ 26/* this is the plugin entry point */
27enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 27enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
28{ 28{
29 return run_overlay(api, parameter, PLUGIN_APPS_DIR "/zxbox.ovl", "ZXBox"); 29 return run_overlay(api, parameter, VIEWERS_DIR "/zxbox.ovl", "ZXBox");
30} 30}
31#endif 31#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 @@
1#include "config.h" 1#include "config.h"
2 2
3/* linker script for chessbox as an overlay, 3/* linker script for zxbox as an overlay,
4 * only used/ necessary for SH-based archos targets */ 4 * only used/ necessary for SH-based archos targets */
5 5
6OUTPUT_FORMAT(elf32-sh) 6OUTPUT_FORMAT(elf32-sh)
@@ -8,7 +8,7 @@ OUTPUT_FORMAT(elf32-sh)
8#define DRAMORIG 0x09000000 8#define DRAMORIG 0x09000000
9#define PLUGIN_LENGTH PLUGIN_BUFFER_SIZE 9#define PLUGIN_LENGTH PLUGIN_BUFFER_SIZE
10 10
11#define OVERLAY_LENGTH 0x80000 11#define OVERLAY_LENGTH 0x48000
12#define OVERLAY_ORIGIN (DRAMORIG + (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH - OVERLAY_LENGTH) 12#define OVERLAY_ORIGIN (DRAMORIG + (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH - OVERLAY_LENGTH)
13 13
14MEMORY 14MEMORY
@@ -20,26 +20,23 @@ SECTIONS
20{ 20{
21 .header : { 21 .header : {
22 _plugin_start_addr = .; 22 _plugin_start_addr = .;
23 *(.header) 23 KEEP(*(.header))
24 } > OVERLAY_RAM 24 } > OVERLAY_RAM
25 25
26 .text : { 26 .text : {
27 *(.text) 27 *(.text*)
28 *(.text.*)
29 } > OVERLAY_RAM 28 } > OVERLAY_RAM
30 29
31 .rodata : { 30 .rodata : {
32 *(.rodata) 31 *(.rodata*)
33 *(.rodata.*)
34 } > OVERLAY_RAM 32 } > OVERLAY_RAM
35 33
36 .data : { 34 .data : {
37 *(.data) 35 *(.data*)
38 } > OVERLAY_RAM 36 } > OVERLAY_RAM
39 37
40 .bss : { 38 .bss : {
41 *(.bss) 39 *(.bss*)
42 *(.bss.*)
43 *(COMMON) 40 *(COMMON)
44 . = ALIGN(0x4); 41 . = ALIGN(0x4);
45 _plugin_end_addr = .; 42 _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 @@
48 48
49#elif CONFIG_KEYPAD == RECORDER_PAD 49#elif CONFIG_KEYPAD == RECORDER_PAD
50#define ZX_SELECT BUTTON_PLAY 50#define ZX_SELECT BUTTON_PLAY
51#define ZX_MENU BUTTON_OFF 51#define ZX_MENU BUTTON_F1
52#define ZX_LEFT BUTTON_LEFT 52#define ZX_LEFT BUTTON_LEFT
53#define ZX_RIGHT BUTTON_RIGHT 53#define ZX_RIGHT BUTTON_RIGHT
54#define ZX_UP BUTTON_UP 54#define ZX_UP BUTTON_UP
@@ -103,6 +103,14 @@
103#define ZX_SELECT BUTTON_RC_MODE 103#define ZX_SELECT BUTTON_RC_MODE
104#define ZX_MENU (BUTTON_POWER | BUTTON_REL) 104#define ZX_MENU (BUTTON_POWER | BUTTON_REL)
105 105
106#elif CONFIG_KEYPAD == MROBE100_PAD
107#define ZX_UP BUTTON_UP
108#define ZX_DOWN BUTTON_DOWN
109#define ZX_LEFT BUTTON_LEFT
110#define ZX_RIGHT BUTTON_RIGHT
111#define ZX_SELECT BUTTON_SELECT
112#define ZX_MENU BUTTON_MENU
113
106#elif CONFIG_KEYPAD == IAUDIO_M3_PAD 114#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
107#define ZX_UP BUTTON_RC_VOL_UP 115#define ZX_UP BUTTON_RC_VOL_UP
108#define ZX_DOWN BUTTON_RC_VOL_DOWN 116#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
64 PLUGIN_IRAM_INIT(api) 64 PLUGIN_IRAM_INIT(api)
65 65
66 rb = api; 66 rb = api;
67#if LCD_DEPTH > 1
67 rb->lcd_set_backdrop(NULL); 68 rb->lcd_set_backdrop(NULL);
69#endif
68 rb->splash(HZ, "Welcome to ZXBox"); 70 rb->splash(HZ, "Welcome to ZXBox");
69 71
70 72
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 @@
111#define KBD_DOWN BUTTON_SCROLL_DOWN 111#define KBD_DOWN BUTTON_SCROLL_DOWN
112 112
113#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ 113#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \
114(CONFIG_KEYPAD == SANSA_C200_PAD) 114(CONFIG_KEYPAD == SANSA_C200_PAD) || \
115(CONFIG_KEYPAD == MROBE100_PAD)
115 116
116/* TODO: Check keyboard mappings */ 117/* TODO: Check keyboard mappings */
117 118