adapted to build on iRiver

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5784 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2005-02-04 12:41:09 +00:00
parent 3fcfdffe88
commit 6700ad8f20
26 changed files with 184 additions and 11 deletions

View file

@ -32,10 +32,15 @@ snake.c
snake2.c snake2.c
snow.c snow.c
sokoban.c sokoban.c
#ifndef CONFIG_KEYPAD != IRIVER_H100_PAD
/* just because it isn't fixed yet to deal with this keymap */
solitaire.c solitaire.c
#endif
splitedit.c splitedit.c
star.c star.c
#if CONFIG_LCD == LCD_SSD1815
video.c video.c
#endif
vu_meter.c vu_meter.c
#ifdef HAVE_RTC /* Recorder models only */ #ifdef HAVE_RTC /* Recorder models only */

View file

@ -30,6 +30,8 @@
* *
****************************************************************************/ ****************************************************************************/
#include "plugin.h"
/* Only build for (correct) target */ /* Only build for (correct) target */
#if !defined(SIMULATOR) && CONFIG_CPU==SH7034 && !defined(HAVE_MMC) #if !defined(SIMULATOR) && CONFIG_CPU==SH7034 && !defined(HAVE_MMC)
@ -43,7 +45,6 @@
/****************** imports ******************/ /****************** imports ******************/
#include "plugin.h"
#include "sh7034.h" #include "sh7034.h"
#include "system.h" #include "system.h"

View file

@ -39,6 +39,9 @@
#define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL) #define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL)
#define BOUNCE_MODE (BUTTON_MENU | BUTTON_REL) #define BOUNCE_MODE (BUTTON_MENU | BUTTON_REL)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define BOUNCE_QUIT (BUTTON_OFF | BUTTON_REL)
#define BOUNCE_MODE (BUTTON_SELECT | BUTTON_REL)
#endif #endif
static struct plugin_api* rb; static struct plugin_api* rb;

View file

@ -118,6 +118,12 @@ F3: equal to "="
#define CALCULATOR_INPUT (BUTTON_MENU | BUTTON_REL) #define CALCULATOR_INPUT (BUTTON_MENU | BUTTON_REL)
#define CALCULATOR_CALC (BUTTON_MENU | BUTTON_REPEAT) #define CALCULATOR_CALC (BUTTON_MENU | BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define CALCULATOR_QUIT BUTTON_OFF
#define CALCULATOR_INPUT_CALC_PRE BUTTON_SELECT
#define CALCULATOR_INPUT (BUTTON_ON | BUTTON_REL)
#define CALCULATOR_CALC (BUTTON_ON | BUTTON_REPEAT)
#endif #endif
static struct plugin_api* rb; static struct plugin_api* rb;

View file

@ -42,6 +42,13 @@
#define CHIP8_KEY6 BUTTON_RIGHT #define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY8 BUTTON_DOWN #define CHIP8_KEY8 BUTTON_DOWN
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define CHIP8_KEY2 BUTTON_UP
#define CHIP8_KEY4 BUTTON_LEFT
#define CHIP8_KEY5 BUTTON_SELECT
#define CHIP8_KEY6 BUTTON_RIGHT
#define CHIP8_KEY8 BUTTON_DOWN
#endif #endif
static struct plugin_api* rb; /* here is a global api struct pointer */ static struct plugin_api* rb; /* here is a global api struct pointer */

View file

