1
0
Fork 0
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:
Jens Arnold 2008-03-22 14:20:04 +00:00
parent 95d8590659
commit 106ac75ad8
17 changed files with 335 additions and 447 deletions

View file

@ -34,7 +34,7 @@ pacbox
/* For all the color targets */
#if defined(HAVE_LCD_COLOR) || \
(LCD_DEPTH == 2) && !defined(ARCHOS_AV300)
(LCD_DEPTH == 2) && !defined(ARCHOS_AV300) && !defined(IAUDIO_M3)
doom
#endif
@ -42,7 +42,9 @@ doom
#if CONFIG_CODEC == SWCODEC
midi
/* beatbox */
#ifndef IAUDIO_M3 /* TODO: no greyscale lib yet */
mpegplayer
#endif
#endif
#endif /* IRIVER_IFP7XX_SERIES */

View file

@ -479,6 +479,10 @@ star_tiles.6x7.mono.bmp
sudoku_start.112x64x1.bmp
sudoku_normal.112x64x1.bmp
sudoku_inverse.112x64x1.bmp
#elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 96) && (LCD_DEPTH >= 2)
sudoku_start.128x96x2.bmp
sudoku_normal.128x96x2.bmp
sudoku_inverse.128x96x2.bmp
#elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110) && (LCD_DEPTH >= 2)
sudoku_start.138x110x2.bmp
sudoku_normal.138x110x2.bmp

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

View file

@ -40,211 +40,6 @@ extern const fb_data chessbox_pieces[];
PLUGIN_HEADER
/* button definitions */
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_MENU
#define CB_DOWN BUTTON_PLAY
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY (BUTTON_SELECT | BUTTON_PLAY)
#define CB_LEVEL (BUTTON_SELECT | BUTTON_RIGHT)
#define CB_MENU (BUTTON_SELECT | BUTTON_MENU)
#define CB_SCROLL_UP (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_REC
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_MODE
#define CB_MENU BUTTON_OFF
#define CB_RC_QUIT BUTTON_RC_STOP
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_EQ
#define CB_MENU BUTTON_MODE
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == RECORDER_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_F1
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_F1
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CB_SELECT_PRE BUTTON_MENU
#define CB_SELECT (BUTTON_MENU|BUTTON_REL)
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY_PRE BUTTON_MENU
#define CB_PLAY (BUTTON_MENU|BUTTON_REPEAT)
#define CB_LEVEL (BUTTON_MENU|BUTTON_OFF)
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == GIGABEAT_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_A
#define CB_LEVEL BUTTON_MENU
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define CB_SELECT BUTTON_REW
#define CB_UP BUTTON_SCROLL_UP
#define CB_DOWN BUTTON_SCROLL_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_FF
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_SCROLL_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == SANSA_E200_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY (BUTTON_SELECT | BUTTON_RIGHT)
#define CB_LEVEL BUTTON_REC
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == SANSA_C200_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_VOL_UP
#define CB_LEVEL BUTTON_REC
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == MROBE500_PAD
#define CB_SELECT BUTTON_RC_MODE
#define CB_UP BUTTON_RC_PLAY
#define CB_DOWN BUTTON_RC_DOWN
#define CB_LEFT BUTTON_RC_REW
#define CB_RIGHT BUTTON_RC_FF
#define CB_PLAY BUTTON_RC_HEART
#define CB_LEVEL BUTTON_RC_VOL_DOWN
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_RC_PLAY|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_RC_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_RC_REW|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RC_FF|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == MROBE100_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_DISPLAY
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#else
#error No keymap defined!
#endif
/* Tile size defined by the assigned bitmap */
#include "chessbox_pieces.h"
#define TILE_WIDTH BMPWIDTH_chessbox_pieces

View file

