summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/pacbox/SOURCES2
-rw-r--r--apps/plugins/pacbox/pacbox.h11
-rw-r--r--apps/plugins/pacbox/pacbox_lcd.c17
3 files changed, 28 insertions, 2 deletions
diff --git a/apps/plugins/pacbox/SOURCES b/apps/plugins/pacbox/SOURCES
index 188fc53c1f..cedcda1363 100644
--- a/apps/plugins/pacbox/SOURCES
+++ b/apps/plugins/pacbox/SOURCES
@@ -1,4 +1,3 @@
-#ifndef IRIVER_H10_5GB
arcade.c
pacbox.c
hardware.c
@@ -11,4 +10,3 @@ pacbox_lcd.c
#if defined(CPU_COLDFIRE)
pacbox_cf.S
#endif
-#endif
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h
index d0b0bce303..f6816082ef 100644
--- a/apps/plugins/pacbox/pacbox.h
+++ b/apps/plugins/pacbox/pacbox.h
@@ -89,10 +89,18 @@
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
+#if defined(IRIVER_H10_5GB)
+#define PACMAN_UP BUTTON_SCROLL_UP
+#define PACMAN_DOWN BUTTON_SCROLL_DOWN
+#define PACMAN_LEFT BUTTON_LEFT
+#define PACMAN_RIGHT BUTTON_RIGHT
+#else
#define PACMAN_UP BUTTON_RIGHT
#define PACMAN_DOWN BUTTON_LEFT
#define PACMAN_LEFT BUTTON_SCROLL_UP
#define PACMAN_RIGHT BUTTON_SCROLL_DOWN
+#endif
+
#define PACMAN_1UP BUTTON_REW
#define PACMAN_2UP BUTTON_POWER
#define PACMAN_COIN BUTTON_FF
@@ -112,6 +120,9 @@
#elif (LCD_WIDTH >= 144)
#define XOFS ((LCD_WIDTH-288/2)/2)
#define YOFS ((LCD_HEIGHT-224/2)/2)
+#elif (LCD_WIDTH >= 128)
+#define XOFS ((LCD_WIDTH-224/2)/2)
+#define YCLIP ((288-2*LCD_HEIGHT)/2)
#endif
/* How many video frames (out of a possible 60) we display each second.
diff --git a/apps/plugins/pacbox/pacbox_lcd.c b/apps/plugins/pacbox/pacbox_lcd.c
index 5d126efcf1..e63ef4dd31 100644
--- a/apps/plugins/pacbox/pacbox_lcd.c
+++ b/apps/plugins/pacbox/pacbox_lcd.c
@@ -86,6 +86,23 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
}
vbuf+=ScreenWidth;
}
+#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128)
+ /* 0.5 scaling - display every other pixel = 112x144, crop to 112x128 */
+ (void)next_dst;
+ dst=&lcd_framebuffer[XOFS];
+
+ /* Skip first 16 lines */
+ vbuf+=ScreenWidth*YCLIP;
+
+ /* Show regular screen */
+ for (y=0;y<(ScreenHeight/2-YCLIP);y++) {
+ for (x=0;x<ScreenWidth/2;x++) {
+ *(dst++) = palette[*(vbuf)];
+ vbuf+=2;
+ }
+ dst += XOFS*2;
+ vbuf+=ScreenWidth;
+ }
#endif
#else /* Greyscale LCDs */
#if (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112)