@ -46,6 +46,17 @@
#define CUBE_HIGHSPEED_PRE BUTTON_MENU #define CUBE_HIGHSPEED_PRE BUTTON_MENU
#define CUBE_HIGHSPEED (BUTTON_MENU | BUTTON_REL) #define CUBE_HIGHSPEED (BUTTON_MENU | BUTTON_REL)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define CUBE_QUIT (BUTTON_OFF | BUTTON_REL)
#define CUBE_X_INC BUTTON_RIGHT
#define CUBE_X_DEC BUTTON_LEFT
#define CUBE_Y_INC BUTTON_UP
#define CUBE_Y_DEC BUTTON_DOWN
#define CUBE_Z_INC (BUTTON_ON | BUTTON_UP)
#define CUBE_Z_DEC (BUTTON_ON | BUTTON_DOWN)
#define CUBE_HIGHSPEED_PRE BUTTON_SELECT
#define CUBE_HIGHSPEED (BUTTON_SELECT | BUTTON_REL)
#endif #endif
struct point_3D { struct point_3D {

View file

@ -35,6 +35,14 @@
#define FLIPIT_TOGGLE_PRE BUTTON_MENU #define FLIPIT_TOGGLE_PRE BUTTON_MENU
#define FLIPIT_TOGGLE (BUTTON_MENU | BUTTON_REL) #define FLIPIT_TOGGLE (BUTTON_MENU | BUTTON_REL)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define FLIPIT_QUIT BUTTON_OFF
#define FLIPIT_SHUFFLE BUTTON_SELECT
#define FLIPIT_SOLVE BUTTON_ON
#define FLIPIT_STEP_BY_STEP BUTTON_REC
#define FLIPIT_TOGGLE_PRE BUTTON_MODE
#define FLIPIT_TOGGLE (BUTTON_MODE | BUTTON_REL)
#endif #endif
static struct plugin_api* rb; static struct plugin_api* rb;

View file

@ -22,7 +22,7 @@
#ifndef SIMULATOR /* not for simulator by now */ #ifndef SIMULATOR /* not for simulator by now */
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP /* and also not for the Player */ #if CONFIG_LCD == LCD_SSD1815 /* only for Recorder/Ondio displays */
#include "gray.h" #include "gray.h"
/* variable button definitions */ /* variable button definitions */

View file

@ -26,7 +26,15 @@
#ifndef SIMULATOR /* not for simulator by now */ #ifndef SIMULATOR /* not for simulator by now */
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP /* and also not for the Player */ #if CONFIG_LCD == LCD_SSD1815 /* only for Recorder/Ondio displays */
/*
FIX:
This would be a lot nicer if it depended on HAVE_LCD_BITMAP only, but we
need to fix the grayscale lib for Gmini and iRiver. Either with true
grayscale or 1bit.
*/
#include "gray.h" #include "gray.h"
/* variable button definitions */ /* variable button definitions */
@ -39,6 +47,10 @@
#define JPEG_ZOOM_IN (BUTTON_MENU | BUTTON_REL) #define JPEG_ZOOM_IN (BUTTON_MENU | BUTTON_REL)
#define JPEG_ZOOM_OUT (BUTTON_MENU | BUTTON_REPEAT) #define JPEG_ZOOM_OUT (BUTTON_MENU | BUTTON_REPEAT)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define JPEG_ZOOM_IN BUTTON_ON
#define JPEG_ZOOM_OUT BUTTON_SELECT
#endif #endif
/******************************* Globals ***********************************/ /******************************* Globals ***********************************/

View file

@ -20,8 +20,17 @@
#ifndef SIMULATOR #ifndef SIMULATOR
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP // this is not fun on the player #if CONFIG_LCD == LCD_SSD1815 /* only for Recorder/Ondio displays */
# include "gray.h" /*
FIX:
This would be a lot nicer if it depended on HAVE_LCD_BITMAP only, but we
need to fix the grayscale lib for Gmini and iRiver. Either with true
grayscale or 1bit.
*/
#include "gray.h"
/* variable button definitions */ /* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD #if CONFIG_KEYPAD == RECORDER_PAD
@ -42,6 +51,13 @@
#define MANDELBROT_MAXITER_DEC (BUTTON_MENU | BUTTON_LEFT) #define MANDELBROT_MAXITER_DEC (BUTTON_MENU | BUTTON_LEFT)
#define MANDELBROT_RESET (BUTTON_MENU | BUTTON_OFF) #define MANDELBROT_RESET (BUTTON_MENU | BUTTON_OFF)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define MANDELBROT_QUIT BUTTON_OFF
#define MANDELBROT_ZOOM_IN BUTTON_ON
#define MANDELBROT_ZOOM_OUT BUTTON_SELECT
#define MANDELBROT_MAXITER_INC (BUTTON_MODE | BUTTON_RIGHT)
#define MANDELBROT_MAXITER_DEC (BUTTON_MODE | BUTTON_LEFT)
#define MANDELBROT_RESET (BUTTON_MODE | BUTTON_SELECT)
#endif #endif
static struct plugin_api* rb; static struct plugin_api* rb;

View file

@ -57,6 +57,15 @@ use F3 to see how many mines are left (supposing all your flags are correct)
#define MINESWP_DISCOVER (BUTTON_MENU | BUTTON_REPEAT) #define MINESWP_DISCOVER (BUTTON_MENU | BUTTON_REPEAT)
#define MINESWP_INFO (BUTTON_MENU | BUTTON_OFF) #define MINESWP_INFO (BUTTON_MENU | BUTTON_OFF)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define MINESWP_QUIT BUTTON_OFF
#define MINESWP_START BUTTON_ON
#define MINESWP_TOGGLE_PRE BUTTON_MODE
#define MINESWP_TOGGLE (BUTTON_MODE | BUTTON_REL)
#define MINESWP_DISCOVER (BUTTON_MODE | BUTTON_REPEAT)
#define MINESWP_INFO (BUTTON_MODE | BUTTON_OFF)
#endif #endif

View file

@ -35,6 +35,10 @@
#define MOSAIQUE_SPEED2 BUTTON_RIGHT #define MOSAIQUE_SPEED2 BUTTON_RIGHT
#define MOSAIQUE_RESTART BUTTON_MENU #define MOSAIQUE_RESTART BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define MOSAIQUE_QUIT BUTTON_OFF
#define MOSAIQUE_SPEED BUTTON_MODE
#define MOSAIQUE_RESTART BUTTON_ON
#endif #endif
enum plugin_status plugin_start(struct plugin_api* api, void* parameter) enum plugin_status plugin_start(struct plugin_api* api, void* parameter)

View file

@ -20,6 +20,7 @@
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
#ifndef SIMULATOR /* don't want this code in the simulator */ #ifndef SIMULATOR /* don't want this code in the simulator */
#if CONFIG_HWCODEC != MASNONE /* only for MAS-targets */
/* The different drawing modes */ /* The different drawing modes */
#define DRAW_MODE_FILLED 0 #define DRAW_MODE_FILLED 0
@ -241,5 +242,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
return PLUGIN_OK; return PLUGIN_OK;
} }
#endif /* if using MAS */
#endif /* #ifndef SIMULATOR */ #endif /* #ifndef SIMULATOR */
#endif #endif