@ -17,221 +17,8 @@
*
****************************************************************************/
#include "chessbox_pgn.h"
#include "plugin.h"
/* button definitions */
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_MENU
#define CB_DOWN BUTTON_PLAY
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY (BUTTON_SELECT | BUTTON_PLAY)
#define CB_LEVEL (BUTTON_SELECT | BUTTON_RIGHT)
#define CB_RESTART (BUTTON_SELECT | BUTTON_LEFT)
#define CB_MENU (BUTTON_SELECT | BUTTON_MENU)
#define CB_SCROLL_UP (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_REC
#define CB_RESTART (BUTTON_SELECT | BUTTON_PLAY)
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_MODE
#define CB_RESTART BUTTON_REC
#define CB_MENU BUTTON_OFF
#define CB_RC_QUIT BUTTON_RC_STOP
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_EQ
#define CB_MENU BUTTON_MODE
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == RECORDER_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_F1
#define CB_RESTART BUTTON_F3
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_F1
#define CB_RESTART BUTTON_F3
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CB_SELECT_PRE BUTTON_MENU
#define CB_SELECT (BUTTON_MENU|BUTTON_REL)
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY_PRE BUTTON_MENU
#define CB_PLAY (BUTTON_MENU|BUTTON_REPEAT)
#define CB_LEVEL (BUTTON_MENU|BUTTON_OFF)
#define CB_RESTART (BUTTON_MENU|BUTTON_LEFT)
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == GIGABEAT_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_A
#define CB_LEVEL BUTTON_MENU
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define CB_SELECT BUTTON_REW
#define CB_UP BUTTON_SCROLL_UP
#define CB_DOWN BUTTON_SCROLL_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_FF
#define CB_RESTART (BUTTON_REW | BUTTON_PLAY)
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == SANSA_E200_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY (BUTTON_SELECT | BUTTON_RIGHT)
#define CB_LEVEL BUTTON_REC
#define CB_RESTART (BUTTON_SELECT | BUTTON_REPEAT)
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_SCROLL_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == SANSA_C200_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_VOL_UP
#define CB_LEVEL BUTTON_REC
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == MROBE500_PAD
#define CB_SELECT BUTTON_RC_MODE
#define CB_UP BUTTON_RC_PLAY
#define CB_DOWN BUTTON_RC_DOWN
#define CB_LEFT BUTTON_RC_REW
#define CB_RIGHT BUTTON_RC_FF
#define CB_PLAY BUTTON_RC_HEART
#define CB_LEVEL BUTTON_RC_VOL_DOWN
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_RC_PLAY|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_RC_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_RC_REW|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RC_FF|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == MROBE100_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_DISPLAY
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#else
#error No keymap defined!
#endif
#include "chessbox_pgn.h"
#define PGN_FILE PLUGIN_GAMES_DIR "/chessbox.pgn"
#define LOG_FILE PLUGIN_GAMES_DIR "/chessbox.log"

View file

