mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
|
@ -34,7 +34,7 @@ pacbox
|
||||||
|
|
||||||
/* For all the color targets */
|
/* For all the color targets */
|
||||||
#if defined(HAVE_LCD_COLOR) || \
|
#if defined(HAVE_LCD_COLOR) || \
|
||||||
(LCD_DEPTH == 2) && !defined(ARCHOS_AV300)
|
(LCD_DEPTH == 2) && !defined(ARCHOS_AV300) && !defined(IAUDIO_M3)
|
||||||
doom
|
doom
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -42,7 +42,9 @@ doom
|
||||||
#if CONFIG_CODEC == SWCODEC
|
#if CONFIG_CODEC == SWCODEC
|
||||||
midi
|
midi
|
||||||
/* beatbox */
|
/* beatbox */
|
||||||
|
#ifndef IAUDIO_M3 /* TODO: no greyscale lib yet */
|
||||||
mpegplayer
|
mpegplayer
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* IRIVER_IFP7XX_SERIES */
|
#endif /* IRIVER_IFP7XX_SERIES */
|
||||||
|
|
|
@ -475,10 +475,14 @@ star_tiles.6x7.mono.bmp
|
||||||
|
|
||||||
/* Sudoku */
|
/* Sudoku */
|
||||||
#if LCD_WIDTH >= LCD_HEIGHT
|
#if LCD_WIDTH >= LCD_HEIGHT
|
||||||
#if (LCD_WIDTH == 112) && (LCD_HEIGHT==64) && (LCD_DEPTH == 1)
|
#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) && (LCD_DEPTH == 1)
|
||||||
sudoku_start.112x64x1.bmp
|
sudoku_start.112x64x1.bmp
|
||||||
sudoku_normal.112x64x1.bmp
|
sudoku_normal.112x64x1.bmp
|
||||||
sudoku_inverse.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)
|
#elif (LCD_WIDTH == 138) && (LCD_HEIGHT == 110) && (LCD_DEPTH >= 2)
|
||||||
sudoku_start.138x110x2.bmp
|
sudoku_start.138x110x2.bmp
|
||||||
sudoku_normal.138x110x2.bmp
|
sudoku_normal.138x110x2.bmp
|
||||||
|
|
BIN
apps/plugins/bitmaps/native/sudoku_inverse.128x96x2.bmp
Normal file
BIN
apps/plugins/bitmaps/native/sudoku_inverse.128x96x2.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 424 B |
BIN
apps/plugins/bitmaps/native/sudoku_normal.128x96x2.bmp
Normal file
BIN
apps/plugins/bitmaps/native/sudoku_normal.128x96x2.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 424 B |
BIN
apps/plugins/bitmaps/native/sudoku_start.128x96x2.bmp
Normal file
BIN
apps/plugins/bitmaps/native/sudoku_start.128x96x2.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 840 B |
|
@ -40,211 +40,6 @@ extern const fb_data chessbox_pieces[];
|
||||||
|
|
||||||
PLUGIN_HEADER
|
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 */
|
/* Tile size defined by the assigned bitmap */
|
||||||
#include "chessbox_pieces.h"
|
#include "chessbox_pieces.h"
|
||||||
#define TILE_WIDTH BMPWIDTH_chessbox_pieces
|
#define TILE_WIDTH BMPWIDTH_chessbox_pieces
|
||||||
|
|
|
@ -17,221 +17,8 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "chessbox_pgn.h"
|
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
|
#include "chessbox_pgn.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
|
|
||||||
|
|
||||||
#define PGN_FILE PLUGIN_GAMES_DIR "/chessbox.pgn"
|
#define PGN_FILE PLUGIN_GAMES_DIR "/chessbox.pgn"
|
||||||
#define LOG_FILE PLUGIN_GAMES_DIR "/chessbox.log"
|
#define LOG_FILE PLUGIN_GAMES_DIR "/chessbox.log"
|
||||||
|
|
|
@ -20,6 +20,237 @@
|
||||||
#include "plugin.h"
|
#include "plugin.h"
|
||||||
#include "gnuchess.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 */
|
/* structure to represent the plies */
|
||||||
struct pgn_ply_node {
|
struct pgn_ply_node {
|
||||||
unsigned short player;
|
unsigned short player;
|
||||||
|
|
|
@ -126,6 +126,15 @@ PLUGIN_IRAM_DECLARE
|
||||||
#define BTN_PLAY BUTTON_DISPLAY
|
#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
|
#else
|
||||||
#error No keymap defined!
|
#error No keymap defined!
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -75,22 +75,19 @@ static struct plugin_api* rb;
|
||||||
#define CELL_HEIGHT 8
|
#define CELL_HEIGHT 8
|
||||||
#define SMALL_BOARD
|
#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 */
|
/* 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 */
|
/* iriver H10 5-6GB - 128x128, 8 cells @ 10x10 with 9 border lines */
|
||||||
|
|
||||||
/* Internal dimensions of a cell */
|
/* Internal dimensions of a cell */
|
||||||
#define CELL_WIDTH 10
|
#define CELL_WIDTH 10
|
||||||
#define CELL_HEIGHT 10
|
#define CELL_HEIGHT 10
|
||||||
|
|
||||||
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) || \
|
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) \
|
||||||
((LCD_HEIGHT==132) && (LCD_WIDTH==176))
|
|| ((LCD_HEIGHT==132) && (LCD_WIDTH==176))
|
||||||
/* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */
|
/* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */
|
||||||
/* iPod Nano - 176x132, 8 cells @ 12x12 with 9 border lines */
|
/* iPod Nano - 176x132, 8 cells @ 12x12 with 9 border lines */
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,15 @@
|
||||||
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
|
#define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT
|
||||||
#define REVERSI_BUTTON_MENU BUTTON_MENU
|
#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
|
#else
|
||||||
#error No keymap defined!
|
#error No keymap defined!
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -116,22 +116,24 @@ static const char default_game[9][9] =
|
||||||
#define CELL_HEIGHT 8
|
#define CELL_HEIGHT 8
|
||||||
#define SMALL_BOARD
|
#define SMALL_BOARD
|
||||||
|
|
||||||
#elif (LCD_HEIGHT==110) && (LCD_WIDTH==138)
|
#elif ((LCD_HEIGHT==96) && (LCD_WIDTH==128))
|
||||||
/* iPod Mini - 138x110, 9 cells @ 10x10 with 14 border lines */
|
/* iAudio M3, 9 cells @ 9x9 with 14 border lines */
|
||||||
|
|
||||||
/* Internal dimensions of a cell */
|
/* Internal dimensions of a cell */
|
||||||
#define CELL_WIDTH 10
|
#define CELL_WIDTH 9
|
||||||
#define CELL_HEIGHT 10
|
#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 */
|
/* iriver H10 5-6GB - 128x128, 9 cells @ 10x10 with 14 border lines */
|
||||||
|
|
||||||
/* Internal dimensions of a cell */
|
/* Internal dimensions of a cell */
|
||||||
#define CELL_WIDTH 10
|
#define CELL_WIDTH 10
|
||||||
#define CELL_HEIGHT 10
|
#define CELL_HEIGHT 10
|
||||||
|
|
||||||
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) || \
|
#elif ((LCD_HEIGHT==128) && (LCD_WIDTH==160)) \
|
||||||
((LCD_HEIGHT==132) && (LCD_WIDTH==176))
|
|| ((LCD_HEIGHT==132) && (LCD_WIDTH==176))
|
||||||
/* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */
|
/* iAudio X5, Iriver H1x0, iPod G3, G4 - 160x128; */
|
||||||
/* iPod Nano - 176x132, 9 cells @ 12x12 with 14 border lines */
|
/* iPod Nano - 176x132, 9 cells @ 12x12 with 14 border lines */
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,16 @@
|
||||||
#define SUDOKU_BUTTON_MENU BUTTON_MENU
|
#define SUDOKU_BUTTON_MENU BUTTON_MENU
|
||||||
#define SUDOKU_BUTTON_POSSIBLE BUTTON_DISPLAY
|
#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
|
#else
|
||||||
#error No keymap defined!
|
#error No keymap defined!
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -94,6 +94,14 @@
|
||||||
#define ZX_SELECT BUTTON_RC_MODE
|
#define ZX_SELECT BUTTON_RC_MODE
|
||||||
#define ZX_MENU (BUTTON_POWER | BUTTON_REL)
|
#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
|
#else
|
||||||
#error Keymap not defined!
|
#error Keymap not defined!
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,15 @@
|
||||||
#define KBD_UP BUTTON_UP
|
#define KBD_UP BUTTON_UP
|
||||||
#define KBD_DOWN BUTTON_DOWN
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,8 @@ extern int intkeys[5];
|
||||||
#define SETTINGS_VERSION 2
|
#define SETTINGS_VERSION 2
|
||||||
|
|
||||||
/* undef not to use greyscale lib */
|
/* 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_GREY
|
||||||
#define USE_BUFFERED_GREY
|
#define USE_BUFFERED_GREY
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,13 +5,20 @@
|
||||||
|
|
||||||
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
|
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
|
||||||
#define FB_WIDTH ((LCD_WIDTH+3)/4)
|
#define FB_WIDTH ((LCD_WIDTH+3)/4)
|
||||||
unsigned char pixmask[4] ICONST_ATTR = {
|
fb_data pixmask[4] ICONST_ATTR = {
|
||||||
0xC0, 0x30, 0x0C, 0x03
|
0xC0, 0x30, 0x0C, 0x03
|
||||||
};
|
};
|
||||||
#elif LCD_PIXELFORMAT == VERTICAL_PACKING
|
#elif LCD_PIXELFORMAT == VERTICAL_PACKING
|
||||||
unsigned char pixmask[4] ICONST_ATTR = {
|
fb_data pixmask[4] ICONST_ATTR = {
|
||||||
0x03, 0x0C, 0x30, 0xC0
|
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
|
#endif
|
||||||
|
|
||||||
void init_spect_scr(void)
|
void init_spect_scr(void)
|
||||||
|
@ -63,8 +70,8 @@ void update_screen(void)
|
||||||
srcx = 0; /* reset our x counter before each row... */
|
srcx = 0; /* reset our x counter before each row... */
|
||||||
for(x = 0; x < LCD_WIDTH; x++)
|
for(x = 0; x < LCD_WIDTH; x++)
|
||||||
{
|
{
|
||||||
mask = pixmask[x & 3];
|
mask = ~pixmask[x & 3];
|
||||||
frameb[x >> 2] = (frameb[x >> 2] & ~mask) | ((image[(srcx>>16)]&0x3) << ((3-(x & 3 )) * 2 ));
|
frameb[x >> 2] = (frameb[x >> 2] & mask) | ((image[(srcx>>16)]&0x3) << ((3-(x & 3 )) * 2 ));
|
||||||
srcx += X_STEP; /* move through source image */
|
srcx += X_STEP; /* move through source image */
|
||||||
}
|
}
|
||||||
srcy += Y_STEP; /* move through the 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;
|
frameb = rb->lcd_framebuffer + (y/4) * LCD_WIDTH;
|
||||||
srcx = 0; /* reset our x counter before each row... */
|
srcx = 0; /* reset our x counter before each row... */
|
||||||
shift = ((y & 3 ) * 2 );
|
shift = ((y & 3 ) * 2 );
|
||||||
mask = pixmask[y & 3];
|
mask = ~pixmask[y & 3];
|
||||||
for(x = 0; x < LCD_WIDTH; x++)
|
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 */
|
srcx += X_STEP; /* move through source image */
|
||||||
}
|
}
|
||||||
srcy += Y_STEP; /* move through the source image... */
|
srcy += Y_STEP; /* move through the source image... */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue