diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index fff93b2a3a..a74a1cf328 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -98,7 +98,8 @@ PLUGIN_HEADER #define BATTERY_OFF_TXT "PLAY" #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) #define BATTERY_ON BUTTON_SELECT #define BATTERY_OFF BUTTON_POWER #define BATTERY_ON_TXT "SELECT - start" diff --git a/apps/plugins/bitmaps/mono/SOURCES b/apps/plugins/bitmaps/mono/SOURCES index e0e112d904..a109405bc9 100644 --- a/apps/plugins/bitmaps/mono/SOURCES +++ b/apps/plugins/bitmaps/mono/SOURCES @@ -3,6 +3,8 @@ /* Bubbles */ #if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) bubbles_bubble.112x64x1.bmp +#elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 64) +bubbles_bubble.128x64x1.bmp #elif (LCD_WIDTH == 132) && (LCD_HEIGHT == 80) bubbles_bubble.132x80x16.bmp #elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 96) diff --git a/apps/plugins/bitmaps/mono/bubbles_bubble.128x64x1.bmp b/apps/plugins/bitmaps/mono/bubbles_bubble.128x64x1.bmp new file mode 100644 index 0000000000..f8cab460c0 Binary files /dev/null and b/apps/plugins/bitmaps/mono/bubbles_bubble.128x64x1.bmp differ diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index c248bcb97b..882c3f455a 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -118,6 +118,8 @@ bubbles_emblem.160x128x2.bmp bubbles_emblem.138x110x2.bmp #elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) bubbles_emblem.128x96x2.bmp +#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 64) +bubbles_emblem.112x64x1.bmp /* use the same emblems than Archos */ #elif (LCD_WIDTH >= 112) && (LCD_HEIGHT >= 64) bubbles_emblem.112x64x1.bmp #endif @@ -586,7 +588,7 @@ star_tiles.6x7x1.bmp /* Sudoku */ #if LCD_WIDTH >= LCD_HEIGHT -#if (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) && (LCD_DEPTH == 1) +#if (LCD_WIDTH == 112 || LCD_WIDTH == 128) && (LCD_HEIGHT == 64) && (LCD_DEPTH == 1) sudoku_start.112x64x1.bmp sudoku_normal.112x64x1.bmp sudoku_inverse.112x64x1.bmp diff --git a/apps/plugins/blackjack.c b/apps/plugins/blackjack.c index d120d37646..ef90a8fed4 100644 --- a/apps/plugins/blackjack.c +++ b/apps/plugins/blackjack.c @@ -190,6 +190,21 @@ PLUGIN_HEADER #define BJACK_RIGHT BUTTON_RIGHT #define BJACK_LEFT BUTTON_LEFT +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD +#define BJACK_START BUTTON_SELECT +#define BJACK_QUIT BUTTON_POWER +#define BJACK_MAX BUTTON_VOL_UP +#define BJACK_MIN BUTTON_VOL_DOWN +#define BJACK_HIT BUTTON_SELECT +#define BJACK_STAY BUTTON_RIGHT +#define BJACK_DOUBLEDOWN BUTTON_LEFT +#define BJACK_SCORES BUTTON_HOME +#define BJACK_RESUME BUTTON_DOWN +#define BJACK_UP BUTTON_UP +#define BJACK_DOWN BUTTON_DOWN +#define BJACK_RIGHT BUTTON_RIGHT +#define BJACK_LEFT BUTTON_LEFT + #elif CONFIG_KEYPAD == ELIO_TPJ1022_PAD #define BJACK_START BUTTON_MAIN #define BJACK_QUIT BUTTON_POWER diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c index 5d92ed1c4b..c93d1a082a 100644 --- a/apps/plugins/bounce.c +++ b/apps/plugins/bounce.c @@ -100,7 +100,7 @@ PLUGIN_HEADER #define BOUNCE_QUIT BUTTON_POWER #define BOUNCE_MODE BUTTON_SELECT -#elif CONFIG_KEYPAD == SANSA_C200_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD #define BOUNCE_LEFT BUTTON_LEFT #define BOUNCE_RIGHT BUTTON_RIGHT #define BOUNCE_UP BUTTON_UP diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c index 6d84d2bc85..0df7b32fa6 100644 --- a/apps/plugins/brickmania.c +++ b/apps/plugins/brickmania.c @@ -116,7 +116,7 @@ PLUGIN_HEADER #define SCROLL_BACK(x) ((x) & BUTTON_SCROLL_BACK) -#elif CONFIG_KEYPAD == SANSA_C200_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD #define QUIT BUTTON_POWER #define LEFT BUTTON_LEFT @@ -386,8 +386,8 @@ enum menu_items { #define STRINGPOS_NAVI 44 #define STRINGPOS_FLIP 44 -/* Archos */ -#elif (LCD_WIDTH == 112) && (LCD_HEIGHT == 64) +/* Archos / Sansa Clip / Sansa m200 */ +#elif ((LCD_WIDTH == 112) | (LCD_WIDTH == 128)) && (LCD_HEIGHT == 64) /* The time (in ms) for one iteration through the game loop - decrease this to speed up the game - note that current_tick is (currently) only accurate to 10ms. diff --git a/apps/plugins/bubbles.c b/apps/plugins/bubbles.c index 5415f3b506..a736e74542 100644 --- a/apps/plugins/bubbles.c +++ b/apps/plugins/bubbles.c @@ -167,12 +167,19 @@ PLUGIN_HEADER #define MAX_FPS 30 /* 8x8 bubbles (Sansa C200) */ -#elif (LCD_HEIGHT == 80) && (LCD_WIDTH == 132) +#elif ((LCD_HEIGHT == 80) && (LCD_WIDTH == 132)) #define XOFS 45 #define ROW_HEIGHT 6 #define ROW_INDENT 4 #define MAX_FPS 30 +/* 7x7 bubbles (Sansa Clip/m200) */ +#elif (LCD_HEIGHT == 64 && LCD_WIDTH == 128) +#define XOFS 33 +#define ROW_HEIGHT 5 +#define ROW_INDENT 4 +#define MAX_FPS 30 + /* 8x7 bubbles (Archos recorder, Ondio) */ #elif (LCD_HEIGHT == 64) && (LCD_WIDTH == 112) #define XOFS 33 @@ -2445,7 +2452,7 @@ static int bubbles(struct game_context* bb) { rb->lcd_puts(0, 6, " and show high scores"); rb->lcd_puts(0, 7, "SCROLL to aim"); rb->lcd_puts(0, 8, " and change level"); -#elif CONFIG_KEYPAD == SANSA_C200_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD rb->lcd_puts(0, 2, "PLAY to start/pause"); rb->lcd_puts(0, 3, "SUBMENU to save/resume"); rb->lcd_puts(0, 4, "POWER to exit"); diff --git a/apps/plugins/calculator.c b/apps/plugins/calculator.c index 0a91d94619..0207688c6d 100644 --- a/apps/plugins/calculator.c +++ b/apps/plugins/calculator.c @@ -209,6 +209,17 @@ PLUGIN_HEADER #define CALCULATOR_CALC (BUTTON_SELECT|BUTTON_REPEAT) #define CALCULATOR_CLEAR BUTTON_REC +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#define CALCULATOR_LEFT BUTTON_LEFT +#define CALCULATOR_RIGHT BUTTON_RIGHT +#define CALCULATOR_UP BUTTON_UP +#define CALCULATOR_DOWN BUTTON_DOWN +#define CALCULATOR_QUIT BUTTON_POWER +#define CALCULATOR_INPUT_CALC_PRE BUTTON_SELECT +#define CALCULATOR_INPUT (BUTTON_SELECT|BUTTON_REL) +#define CALCULATOR_CALC (BUTTON_SELECT|BUTTON_REPEAT) +#define CALCULATOR_CLEAR BUTTON_HOME + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define CALCULATOR_LEFT BUTTON_LEFT diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index 05f10ec5d0..794e9f86da 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c @@ -100,7 +100,7 @@ PLUGIN_HEADER #define CALENDAR_NEXT_MONTH BUTTON_DOWN #define CALENDAR_PREV_MONTH BUTTON_UP -#elif CONFIG_KEYPAD == SANSA_C200_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD #define CALENDAR_QUIT BUTTON_POWER #define CALENDAR_SELECT BUTTON_SELECT #define CALENDAR_NEXT_WEEK BUTTON_DOWN diff --git a/apps/plugins/chessbox/chessbox_pgn.h b/apps/plugins/chessbox/chessbox_pgn.h index 2054316770..88d12c787f 100644 --- a/apps/plugins/chessbox/chessbox_pgn.h +++ b/apps/plugins/chessbox/chessbox_pgn.h @@ -201,6 +201,21 @@ #define CB_SCROLL_LEFT (BUTTON_LEFT|BUTTON_REPEAT) #define CB_SCROLL_RIGHT (BUTTON_RIGHT|BUTTON_REPEAT) +#elif CONFIG_KEYPAD == SANSA_CLIP_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_HOME +#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 == SANSA_C200_PAD #define CB_SELECT BUTTON_SELECT #define CB_UP BUTTON_UP diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c index 3acb5f3ccf..3e22676d8b 100644 --- a/apps/plugins/chessclock.c +++ b/apps/plugins/chessclock.c @@ -122,7 +122,8 @@ PLUGIN_HEADER #define CHC_SETTINGS_CANCEL BUTTON_POWER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) #define CHC_QUIT BUTTON_POWER #define CHC_STARTSTOP BUTTON_SELECT #define CHC_RESET BUTTON_DOWN diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c index be624ed711..9ce18b582b 100644 --- a/apps/plugins/chip8.c +++ b/apps/plugins/chip8.c @@ -1030,7 +1030,7 @@ STATIC void chip8 (void) #define CHIP8_KEY6 BUTTON_RIGHT #define CHIP8_KEY8 BUTTON_SCROLL_FWD -#elif CONFIG_KEYPAD == SANSA_C200_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD #define CHIP8_OFF BUTTON_POWER #define CHIP8_KEY2 BUTTON_VOL_UP #define CHIP8_KEY4 BUTTON_LEFT diff --git a/apps/plugins/chopper.c b/apps/plugins/chopper.c index b497b161b5..b2fab7e07a 100644 --- a/apps/plugins/chopper.c +++ b/apps/plugins/chopper.c @@ -67,7 +67,7 @@ Still To do: #define ACTIONTEXT "RIGHT" #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define QUIT BUTTON_POWER #define ACTION BUTTON_SELECT #define ACTIONTEXT "SELECT" diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c index ec1930f547..fde3b7583c 100644 --- a/apps/plugins/cube.c +++ b/apps/plugins/cube.c @@ -140,7 +140,7 @@ PLUGIN_HEADER #define CUBE_PAUSE BUTTON_UP #define CUBE_HIGHSPEED BUTTON_SELECT -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define CUBE_QUIT BUTTON_POWER #define CUBE_NEXT BUTTON_RIGHT #define CUBE_PREV BUTTON_LEFT diff --git a/apps/plugins/dict.c b/apps/plugins/dict.c index 0f75463946..eb1f3df5db 100644 --- a/apps/plugins/dict.c +++ b/apps/plugins/dict.c @@ -118,7 +118,8 @@ long reverse (long N) { #elif CONFIG_KEYPAD == GIGABEAT_PAD #define LP_QUIT BUTTON_POWER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) #define LP_QUIT BUTTON_POWER #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define LP_QUIT BUTTON_POWER diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c index 76d1293527..23f4675fae 100644 --- a/apps/plugins/flipit.c +++ b/apps/plugins/flipit.c @@ -155,6 +155,18 @@ PLUGIN_HEADER #define FLIPIT_STEP_BY_STEP (BUTTON_REC | BUTTON_SELECT) #define FLIPIT_TOGGLE BUTTON_SELECT +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD + +#define FLIPIT_LEFT BUTTON_LEFT +#define FLIPIT_RIGHT BUTTON_RIGHT +#define FLIPIT_UP BUTTON_UP +#define FLIPIT_DOWN BUTTON_DOWN +#define FLIPIT_QUIT BUTTON_POWER +#define FLIPIT_SHUFFLE (BUTTON_HOME | BUTTON_LEFT) +#define FLIPIT_SOLVE (BUTTON_HOME | BUTTON_RIGHT) +#define FLIPIT_STEP_BY_STEP (BUTTON_HOME | BUTTON_SELECT) +#define FLIPIT_TOGGLE BUTTON_SELECT + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define FLIPIT_LEFT BUTTON_LEFT diff --git a/apps/plugins/jewels.c b/apps/plugins/jewels.c index 239827c123..9d6400c9a9 100644 --- a/apps/plugins/jewels.c +++ b/apps/plugins/jewels.c @@ -108,7 +108,7 @@ PLUGIN_HEADER #define JEWELS_SELECT BUTTON_SELECT #define JEWELS_CANCEL BUTTON_POWER -#elif CONFIG_KEYPAD == SANSA_C200_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD #define JEWELS_UP BUTTON_UP #define JEWELS_DOWN BUTTON_DOWN #define JEWELS_LEFT BUTTON_LEFT @@ -1570,7 +1570,7 @@ static int jewels_main(struct game_context* bj) { rb->lcd_puts(0, 10, "Long SELECT to show menu"); rb->lcd_puts(0, 11, "POWER to cancel"); #elif CONFIG_KEYPAD == SANSA_E200_PAD \ - || CONFIG_KEYPAD == SANSA_C200_PAD + || CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD rb->lcd_puts(0, 2, "Swap pairs of jewels to"); rb->lcd_puts(0, 3, "form connected segments"); rb->lcd_puts(0, 4, "of three or more of the"); diff --git a/apps/plugins/jpeg/jpeg.h b/apps/plugins/jpeg/jpeg.h index 1a24948a19..154e2dd68a 100644 --- a/apps/plugins/jpeg/jpeg.h +++ b/apps/plugins/jpeg/jpeg.h @@ -148,6 +148,21 @@ #define JPEG_PREVIOUS BUTTON_VOL_DOWN #define JPEG_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT) +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD +#define JPEG_ZOOM_PRE BUTTON_SELECT +#define JPEG_ZOOM_IN (BUTTON_SELECT | BUTTON_REL) +#define JPEG_ZOOM_OUT (BUTTON_SELECT | BUTTON_REPEAT) +#define JPEG_UP BUTTON_UP +#define JPEG_DOWN BUTTON_DOWN +#define JPEG_LEFT BUTTON_LEFT +#define JPEG_RIGHT BUTTON_RIGHT +#define JPEG_MENU BUTTON_POWER +#define JPEG_SLIDE_SHOW BUTTON_HOME +#define JPEG_NEXT BUTTON_VOL_UP +#define JPEG_NEXT_REPEAT (BUTTON_VOL_UP|BUTTON_REPEAT) +#define JPEG_PREVIOUS BUTTON_VOL_DOWN +#define JPEG_PREVIOUS_REPEAT (BUTTON_VOL_DOWN|BUTTON_REPEAT) + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define JPEG_ZOOM_PRE BUTTON_PLAY #define JPEG_ZOOM_IN (BUTTON_PLAY | BUTTON_REL) diff --git a/apps/plugins/lamp.c b/apps/plugins/lamp.c index bad757c161..e355ee4ce3 100644 --- a/apps/plugins/lamp.c +++ b/apps/plugins/lamp.c @@ -140,8 +140,9 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame #endif /* HAVE_BUTTONLIGHT_BRIGHTNESS */ #ifdef HAVE_LCD_INVERT -#ifdef MROBE_100 +#if defined(MROBE_100) || defined(SANSA_CLIP) /* mrobe-100 has inverted display so invert it for max brightness */ + /* sansa clip has no real backlight so we need to enable all pixels */ rb->lcd_set_invert_display(true); #else rb->lcd_set_invert_display(false); diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index b2e640161d..756a12b289 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c @@ -96,7 +96,7 @@ const unsigned char rockbox16x7[] = { #define LP_INC_Y BUTTON_UP #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define LP_QUIT BUTTON_POWER #define LP_DEC_X BUTTON_LEFT #define LP_INC_X BUTTON_RIGHT diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index 56483bdfd3..a59bace76c 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c @@ -150,6 +150,18 @@ PLUGIN_HEADER #define MANDELBROT_MAXITER_DEC (BUTTON_SELECT | BUTTON_LEFT) #define MANDELBROT_RESET BUTTON_REC +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD +#define MANDELBROT_QUIT BUTTON_POWER +#define MANDELBROT_UP BUTTON_UP +#define MANDELBROT_DOWN BUTTON_DOWN +#define MANDELBROT_LEFT BUTTON_LEFT +#define MANDELBROT_RIGHT BUTTON_RIGHT +#define MANDELBROT_ZOOM_IN BUTTON_VOL_UP +#define MANDELBROT_ZOOM_OUT BUTTON_VOL_DOWN +#define MANDELBROT_MAXITER_INC (BUTTON_SELECT | BUTTON_RIGHT) +#define MANDELBROT_MAXITER_DEC (BUTTON_SELECT | BUTTON_LEFT) +#define MANDELBROT_RESET BUTTON_HOME + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define MANDELBROT_QUIT BUTTON_POWER #define MANDELBROT_UP BUTTON_SCROLL_UP diff --git a/apps/plugins/midi/midiplay.c b/apps/plugins/midi/midiplay.c index 55dc4d6849..c33ff3e725 100644 --- a/apps/plugins/midi/midiplay.c +++ b/apps/plugins/midi/midiplay.c @@ -92,7 +92,7 @@ PLUGIN_IRAM_DECLARE #define BTN_PLAY BUTTON_UP -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define BTN_QUIT BUTTON_POWER #define BTN_RIGHT BUTTON_RIGHT #define BTN_LEFT BUTTON_LEFT diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c index c37c9e8795..683084921b 100644 --- a/apps/plugins/minesweeper.c +++ b/apps/plugins/minesweeper.c @@ -132,7 +132,7 @@ enum minesweeper_status { # define MINESWP_DISCOVER BUTTON_SELECT # define MINESWP_INFO (BUTTON_REC|BUTTON_REPEAT) -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) # define MINESWP_LEFT BUTTON_LEFT # define MINESWP_RIGHT BUTTON_RIGHT # define MINESWP_UP BUTTON_UP @@ -143,7 +143,7 @@ enum minesweeper_status { # define MINESWP_TOGGLE2 BUTTON_VOL_DOWN # define MINESWP_DISCOVER (BUTTON_SELECT | BUTTON_REPEAT) # define MINESWP_DISCOVER2 BUTTON_VOL_UP -# define MINESWP_INFO BUTTON_REC +# define MINESWP_INFO (BUTTON_SELECT | BUTTON_UP) #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) # define MINESWP_LEFT BUTTON_LEFT diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c index 4c8139cb0a..6a27641f84 100644 --- a/apps/plugins/mosaique.c +++ b/apps/plugins/mosaique.c @@ -94,7 +94,7 @@ PLUGIN_HEADER #define MOSAIQUE_RESTART BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define MOSAIQUE_QUIT BUTTON_POWER #define MOSAIQUE_SPEED BUTTON_DOWN #define MOSAIQUE_RESTART BUTTON_SELECT diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c index e04d3d0357..adc557a534 100644 --- a/apps/plugins/mp3_encoder.c +++ b/apps/plugins/mp3_encoder.c @@ -2430,7 +2430,7 @@ void get_mp3_filename(const char *wav_name) #define MP3ENC_DONE BUTTON_POWER #define MP3ENC_SELECT BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define MP3ENC_PREV BUTTON_UP #define MP3ENC_NEXT BUTTON_DOWN #define MP3ENC_DONE BUTTON_POWER diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index 0c66f3ff32..dbb2c1e030 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c @@ -83,7 +83,7 @@ struct mpeg_settings settings; #define MPEG_START_TIME_DOWN BUTTON_DOWN #define MPEG_START_TIME_EXIT BUTTON_POWER -#elif (CONFIG_KEYPAD == SANSA_C200_PAD) +#elif (CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define MPEG_START_TIME_SELECT BUTTON_SELECT #define MPEG_START_TIME_SCROLL_UP BUTTON_VOL_UP #define MPEG_START_TIME_SCROLL_DOWN BUTTON_VOL_DOWN @@ -551,7 +551,7 @@ static uint32_t increment_time(uint32_t val, int32_t amount, uint32_t range) return val; } -#ifdef HAVE_LCD_ENABLE +#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) static void get_start_time_lcd_enable_hook(void) { rb->queue_post(rb->button_queue, LCD_ENABLE_EVENT_0, 0); diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index dc2dc0d1fd..578c783072 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -189,7 +189,7 @@ PLUGIN_IRAM_DECLARE #define MPEG_RW BUTTON_LEFT #define MPEG_FF BUTTON_RIGHT -#elif CONFIG_KEYPAD == SANSA_C200_PAD +#elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_CLIP_PAD #define MPEG_MENU BUTTON_SELECT #define MPEG_STOP BUTTON_POWER #define MPEG_PAUSE BUTTON_UP @@ -598,7 +598,7 @@ static void draw_putsxy_oriented(int x, int y, const char *str) } #endif /* LCD_PORTRAIT */ -#ifdef HAVE_LCD_ENABLE +#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) /* So we can refresh the overlay */ static void wvs_lcd_enable_hook(void) { diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c index 68b4530e40..9c25dc3a64 100644 --- a/apps/plugins/oscilloscope.c +++ b/apps/plugins/oscilloscope.c @@ -122,6 +122,17 @@ PLUGIN_HEADER #define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP #define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#define OSCILLOSCOPE_QUIT BUTTON_POWER +#define OSCILLOSCOPE_DRAWMODE BUTTON_SELECT +#define OSCILLOSCOPE_ADVMODE BUTTON_DOWN +#define OSCILLOSCOPE_ORIENTATION BUTTON_UP +#define OSCILLOSCOPE_PAUSE BUTTON_HOME +#define OSCILLOSCOPE_SPEED_UP BUTTON_RIGHT +#define OSCILLOSCOPE_SPEED_DOWN BUTTON_LEFT +#define OSCILLOSCOPE_VOL_UP BUTTON_VOL_UP +#define OSCILLOSCOPE_VOL_DOWN BUTTON_VOL_DOWN + #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD #define OSCILLOSCOPE_QUIT BUTTON_POWER #define OSCILLOSCOPE_DRAWMODE_PRE BUTTON_SELECT diff --git a/apps/plugins/pegbox.c b/apps/plugins/pegbox.c index b6221448fb..4a98426e77 100644 --- a/apps/plugins/pegbox.c +++ b/apps/plugins/pegbox.c @@ -262,6 +262,23 @@ PLUGIN_HEADER #define LVL_UP_TEXT "VOL+" #define LVL_DOWN_TEXT "VOL-" +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD +#define PEGBOX_SAVE BUTTON_SELECT +#define PEGBOX_QUIT BUTTON_POWER +#define PEGBOX_RESTART BUTTON_HOME +#define PEGBOX_LVL_UP BUTTON_VOL_UP +#define PEGBOX_LVL_DOWN BUTTON_VOL_DOWN +#define PEGBOX_UP BUTTON_UP +#define PEGBOX_DOWN BUTTON_DOWN +#define PEGBOX_RIGHT BUTTON_RIGHT +#define PEGBOX_LEFT BUTTON_LEFT + +#define SAVE_TEXT "SELECT" +#define QUIT_TEXT "POWER" +#define RESTART_TEXT "HOME" +#define LVL_UP_TEXT "VOL+" +#define LVL_DOWN_TEXT "VOL-" + #elif CONFIG_KEYPAD == IAUDIO_M3_PAD #define PEGBOX_SAVE BUTTON_RC_PLAY #define PEGBOX_QUIT BUTTON_RC_REC @@ -342,6 +359,7 @@ PLUGIN_HEADER #define PIECE_WIDTH 50 #define PIECE_HEIGHT 10 #endif + #define BOARD_WIDTH (12*PIECE_WIDTH) #define BOARD_HEIGHT (8*PIECE_HEIGHT) @@ -370,6 +388,10 @@ PLUGIN_HEADER #define TEXT_X 116 #define LEVEL_TEXT_Y 14 #define PEGS_TEXT_Y 58 +#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 64) +#define TEXT_X 114 +#define LEVEL_TEXT_Y 14 +#define PEGS_TEXT_Y 58 #else #error "Unsupported screen size" #endif diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index 5d12818beb..a304058d20 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c @@ -68,7 +68,7 @@ static int plasma_frequency; #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define PLASMA_QUIT BUTTON_POWER #define PLASMA_INCREASE_FREQUENCY BUTTON_UP #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN diff --git a/apps/plugins/pong.c b/apps/plugins/pong.c index 53edb90c00..13a51c4ab4 100644 --- a/apps/plugins/pong.c +++ b/apps/plugins/pong.c @@ -102,7 +102,7 @@ PLUGIN_HEADER #define PONG_RIGHT_UP BUTTON_VOL_UP #define PONG_RIGHT_DOWN BUTTON_VOL_DOWN -#elif (CONFIG_KEYPAD == SANSA_E200_PAD) +#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define PONG_QUIT BUTTON_POWER #define PONG_PAUSE BUTTON_SELECT #define PONG_LEFT_UP BUTTON_LEFT diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index 1c1cf56168..d8cdc0a952 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c @@ -69,6 +69,14 @@ static const struct plugin_api* rb; #define CELL_HEIGHT 6 #define SMALL_BOARD +#elif (LCD_HEIGHT==64) && (LCD_WIDTH==128) +/* Sansa Clip and M200 - 128x64, 8 cells @ 9x9 with 9 border lines */ + +/* Internal dimensions of a cell */ +#define CELL_WIDTH 6 +#define CELL_HEIGHT 6 +#define SMALL_BOARD + #elif (LCD_HEIGHT==80) && (LCD_WIDTH==132) /* Sansa C200 - 132x80, 8 cells @ 9x9 with 9 border lines */ diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index 4c86d275ae..69d29d4f68 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h @@ -107,7 +107,7 @@ #define REVERSI_BUTTON_MENU BUTTON_PLAY #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define REVERSI_BUTTON_QUIT BUTTON_POWER #define REVERSI_BUTTON_UP BUTTON_UP #define REVERSI_BUTTON_DOWN BUTTON_DOWN diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c index d9b1c0aeb5..5170ab94d9 100644 --- a/apps/plugins/rockblox.c +++ b/apps/plugins/rockblox.c @@ -135,6 +135,18 @@ PLUGIN_HEADER #define ROCKBLOX_DROP BUTTON_SELECT #define ROCKBLOX_RESTART BUTTON_REC +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD + +#define ROCKBLOX_OFF BUTTON_POWER +#define ROCKBLOX_ROTATE_RIGHT BUTTON_UP +#define ROCKBLOX_ROTATE_RIGHT2 BUTTON_VOL_DOWN +#define ROCKBLOX_ROTATE_LEFT BUTTON_VOL_UP +#define ROCKBLOX_DOWN BUTTON_DOWN +#define ROCKBLOX_LEFT BUTTON_LEFT +#define ROCKBLOX_RIGHT BUTTON_RIGHT +#define ROCKBLOX_DROP BUTTON_SELECT +#define ROCKBLOX_RESTART BUTTON_HOME + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define ROCKBLOX_OFF BUTTON_POWER diff --git a/apps/plugins/rockblox1d.c b/apps/plugins/rockblox1d.c index b0fa6919b4..dd28e460f6 100644 --- a/apps/plugins/rockblox1d.c +++ b/apps/plugins/rockblox1d.c @@ -57,8 +57,8 @@ PLUGIN_HEADER #define ONEDROCKBLOX_DOWN BUTTON_SELECT #define ONEDROCKBLOX_QUIT BUTTON_POWER -#elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +#elif CONFIG_KEYPAD == SANSA_E200_PAD || CONFIG_KEYPAD == SANSA_C200_PAD || \ +CONFIG_KEYPAD == SANSA_CLIP_PAD #define ONEDROCKBLOX_DOWN BUTTON_SELECT #define ONEDROCKBLOX_QUIT BUTTON_POWER diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c index 0d12556696..fa5ba274a5 100644 --- a/apps/plugins/sliding_puzzle.c +++ b/apps/plugins/sliding_puzzle.c @@ -104,6 +104,15 @@ PLUGIN_HEADER #define PUZZLE_SHUFFLE BUTTON_REC #define PUZZLE_PICTURE BUTTON_SELECT +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#define PUZZLE_QUIT BUTTON_POWER +#define PUZZLE_LEFT BUTTON_LEFT +#define PUZZLE_RIGHT BUTTON_RIGHT +#define PUZZLE_UP BUTTON_UP +#define PUZZLE_DOWN BUTTON_DOWN +#define PUZZLE_SHUFFLE BUTTON_HOME +#define PUZZLE_PICTURE BUTTON_SELECT + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define PUZZLE_QUIT BUTTON_POWER #define PUZZLE_LEFT BUTTON_LEFT diff --git a/apps/plugins/snake.c b/apps/plugins/snake.c index 0f5923454b..584d9371b3 100644 --- a/apps/plugins/snake.c +++ b/apps/plugins/snake.c @@ -100,7 +100,8 @@ PLUGIN_HEADER #define SNAKE_PLAYPAUSE BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) #define SNAKE_QUIT BUTTON_POWER #define SNAKE_LEFT BUTTON_LEFT #define SNAKE_RIGHT BUTTON_RIGHT diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index a99c646d92..82ef41732d 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -234,6 +234,20 @@ PLUGIN_HEADER #define SNAKE2_PLAYPAUSE BUTTON_SELECT #define SNAKE2_PLAYPAUSE_TEXT "Select" +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#define SNAKE2_LEFT BUTTON_LEFT +#define SNAKE2_RIGHT BUTTON_RIGHT +#define SNAKE2_UP BUTTON_UP +#define SNAKE2_DOWN BUTTON_DOWN +#define SNAKE2_QUIT BUTTON_POWER +#define SNAKE2_LEVEL_UP BUTTON_UP +#define SNAKE2_LEVEL_DOWN BUTTON_DOWN +#define SNAKE2_MAZE_NEXT BUTTON_RIGHT +#define SNAKE2_MAZE_LAST BUTTON_LEFT +#define SNAKE2_SELECT_TYPE BUTTON_VOL_UP +#define SNAKE2_PLAYPAUSE BUTTON_SELECT +#define SNAKE2_PLAYPAUSE_TEXT "Select" + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define SNAKE2_LEFT BUTTON_LEFT #define SNAKE2_RIGHT BUTTON_RIGHT diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c index 28315cc34f..2f88875050 100644 --- a/apps/plugins/snow.c +++ b/apps/plugins/snow.c @@ -49,7 +49,7 @@ PLUGIN_HEADER #elif CONFIG_KEYPAD == GIGABEAT_PAD #define SNOW_QUIT BUTTON_POWER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define SNOW_QUIT BUTTON_POWER #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define SNOW_QUIT BUTTON_POWER diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 0a032f6bd1..9a166a3fb4 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -236,6 +236,22 @@ PLUGIN_HEADER #define BUTTON_SAVE BUTTON_SELECT #define BUTTON_SAVE_NAME "SELECT" +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD +#define SOKOBAN_LEFT BUTTON_LEFT +#define SOKOBAN_RIGHT BUTTON_RIGHT +#define SOKOBAN_UP BUTTON_UP +#define SOKOBAN_DOWN BUTTON_DOWN +#define SOKOBAN_MENU BUTTON_POWER +#define SOKOBAN_UNDO_PRE BUTTON_SELECT +#define SOKOBAN_UNDO (BUTTON_SELECT | BUTTON_REL) +#define SOKOBAN_REDO BUTTON_HOME +#define SOKOBAN_LEVEL_DOWN BUTTON_VOL_DOWN +#define SOKOBAN_LEVEL_REPEAT (BUTTON_SELECT | BUTTON_RIGHT) +#define SOKOBAN_LEVEL_UP BUTTON_VOL_UP +#define SOKOBAN_PAUSE BUTTON_SELECT +#define BUTTON_SAVE BUTTON_SELECT +#define BUTTON_SAVE_NAME "SELECT" + #elif CONFIG_KEYPAD == GIGABEAT_S_PAD #define SOKOBAN_LEFT BUTTON_LEFT #define SOKOBAN_RIGHT BUTTON_RIGHT diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c index f95777e024..92f647303a 100644 --- a/apps/plugins/solitaire.c +++ b/apps/plugins/solitaire.c @@ -220,6 +220,25 @@ static const struct plugin_api* rb; # define HK_CUR2STACK "DOUBLE SELECT" # define HK_REM2STACK "RIGHT" +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD +# define SOL_QUIT BUTTON_POWER +# define SOL_UP BUTTON_UP +# define SOL_DOWN BUTTON_DOWN +# define SOL_LEFT BUTTON_LEFT +# define SOL_RIGHT BUTTON_RIGHT +# define SOL_MOVE_PRE BUTTON_SELECT +# define SOL_MOVE (BUTTON_SELECT | BUTTON_REL) +# define SOL_DRAW BUTTON_HOME +# define SOL_REM2CUR BUTTON_VOL_DOWN +# define SOL_CUR2STACK_PRE BUTTON_SELECT +# define SOL_CUR2STACK (BUTTON_SELECT | BUTTON_REPEAT) +# define SOL_REM2STACK BUTTON_VOL_UP +# define HK_MOVE "SELECT" +# define HK_DRAW "HOME" +# define HK_REM2CUR "LEFT" +# define HK_CUR2STACK "DOUBLE SELECT" +# define HK_REM2STACK "RIGHT" + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) # define SOL_QUIT BUTTON_POWER # define SOL_UP BUTTON_SCROLL_UP diff --git a/apps/plugins/spacerocks.c b/apps/plugins/spacerocks.c index b8cf043125..be80a2d8d7 100644 --- a/apps/plugins/spacerocks.c +++ b/apps/plugins/spacerocks.c @@ -148,6 +148,19 @@ static const struct plugin_api* rb; /* global api struct pointer */ #define AST_FIRE BUTTON_SELECT #define AST_FIRE_REP (BUTTON_SELECT | BUTTON_REPEAT) +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#define AST_PAUSE BUTTON_HOME +#define AST_QUIT BUTTON_POWER +#define AST_THRUST_REP (BUTTON_UP | BUTTON_REPEAT) +#define AST_THRUST BUTTON_UP +#define AST_HYPERSPACE BUTTON_DOWN +#define AST_LEFT BUTTON_LEFT +#define AST_LEFT_REP (BUTTON_LEFT | BUTTON_REPEAT) +#define AST_RIGHT BUTTON_RIGHT +#define AST_RIGHT_REP (BUTTON_RIGHT | BUTTON_REPEAT) +#define AST_FIRE BUTTON_SELECT +#define AST_FIRE_REP (BUTTON_SELECT | BUTTON_REPEAT) + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define AST_PAUSE BUTTON_PLAY #define AST_QUIT BUTTON_POWER diff --git a/apps/plugins/star.c b/apps/plugins/star.c index f2bf2c4e5f..104a43301f 100644 --- a/apps/plugins/star.c +++ b/apps/plugins/star.c @@ -161,7 +161,7 @@ PLUGIN_HEADER #define STAR_MENU_RUN BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define STAR_QUIT BUTTON_POWER #define STAR_LEFT BUTTON_LEFT diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c index 536213686a..6756539c98 100644 --- a/apps/plugins/starfield.c +++ b/apps/plugins/starfield.c @@ -60,7 +60,8 @@ static const struct plugin_api* rb; /* global api struct pointer */ #define STARFIELD_DECREASE_NB_STARS BUTTON_LEFT #define STARFIELD_TOGGLE_COLOR BUTTON_SELECT #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) #define STARFIELD_QUIT BUTTON_POWER #define STARFIELD_INCREASE_ZMOVE BUTTON_UP #define STARFIELD_DECREASE_ZMOVE BUTTON_DOWN diff --git a/apps/plugins/stats.c b/apps/plugins/stats.c index d77f04408b..ca9499befb 100644 --- a/apps/plugins/stats.c +++ b/apps/plugins/stats.c @@ -56,7 +56,7 @@ static bool abort; #define STATS_STOP BUTTON_POWER #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define STATS_STOP BUTTON_POWER #elif CONFIG_KEYPAD == IRIVER_H10_PAD diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index b78225488d..2803e52440 100644 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c @@ -105,7 +105,7 @@ PLUGIN_HEADER #define STOPWATCH_SCROLL_UP BUTTON_UP #define STOPWATCH_SCROLL_DOWN BUTTON_DOWN #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define STOPWATCH_QUIT BUTTON_POWER #define STOPWATCH_START_STOP BUTTON_RIGHT #define STOPWATCH_RESET_TIMER BUTTON_LEFT diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 5e34fd404b..de90de360c 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c @@ -102,7 +102,7 @@ static const char default_game[9][9] = #if LCD_HEIGHT <= LCD_WIDTH /* Horizontal layout, scratchpad at the left */ -#if (LCD_HEIGHT==64) && (LCD_WIDTH==112) +#if (LCD_HEIGHT==64) && (LCD_WIDTH==112 || LCD_WIDTH==128) /* Archos Recorders and Ondios - 112x64, 9 cells @ 8x6 with 10 border lines */ /* Internal dimensions of a cell */ diff --git a/apps/plugins/sudoku/sudoku.h b/apps/plugins/sudoku/sudoku.h index b4f18b6341..c33a8ea9c4 100644 --- a/apps/plugins/sudoku/sudoku.h +++ b/apps/plugins/sudoku/sudoku.h @@ -148,6 +148,20 @@ #define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) #define SUDOKU_BUTTON_POSSIBLE BUTTON_REC +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER +#define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) +#define SUDOKU_BUTTON_UP BUTTON_UP +#define SUDOKU_BUTTON_DOWN BUTTON_DOWN +#define SUDOKU_BUTTON_LEFT BUTTON_LEFT +#define SUDOKU_BUTTON_RIGHT BUTTON_RIGHT +#define SUDOKU_BUTTON_TOGGLEBACK BUTTON_VOL_DOWN +#define SUDOKU_BUTTON_TOGGLE BUTTON_VOL_UP +#define SUDOKU_BUTTON_ALTTOGGLE BUTTON_SELECT +#define SUDOKU_BUTTON_MENU_PRE BUTTON_POWER +#define SUDOKU_BUTTON_MENU (BUTTON_POWER | BUTTON_REL) +#define SUDOKU_BUTTON_POSSIBLE BUTTON_HOME + #elif CONFIG_KEYPAD == MROBE500_PAD #define SUDOKU_BUTTON_QUIT_PRE BUTTON_POWER #define SUDOKU_BUTTON_QUIT (BUTTON_POWER | BUTTON_REPEAT) diff --git a/apps/plugins/test_grey.c b/apps/plugins/test_grey.c index 34167e44c3..1b65c34f4e 100644 --- a/apps/plugins/test_grey.c +++ b/apps/plugins/test_grey.c @@ -58,7 +58,8 @@ PLUGIN_HEADER #define GREY_DOWN BUTTON_DOWN #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \ - || (CONFIG_KEYPAD == MROBE100_PAD) + || (CONFIG_KEYPAD == MROBE100_PAD) \ + || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define GREY_QUIT BUTTON_POWER #define GREY_OK BUTTON_SELECT #define GREY_PREV BUTTON_LEFT diff --git a/apps/plugins/test_scanrate.c b/apps/plugins/test_scanrate.c index 6598b803e9..0c291261db 100644 --- a/apps/plugins/test_scanrate.c +++ b/apps/plugins/test_scanrate.c @@ -34,7 +34,8 @@ PLUGIN_HEADER #define SCANRATE_DEC BUTTON_LEFT #elif (CONFIG_KEYPAD == IAUDIO_X5M5_PAD) \ - || (CONFIG_KEYPAD == MROBE100_PAD) + || (CONFIG_KEYPAD == MROBE100_PAD) \ + || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define SCANRATE_DONE BUTTON_POWER #define SCANRATE_FASTINC BUTTON_UP #define SCANRATE_FASTDEC BUTTON_DOWN @@ -76,6 +77,8 @@ PLUGIN_HEADER #define DEFAULT_SCAN_RATE 870 #elif defined IRIVER_H100_SERIES #define DEFAULT_SCAN_RATE 700 +#elif defined SANSA_CLIP +#define DEFAULT_SCAN_RATE 780 #else #define DEFAULT_SCAN_RATE 700 #warning Generic default scanrate diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index e85a979bd5..b75059ffc0 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c @@ -197,6 +197,18 @@ PLUGIN_HEADER #define VIEWER_LINE_UP BUTTON_UP #define VIEWER_LINE_DOWN BUTTON_DOWN +/* Sansa Clip keys */ +#elif CONFIG_KEYPAD == SANSA_CLIP_PAD +#define VIEWER_QUIT BUTTON_POWER +#define VIEWER_PAGE_UP BUTTON_VOL_UP +#define VIEWER_PAGE_DOWN BUTTON_VOL_DOWN +#define VIEWER_SCREEN_LEFT BUTTON_LEFT +#define VIEWER_SCREEN_RIGHT BUTTON_RIGHT +#define VIEWER_MENU BUTTON_SELECT +#define VIEWER_AUTOSCROLL BUTTON_HOME +#define VIEWER_LINE_UP BUTTON_UP +#define VIEWER_LINE_DOWN BUTTON_DOWN + /* iriver H10 keys */ #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define VIEWER_QUIT BUTTON_POWER diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index f07eb098a3..65556ab2ec 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c @@ -137,6 +137,19 @@ PLUGIN_HEADER #define LABEL_MENU "SELECT" #define LABEL_VOLUME "VOL UP/DN" +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) +#define VUMETER_QUIT BUTTON_POWER +#define VUMETER_HELP BUTTON_HOME +#define VUMETER_MENU BUTTON_SELECT +#define VUMETER_MENU_EXIT BUTTON_SELECT +#define VUMETER_MENU_EXIT2 BUTTON_POWER +#define VUMETER_UP BUTTON_VOL_UP +#define VUMETER_DOWN BUTTON_VOL_DOWN +#define LABEL_HELP "HOME" +#define LABEL_QUIT "POWER" +#define LABEL_MENU "SELECT" +#define LABEL_VOLUME "VOL UP/DN" + #elif CONFIG_KEYPAD == IAUDIO_X5M5_PAD #define VUMETER_QUIT BUTTON_POWER #define VUMETER_HELP BUTTON_PLAY diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 5411d0cb68..91f8f05c53 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -165,6 +165,20 @@ PLUGIN_HEADER #define WORMS_TEXT "Left/Right" +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) + +#define BTN_DIR_UP BUTTON_UP +#define BTN_DIR_DOWN BUTTON_DOWN +#define BTN_DIR_LEFT BUTTON_LEFT +#define BTN_DIR_RIGHT BUTTON_RIGHT +#define BTN_STARTPAUSE BUTTON_SELECT +#define BTN_QUIT BUTTON_POWER +#define BTN_STOPRESET BUTTON_HOME + +#define PLAYERS_TEXT "Up/Down" +#define WORMS_TEXT "Left/Right" + + #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) #define BTN_DIR_UP BUTTON_SCROLL_UP @@ -262,6 +276,11 @@ PLUGIN_HEADER #define ARGH_SIZE 4 #define SPEED 14 #define MAX_WORM_SEGMENTS 128 +#elif (LCD_WIDTH == 128) && (LCD_HEIGHT == 64) +#define FOOD_SIZE 3 +#define ARGH_SIZE 4 +#define SPEED 14 +#define MAX_WORM_SEGMENTS 128 #elif (LCD_WIDTH == 132) && (LCD_HEIGHT == 80) #define FOOD_SIZE 3 #define ARGH_SIZE 4 diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index d345c4404f..df6bb7d871 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -87,6 +87,16 @@ PLUGIN_HEADER #define PAUSE BUTTON_REC +#elif (CONFIG_KEYPAD == SANSA_CLIP_PAD) + +#define QUIT BUTTON_POWER +#define LEFT BUTTON_LEFT +#define RIGHT BUTTON_RIGHT +#define UP BUTTON_UP +#define DOWN BUTTON_DOWN +#define PAUSE BUTTON_HOME + + #elif CONFIG_KEYPAD == IRIVER_H10_PAD #define QUIT BUTTON_POWER diff --git a/apps/plugins/zxbox/keymaps.h b/apps/plugins/zxbox/keymaps.h index fec6e38d27..ae04649c72 100644 --- a/apps/plugins/zxbox/keymaps.h +++ b/apps/plugins/zxbox/keymaps.h @@ -87,7 +87,7 @@ #define ZX_DOWN BUTTON_SCROLL_DOWN #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ -(CONFIG_KEYPAD == SANSA_C200_PAD) +(CONFIG_KEYPAD == SANSA_C200_PAD) || (CONFIG_KEYPAD == SANSA_CLIP_PAD) #define ZX_SELECT BUTTON_SELECT #define ZX_MENU BUTTON_POWER #define ZX_LEFT BUTTON_LEFT diff --git a/apps/plugins/zxbox/zxbox_keyb.c b/apps/plugins/zxbox/zxbox_keyb.c index 1e9ee10bb5..920cf8ce06 100644 --- a/apps/plugins/zxbox/zxbox_keyb.c +++ b/apps/plugins/zxbox/zxbox_keyb.c @@ -112,6 +112,7 @@ #elif (CONFIG_KEYPAD == SANSA_E200_PAD) || \ (CONFIG_KEYPAD == SANSA_C200_PAD) || \ +(CONFIG_KEYPAD == SANSA_CLIP_PAD) || \ (CONFIG_KEYPAD == MROBE100_PAD) /* TODO: Check keyboard mappings */ diff --git a/firmware/export/config-clip.h b/firmware/export/config-clip.h index d54d4f3488..0f4b93b4ae 100644 --- a/firmware/export/config-clip.h +++ b/firmware/export/config-clip.h @@ -95,14 +95,10 @@ #define HAVE_FAT16SUPPORT /* The number of bytes reserved for loadable codecs */ -#define CODEC_SIZE 0x100000 +#define CODEC_SIZE 0x80000 /* TODO : check if we can use IRAM */ /* The number of bytes reserved for loadable plugins */ -#if 0 /* The plugin buffer doesn't fit in the 2MB memory */ #define PLUGIN_BUFFER_SIZE 0x80000 -#else -#define PLUGIN_BUFFER_SIZE 0 -#endif #define AB_REPEAT_ENABLE 1 diff --git a/tools/configure b/tools/configure index d445752959..53e596c882 100755 --- a/tools/configure +++ b/tools/configure @@ -1685,7 +1685,7 @@ fi output="rockbox.sansa" bootoutput="bootloader-clip.sansa" appextra="recorder:gui" - plugins="" + plugins="yes" swcodec="yes" toolset=$scramblebitmaptools t_cpu="arm"