From a256878e773000c2ac6e070b3ce115a0363ebea7 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 25 Oct 2007 07:44:56 +0000 Subject: [PATCH] enable jpeg, mpegplayer and midiplay on the mr500 (only jpeg is actually usable though, mpegplayer data aborts) fix the config which should have been done a few commits ago git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15296 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/SOURCES | 5 +++++ apps/plugins/SUBDIRS | 3 ++- apps/plugins/jpeg.c | 11 +++++++++++ apps/plugins/midi/midiplay.c | 6 ++++++ apps/plugins/mpegplayer/mpeg_settings.c | 10 ++++++++++ apps/plugins/mpegplayer/mpegplayer.c | 7 +++++++ firmware/export/dm320.h | 2 +- 7 files changed, 42 insertions(+), 2 deletions(-) diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 33ebec31bd..ebe4aa8b03 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES @@ -20,6 +20,11 @@ stopwatch.c vbrfix.c viewer.c +#ifdef OLYMPUS_MROBE_500 +/* remove these once the plugins before it are compileable */ +jpeg.c +#endif + #ifndef OLYMPUS_MROBE_500 #if CONFIG_CODEC == SWCODEC diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 97731a1e6c..0b963b0fd2 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -37,7 +37,8 @@ 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/jpeg.c b/apps/plugins/jpeg.c index 09f7455f8b..9e11ca431b 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c @@ -169,6 +169,17 @@ PLUGIN_HEADER #define JPEG_NEXT BUTTON_FF #define JPEG_PREVIOUS BUTTON_REW +#elif CONFIG_KEYPAD == MROBE500_PAD +#define JPEG_ZOOM_IN BUTTON_RC_VOL_UP +#define JPEG_ZOOM_OUT BUTTON_RC_VOL_DOWN +#define JPEG_UP BUTTON_RC_PLAY +#define JPEG_DOWN BUTTON_RC_DOWN +#define JPEG_LEFT BUTTON_LEFT +#define JPEG_RIGHT BUTTON_RIGHT +#define JPEG_MENU BUTTON_POWER +#define JPEG_NEXT BUTTON_RC_HEART +#define JPEG_PREVIOUS BUTTON_RC_MODE + #endif /* different graphics libraries */ diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c index 974dc99069..a5ecfdf1f7 100644 --- a/apps/plugins/midi/midiplay.c +++ b/apps/plugins/midi/midiplay.c @@ -79,6 +79,12 @@ PLUGIN_IRAM_DECLARE #define BTN_UP BUTTON_SCROLL_UP #define BTN_DOWN BUTTON_SCROLL_DOWN +#elif CONFIG_KEYPAD == MROBE500_PAD +#define BTN_QUIT BUTTON_POWER +#define BTN_RIGHT BUTTON_RIGHT +#define BTN_UP BUTTON_RC_PLAY +#define BTN_DOWN BUTTON_RC_DOWN + #endif #undef SYNC diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 0a717aeaac..6cd5f7b186 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -90,6 +90,16 @@ volatile long thumbDelayTimer; #define MPEG_DOWN BUTTON_DOWN #define MPEG_EXIT BUTTON_POWER +#elif CONFIG_KEYPAD == MROBE500_PAD +#define MPEG_SELECT BUTTON_RC_HEART +#define MPEG_SCROLL_UP BUTTON_RC_VOL_UP +#define MPEG_SCROLL_DOWN BUTTON_RC_VOL_DOWN +#define MPEG_LEFT BUTTON_LEFT +#define MPEG_RIGHT BUTTON_RIGHT +#define MPEG_UP BUTTON_RC_PLAY +#define MPEG_DOWN BUTTON_RC_DOWN +#define MPEG_EXIT BUTTON_POWER + #else #error MPEGPLAYER: Unsupported keypad #endif diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 770abf95ca..aed96d6af9 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -162,6 +162,13 @@ PLUGIN_IRAM_DECLARE #define MPEG_VOLDOWN BUTTON_VOL_DOWN #define MPEG_VOLUP BUTTON_VOL_UP +#elif CONFIG_KEYPAD == MROBE500_PAD +#define MPEG_MENU BUTTON_RC_HEART +#define MPEG_STOP BUTTON_POWER +#define MPEG_PAUSE BUTTON_TOUCHPAD +#define MPEG_VOLDOWN BUTTON_RC_VOL_DOWN +#define MPEG_VOLUP BUTTON_RC_VOL_UP + #else #error MPEGPLAYER: Unsupported keypad #endif diff --git a/firmware/export/dm320.h b/firmware/export/dm320.h index 4dfc55dcd3..57ffc8667a 100644 --- a/firmware/export/dm320.h +++ b/firmware/export/dm320.h @@ -28,7 +28,7 @@ #define TTB_SIZE (0x4000) /* must be 16Kb (0x4000) aligned */ #define TTB_BASE ((unsigned int *)(0x04900000 - TTB_SIZE)) /* End of memory */ -#define FRAME ((short *) (TTB_BASE - LCD_BUFFER_SIZE)) /* Right before TTB */ +#define FRAME ((short *) ((char*)TTB_BASE - LCD_BUFFER_SIZE)) /* Right before TTB */ #define PHY_IO_BASE 0x00030000 #define DM320_REG(addr) (*(volatile unsigned short *)(PHY_IO_BASE + (addr)))