View file

@ -23,6 +23,7 @@
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP /* and also not for the Player */ #ifdef HAVE_LCD_BITMAP /* and also not for the Player */
#if CONFIG_HWCODEC != MASNONE /* only for MAS-targets */
/* The different drawing modes */ /* The different drawing modes */
#define DRAW_MODE_FILLED 0 #define DRAW_MODE_FILLED 0
@ -269,5 +270,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
cleanup(NULL); cleanup(NULL);
return PLUGIN_OK; return PLUGIN_OK;
} }
#endif #endif /* if using MAS */
#endif #endif /* if HAVE_LCD_BITMAP */
#endif /* SIMULATOR */

View file

@ -48,6 +48,13 @@
#define PONG_RIGHT_UP BUTTON_UP #define PONG_RIGHT_UP BUTTON_UP
#define PONG_RIGHT_DOWN BUTTON_DOWN #define PONG_RIGHT_DOWN BUTTON_DOWN
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define PONG_QUIT BUTTON_OFF
#define PONG_LEFT_UP BUTTON_UP
#define PONG_LEFT_DOWN BUTTON_DOWN
#define PONG_RIGHT_UP BUTTON_ON
#define PONG_RIGHT_DOWN BUTTON_MODE
#endif #endif
static struct plugin_api* rb; static struct plugin_api* rb;

View file

@ -21,7 +21,7 @@
****************************************************************************/ ****************************************************************************/
#include "plugin.h" #include "plugin.h"
#ifndef SIMULATOR /* Only build for target */ #if !defined(SIMULATOR) && (CONFIG_CPU == SH7034) /* Only for SH targets */
/* define DUMMY if you only want to "play" with the UI, does no harm */ /* define DUMMY if you only want to "play" with the UI, does no harm */
/* #define DUMMY */ /* #define DUMMY */
@ -1002,4 +1002,4 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
} }
#endif /* #ifndef SIMULATOR */ #endif /* !SIMULATOR or a SH-target */

View file

@ -31,6 +31,10 @@
#define PUZZLE_SHUFFLE (BUTTON_MENU | BUTTON_REPEAT) #define PUZZLE_SHUFFLE (BUTTON_MENU | BUTTON_REPEAT)
#define PUZZLE_PICTURE (BUTTON_MENU | BUTTON_REL) #define PUZZLE_PICTURE (BUTTON_MENU | BUTTON_REL)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define PUZZLE_QUIT BUTTON_OFF
#define PUZZLE_SHUFFLE BUTTON_SELECT
#define PUZZLE_PICTURE BUTTON_ON
#endif #endif
static struct plugin_api* rb; static struct plugin_api* rb;

