forked from len0rd/rockbox
Adjust Pacbox for H10 5GB screen (128x128).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11216 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2239bbab04
commit
3beaad8d06
3 changed files with 28 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
||||||
#ifndef IRIVER_H10_5GB
|
|
||||||
arcade.c
|
arcade.c
|
||||||
pacbox.c
|
pacbox.c
|
||||||
hardware.c
|
hardware.c
|
||||||
|
@ -11,4 +10,3 @@ pacbox_lcd.c
|
||||||
#if defined(CPU_COLDFIRE)
|
#if defined(CPU_COLDFIRE)
|
||||||
pacbox_cf.S
|
pacbox_cf.S
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
|
@ -89,10 +89,18 @@
|
||||||
|
|
||||||
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
|
#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_UP BUTTON_RIGHT
|
||||||
#define PACMAN_DOWN BUTTON_LEFT
|
#define PACMAN_DOWN BUTTON_LEFT
|
||||||
#define PACMAN_LEFT BUTTON_SCROLL_UP
|
#define PACMAN_LEFT BUTTON_SCROLL_UP
|
||||||
#define PACMAN_RIGHT BUTTON_SCROLL_DOWN
|
#define PACMAN_RIGHT BUTTON_SCROLL_DOWN
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PACMAN_1UP BUTTON_REW
|
#define PACMAN_1UP BUTTON_REW
|
||||||
#define PACMAN_2UP BUTTON_POWER
|
#define PACMAN_2UP BUTTON_POWER
|
||||||
#define PACMAN_COIN BUTTON_FF
|
#define PACMAN_COIN BUTTON_FF
|
||||||
|
@ -112,6 +120,9 @@
|
||||||
#elif (LCD_WIDTH >= 144)
|
#elif (LCD_WIDTH >= 144)
|
||||||
#define XOFS ((LCD_WIDTH-288/2)/2)
|
#define XOFS ((LCD_WIDTH-288/2)/2)
|
||||||
#define YOFS ((LCD_HEIGHT-224/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
|
#endif
|
||||||
|
|
||||||
/* How many video frames (out of a possible 60) we display each second.
|
/* How many video frames (out of a possible 60) we display each second.
|
||||||
|
|
|
@ -86,6 +86,23 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
|
||||||
}
|
}
|
||||||
vbuf+=ScreenWidth;
|
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
|
#endif
|
||||||
#else /* Greyscale LCDs */
|
#else /* Greyscale LCDs */
|
||||||
#if (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112)
|
#if (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue