summaryrefslogtreecommitdiff
path: root/apps/plugins/pacbox
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2006-10-13 20:23:53 +0000
committerBarry Wardell <rockbox@barrywardell.net>2006-10-13 20:23:53 +0000
commit3beaad8d0645488fa5b9a2f4983caae585f81312 (patch)
treeb047a23e4f320bcc0f61ad2a6cceb5322f0ac80f /apps/plugins/pacbox
parent2239bbab047d294cce7b9f44db19a77a3ab4dc0d (diff)
downloadrockbox-3beaad8d0645488fa5b9a2f4983caae585f81312.tar.gz
rockbox-3beaad8d0645488fa5b9a2f4983caae585f81312.zip
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/pacbox')
-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 @@
1#ifndef IRIVER_H10_5GB
2arcade.c 1arcade.c
3pacbox.c 2pacbox.c
4hardware.c 3hardware.c
@@ -11,4 +10,3 @@ pacbox_lcd.c
11#if defined(CPU_COLDFIRE) 10#if defined(CPU_COLDFIRE)
12pacbox_cf.S 11pacbox_cf.S
13#endif 12#endif
14#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 @@
89 89
90#elif CONFIG_KEYPAD == IRIVER_H10_PAD 90#elif CONFIG_KEYPAD == IRIVER_H10_PAD
91 91
92#if defined(IRIVER_H10_5GB)
93#define PACMAN_UP BUTTON_SCROLL_UP
94#define PACMAN_DOWN BUTTON_SCROLL_DOWN
95#define PACMAN_LEFT BUTTON_LEFT
96#define PACMAN_RIGHT BUTTON_RIGHT
97#else
92#define PACMAN_UP BUTTON_RIGHT 98#define PACMAN_UP BUTTON_RIGHT
93#define PACMAN_DOWN BUTTON_LEFT 99#define PACMAN_DOWN BUTTON_LEFT
94#define PACMAN_LEFT BUTTON_SCROLL_UP 100#define PACMAN_LEFT BUTTON_SCROLL_UP
95#define PACMAN_RIGHT BUTTON_SCROLL_DOWN 101#define PACMAN_RIGHT BUTTON_SCROLL_DOWN
102#endif
103
96#define PACMAN_1UP BUTTON_REW 104#define PACMAN_1UP BUTTON_REW
97#define PACMAN_2UP BUTTON_POWER 105#define PACMAN_2UP BUTTON_POWER
98#define PACMAN_COIN BUTTON_FF 106#define PACMAN_COIN BUTTON_FF
@@ -112,6 +120,9 @@
112#elif (LCD_WIDTH >= 144) 120#elif (LCD_WIDTH >= 144)
113#define XOFS ((LCD_WIDTH-288/2)/2) 121#define XOFS ((LCD_WIDTH-288/2)/2)
114#define YOFS ((LCD_HEIGHT-224/2)/2) 122#define YOFS ((LCD_HEIGHT-224/2)/2)
123#elif (LCD_WIDTH >= 128)
124#define XOFS ((LCD_WIDTH-224/2)/2)
125#define YCLIP ((288-2*LCD_HEIGHT)/2)
115#endif 126#endif
116 127
117/* How many video frames (out of a possible 60) we display each second. 128/* 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)
86 } 86 }
87 vbuf+=ScreenWidth; 87 vbuf+=ScreenWidth;
88 } 88 }
89#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128)
90 /* 0.5 scaling - display every other pixel = 112x144, crop to 112x128 */
91 (void)next_dst;
92 dst=&lcd_framebuffer[XOFS];
93
94 /* Skip first 16 lines */
95 vbuf+=ScreenWidth*YCLIP;
96
97 /* Show regular screen */
98 for (y=0;y<(ScreenHeight/2-YCLIP);y++) {
99 for (x=0;x<ScreenWidth/2;x++) {
100 *(dst++) = palette[*(vbuf)];
101 vbuf+=2;
102 }
103 dst += XOFS*2;
104 vbuf+=ScreenWidth;
105 }
89#endif 106#endif
90#else /* Greyscale LCDs */ 107#else /* Greyscale LCDs */
91#if (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112) 108#if (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112)