From 3beaad8d0645488fa5b9a2f4983caae585f81312 Mon Sep 17 00:00:00 2001 From: Barry Wardell Date: Fri, 13 Oct 2006 20:23:53 +0000 Subject: Adjust Pacbox for H10 5GB screen (128x128). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11216 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/pacbox/SOURCES | 2 -- apps/plugins/pacbox/pacbox.h | 11 +++++++++++ apps/plugins/pacbox/pacbox_lcd.c | 17 +++++++++++++++++ 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= 144) && (LCD_HEIGHT >= 112) -- cgit