@ -20,6 +20,237 @@
#include "plugin.h"
#include "gnuchess.h"
/* button definitions */
#if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD) || \
(CONFIG_KEYPAD == IPOD_1G2G_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_MENU
#define CB_DOWN BUTTON_PLAY
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY (BUTTON_SELECT | BUTTON_PLAY)
#define CB_LEVEL (BUTTON_SELECT | BUTTON_RIGHT)
#define CB_RESTART (BUTTON_SELECT | BUTTON_LEFT)
#define CB_MENU (BUTTON_SELECT | BUTTON_MENU)
#define CB_SCROLL_UP (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_REC
#define CB_RESTART (BUTTON_SELECT | BUTTON_PLAY)
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_MODE
#define CB_RESTART BUTTON_REC
#define CB_MENU BUTTON_OFF
#define CB_RC_QUIT BUTTON_RC_STOP
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_EQ
#define CB_MENU BUTTON_MODE
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == RECORDER_PAD
#define CB_SELECT BUTTON_PLAY
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_F1
#define CB_RESTART BUTTON_F3
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == ARCHOS_AV300_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_ON
#define CB_LEVEL BUTTON_F1
#define CB_RESTART BUTTON_F3
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == ONDIO_PAD
#define CB_SELECT_PRE BUTTON_MENU
#define CB_SELECT (BUTTON_MENU|BUTTON_REL)
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY_PRE BUTTON_MENU
#define CB_PLAY (BUTTON_MENU|BUTTON_REPEAT)
#define CB_LEVEL (BUTTON_MENU|BUTTON_OFF)
#define CB_RESTART (BUTTON_MENU|BUTTON_LEFT)
#define CB_MENU BUTTON_OFF
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == GIGABEAT_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_A
#define CB_LEVEL BUTTON_MENU
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_H10_PAD
#define CB_SELECT BUTTON_REW
#define CB_UP BUTTON_SCROLL_UP
#define CB_DOWN BUTTON_SCROLL_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_FF
#define CB_RESTART (BUTTON_REW | BUTTON_PLAY)
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_SCROLL_BACK|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_FWD|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == SANSA_E200_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY (BUTTON_SELECT | BUTTON_RIGHT)
#define CB_LEVEL BUTTON_REC
#define CB_RESTART (BUTTON_SELECT | BUTTON_REPEAT)
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_SCROLL_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_SCROLL_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == SANSA_C200_PAD
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_VOL_UP
#define CB_LEVEL BUTTON_REC
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == MROBE500_PAD
#define CB_SELECT BUTTON_RC_MODE
#define CB_UP BUTTON_RC_PLAY
#define CB_DOWN BUTTON_RC_DOWN
#define CB_LEFT BUTTON_RC_REW
#define CB_RIGHT BUTTON_RC_FF
#define CB_PLAY BUTTON_RC_HEART
#define CB_LEVEL BUTTON_RC_VOL_DOWN
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_RC_PLAY|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_RC_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_RC_REW|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RC_FF|BUTTON_REPEAT)
#elif (CONFIG_KEYPAD == MROBE100_PAD)
#define CB_SELECT BUTTON_SELECT
#define CB_UP BUTTON_UP
#define CB_DOWN BUTTON_DOWN
#define CB_LEFT BUTTON_LEFT
#define CB_RIGHT BUTTON_RIGHT
#define CB_PLAY BUTTON_PLAY
#define CB_LEVEL BUTTON_DISPLAY
#define CB_MENU BUTTON_POWER
#define CB_SCROLL_UP (BUTTON_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
#define CB_SELECT BUTTON_RC_PLAY
#define CB_UP BUTTON_RC_VOL_UP
#define CB_DOWN BUTTON_RC_VOL_DOWN
#define CB_LEFT BUTTON_RC_REW
#define CB_RIGHT BUTTON_RC_FF
#define CB_PLAY BUTTON_RC_MODE
#define CB_LEVEL BUTTON_RC_MENU
#define CB_RESTART (BUTTON_RC_PLAY|BUTTON_REPEAT)
#define CB_MENU BUTTON_RC_REC
#define CB_SCROLL_UP (BUTTON_RC_VOL_UP|BUTTON_REPEAT)
#define CB_SCROLL_DOWN (BUTTON_RC_VOL_DOWN|BUTTON_REPEAT)
#define CB_SCROLL_LEFT (BUTTON_RC_REW|BUTTON_REPEAT)
#define CB_SCROLL_RIGHT (BUTTON_RC_FF|BUTTON_REPEAT)
#define CB_RC_QUIT BUTTON_REC
#else
#error No keymap defined!
#endif
/* structure to represent the plies */
struct pgn_ply_node {
unsigned short player;

View file

@ -126,6 +126,15 @@ PLUGIN_IRAM_DECLARE
#define BTN_PLAY BUTTON_DISPLAY
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
#define BTN_QUIT BUTTON_RC_REC
#define BTN_RIGHT BUTTON_RC_FF
#define BTN_LEFT BUTTON_RC_REW
#define BTN_UP BUTTON_RC_VOL_UP
#define BTN_DOWN BUTTON_RC_VOL_DOWN
#define BTN_PLAY BUTTON_RC_PLAY
#else
#error No keymap defined!
#endif

View file

@ -75,22 +75,19 @@ static struct plugin_api* rb;
#define CELL_HEIGHT 8
#define SMALL_BOARD
#elif (LCD_HEIGHT==110) && (LCD_WIDTH==138)
#elif (LCD_HEIGHT==96) && (LCD_WIDTH==128) \
|| (LCD_HEIGHT==110) && (LCD_WIDTH==138) \
|| (LCD_HEIGHT==128) && (LCD_WIDTH==128)
/* iAudio M3 - 138x110, 8 cells @ 10x10 with 9 border lines */
/* iPod Mini - 138x110, 8 cells @ 10x10 with 9 border lines */
/* Internal dimensions of a cell */
#define CELL_WIDTH 10
#define CELL_HEIGHT 10
#elif (LCD_HEIGHT==128) && (LCD_WIDTH==128)
/* iriver H10 5-6GB - 128x128, 8 cells @ 10x10 with 9 border lines */
/* Internal dimensions of a cell */
#define CELL_WIDTH 10
#define CELL_HEIGHT 10
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) || \
((LCD_HEIGHT==132) && (LCD_WIDTH==176))
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) \
|| ((LCD_HEIGHT==132) && (LCD_WIDTH==176))
/* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */
/* iPod Nano - 176x132, 8 cells @ 12x12 with 9 border lines */

