summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Dziok <b0hoon@o2.pl>2010-02-01 16:41:03 +0000
committerSzymon Dziok <b0hoon@o2.pl>2010-02-01 16:41:03 +0000
commita09606123f4e8501dd527c48d493853435df2a0d (patch)
tree7ec42424f79a5ad1f6c0841e78bc60b8d7454802
parent9938ea4b793e99026333496eccd7e1eeb4e0cb7e (diff)
downloadrockbox-a09606123f4e8501dd527c48d493853435df2a0d.zip
rockbox-a09606123f4e8501dd527c48d493853435df2a0d.tar.gz
rockbox-a09606123f4e8501dd527c48d493853435df2a0d.tar.bz2
rockbox-a09606123f4e8501dd527c48d493853435df2a0d.tar.xz
Packard Bell Vibe 500: add the simulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24439 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/SOURCES2
-rw-r--r--uisimulator/sdl/UI-vibe500.bmpbin0 -> 421688 bytes
-rw-r--r--uisimulator/sdl/button.c37
-rw-r--r--uisimulator/sdl/uisdl.h7
4 files changed, 45 insertions, 1 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index e60bf63..768ab49 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1555,6 +1555,7 @@ target/arm/s5l8700/yps3/power-yps3.c
#endif /* SAMSUNG_YPS3 */
#ifdef PBELL_VIBE500
+#ifndef SIMULATOR
drivers/synaptics-mep.c
target/arm/ata-as-arm.S
target/arm/ata-pp5020.c
@@ -1568,5 +1569,6 @@ target/arm/pbell/vibe500/backlight-vibe500.c
target/arm/pbell/vibe500/lcd-as-vibe500.S
target/arm/pbell/vibe500/powermgmt-vibe500.c
target/arm/usb-fw-pp502x.c
+#endif /* SIMULATOR */
#endif
diff --git a/uisimulator/sdl/UI-vibe500.bmp b/uisimulator/sdl/UI-vibe500.bmp
new file mode 100644
index 0000000..8c12aa5
--- /dev/null
+++ b/uisimulator/sdl/UI-vibe500.bmp
Binary files differ
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 0f9770d..a102925 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -1248,7 +1248,42 @@ void button_event(int key, bool pressed)
break;
case SDLK_KP_MINUS:
new_btn = BUTTON_VOL_DOWN;
- break;
+ break;
+#elif CONFIG_KEYPAD == PBELL_VIBE500_PAD
+ case SDLK_KP4:
+ case SDLK_LEFT:
+ new_btn = BUTTON_PREV;
+ break;
+ case SDLK_KP6:
+ case SDLK_RIGHT:
+ new_btn = BUTTON_NEXT;
+ break;
+ case SDLK_KP8:
+ case SDLK_UP:
+ new_btn = BUTTON_UP;
+ break;
+ case SDLK_KP2:
+ case SDLK_DOWN:
+ new_btn = BUTTON_DOWN;
+ break;
+ case SDLK_KP7:
+ new_btn = BUTTON_MENU;
+ break;
+ case SDLK_KP9:
+ new_btn = BUTTON_PLAY;
+ break;
+ case SDLK_KP5:
+ new_btn = BUTTON_OK;
+ break;
+ case SDLK_KP_DIVIDE:
+ new_btn = BUTTON_CANCEL;
+ break;
+ case SDLK_KP_PLUS:
+ new_btn = BUTTON_POWER;
+ break;
+ case SDLK_KP_MULTIPLY:
+ new_btn = BUTTON_REC;
+ break;
#else
#error No keymap defined!
#endif /* CONFIG_KEYPAD */
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index 5dfb9c5..58a2f99 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -364,6 +364,13 @@
#define UI_HEIGHT 436 /* height of GUI window */
#define UI_LCD_POSX 148 /* x position of lcd */
#define UI_LCD_POSY 50 /* y position of lcd */
+
+#elif defined(PBELL_VIBE500)
+#define UI_TITLE "Packard Bell Vibe 500"
+#define UI_WIDTH 287 /* width of GUI window */
+#define UI_HEIGHT 488 /* height of GUI window */
+#define UI_LCD_POSX 64 /* x position of lcd */
+#define UI_LCD_POSY 61 /* y position of lcd */
#else
#error no UI defines
#endif