diff options
author | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2016-04-12 17:20:04 +0200 |
---|---|---|
committer | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2018-04-03 00:21:40 +0200 |
commit | fb3f7651fd68bf3b8c7e4dbd62dbb2b3505f929a (patch) | |
tree | d09a0cd7828395d70962b5ef18ba7b5a8d71afc2 | |
parent | 96335a7eb2e9cf1e452feac0c8ae0c489197500f (diff) | |
download | rockbox-fb3f7651fd68bf3b8c7e4dbd62dbb2b3505f929a.tar.gz rockbox-fb3f7651fd68bf3b8c7e4dbd62dbb2b3505f929a.zip |
pacbox for small screens, up to 75x96
Change-Id: I6e9adf2f6923f4d0078a54e9857fc8eacef259a6
-rw-r--r-- | apps/plugins/SUBDIRS | 3 | ||||
-rw-r--r-- | apps/plugins/pacbox/pacbox.h | 23 | ||||
-rw-r--r-- | apps/plugins/pacbox/pacbox_lcd.c | 39 | ||||
-rw-r--r-- | manual/plugins/images/ss-pacbox-128x96x16.png | bin | 0 -> 1631 bytes | |||
-rw-r--r-- | manual/plugins/images/ss-pacbox-96x96x16.png | bin | 0 -> 1226 bytes | |||
-rw-r--r-- | manual/plugins/main.tex | 2 |
6 files changed, 65 insertions, 2 deletions
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 07c435123c..055db43b48 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -65,7 +65,8 @@ zxbox #endif /* HAVE_LCD_BITMAP */ /* For all big enough colour screens, iriver H1x0 and iAudio M5 */ -#if defined(HAVE_LCD_COLOR) && LCD_HEIGHT > 96\ +#if defined(HAVE_LCD_COLOR) && ( (LCD_HEIGHT >= 90 && LCD_WIDTH >=116) \ + || (LCD_HEIGHT >= 96 && LCD_WIDTH >=75) ) \ || defined(IRIVER_H100_SERIES) || defined(IAUDIO_M5) pacbox #endif diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h index 77a107bec4..58838c7be3 100644 --- a/apps/plugins/pacbox/pacbox.h +++ b/apps/plugins/pacbox/pacbox.h @@ -123,6 +123,17 @@ #define PACMAN_COIN (BUTTON_SELECT | BUTTON_DOWN) #define PACMAN_MENU BUTTON_HOME +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD + +#define PACMAN_UP BUTTON_UP +#define PACMAN_DOWN BUTTON_DOWN +#define PACMAN_LEFT BUTTON_LEFT +#define PACMAN_RIGHT BUTTON_RIGHT +#define PACMAN_1UP BUTTON_SELECT +#define PACMAN_COIN_PRE BUTTON_SELECT +#define PACMAN_COIN (BUTTON_SELECT | BUTTON_DOWN) +#define PACMAN_MENU BUTTON_HOME + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #if defined(IRIVER_H10_5GB) @@ -418,6 +429,18 @@ #define YOFS ((LCD_HEIGHT-288/2)/2) #endif +#elif (LCD_WIDTH >= 116) && (LCD_HEIGHT >= 90) +#define LCD_SCALE 40 +#define LCD_ROTATE 1 +#define XOFS ((LCD_HEIGHT-224*2/5)/2) +#define YOFS ((LCD_WIDTH-288*2/5)/2) + +#elif (LCD_WIDTH >= 75) && (LCD_HEIGHT >= 96) +#define LCD_SCALE 33 +#define LCD_ROTATE 0 +#define XOFS ((LCD_HEIGHT-224/3)/2) +#define YOFS ((LCD_WIDTH-288/3)/2) + #else #error "unsupported screen resolution" #endif diff --git a/apps/plugins/pacbox/pacbox_lcd.c b/apps/plugins/pacbox/pacbox_lcd.c index 6bb51a038d..bf4aa9f028 100644 --- a/apps/plugins/pacbox/pacbox_lcd.c +++ b/apps/plugins/pacbox/pacbox_lcd.c @@ -124,7 +124,46 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf) dst += XOFS*2; vbuf+=ScreenWidth; } +#elif LCD_SCALE==40 && LCD_ROTATE==1 + /* 0.4 scaling - rotated = 116x90 */ + /* show 2 out of 5 pixels: 1st and 3rd anf 4th merged together */ + next_dst=&lcd_framebuffer[XOFS*LCD_WIDTH+YOFS+ScreenHeight*2/5-1]; + for (y=(ScreenHeight*2/5)-1;y >= 0; y--) { + dst = (next_dst--); + for (x=0;x<ScreenWidth*2/5;x++) { + *dst = palette[*(vbuf)] | palette[*(vbuf+ScreenWidth+1)]; + /* every odd row number merge 2 source lines as one */ + if (y & 1) *dst |= palette[*(vbuf+ScreenWidth*2)]; + vbuf+=2; + dst+=LCD_WIDTH; + + x++; + /* every odd column merge 2 colums together */ + *dst = palette[*(vbuf)] | palette[*(vbuf+1)] |palette[*(vbuf+ScreenWidth+2)]; + if (y & 1) *dst |= palette[*(vbuf+ScreenWidth*2+1)]; + vbuf+=3; + dst+=LCD_WIDTH; + } + vbuf+=ScreenWidth-1; + if (y & 1) vbuf+=ScreenWidth; + } +#elif LCD_SCALE==33 && LCD_ROTATE==0 + /* 1/3 scaling - display every third pixel - 75x96 */ + (void)next_dst; + dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS]; + + for (y=0;y<ScreenHeight/3;y++) { + for (x=0;x<ScreenWidth/3;x++) { + *(dst++) = palette[*(vbuf)] + | palette[*(vbuf+ScreenWidth+1)] + | palette[*(vbuf+ScreenWidth*2+2)]; + vbuf+=3; + } + dst += XOFS*2; + vbuf+=ScreenWidth*2+2; + } #endif + #else /* Greyscale LCDs */ #if LCD_SCALE==50 && LCD_ROTATE==1 #if LCD_PIXELFORMAT == VERTICAL_PACKING diff --git a/manual/plugins/images/ss-pacbox-128x96x16.png b/manual/plugins/images/ss-pacbox-128x96x16.png Binary files differnew file mode 100644 index 0000000000..7940aea453 --- /dev/null +++ b/manual/plugins/images/ss-pacbox-128x96x16.png diff --git a/manual/plugins/images/ss-pacbox-96x96x16.png b/manual/plugins/images/ss-pacbox-96x96x16.png Binary files differnew file mode 100644 index 0000000000..782f87eeee --- /dev/null +++ b/manual/plugins/images/ss-pacbox-96x96x16.png diff --git a/manual/plugins/main.tex b/manual/plugins/main.tex index 60dce0457c..83a37eda9a 100644 --- a/manual/plugins/main.tex +++ b/manual/plugins/main.tex @@ -68,7 +68,7 @@ text files% \opt{archosplayer}{\input{plugins/nim.tex}} -\opt{iriverh100,iaudiom5,lcd_color}{\nopt{c200,c200v2,clipzip,samsungyh820}{\input{plugins/pacbox.tex}}} +\opt{iriverh100,iaudiom5,lcd_color}{\nopt{c200,c200v2}{\input{plugins/pacbox.tex}}} \opt{lcd_bitmap}{\input{plugins/pegbox.tex}} |