Create an SDL sim for the iPod 4G Grayscale and also create an IPOD_ARCH define for all iPods.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8636 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a88632f885
commit
8ad2df8275
15 changed files with 49 additions and 9 deletions
|
@ -54,10 +54,12 @@ arabjoin.c
|
|||
bidi.c
|
||||
#if LCD_DEPTH == 1
|
||||
drivers/lcd-recorder.c
|
||||
#elif CONFIG_LCD==LCD_IPOD2BPP
|
||||
drivers/lcd-2bit-horz.c
|
||||
#elif LCD_DEPTH == 2
|
||||
#if (LCD_PIXELFORMAT == HORIZONTAL_PACKING)
|
||||
drivers/lcd-2bit-horz.c
|
||||
#else
|
||||
drivers/lcd-h100.c
|
||||
#endif
|
||||
#elif LCD_DEPTH == 16
|
||||
drivers/lcd-16bit.c
|
||||
#endif
|
||||
|
|
|
@ -82,6 +82,11 @@ void lcd_init(void)
|
|||
sizeof(scroll_stack), scroll_name);
|
||||
}
|
||||
|
||||
int lcd_default_contrast(void)
|
||||
{
|
||||
return 96;
|
||||
}
|
||||
|
||||
/*** parameter handling ***/
|
||||
|
||||
void lcd_set_drawmode(int mode)
|
||||
|
|
|
@ -100,11 +100,6 @@ static void lcd_cmd_and_data(int cmd, int data_lo, int data_hi)
|
|||
lcd_send_data(data_lo, data_hi);
|
||||
}
|
||||
|
||||
int lcd_default_contrast(void)
|
||||
{
|
||||
return 96;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* LCD init
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#define LCD_HEIGHT 128
|
||||
#define LCD_DEPTH 2
|
||||
|
||||
#define LCD_PIXELFORMAT VERTICAL_PACKING
|
||||
|
||||
/* remote LCD */
|
||||
#define LCD_REMOTE_WIDTH 128
|
||||
#define LCD_REMOTE_HEIGHT 64
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#define LCD_HEIGHT 128
|
||||
#define LCD_DEPTH 2
|
||||
|
||||
#define LCD_PIXELFORMAT VERTICAL_PACKING
|
||||
|
||||
/* remote LCD */
|
||||
#define LCD_REMOTE_WIDTH 128
|
||||
#define LCD_REMOTE_HEIGHT 64
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
#define APPLE_IPOD3G 1
|
||||
|
||||
#define IPOD_ARCH 1
|
||||
|
||||
/* For Rolo and boot loader */
|
||||
#define MODEL_NUMBER 7
|
||||
|
||||
|
@ -17,6 +19,8 @@
|
|||
#define LCD_HEIGHT 128
|
||||
#define LCD_DEPTH 2 /* 4 colours - 2bpp */
|
||||
|
||||
#define LCD_PIXELFORMAT HORIZONTAL_PACKING
|
||||
|
||||
#define CONFIG_KEYPAD IPOD_3G_PAD
|
||||
|
||||
/* Define this if you do software codec */
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
#define APPLE_IPOD4G 1
|
||||
|
||||
#define IPOD_ARCH 1
|
||||
|
||||
/* For Rolo and boot loader */
|
||||
#define MODEL_NUMBER 8
|
||||
|
||||
|
@ -17,6 +19,8 @@
|
|||
#define LCD_HEIGHT 128
|
||||
#define LCD_DEPTH 2 /* 4 colours - 2bpp */
|
||||
|
||||
#define LCD_PIXELFORMAT HORIZONTAL_PACKING
|
||||
|
||||
#define CONFIG_KEYPAD IPOD_4G_PAD
|
||||
|
||||
/* Define this if you do software codec */
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
#define APPLE_IPODCOLOR 1
|
||||
|
||||
#define IPOD_ARCH 1
|
||||
|
||||
/* For Rolo and boot loader */
|
||||
#define MODEL_NUMBER 3
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
#define APPLE_IPODNANO 1
|
||||
|
||||
#define IPOD_ARCH 1
|
||||
|
||||
/* For Rolo and boot loader */
|
||||
#define MODEL_NUMBER 4
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*/
|
||||
#define APPLE_IPODVIDEO 1
|
||||
|
||||
#define IPOD_ARCH 1
|
||||
|
||||
/* For Rolo and boot loader */
|
||||
#define MODEL_NUMBER 5
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@
|
|||
#define LCD_IFP7XX 10 /* as used by iRiver iFP 7xx/8xx */
|
||||
|
||||
/* LCD_PIXELFORMAT */
|
||||
#define HORIZONTAL_PACKING 1
|
||||
#define VERTICAL_PACKING 2
|
||||
#define RGB565 565
|
||||
#define RGB565SWAPPED 3553
|
||||
|
||||
|
|
|
@ -192,10 +192,12 @@ typedef void lcd_fastpixelfunc_type(fb_data *address);
|
|||
/* Memory copy of display bitmap */
|
||||
#if LCD_DEPTH == 1
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
|
||||
#elif CONFIG_LCD == LCD_IPOD2BPP
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH/4];
|
||||
#elif LCD_DEPTH == 2
|
||||
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH/4];
|
||||
#else
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
|
||||
#endif
|
||||
#elif LCD_DEPTH == 16
|
||||
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
|
||||
#elif LCD_DEPTH == 18
|
||||
|
|
BIN
uisimulator/sdl/UI-ipod4g.bmp
Normal file
BIN
uisimulator/sdl/UI-ipod4g.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 KiB |
|
@ -73,7 +73,11 @@ void lcd_update_rect(int x_start, int y_start, int width, int height)
|
|||
#if LCD_DEPTH == 1
|
||||
*p = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1);
|
||||
#elif LCD_DEPTH == 2
|
||||
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
|
||||
*p = ((lcd_framebuffer[y][x/4] >> (2 * (x & 3))) & 3);
|
||||
#else
|
||||
*p = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
|
||||
#endif
|
||||
#elif LCD_DEPTH == 16
|
||||
#if LCD_PIXELFORMAT == RGB565SWAPPED
|
||||
unsigned bits = lcd_framebuffer[y][x];
|
||||
|
|
|
@ -109,6 +109,18 @@
|
|||
#define UI_REMOTE_WIDTH 128
|
||||
#define UI_REMOTE_HEIGHT 64
|
||||
|
||||
#elif defined(IPOD_4G)
|
||||
#define UI_TITLE "iPod 4G"
|
||||
#define UI_WIDTH 196 // width of GUI window
|
||||
#define UI_HEIGHT 370 // height of GUI window
|
||||
#define UI_LCD_BGCOLOR 90, 145, 90 // bkgnd color of LCD (no backlight)
|
||||
#define UI_LCD_BGCOLORLIGHT 173, 216, 230 // bkgnd color of LCD (backlight)
|
||||
#define UI_LCD_BLACK 0, 0, 0 // black
|
||||
#define UI_LCD_POSX 19 // x position of lcd
|
||||
#define UI_LCD_POSY 14 // y position of lcd
|
||||
#define UI_LCD_WIDTH 160
|
||||
#define UI_LCD_HEIGHT 128
|
||||
|
||||
#elif defined(IPOD_COLOR)
|
||||
#define UI_TITLE "iPod Color"
|
||||
#define UI_WIDTH 261 // width of GUI window
|
||||
|
|
Loading…
Reference in a new issue