View file

@ -42,6 +42,12 @@ dir is the current direction of the snake - 0=up, 1=right, 2=down, 3=left;
#define SNAKE_QUIT BUTTON_OFF #define SNAKE_QUIT BUTTON_OFF
#define SNAKE_PLAYPAUSE BUTTON_MENU #define SNAKE_PLAYPAUSE BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define SNAKE_QUIT BUTTON_OFF
#define SNAKE_PLAYPAUSE BUTTON_ON
#else
#error "lacks keymapping"
#endif #endif
static int board[28][16],snakelength; static int board[28][16],snakelength;

View file

@ -52,6 +52,17 @@ Head and Tail are stored
#define SNAKE2_SELECT_TYPE BUTTON_RIGHT #define SNAKE2_SELECT_TYPE BUTTON_RIGHT
#define SNAKE2_PLAYPAUSE BUTTON_MENU #define SNAKE2_PLAYPAUSE BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define SNAKE2_QUIT BUTTON_OFF
#define SNAKE2_LEVEL_UP BUTTON_UP
#define SNAKE2_LEVEL_UP2 BUTTON_RIGHT
#define SNAKE2_LEVEL_DOWN BUTTON_DOWN
#define SNAKE2_LEVEL_DOWN2 BUTTON_LEFT
#define SNAKE2_SELECT_MAZE BUTTON_REC
#define SNAKE2_SELECT_TYPE BUTTON_MODE
#define SNAKE2_PLAYPAUSE BUTTON_ON
#else
#error "lacks keymapping"
#endif #endif
static int max_levels = 0; static int max_levels = 0;

View file

@ -49,6 +49,12 @@
#define SOKOBAN_LEVEL_DOWN (BUTTON_MENU | BUTTON_LEFT) #define SOKOBAN_LEVEL_DOWN (BUTTON_MENU | BUTTON_LEFT)
#define SOKOBAN_LEVEL_REPEAT (BUTTON_MENU | BUTTON_UP) #define SOKOBAN_LEVEL_REPEAT (BUTTON_MENU | BUTTON_UP)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define SOKOBAN_QUIT BUTTON_OFF
#define SOKOBAN_UNDO BUTTON_ON
#define SOKOBAN_LEVEL_UP BUTTON_MODE
#define SOKOBAN_LEVEL_DOWN BUTTON_REC
#define SOKOBAN_LEVEL_REPEAT BUTTON_SELECT
#endif #endif
static void init_undo(void); static void init_undo(void);

View file

@ -85,6 +85,22 @@ static struct plugin_api* rb;
#define SOL_MENU_RUN BUTTON_RIGHT #define SOL_MENU_RUN BUTTON_RIGHT
#define SOL_MENU_INFO BUTTON_MENU #define SOL_MENU_INFO BUTTON_MENU
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define SOL_QUIT BUTTON_OFF
#define SOL_UP BUTTON_UP
#define SOL_DOWN BUTTON_DOWN
#define SOL_LEFT BUTTON_LEFT
#define SOL_RIGHT BUTTON_RIGHT
#define SOL_MOVE BUTTON_ON
#define SOL_DRAW BUTTON_SELECT
#define SOL_REM2CUR BUTTON_PLAY
#define SOL_CUR2STACK BUTTON_F1
#define SOL_REM2STACK BUTTON_F3
#define SOL_MENU_RUN BUTTON_RIGHT
#define SOL_MENU_RUN2 BUTTON_ON
#define SOL_MENU_INFO BUTTON_SELECT
#define SOL_MENU_INFO2 BUTTON_REC
#define SOL_MENU_INFO3 BUTTON_MODE
#endif #endif
/* common help definitions */ /* common help definitions */

View file

@ -43,6 +43,18 @@
#define SPLITEDIT_SCALE (BUTTON_MENU | BUTTON_RIGHT) #define SPLITEDIT_SCALE (BUTTON_MENU | BUTTON_RIGHT)
#define SPLITEDIT_MENU_RUN BUTTON_RIGHT #define SPLITEDIT_MENU_RUN BUTTON_RIGHT
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define SPLITEDIT_QUIT BUTTON_OFF
#define SPLITEDIT_PLAY BUTTON_ON
#define SPLITEDIT_SAVE BUTTON_SELECT
#define SPLITEDIT_LOOP_MODE BUTTON_MODE
#define SPLITEDIT_SCALE (BUTTON_REC | BUTTON_UP)
#define SPLITEDIT_SPEED50 (BUTTON_REC | BUTTON_LEFT)
#define SPLITEDIT_SPEED100 (BUTTON_REC | BUTTON_DOWN)
#define SPLITEDIT_SPEED150 (BUTTON_REC | BUTTON_RIGHT)
#define SPLITEDIT_MENU_RUN BUTTON_RIGHT
#endif #endif
#define BMPHEIGHT 7 #define BMPHEIGHT 7

