zenxfi: add simulator keymap and bitmap

Change-Id: Ic82ad39234d3056c3cc06d9f8f0ba6f28892e15f
diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h
index 7289329..f3ef41e 100644
--- a/firmware/target/hosted/sdl/sim-ui-defines.h
+++ b/firmware/target/hosted/sdl/sim-ui-defines.h
@@ -487,6 +487,13 @@
 #define UI_LCD_POSX                 35
 #define UI_LCD_POSY                 36
 
+#elif defined(CREATIVE_ZENXFI)
+#define UI_TITLE                    "Creative ZEN X-Fi"
+#define UI_WIDTH                    510 /* width of GUI window */
+#define UI_HEIGHT                   330 /* height of GUI window */
+#define UI_LCD_POSX                 32
+#define UI_LCD_POSY                 33
+
 #elif defined(SIMULATOR)
 #error no UI defines
 #endif
diff --git a/uisimulator/bitmaps/UI-creativezenxfi.bmp b/uisimulator/bitmaps/UI-creativezenxfi.bmp
new file mode 100644
index 0000000..003378e
--- /dev/null
+++ b/uisimulator/bitmaps/UI-creativezenxfi.bmp
Binary files differ
diff --git a/uisimulator/buttonmap/creative-zen.c b/uisimulator/buttonmap/creative-zen.c
index f19df4e..275de56 100644
--- a/uisimulator/buttonmap/creative-zen.c
+++ b/uisimulator/buttonmap/creative-zen.c
@@ -46,14 +46,20 @@
             new_btn = BUTTON_DOWN;
             break;
         case SDLK_KP9:
+            new_btn = BUTTON_TOPRIGHT;
+            break;
         case SDLK_PAGEUP:
             new_btn = BUTTON_MENU;
             break;
         case SDLK_KP1:
+            new_btn = BUTTON_BOTTOMLEFT;
+            break;
         case SDLK_END:
             new_btn = BUTTON_SHORTCUT;
             break;
         case SDLK_KP3:
+            new_btn = BUTTON_BOTTOMRIGHT;
+            break;
         case SDLK_PAGEDOWN:
             new_btn = BUTTON_PLAYPAUSE;
             break;
@@ -70,6 +76,8 @@
             break;
 #endif
         case SDLK_KP7:
+            new_btn = BUTTON_TOPLEFT;
+            break;
         case SDLK_HOME:
         case SDLK_BACKSPACE:
             new_btn = BUTTON_BACK;
@@ -97,6 +105,23 @@
     { SDLK_PAGEDOWN,    462, 275, 20, "Play" },
     { 0, 0, 0, 0, "None" }
 };
+#elif defined(CREATIVE_ZENXFI)
+struct button_map bm[] = {
+    { SDLK_LEFT,        386, 166, 13, "Left" },
+    { SDLK_RIGHT,       466, 166, 13, "Right" },
+    { SDLK_UP,          426, 126, 13, "Up" },
+    { SDLK_DOWN,        426, 206, 13, "Down" },
+    { SDLK_RETURN,      426, 166, 13, "Select" },
+    { SDLK_KP7,         386, 126, 13, "Top Left" },
+    { SDLK_KP9,         466, 126, 13, "Top Right" },
+    { SDLK_KP3,         466, 166, 13, "Bottom Right" },
+    { SDLK_KP1,         386, 166, 13, "Bottom Left" },
+    { SDLK_HOME,        390,  63, 16, "Back" },
+    { SDLK_PAGEUP,      463,  63, 16, "Menu" },
+    { SDLK_END,         390, 267, 16, "Shortcut" },
+    { SDLK_PAGEDOWN,    463, 267, 16, "Play" },
+    { 0, 0, 0, 0, "None" }
+};
 #else
 #error please define button map
 #endif