diff --git a/apps/debug_menu.c b/apps/debug_menu.c index c9d962ece4..f51fb680d7 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -648,6 +648,44 @@ static bool dbg_hw_info(void) lcd_update(); while (!(action_userabort(TIMEOUT_BLOCK))); +#elif CONFIG_CPU == DM320 + int line = 0, button; + int *address=0x0; + bool done=false; + char buf[100]; + + lcd_setmargins(0, 0); + lcd_setfont(FONT_SYSFIXED); + lcd_clear_display(); + lcd_puts(0, line++, "[Hardware info]"); + + while(!done) + { + button = button_get(false); + button&=~BUTTON_REPEAT; + if (button == BUTTON_POWER) + done=true; + if(button==BUTTON_RC_PLAY) + address+=0x01; + else if (button==BUTTON_RC_DOWN) + address-=0x01; + else if (button==BUTTON_RC_FF) + address+=0x800; + else if (button==BUTTON_RC_REW) + address-=0x800; + { + snprintf(buf, sizeof(buf), "current tick: %04x", (unsigned int)current_tick); + lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)address, *address); + lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+1), *(address+1)); + lcd_puts(0, line++, buf); + snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+2), *(address+2)); + lcd_puts(0, line++, buf); + line -= 4; + } + lcd_update(); + } #endif /* CONFIG_CPU */ return false; diff --git a/apps/gui/list.c b/apps/gui/list.c index 38cecaefcc..3cdd6cbbc4 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -325,7 +325,7 @@ static void gui_list_draw_smart(struct gui_list *gui_list) gui_list->data, entry_buffer); entry_name = P2STR(s); - + #ifdef HAVE_LCD_BITMAP int style = STYLE_DEFAULT; /* position the string at the correct offset place */ diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 2fd36ff0dc..d36ed406ff 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c @@ -64,7 +64,7 @@ static char *option_get_valuestring(struct settings_list *setting, if ((setting->flags & F_BOOL_SETTING) == F_BOOL_SETTING) { bool val = (bool)temp_var; - snprintf(buffer, buf_len, "%s", + snprintf(buffer, buf_len, "%s", str(val? setting->bool_setting->lang_yes : setting->bool_setting->lang_no)); } diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 0b963b0fd2..12b38cea75 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -1,4 +1,4 @@ -#if !defined(IRIVER_IFP7XX_SERIES) && !defined(OLYMPUS_MROBE_500) +#if !defined(IRIVER_IFP7XX_SERIES) /* For all targets */ shortcuts @@ -22,7 +22,7 @@ reversi #endif /* For all 2bpp and colour targets */ -#if (LCD_DEPTH >= 2) +#if (LCD_DEPTH >= 2) && !defined(OLYMPUS_MROBE_500) zxbox #endif @@ -37,8 +37,7 @@ pacbox (LCD_DEPTH == 2) && !defined(ARCHOS_AV300) doom #endif -#endif /* mrobe 500 */ -#if !defined(IRIVER_IFP7XX_SERIES) + /* For all the swcodec targets */ #if CONFIG_CODEC == SWCODEC midi diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index 9b0b79bcda..cc31fe067f 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c @@ -211,6 +211,21 @@ PLUGIN_HEADER #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) +#elif CONFIG_KEYPAD == MROBE500_PAD +#define CB_SELECT BUTTON_RC_MODE +#define CB_UP BUTTON_RC_PLAY +#define CB_DOWN BUTTON_RC_DOWN +#define CB_LEFT BUTTON_RC_REW +#define CB_RIGHT BUTTON_RC_FF +#define CB_PLAY BUTTON_RC_HEART +#define CB_LEVEL BUTTON_RC_VOL_DOWN +#define CB_MENU BUTTON_POWER + +#define CB_SCROLL_UP (BUTTON_RC_PLAY|BUTTON_REPEAT) +#define CB_SCROLL_DOWN (BUTTON_RC_DOWN|BUTTON_REPEAT) +#define CB_SCROLL_LEFT (BUTTON_RC_REW|BUTTON_REPEAT) +#define CB_SCROLL_RIGHT (BUTTON_RC_FF|BUTTON_REPEAT) + #else #error CHESSBOX: Unsupported keypad #endif diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index ab3215384f..9b09411170 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c @@ -199,6 +199,21 @@ #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) +#elif CONFIG_KEYPAD == MROBE500_PAD +#define CB_SELECT BUTTON_RC_MODE +#define CB_UP BUTTON_RC_PLAY +#define CB_DOWN BUTTON_RC_DOWN +#define CB_LEFT BUTTON_RC_REW +#define CB_RIGHT BUTTON_RC_FF +#define CB_PLAY BUTTON_RC_HEART +#define CB_LEVEL BUTTON_RC_VOL_DOWN +#define CB_MENU BUTTON_POWER + +#define CB_SCROLL_UP (BUTTON_RC_PLAY|BUTTON_REPEAT) +#define CB_SCROLL_DOWN (BUTTON_RC_DOWN|BUTTON_REPEAT) +#define CB_SCROLL_LEFT (BUTTON_RC_REW|BUTTON_REPEAT) +#define CB_SCROLL_RIGHT (BUTTON_RC_FF|BUTTON_REPEAT) + #else #error CHESSBOX: Unsupported keypad #endif diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 32990f3923..1b07a8f0d4 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c @@ -213,16 +213,19 @@ void I_ShutdownGraphics(void) #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 +#define DOOMBUTTON_DOWN BUTTON_RC_DOWN +#define DOOMBUTTON_LEFT BUTTON_RC_REW +#define DOOMBUTTON_RIGHT BUTTON_RC_FF +#define DOOMBUTTON_OPEN BUTTON_RC_VOL_DOWN +#define DOOMBUTTON_SHOOT BUTTON_RC_VOL_UP +#define DOOMBUTTON_ENTER BUTTON_RC_MODE +#define DOOMBUTTON_WEAPON BUTTON_RC_HEART + #else -#define DOOMBUTTON_UP BUTTON_UP -#define DOOMBUTTON_DOWN BUTTON_DOWN -#define DOOMBUTTON_LEFT BUTTON_LEFT -#define DOOMBUTTON_RIGHT BUTTON_RIGHT -#define DOOMBUTTON_SHOOT BUTTON_REC -#define DOOMBUTTON_OPEN BUTTON_MODE -#define DOOMBUTTON_ESC BUTTON_OFF -#define DOOMBUTTON_ENTER BUTTON_SELECT -#define DOOMBUTTON_WEAPON BUTTON_ON +#error Keymap not defined! #endif #ifdef DOOMBUTTON_SCROLLWHEEL diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h index 0d879fcddc..ea9fd3c0ef 100644 --- a/apps/plugins/pacbox/pacbox.h +++ b/apps/plugins/pacbox/pacbox.h @@ -118,6 +118,22 @@ #define PACMAN_COIN BUTTON_FF #define PACMAN_MENU BUTTON_PLAY +#elif CONFIG_KEYPAD == MROBE500_PAD + +#define PACMAN_UP BUTTON_RC_PLAY +#define PACMAN_DOWN BUTTON_RC_DOWN +#define PACMAN_LEFT BUTTON_RC_REW +#define PACMAN_RIGHT BUTTON_RC_FF +#define PACMAN_1UP BUTTON_RC_VOL_DOWN +#define PACMAN_2UP BUTTON_RC_VOL_UP +#define PACMAN_COIN_PRE BUTTON_RC_MODE +#define PACMAN_COIN (BUTTON_RC_MODE | BUTTON_RC_DOWN) +#define PACMAN_MENU BUTTON_POWER + +#else + +#error Keymap not defined! + #endif #if (LCD_HEIGHT >= 288) diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index be645b4f5a..e877811365 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -57,8 +57,9 @@ OUTPUT_FORMAT(elf32-sh) #define IRAMSIZE 0x4000 #elif CONFIG_CPU==DM320 #define DRAMORIG 0x00900000 + STUBOFFSET -#define IRAMORIG 0x00000100 -#define IRAMSIZE 0x4000-0x100 +#define IRAMORIG DRAMORIG +#define IRAMSIZE 0x4000 +#define IRAM DRAM #else #define DRAMORIG 0x09000000 + STUBOFFSET #endif diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index 5543ea8fd6..0d34cab551 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h @@ -105,7 +105,16 @@ #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT #define REVERSI_BUTTON_MENU (BUTTON_SELECT|BUTTON_REPEAT) -#elif +#elif CONFIG_KEYPAD == MROBE500_PAD +#define REVERSI_QUIT BUTTON_POWER +#define REVERSI_BUTTON_UP BUTTON_RC_PLAY +#define REVERSI_BUTTON_DOWN BUTTON_RC_DOWN +#define REVERSI_BUTTON_LEFT BUTTON_RC_REW +#define REVERSI_BUTTON_RIGHT BUTTON_RC_FF +#define REVERSI_BUTTON_MAKE_MOVE BUTTON_RC_MODE +#define REVERSI_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) + +#else #error REVERSI: Unsupported keypad #endif diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 1cf4b7134b..4ef95b0be9 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c @@ -176,7 +176,7 @@ static void setoptions (void) options.START=BUTTON_SELECT; options.SELECT=BUTTON_NONE; options.MENU=BUTTON_POWER; - + #elif CONFIG_KEYPAD == IRIVER_H10_PAD options.UP=BUTTON_SCROLL_UP; options.DOWN=BUTTON_SCROLL_DOWN; @@ -186,6 +186,19 @@ static void setoptions (void) options.START=BUTTON_REW; options.SELECT=BUTTON_NONE; options.MENU=BUTTON_POWER; +#elif CONFIG_KEYPAD == MROBE500_PAD + options.UP=BUTTON_RC_PLAY; + options.DOWN=BUTTON_RC_DOWN; + options.LEFT=BUTTON_RC_REW; + options.RIGHT=BUTTON_RC_FF; + + options.A=BUTTON_RC_VOL_DOWN; + options.B=BUTTON_RC_VOL_UP; + options.START=BUTTON_RC_HEART; + options.SELECT=BUTTON_RC_MODE; + options.MENU=BUTTON_POWER; +#else +#error No Keymap Defined! #endif options.maxskip=4; diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h index f888bd7090..ce8dfa00f4 100644 --- a/apps/plugins/sudoku/sudoku.h +++ b/apps/plugins/sudoku/sudoku.h @@ -136,7 +136,21 @@ #define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) #define SUDOKU_BUTTON_POSSIBLE BUTTON_REC -#elif +#elif CONFIG_KEYPAD == MROBE500_PAD +#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER +#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) +#define SUDOKU_BUTTON_UP BUTTON_RC_PLAY +#define SUDOKU_BUTTON_DOWN BUTTON_RC_DOWN +#define SUDOKU_BUTTON_LEFT BUTTON_RC_REW +#define SUDOKU_BUTTON_RIGHT BUTTON_RC_FF +#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_RC_VOL_DOWN +#define SUDOKU_BUTTON_TOGGLE BUTTON_RC_VOL_UP +#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_RC_MODE +#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER +#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) +#define SUDOKU_BUTTON_POSSIBLE BUTTON_RC_HEART + +#else #error SUDOKU: Unsupported keypad #endif diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h index 6af84719ff..9e9e3ed616 100644 --- a/apps/plugins/zxbox/keymaps.h +++ b/apps/plugins/zxbox/keymaps.h @@ -86,6 +86,17 @@ #define ZX_UP BUTTON_UP #define ZX_DOWN BUTTON_DOWN +#elif CONFIG_KEYPAD == MROBE500_PAD +#define ZX_UP BUTTON_RC_PLAY +#define ZX_DOWN BUTTON_RC_DOWN +#define ZX_LEFT BUTTON_RC_REW +#define ZX_RIGHT BUTTON_RC_FF +#define ZX_SELECT BUTTON_RC_MODE +#define ZX_MENU (BUTTON_POWER | BUTTON_REL) + +#else +#error Keymap not defined! + #endif #endif diff --git a/firmware/app.lds b/firmware/app.lds index f77d0a1c22..3b53c6e46a 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -54,6 +54,8 @@ INPUT(target/sh/crt0.o) #define IRAMSIZE 0xc000 #elif CONFIG_CPU==PNX0101 #define DRAMORIG 0xc00000 + STUBOFFSET +#define IRAM0ORIG 0x000000 +#define IRAM0SIZE 0x7000 #define IRAMORIG 0x400000 #define IRAMSIZE 0x7000 #elif CONFIG_CPU==S3C2440 @@ -83,17 +85,104 @@ INPUT(target/sh/crt0.o) MEMORY { - DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE + DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE #if CONFIG_CPU != S3C2440 - IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE + IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE #endif #if CONFIG_CPU==PNX0101 - IRAM0 : ORIGIN = 0x0, LENGTH = IRAMSIZE + IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE #endif } SECTIONS { +#if (CONFIG_CPU==DM320) + .text : + { + loadaddress = .; + _loadaddress = .; + . = ALIGN(0x200); + *(.init.text) + *(.text*) + *(.glue_7) + *(.glue_7t) + . = ALIGN(0x4); + } > DRAM + + .rodata : + { + *(.rodata) /* problems without this, dunno why */ + *(.rodata*) + *(.rodata.str1.1) + *(.rodata.str1.4) + . = ALIGN(0x4); + + /* Pseudo-allocate the copies of the data sections */ + _datacopy = .; + } > DRAM + + /* TRICK ALERT! For RAM execution, we put the .data section at the + same load address as the copy. Thus, we don't waste extra RAM + when we don't actually need the copy. */ + .data : AT ( _datacopy ) + { + _datastart = .; + *(.data*) + . = ALIGN(0x4); + _dataend = .; + } > DRAM + + /DISCARD/ : + { + *(.eh_frame) + } + + .vectors IRAMORIG : + { + _vectorsstart = .; + *(.vectors); + _vectorsend = .; + } > IRAM AT> DRAM + + _vectorscopy = LOADADDR(.vectors); + + .iram : + { + _iramstart = .; + *(.icode) + *(.irodata) + *(.idata) + _iramend = .; + } > IRAM AT> DRAM + + _iramcopy = LOADADDR(.iram); + + .ibss (NOLOAD) : + { + _iedata = .; + *(.ibss) + . = ALIGN(0x4); + _iend = .; + } > IRAM + + .stack : + { + *(.stack) + stackbegin = .; + . += 0x2000; + stackend = .; + } > IRAM + + .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): + { + _edata = .; + *(.bss*) + *(COMMON) + . = ALIGN(0x4); + _end = .; + } > DRAM + +#else /* End DM320 */ #if !defined(CPU_ARM) .vectors : { @@ -248,6 +337,8 @@ SECTIONS . = ALIGN(0x4); _end = .; } > DRAM + +#endif .audiobuf ALIGN(4) : { diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h index 04f3d83401..4a8834c1a2 100644 --- a/firmware/export/config-mrobe500.h +++ b/firmware/export/config-mrobe500.h @@ -104,8 +104,10 @@ /* The number of bytes reserved for loadable codecs */ #define CODEC_SIZE 0x80000 -/* The number of bytes reserved for loadable plugins */ -#define PLUGIN_BUFFER_SIZE 0x80000 +/* The number of bytes reserved for loadable plugins + * - larger than other targets due to screen size + */ +#define PLUGIN_BUFFER_SIZE 0x100000 /* Define this if you have the WM8975 audio codec */ //#define HAVE_WM8751 diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c index bc1439762d..1086c1c28b 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c +++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c @@ -100,6 +100,7 @@ void lcd_update_rect(int x, int y, int width, int height) if (height <= 0) return; /* nothing left to do */ +#if defined(SCREEN_ROTATE) dst = (fb_data *)FRAME + LCD_WIDTH*y + x; src = &lcd_framebuffer[y][x]; @@ -114,6 +115,27 @@ void lcd_update_rect(int x, int y, int width, int height) /* Full width - copy as one line */ lcd_copy_buffer_rect(dst, src, LCD_WIDTH*height, 1); } +#else + +#if 0 + src = &lcd_framebuffer[y][x]; + + register int xc, yc; + register fb_data *start=(fb_data *)FRAME + (LCD_HEIGHT-x)*LCD_WIDTH + y; + + for(yc=0;yc