View file

@ -123,6 +123,15 @@
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
#define REVERSI_BUTTON_MENU BUTTON_MENU
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
#define REVERSI_BUTTON_QUIT BUTTON_RC_REC
#define REVERSI_BUTTON_UP BUTTON_RC_VOL_UP
#define REVERSI_BUTTON_DOWN BUTTON_RC_VOL_DOWN
#define REVERSI_BUTTON_LEFT BUTTON_RC_REW
#define REVERSI_BUTTON_RIGHT BUTTON_RC_FF
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_RC_PLAY
#define REVERSI_BUTTON_MENU BUTTON_RC_MENU
#else
#error No keymap defined!
#endif

View file

@ -116,22 +116,24 @@ static const char default_game[9][9] =
#define CELL_HEIGHT 8
#define SMALL_BOARD
#elif (LCD_HEIGHT==110) && (LCD_WIDTH==138)
/* iPod Mini - 138x110, 9 cells @ 10x10 with 14 border lines */
#elif ((LCD_HEIGHT==96) && (LCD_WIDTH==128))
/* iAudio M3, 9 cells @ 9x9 with 14 border lines */
/* Internal dimensions of a cell */
#define CELL_WIDTH 10
#define CELL_HEIGHT 10
#define CELL_WIDTH 9
#define CELL_HEIGHT 9
#elif (LCD_HEIGHT==128) && (LCD_WIDTH==128)
#elif (LCD_HEIGHT==110) && (LCD_WIDTH==138) \
|| (LCD_HEIGHT==128) && (LCD_WIDTH==128)
/* iPod Mini - 138x110, 9 cells @ 10x10 with 14 border lines */
/* iriver H10 5-6GB - 128x128, 9 cells @ 10x10 with 14 border lines */
/* Internal dimensions of a cell */
#define CELL_WIDTH 10
#define CELL_HEIGHT 10
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) || \
((LCD_HEIGHT==132) && (LCD_WIDTH==176))
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) \
|| ((LCD_HEIGHT==132) && (LCD_WIDTH==176))
/* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */
/* iPod Nano - 176x132, 9 cells @ 12x12 with 14 border lines */

View file

@ -160,6 +160,16 @@
#define SUDOKU_BUTTON_MENU BUTTON_MENU
#define SUDOKU_BUTTON_POSSIBLE BUTTON_DISPLAY
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
#define SUDOKU_BUTTON_QUIT BUTTON_RC_REC
#define SUDOKU_BUTTON_UP BUTTON_RC_VOL_UP
#define SUDOKU_BUTTON_DOWN BUTTON_RC_VOL_DOWN
#define SUDOKU_BUTTON_LEFT BUTTON_RC_REW
#define SUDOKU_BUTTON_RIGHT BUTTON_RC_FF
#define SUDOKU_BUTTON_TOGGLE BUTTON_RC_MODE
#define SUDOKU_BUTTON_MENU BUTTON_RC_MENU
#define SUDOKU_BUTTON_POSSIBLE BUTTON_RC_PLAY
#else
#error No keymap defined!
#endif

View file

@ -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!

View file

@ -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

View file

@ -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

View file

@ -5,13 +5,20 @@
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
#define FB_WIDTH ((LCD_WIDTH+3)/4)
unsigned char pixmask[4] ICONST_ATTR = {
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,10 +85,27 @@ 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 */
}
#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... */