diff options
| author | Barry Wardell <rockbox@barrywardell.net> | 2006-10-13 20:23:53 +0000 |
|---|---|---|
| committer | Barry Wardell <rockbox@barrywardell.net> | 2006-10-13 20:23:53 +0000 |
| commit | 3beaad8d0645488fa5b9a2f4983caae585f81312 (patch) | |
| tree | b047a23e4f320bcc0f61ad2a6cceb5322f0ac80f /apps/plugins | |
| parent | 2239bbab047d294cce7b9f44db19a77a3ab4dc0d (diff) | |
| download | rockbox-3beaad8d0645488fa5b9a2f4983caae585f81312.zip rockbox-3beaad8d0645488fa5b9a2f4983caae585f81312.tar.gz rockbox-3beaad8d0645488fa5b9a2f4983caae585f81312.tar.bz2 rockbox-3beaad8d0645488fa5b9a2f4983caae585f81312.tar.xz | |
Adjust Pacbox for H10 5GB screen (128x128).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11216 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
| -rw-r--r-- | apps/plugins/pacbox/SOURCES | 2 | ||||
| -rw-r--r-- | apps/plugins/pacbox/pacbox.h | 11 | ||||
| -rw-r--r-- | 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 188fc53..cedcda1 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 d0b0bce..f681608 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 5d126ef..e63ef4d 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) |