summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/sdl/UI-m3.bmpbin0 -> 398852 bytes
-rw-r--r--uisimulator/sdl/button.c30
-rw-r--r--uisimulator/sdl/lcd-bitmap.c5
-rw-r--r--uisimulator/sdl/uisdl.h13
4 files changed, 47 insertions, 1 deletions
diff --git a/uisimulator/sdl/UI-m3.bmp b/uisimulator/sdl/UI-m3.bmp
new file mode 100644
index 0000000000..add298cc89
--- /dev/null
+++ b/uisimulator/sdl/UI-m3.bmp
Binary files differ
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 967f41baf7..03f7dc1e96 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -262,6 +262,36 @@ void button_event(int key, bool pressed)
new_btn = BUTTON_SELECT;
break;
+#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
+ case SDLK_KP4:
+ case SDLK_LEFT:
+ new_btn = BUTTON_LEFT;
+ break;
+ case SDLK_KP6:
+ case SDLK_RIGHT:
+ new_btn = BUTTON_RIGHT;
+ break;
+ case SDLK_KP8:
+ case SDLK_UP:
+ new_btn = BUTTON_VOL_UP;
+ break;
+ case SDLK_KP2:
+ case SDLK_DOWN:
+ new_btn = BUTTON_VOL_DOWN;
+ break;
+ case SDLK_KP_PERIOD:
+ case SDLK_INSERT:
+ new_btn = BUTTON_MODE;
+ break;
+ case SDLK_KP_DIVIDE:
+ case SDLK_F1:
+ new_btn = BUTTON_REC;
+ break;
+ case SDLK_KP5:
+ case SDLK_SPACE:
+ new_btn = BUTTON_PLAY;
+ break;
+
#elif (CONFIG_KEYPAD == IPOD_1G2G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) \
|| (CONFIG_KEYPAD == IPOD_4G_PAD)
case SDLK_KP4:
diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c
index 438b133804..fa3e5d2b0d 100644
--- a/uisimulator/sdl/lcd-bitmap.c
+++ b/uisimulator/sdl/lcd-bitmap.c
@@ -45,8 +45,11 @@ static unsigned long get_lcd_pixel(int x, int y)
#elif LCD_DEPTH == 2
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
return ((lcd_framebuffer[y][x/4] >> (2 * (~x & 3))) & 3);
-#else
+#elif LCD_PIXELFORMAT == VERTICAL_PACKING
return ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
+#elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED
+ unsigned bits = (lcd_framebuffer[y/8][x] >> (y & 7)) & 0x0101;
+ return (bits | (bits >> 7)) & 3;
#endif
#elif LCD_DEPTH == 16
#if LCD_PIXELFORMAT == RGB565SWAPPED
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index 3503d296f7..37989a682b 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -232,6 +232,19 @@
#define UI_REMOTE_WIDTH 128
#define UI_REMOTE_HEIGHT 96
+#elif defined(IAUDIO_M3)
+#define UI_TITLE "iAudio M3"
+#define UI_WIDTH 397 /* width of GUI window */
+#define UI_HEIGHT 501 /* height of GUI window */
+#define UI_LCD_POSX 92 /* x position of lcd */
+#define UI_LCD_POSY 348 /* y position of lcd */
+#define UI_LCD_BGCOLOR 90, 145, 90 /* bkgnd color of LCD (no bklight) */
+#define UI_LCD_BGCOLORLIGHT 130, 180, 250 /* bkgnd color of LCD (bklight) */
+#define UI_LCD_FGCOLOR 0, 0, 0 /* foreground color of LCD (no backlight) */
+#define UI_LCD_FGCOLORLIGHT 0, 0, 0 /* foreground color of LCD (backlight) */
+#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
+#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
+
#elif defined(GIGABEAT_F)
#define UI_TITLE "Toshiba Gigabeat"
#define UI_WIDTH 401 /* width of GUI window */