diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-03-22 14:20:04 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-22 14:20:04 +0000 |
commit | 106ac75ad8229d4c5f66a846609520d22d9d8f0c (patch) | |
tree | defc6786b833bbef4f589070814eee59a8567ba8 /apps/plugins | |
parent | 95d8590659602080acc7d25f49e7b24b429aa5af (diff) |
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
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/SUBDIRS | 4 | ||||
-rw-r--r-- | apps/plugins/bitmaps/native/SOURCES | 6 | ||||
-rw-r--r-- | apps/plugins/bitmaps/native/sudoku_inverse.128x96x2.bmp | bin | 0 -> 424 bytes | |||
-rw-r--r-- | apps/plugins/bitmaps/native/sudoku_normal.128x96x2.bmp | bin | 0 -> 424 bytes | |||
-rw-r--r-- | apps/plugins/bitmaps/native/sudoku_start.128x96x2.bmp | bin | 0 -> 840 bytes | |||
-rw-r--r-- | apps/plugins/chessbox/chessbox.c | 205 | ||||
-rw-r--r-- | apps/plugins/chessbox/chessbox_pgn.c | 215 | ||||
-rw-r--r-- | apps/plugins/chessbox/chessbox_pgn.h | 231 | ||||
-rw-r--r-- | apps/plugins/midi/midiplay.c | 9 | ||||
-rw-r--r-- | apps/plugins/reversi/reversi-gui.c | 15 | ||||
-rw-r--r-- | apps/plugins/reversi/reversi-gui.h | 9 | ||||
-rw-r--r-- | apps/plugins/sudoku/sudoku.c | 16 | ||||
-rw-r--r-- | apps/plugins/sudoku/sudoku.h | 10 | ||||
-rw-r--r-- | apps/plugins/zxbox/keymaps.h | 8 | ||||
-rw-r--r-- | apps/plugins/zxbox/zxbox_keyb.c | 9 | ||||
-rw-r--r-- | apps/plugins/zxbox/zxconfig.h | 3 | ||||
-rw-r--r-- | apps/plugins/zxbox/zxvid_4bpp.c | 42 |
17 files changed, 335 insertions, 447 deletions
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index 4f9731f0ba..b82c6ad172 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS @@ -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 */ diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 70071ca8e3..1afc30fc0d 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -475,10 +475,14 @@ star_tiles.6x7.mono.bmp /* Sudoku */ #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_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 diff --git a/apps/plugins/bitmaps/native/sudoku_inverse.128x96x2.bmp b/apps/plugins/bitmaps/native/sudoku_inverse.128x96x2.bmp Binary files differnew file mode 100644 index 0000000000..1745eac95e --- /dev/null +++ b/apps/plugins/bitmaps/native/sudoku_inverse.128x96x2.bmp diff --git a/apps/plugins/bitmaps/native/sudoku_normal.128x96x2.bmp b/apps/plugins/bitmaps/native/sudoku_normal.128x96x2.bmp Binary files differnew file mode 100644 index 0000000000..35fe1c3357 --- /dev/null +++ b/apps/plugins/bitmaps/native/sudoku_normal.128x96x2.bmp diff --git a/apps/plugins/bitmaps/native/sudoku_start.128x96x2.bmp b/apps/plugins/bitmaps/native/sudoku_start.128x96x2.bmp Binary files differnew file mode 100644 index 0000000000..c7c50893ea --- /dev/null +++ b/apps/plugins/bitmaps/native/sudoku_start.128x96x2.bmp diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c index 24198e507a..920def82d5 100644 --- a/apps/plugins/chessbox/chessbox.c +++ b/apps/plugins/chessbox/chessbox.c @@ -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 diff --git a/apps/plugins/chessbox/chessbox_pgn.c b/apps/plugins/chessbox/chessbox_pgn.c index b59d0fc308..b3e71de77f 100644 --- a/apps/plugins/chessbox/chessbox_pgn.c +++ b/apps/plugins/chessbox/chessbox_pgn.c @@ -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" diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h index c4dd5c671f..59760ec7b3 100644 --- a/apps/plugins/chessbox/chessbox_pgn.h +++ b/apps/plugins/chessbox/chessbox_pgn.h @@ -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; diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c index 940fce3a19..c5865beb09 100644 --- a/apps/plugins/midi/midiplay.c +++ b/apps/plugins/midi/midiplay.c @@ -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 diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index 6bfa4ae1af..1995923f4f 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c @@ -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 */ diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index 84552c8fe1..de2286e5df 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h @@ -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 diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 1d548ace6d..553357fc5c 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -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 */ diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h index 78d1b73e63..8c2759796a 100644 --- a/apps/plugins/sudoku/sudoku.h +++ b/apps/plugins/sudoku/sudoku.h @@ -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 diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h index 9e9e3ed616..19503e1c78 100644 --- a/apps/plugins/zxbox/keymaps.h +++ b/apps/plugins/zxbox/keymaps.h @@ -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! diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c index 2b1d171c11..e3fb92c43d 100644 --- a/apps/plugins/zxbox/zxbox_keyb.c +++ b/apps/plugins/zxbox/zxbox_keyb.c @@ -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 diff --git a/apps/plugins/zxbox/zxconfig.h b/apps/plugins/zxbox/zxconfig.h index f83c091ab9..cdba2626cf 100644 --- a/apps/plugins/zxbox/zxconfig.h +++ b/apps/plugins/zxbox/zxconfig.h @@ -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 diff --git a/apps/plugins/zxbox/zxvid_4bpp.c b/apps/plugins/zxbox/zxvid_4bpp.c index c05e48b8e6..5129d17327 100644 --- a/apps/plugins/zxbox/zxvid_4bpp.c +++ b/apps/plugins/zxbox/zxvid_4bpp.c @@ -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 ); + 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) | ((image[(srcx>>16)]&0x3) << shift ); + 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 +#endif if ( settings.showfps ) { int percent=0; |