View file

@ -80,6 +80,14 @@
#define STAR_LEVEL_REPEAT (BUTTON_MENU | BUTTON_UP) #define STAR_LEVEL_REPEAT (BUTTON_MENU | BUTTON_UP)
#define STAR_MENU_RUN BUTTON_RIGHT #define STAR_MENU_RUN BUTTON_RIGHT
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define STAR_QUIT BUTTON_OFF
#define STAR_TOGGLE_CONTROL_PRE BUTTON_MODE
#define STAR_TOGGLE_CONTROL (BUTTON_MODE | BUTTON_REL)
#define STAR_LEVEL_UP (BUTTON_MODE | BUTTON_RIGHT)
#define STAR_LEVEL_DOWN (BUTTON_MODE | BUTTON_LEFT)
#define STAR_LEVEL_REPEAT (BUTTON_MODE | BUTTON_UP)
#define STAR_MENU_RUN BUTTON_RIGHT
#endif #endif
/* function returns because of USB? */ /* function returns because of USB? */

View file

@ -53,6 +53,13 @@
#define STOPWATCH_LAP_TIMER BUTTON_ON #define STOPWATCH_LAP_TIMER BUTTON_ON
#define STOPWATCH_SCROLL_UP BUTTON_RIGHT #define STOPWATCH_SCROLL_UP BUTTON_RIGHT
#define STOPWATCH_SCROLL_DOWN BUTTON_LEFT #define STOPWATCH_SCROLL_DOWN BUTTON_LEFT
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define STOPWATCH_QUIT BUTTON_OFF
#define STOPWATCH_START_STOP BUTTON_SELECT
#define STOPWATCH_RESET_TIMER BUTTON_DOWN
#define STOPWATCH_LAP_TIMER BUTTON_ON
#define STOPWATCH_SCROLL_UP BUTTON_RIGHT
#define STOPWATCH_SCROLL_DOWN BUTTON_LEFT
#endif #endif
static struct plugin_api* rb; static struct plugin_api* rb;

View file

@ -98,6 +98,16 @@
#define VIEWER_MODE_LINE (BUTTON_ON | BUTTON_MENU | BUTTON_RIGHT) #define VIEWER_MODE_LINE (BUTTON_ON | BUTTON_MENU | BUTTON_RIGHT)
#define VIEWER_MODE_WIDTH (BUTTON_ON | BUTTON_RIGHT) #define VIEWER_MODE_WIDTH (BUTTON_ON | BUTTON_RIGHT)
#elif CONFIG_KEYPAD == IRIVER_H100_PAD
#define VIEWER_QUIT BUTTON_OFF
#define VIEWER_PAGE_UP BUTTON_UP
#define VIEWER_PAGE_DOWN BUTTON_DOWN
#define VIEWER_SCREEN_LEFT BUTTON_LEFT
#define VIEWER_SCREEN_RIGHT BUTTON_RIGHT
#define VIEWER_MODE_WRAP (BUTTON_ON | BUTTON_LEFT)
#define VIEWER_MODE_LINE (BUTTON_ON | BUTTON_DOWN)
#define VIEWER_MODE_WIDTH (BUTTON_ON | BUTTON_RIGHT)
#endif #endif
enum { enum {

View file

@ -17,7 +17,7 @@
**************************************************************************/ **************************************************************************/
#include "plugin.h" #include "plugin.h"
#ifdef HAVE_LCD_BITMAP #if defined(HAVE_LCD_BITMAP) && (CONFIG_HWCODEC != MASNONE)
/* variable button definitions */ /* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD #if CONFIG_KEYPAD == RECORDER_PAD
@ -482,4 +482,4 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
lastbutton = button; lastbutton = button;
} }
} }
#endif /* #ifdef HAVE_LCD_BITMAP */ #endif /* #ifdef HAVE_LCD_BITMAP and HWCODEC */