forked from len0rd/rockbox
Adapted most multi-source plugins to the iAudio M3 keypad and screen. Doom and mpegplayer are disabled because of the not yet implemented greyscale library, and zxbox used 2-bit greyscale for now. * Slight optimisation for the (currently unused except on M3) 2-bit greyscale code in zxbox. * Simplified button definitions in chessbox.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16744 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
95d8590659
commit
106ac75ad8
17 changed files with 335 additions and 447 deletions
|
@ -94,6 +94,14 @@
|
|||
#define ZX_SELECT BUTTON_RC_MODE
|
||||
#define ZX_MENU (BUTTON_POWER | BUTTON_REL)
|
||||
|
||||
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
||||
#define ZX_UP BUTTON_RC_VOL_UP
|
||||
#define ZX_DOWN BUTTON_RC_VOL_DOWN
|
||||
#define ZX_LEFT BUTTON_RC_REW
|
||||
#define ZX_RIGHT BUTTON_RC_FF
|
||||
#define ZX_SELECT BUTTON_RC_PLAY
|
||||
#define ZX_MENU BUTTON_RC_REC
|
||||
|
||||
#else
|
||||
#error Keymap not defined!
|
||||
|
||||
|
|
|
@ -113,6 +113,15 @@
|
|||
#define KBD_UP BUTTON_UP
|
||||
#define KBD_DOWN BUTTON_DOWN
|
||||
|
||||
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
||||
|
||||
#define KBD_SELECT BUTTON_RC_PLAY
|
||||
#define KBD_ABORT BUTTON_RC_REC
|
||||
#define KBD_LEFT BUTTON_RC_REW
|
||||
#define KBD_RIGHT BUTTON_RC_FF
|
||||
#define KBD_UP BUTTON_RC_VOL_UP
|
||||
#define KBD_DOWN BUTTON_RC_VOL_DOWN
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ extern int intkeys[5];
|
|||
#define SETTINGS_VERSION 2
|
||||
|
||||
/* undef not to use greyscale lib */
|
||||
#if !defined HAVE_LCD_COLOR
|
||||
#if !defined HAVE_LCD_COLOR && !defined(IAUDIO_M3)
|
||||
/* FIXME: change after implementing greyscale lib for M3 */
|
||||
#define USE_GREY
|
||||
#define USE_BUFFERED_GREY
|
||||
#endif
|
||||
|
|
|
@ -5,13 +5,20 @@
|
|||
|
||||
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
|
||||
#define FB_WIDTH ((LCD_WIDTH+3)/4)
|
||||
unsigned char pixmask[4] ICONST_ATTR = {
|
||||
0xC0, 0x30, 0x0C, 0x03
|
||||
};
|
||||
fb_data pixmask[4] ICONST_ATTR = {
|
||||
0xC0, 0x30, 0x0C, 0x03
|
||||
};
|
||||
#elif LCD_PIXELFORMAT == VERTICAL_PACKING
|
||||
unsigned char pixmask[4] ICONST_ATTR = {
|
||||
fb_data pixmask[4] ICONST_ATTR = {
|
||||
0x03, 0x0C, 0x30, 0xC0
|
||||
};
|
||||
#elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED
|
||||
fb_data pixmask[8] ICONST_ATTR = {
|
||||
0x0101, 0x0202, 0x0404, 0x0808, 0x1010, 0x2020, 0x4040, 0x8080
|
||||
};
|
||||
fb_data pixval[4] ICONST_ATTR = {
|
||||
0x0000, 0x0001, 0x0100, 0x0101
|
||||
};
|
||||
#endif
|
||||
|
||||
void init_spect_scr(void)
|
||||
|
@ -63,8 +70,8 @@ void update_screen(void)
|
|||
srcx = 0; /* reset our x counter before each row... */
|
||||
for(x = 0; x < LCD_WIDTH; x++)
|
||||
{
|
||||
mask = pixmask[x & 3];
|
||||
frameb[x >> 2] = (frameb[x >> 2] & ~mask) | ((image[(srcx>>16)]&0x3) << ((3-(x & 3 )) * 2 ));
|
||||
mask = ~pixmask[x & 3];
|
||||
frameb[x >> 2] = (frameb[x >> 2] & mask) | ((image[(srcx>>16)]&0x3) << ((3-(x & 3 )) * 2 ));
|
||||
srcx += X_STEP; /* move through source image */
|
||||
}
|
||||
srcy += Y_STEP; /* move through the source image... */
|
||||
|
@ -78,17 +85,34 @@ void update_screen(void)
|
|||
frameb = rb->lcd_framebuffer + (y/4) * LCD_WIDTH;
|
||||
srcx = 0; /* reset our x counter before each row... */
|
||||
shift = ((y & 3 ) * 2 );
|
||||
mask = pixmask[y & 3];
|
||||
mask = ~pixmask[y & 3];
|
||||
for(x = 0; x < LCD_WIDTH; x++)
|
||||
{
|
||||
frameb[x] = (frameb[x] & ~mask) | ((image[(srcx>>16)]&0x3) << shift );
|
||||
frameb[x] = (frameb[x] & mask) | ((image[(srcx>>16)]&0x3) << shift );
|
||||
srcx += X_STEP; /* move through source image */
|
||||
}
|
||||
srcy += Y_STEP; /* move through the source image... */
|
||||
image += (srcy>>16)*WIDTH; /* and possibly to the next row. */
|
||||
srcy &= 0xffff; /* set up the y-coordinate between 0 and 1 */
|
||||
}
|
||||
#endif
|
||||
#elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED
|
||||
int shift;
|
||||
for(y = 0; y < LCD_HEIGHT; y++)
|
||||
{
|
||||
frameb = rb->lcd_framebuffer + (y/8) * LCD_WIDTH;
|
||||
srcx = 0; /* reset our x counter before each row... */
|
||||
shift = (y & 7);
|
||||
mask = ~pixmask[y & 7];
|
||||
for(x = 0; x < LCD_WIDTH; x++)
|
||||
{
|
||||
frameb[x] = (frameb[x] & mask) | (pixval[image[(srcx>>16)]&0x3] << shift );
|
||||
srcx += X_STEP; /* move through source image */
|
||||
}
|
||||
srcy += Y_STEP; /* move through the source image... */
|
||||
image += (srcy>>16)*WIDTH; /* and possibly to the next row. */
|
||||
srcy &= 0xffff; /* set up the y-coordinate between 0 and 1 */
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( settings.showfps ) {
|
||||
int percent=0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue