summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-07-06 22:58:02 +0000
committerJens Arnold <amiconn@rockbox.org>2005-07-06 22:58:02 +0000
commitf894a4c2691fbde1758a05407cb5eadcaec4a6c8 (patch)
tree46cb7ce63c794020175ab251cf0299663be8bf3c
parent1076eb1d2720b88757616f642be0c39c6a3b76df (diff)
downloadrockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.tar.gz
rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.tar.bz2
rockbox-f894a4c2691fbde1758a05407cb5eadcaec4a6c8.zip
4-shades greyscale graphics core for iriver H1x0. 4-grey rockbox logo and light grey background in splash() boxes. Simplified the splash() box creation as the new graphics core does clipping. Adapted screendump feature and added flexible preprocessing to construct the bmp header. Rockboy now uses 4-grey mode as well. 4-grey support for win32 simulator. Fixed win32 player sim to not use double bitmap conversion via a recorder-like framebuffer, and correctly display double-height text. X11 simulator temporarily adapted. The display won't be distorted, but it still shows b&w only.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7046 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main_menu.c2
-rw-r--r--apps/menu.c2
-rw-r--r--apps/misc.c105
-rw-r--r--apps/playlist_viewer.c4
-rw-r--r--apps/plugin.c4
-rw-r--r--apps/plugin.h8
-rw-r--r--apps/plugins/bounce.c10
-rw-r--r--apps/plugins/chessclock.c2
-rw-r--r--apps/plugins/chip8.c2
-rw-r--r--apps/plugins/clock.c200
-rw-r--r--apps/plugins/flipit.c8
-rw-r--r--apps/plugins/logo.c2
-rw-r--r--apps/plugins/minesweeper.c2
-rw-r--r--apps/plugins/rockboy/lcd-gb.h2
-rw-r--r--apps/plugins/rockboy/lcd.c4
-rw-r--r--apps/plugins/rockboy/sys_rockbox.c8
-rw-r--r--apps/plugins/sliding_puzzle.c2
-rw-r--r--apps/plugins/snake2.c6
-rw-r--r--apps/plugins/snow.c4
-rw-r--r--apps/plugins/solitaire.c12
-rw-r--r--apps/plugins/splitedit.c8
-rw-r--r--apps/plugins/star.c52
-rw-r--r--apps/plugins/vu_meter.c48
-rw-r--r--apps/recorder/icons.c314
-rw-r--r--apps/recorder/icons.h2
-rw-r--r--apps/recorder/peakmeter.c20
-rw-r--r--apps/recorder/recording.c20
-rw-r--r--apps/screens.c69
-rw-r--r--apps/status.c8
-rw-r--r--apps/tree.c6
-rw-r--r--apps/wps-display.c2
-rw-r--r--firmware/drivers/lcd-h100.c370
-rw-r--r--firmware/drivers/lcd-recorder.c2
-rw-r--r--firmware/export/config-player.h1
-rw-r--r--firmware/export/lcd.h21
-rw-r--r--uisimulator/win32/lcd-win32.c161
-rw-r--r--uisimulator/win32/lcd-win32.h20
-rw-r--r--uisimulator/win32/uisw32.c2
-rw-r--r--uisimulator/x11/lcd-x11.c42
39 files changed, 992 insertions, 565 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index 37a8ff4711..b887ed6504 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -75,7 +75,7 @@ int show_logo( void )
lcd_bitmap(rockbox112x37, 0, 10, 112, 37);
#endif
#if LCD_WIDTH >= 160
- lcd_bitmap(rockbox160x53, 0, 10, 160, 53);
+ lcd_bitmap(rockbox160x53x2, 0, 10, 160, 53);
#endif
#ifdef HAVE_REMOTE_LCD
diff --git a/apps/menu.c b/apps/menu.c
index 459abe6849..cdcafec770 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -116,7 +116,7 @@ void put_cursorxy(int x, int y, bool on)
/* place the cursor */
if(on) {
#ifdef HAVE_LCD_BITMAP
- lcd_bitmap(bitmap_icons_6x8[Cursor], xpos, ypos, 4, 8);
+ lcd_mono_bitmap(bitmap_icons_6x8[Cursor], xpos, ypos, 4, 8);
#else
lcd_putc(x, y, CURSOR_CHAR);
#endif
diff --git a/apps/misc.c b/apps/misc.c
index 055bcd2983..9a890155a7 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -136,35 +136,81 @@ int read_line(int fd, char* buffer, int buffer_size)
}
#ifdef HAVE_LCD_BITMAP
-extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
-static const unsigned char bmpheader[] =
-{
- 0x42, 0x4d, 0x3e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
- 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, LCD_WIDTH, 0x00, 0x00, 0x00, LCD_HEIGHT, 0x00,
- 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
-#if LCD_WIDTH == 160
- 0x00, 0x00, 0x00, 0x0a,
+
+#if LCD_DEPTH <= 8
+#define BMP_NUMCOLORS (1 << LCD_DEPTH)
#else
- 0x00, 0x00, 0x00, 0x04,
+#define BMP_NUMCOLORS 0
#endif
- 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0xc4, 0x0e, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-#ifdef IRIVER_H100
- 0xe6, 0xd8, 0xad,
+
+#if LCD_DEPTH == 1
+#define BMP_BPP 1
+#define BMP_LINESIZE ((LCD_WIDTH/8 + 3) & ~3)
+#elif LCD_DEPTH <= 4
+#define BMP_BPP 4
+#define BMP_LINESIZE ((LCD_WIDTH/2 + 3) & ~3)
+#elif LCD_DEPTH <= 8
+#define BMP_BPP 8
+#define BMP_LINESIZE ((LCD_WIDTH + 3) & ~3)
+#elif LCD_DEPTH <= 16
+#define BMP_BPP 16
+#define BMP_LINESIZE ((LCD_WIDTH*2 + 3) & ~3)
#else
- 0x90, 0xee, 0x90,
+#define BMP_BPP 24
+#define BMP_LINESIZE ((LCD_WIDTH*3 + 3) & ~3)
+#endif
+
+#define BMP_HEADERSIZE (54 + 4 * BMP_NUMCOLORS)
+#define BMP_DATASIZE (BMP_LINESIZE * LCD_HEIGHT)
+#define BMP_TOTALSIZE (BMP_HEADERSIZE + BMP_DATASIZE)
+
+#define LE16_CONST(x) (x)&0xff, ((x)>>8)&0xff
+#define LE32_CONST(x) (x)&0xff, ((x)>>8)&0xff, ((x)>>16)&0xff, ((x)>>24)&0xff
+
+static const unsigned char bmpheader[] =
+{
+ 0x42, 0x4d, /* 'BM' */
+ LE32_CONST(BMP_TOTALSIZE), /* Total file size */
+ 0x00, 0x00, 0x00, 0x00, /* Reserved */
+ LE32_CONST(BMP_HEADERSIZE), /* Offset to start of pixel data */
+
+ 0x28, 0x00, 0x00, 0x00, /* Size of (2nd) header */
+ LE32_CONST(LCD_WIDTH), /* Width in pixels */
+ LE32_CONST(LCD_HEIGHT), /* Height in pixels */
+ 0x01, 0x00, /* Number of planes (always 1) */
+ LE16_CONST(BMP_BPP), /* Bits per pixel 1/4/8/16/24 */
+ 0x00, 0x00, 0x00, 0x00, /* Compression mode, 0 = none */
+ LE32_CONST(BMP_DATASIZE), /* Size of bitmap data */
+ 0xc4, 0x0e, 0x00, 0x00, /* Horizontal resolution (pixels/meter) */
+ 0xc4, 0x0e, 0x00, 0x00, /* Vertical resolution (pixels/meter) */
+ LE32_CONST(BMP_NUMCOLORS), /* Number of used colours */
+ LE32_CONST(BMP_NUMCOLORS), /* Number of important colours */
+
+#if LCD_DEPTH == 1
+ 0x90, 0xee, 0x90, 0x00, /* Colour #0 */
+ 0x00, 0x00, 0x00, 0x00 /* Colour #1 */
+#elif LCD_DEPTH == 2
+ 0xe6, 0xd8, 0xad, 0x00, /* Colour #0 */
+ 0x99, 0x90, 0x73, 0x00, /* Colour #1 */
+ 0x4c, 0x48, 0x39, 0x00, /* Colour #2 */
+ 0x00, 0x00, 0x00, 0x00 /* Colour #3 */
#endif
- 0x00, 0x00, 0x00,
- 0x00, 0x00
};
void screen_dump(void)
{
int fh;
- int bx, by, ix, iy;
- int src_byte, src_mask, dst_mask;
+ int bx, by, iy;
+ int src_byte;
char filename[MAX_PATH];
- static unsigned char line_block[8][(LCD_WIDTH/8+3) & ~3];
+#if LCD_DEPTH == 1
+ int ix, src_mask, dst_mask;
+ static unsigned char line_block[8][BMP_LINESIZE];
+#elif LCD_DEPTH == 2
+ int src_byte2;
+ static unsigned char line_block[4][BMP_LINESIZE];
+#endif
+
#ifdef HAVE_RTC
struct tm *tm = get_time();
@@ -213,6 +259,7 @@ void screen_dump(void)
write(fh, bmpheader, sizeof(bmpheader));
/* BMP image goes bottom up */
+#if LCD_DEPTH == 1
for (by = LCD_HEIGHT/8 - 1; by >= 0; by--)
{
memset(&line_block[0][0], 0, sizeof(line_block));
@@ -236,6 +283,26 @@ void screen_dump(void)
write(fh, &line_block[0][0], sizeof(line_block));
}
+#elif LCD_DEPTH == 2
+ for (by = LCD_HEIGHT/4 - 1; by >= 0; by--)
+ {
+ memset(&line_block[0][0], 0, sizeof(line_block));
+
+ for (bx = 0; bx < LCD_WIDTH/2; bx++)
+ {
+ src_byte = lcd_framebuffer[by][2*bx];
+ src_byte2 = lcd_framebuffer[by][2*bx+1];
+ for (iy = 3; iy >= 0; iy--)
+ {
+ line_block[iy][bx] = ((src_byte & 3) << 4) | (src_byte2 & 3);
+ src_byte >>= 2;
+ src_byte2 >>= 2;
+ }
+ }
+
+ write(fh, &line_block[0][0], sizeof(line_block));
+ }
+#endif
close(fh);
}
#endif
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 21ae4d7645..32cc6035e0 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -461,8 +461,8 @@ static void display_playlist(void)
int offset=0;
if ( viewer.line_height > 8 )
offset = (viewer.line_height - 8) / 2;
- lcd_bitmap(bitmap_icons_6x8[File],
- CURSOR_X * 6 + CURSOR_WIDTH,
+ lcd_mono_bitmap(bitmap_icons_6x8[File],
+ CURSOR_X * 6 + CURSOR_WIDTH,
MARGIN_Y+(i*viewer.line_height) + offset, 6, 8);
#else
lcd_putc(LINE_X-1, i, File);
diff --git a/apps/plugin.c b/apps/plugin.c
index c92813d0cf..6061e86aa1 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -114,8 +114,8 @@ static const struct plugin_api rockbox_api = {
lcd_vline,
lcd_drawrect,
lcd_fillrect,
- lcd_bitmap_part,
- lcd_bitmap,
+ lcd_mono_bitmap_part,
+ lcd_mono_bitmap,
lcd_putsxy,
lcd_puts_style,
lcd_puts_scroll_style,
diff --git a/apps/plugin.h b/apps/plugin.h
index 46308a1e0b..2f724f3d2e 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -164,10 +164,10 @@ struct plugin_api {
void (*lcd_vline)(int x, int y1, int y2);
void (*lcd_drawrect)(int x, int y, int width, int height);
void (*lcd_fillrect)(int x, int y, int width, int height);
- void (*lcd_bitmap_part)(const unsigned char *src, int src_x, int src_y,
- int stride, int x, int y, int width, int height);
- void (*lcd_bitmap)(const unsigned char *src, int x, int y,
- int width, int height);
+ void (*lcd_mono_bitmap_part)(const unsigned char *src, int src_x, int src_y,
+ int stride, int x, int y, int width, int height);
+ void (*lcd_mono_bitmap)(const unsigned char *src, int x, int y,
+ int width, int height);
void (*lcd_putsxy)(int x, int y, const unsigned char *string);
void (*lcd_puts_style)(int x, int y, const unsigned char *str, int style);
void (*lcd_puts_scroll_style)(int x, int y, const unsigned char* string,
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c
index 98dcd5ff66..676d8fe169 100644
--- a/apps/plugins/bounce.c
+++ b/apps/plugins/bounce.c
@@ -309,8 +309,8 @@ static int scrollit(void)
for(i=0, yy=y, xx=x; i< LETTERS_ON_SCREEN; i++) {
letter = rock[(i+textpos) % rocklen ];
- rb->lcd_bitmap((char *)char_gen_12x16[letter-0x20],
- xx, table[yy&(TABLE_SIZE-1)], 11, 16);
+ rb->lcd_mono_bitmap((char *)char_gen_12x16[letter-0x20],
+ xx, table[yy&(TABLE_SIZE-1)], 11, 16);
yy += YADD;
xx+= LCD_WIDTH/LETTERS_ON_SCREEN;
}
@@ -399,9 +399,9 @@ static int loopit(void)
for(i=0, yy=y, xx=x;
i<rocklen;
i++, yy+=values[NUM_YDIST].num, xx+=values[NUM_XDIST].num)
- rb->lcd_bitmap((char *)char_gen_12x16[rock[i]-0x20],
- xtable[xx&(TABLE_SIZE-1)], table[yy&(TABLE_SIZE-1)],
- 11, 16);
+ rb->lcd_mono_bitmap((char *)char_gen_12x16[rock[i]-0x20],
+ xtable[xx&(TABLE_SIZE-1)],
+ table[yy&(TABLE_SIZE-1)], 11, 16);
rb->lcd_update();
rb->lcd_set_drawmode(DRMODE_SOLID);
diff --git a/apps/plugins/chessclock.c b/apps/plugins/chessclock.c
index 1c394df9de..d81b71ee44 100644
--- a/apps/plugins/chessclock.c
+++ b/apps/plugins/chessclock.c
@@ -215,7 +215,7 @@ static void show_pause_mode(bool enabled)
static const char pause_icon[] = {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00};
if (enabled)
- rb->lcd_bitmap(pause_icon, 52, 0, 7, 8);
+ rb->lcd_mono_bitmap(pause_icon, 52, 0, 7, 8);
else
{
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
diff --git a/apps/plugins/chip8.c b/apps/plugins/chip8.c
index fab5eab102..e990742c9f 100644
--- a/apps/plugins/chip8.c
+++ b/apps/plugins/chip8.c
@@ -1062,7 +1062,7 @@ static void chip8_update_display(void)
}
#ifdef SIMULATOR
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, CHIP8_HEIGHT);
+ rb->lcd_mono_bitmap(lcd_framebuf[0], CHIP8_X, CHIP8_Y, CHIP8_LCDWIDTH, CHIP8_HEIGHT);
rb->lcd_update();
#else
rb->lcd_blit(lcd_framebuf[0], CHIP8_X, CHIP8_Y>>3, CHIP8_LCDWIDTH, CHIP8_HEIGHT>>3
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c
index bddda15f5f..6830c74d53 100644
--- a/apps/plugins/clock.c
+++ b/apps/plugins/clock.c
@@ -788,9 +788,9 @@ bool colon, bool lcd)
if(settings.digital_12h)
{
if(hour > 12)
- rb->lcd_bitmap(pm, 97, 55, 15, 8);
+ rb->lcd_mono_bitmap(pm, 97, 55, 15, 8);
else
- rb->lcd_bitmap(am, 1, 55, 15, 8);
+ rb->lcd_mono_bitmap(am, 1, 55, 15, 8);
}
}
else
@@ -798,9 +798,9 @@ bool colon, bool lcd)
if(settings.lcd_12h)
{
if(hour > 12)
- rb->lcd_bitmap(pm, 97, 55, 15, 8);
+ rb->lcd_mono_bitmap(pm, 97, 55, 15, 8);
else
- rb->lcd_bitmap(am, 1, 55, 15, 8);
+ rb->lcd_mono_bitmap(am, 1, 55, 15, 8);
}
}
@@ -881,138 +881,138 @@ void binary(int hour, int minute, int second)
*****/
if(temphour >= 32)
{
- rb->lcd_bitmap(bitmap_1, 0, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 0, 1, 15, 20);
temphour -= 32;
}
else
- rb->lcd_bitmap(bitmap_0, 0, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 0, 1, 15, 20);
if(temphour >= 16)
{
- rb->lcd_bitmap(bitmap_1, 19, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 19, 1, 15, 20);
temphour -= 16;
}
else
- rb->lcd_bitmap(bitmap_0, 19, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 19, 1, 15, 20);
if(temphour >= 8)
{
- rb->lcd_bitmap(bitmap_1, 38, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 38, 1, 15, 20);
temphour -= 8;
}
else
- rb->lcd_bitmap(bitmap_0, 38, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 38, 1, 15, 20);
if(temphour >= 4)
{
- rb->lcd_bitmap(bitmap_1, 57, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 57, 1, 15, 20);
temphour -= 4;
}
else
- rb->lcd_bitmap(bitmap_0, 57, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 57, 1, 15, 20);
if(temphour >= 2)
{
- rb->lcd_bitmap(bitmap_1, 76, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 76, 1, 15, 20);
temphour -= 2;
}
else
- rb->lcd_bitmap(bitmap_0, 76, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 76, 1, 15, 20);
if(temphour >= 1)
{
- rb->lcd_bitmap(bitmap_1, 95, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 95, 1, 15, 20);
temphour -= 1;
}
else
- rb->lcd_bitmap(bitmap_0, 95, 1, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 95, 1, 15, 20);
/*********
* MINUTES
********/
if(tempmin >= 32)
{
- rb->lcd_bitmap(bitmap_1, 0, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 0, 21, 15, 20);
tempmin -= 32;
}
else
- rb->lcd_bitmap(bitmap_0, 0, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 0, 21, 15, 20);
if(tempmin >= 16)
{
- rb->lcd_bitmap(bitmap_1, 19, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 19, 21, 15, 20);
tempmin -= 16;
}
else
- rb->lcd_bitmap(bitmap_0, 19, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 19, 21, 15, 20);
if(tempmin >= 8)
{
- rb->lcd_bitmap(bitmap_1, 38, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 38, 21, 15, 20);
tempmin -= 8;
}
else
- rb->lcd_bitmap(bitmap_0, 38, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 38, 21, 15, 20);
if(tempmin >= 4)
{
- rb->lcd_bitmap(bitmap_1, 57, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 57, 21, 15, 20);
tempmin -= 4;
}
else
- rb->lcd_bitmap(bitmap_0, 57, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 57, 21, 15, 20);
if(tempmin >= 2)
{
- rb->lcd_bitmap(bitmap_1, 76, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 76, 21, 15, 20);
tempmin -= 2;
}
else
- rb->lcd_bitmap(bitmap_0, 76, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 76, 21, 15, 20);
if(tempmin >= 1)
{
- rb->lcd_bitmap(bitmap_1, 95, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 95, 21, 15, 20);
tempmin -= 1;
}
else
- rb->lcd_bitmap(bitmap_0, 95, 21, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 95, 21, 15, 20);
/*********
* SECONDS
********/
if(tempsec >= 32)
{
- rb->lcd_bitmap(bitmap_1, 0, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 0, 42, 15, 20);
tempsec -= 32;
}
else
- rb->lcd_bitmap(bitmap_0, 0, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 0, 42, 15, 20);
if(tempsec >= 16)
{
- rb->lcd_bitmap(bitmap_1, 19, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 19, 42, 15, 20);
tempsec -= 16;
}
else
- rb->lcd_bitmap(bitmap_0, 19, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 19, 42, 15, 20);
if(tempsec >= 8)
{
- rb->lcd_bitmap(bitmap_1, 38, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 38, 42, 15, 20);
tempsec -= 8;
}
else
- rb->lcd_bitmap(bitmap_0, 38, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 38, 42, 15, 20);
if(tempsec >= 4)
{
- rb->lcd_bitmap(bitmap_1, 57, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 57, 42, 15, 20);
tempsec -= 4;
}
else
- rb->lcd_bitmap(bitmap_0, 57, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 57, 42, 15, 20);
if(tempsec >= 2)
{
- rb->lcd_bitmap(bitmap_1, 76, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 76, 42, 15, 20);
tempsec -= 2;
}
else
- rb->lcd_bitmap(bitmap_0, 76, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 76, 42, 15, 20);
if(tempsec >= 1)
{
- rb->lcd_bitmap(bitmap_1, 95, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_1, 95, 42, 15, 20);
tempsec -= 1;
}
else
- rb->lcd_bitmap(bitmap_0, 95, 42, 15, 20);
+ rb->lcd_mono_bitmap(bitmap_0, 95, 42, 15, 20);
rb->lcd_update();
}
@@ -1039,7 +1039,7 @@ void show_logo(bool animate, bool show_clock_text)
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
+ rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1051,7 +1051,7 @@ void show_logo(bool animate, bool show_clock_text)
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
+ rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1063,7 +1063,7 @@ void show_logo(bool animate, bool show_clock_text)
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_drawline(0, y_position/2+38, 111, y_position/2+38);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
+ rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1071,7 +1071,7 @@ void show_logo(bool animate, bool show_clock_text)
}
else /* don't animate, just show */
{
- rb->lcd_bitmap(clogo, 0, 10, 112, 37);
+ rb->lcd_mono_bitmap(clogo, 0, 10, 112, 37);
if(show_clock_text)
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 48, buf);
rb->lcd_update();
@@ -1094,7 +1094,7 @@ void exit_logo(void)
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_drawline(0, y_position/2-1, 111, y_position/2-1);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(clogo, 0, y_position/2, 112, 37);
+ rb->lcd_mono_bitmap(clogo, 0, y_position/2, 112, 37);
rb->lcd_update();
}
}
@@ -1511,9 +1511,9 @@ bool f1_screen(void)
void draw_checkbox(bool setting, int x, int y)
{
if(setting) /* checkbox is on */
- rb->lcd_bitmap(checkbox_full, x, y, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, x, y, 8, 6);
else /* checkbox is off */
- rb->lcd_bitmap(checkbox_empty, x, y, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_empty, x, y, 8, 6);
}
void draw_settings(void)
@@ -1544,18 +1544,18 @@ void draw_settings(void)
draw_checkbox(settings.analog_digits, 1, 33);
if(settings.analog_date == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_empty, 1, 41, 8, 6);
else if(settings.analog_date == 1)
- rb->lcd_bitmap(checkbox_half, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_half, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6);
if(settings.analog_time == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 49, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_empty, 1, 49, 8, 6);
else if(settings.analog_time == 1)
- rb->lcd_bitmap(checkbox_half, 1, 49, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_half, 1, 49, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 49, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 49, 8, 6);
draw_checkbox(settings.analog_secondhand, 1, 57);
}
@@ -1584,20 +1584,20 @@ void draw_settings(void)
/* Draw checkboxes */
if(settings.digital_date == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_empty, 1, 33, 8, 6);
else if(settings.digital_date == 1)
- rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_half, 1, 33, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 33, 8, 6);
if(settings.digital_seconds == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_empty, 1, 41, 8, 6);
else if(settings.digital_seconds == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.digital_seconds == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6);
draw_checkbox(settings.digital_blinkcolon, 1, 49);
draw_checkbox(settings.digital_12h, 1, 57);
@@ -1627,20 +1627,20 @@ void draw_settings(void)
/* Draw checkboxes */
if(settings.lcd_date == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_empty, 1, 33, 8, 6);
else if(settings.lcd_date == 1)
- rb->lcd_bitmap(checkbox_half, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_half, 1, 33, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 33, 8, 6);
if(settings.lcd_seconds == 0)
- rb->lcd_bitmap(checkbox_empty, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_empty, 1, 41, 8, 6);
else if(settings.lcd_seconds == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.lcd_seconds == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6);
draw_checkbox(settings.lcd_blinkcolon, 1, 49);
draw_checkbox(settings.lcd_12h, 1, 57);
@@ -2131,16 +2131,16 @@ void general_settings(void)
rb->lcd_getstringsize(buf, &buf_w, &buf_h);
rb->lcd_putsxy(LCD_WIDTH/2-buf_w/2, 56, buf);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6);
draw_checkbox(settings.display_counter, 1, 33);
if(settings.save_mode == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.save_mode == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6);
switch(cursorpos)
{
@@ -2181,15 +2181,15 @@ void general_settings(void)
rb->lcd_puts(2, 5, "Save: Automatic");
else
rb->lcd_puts(2, 5, "Save: Manually");
- rb->lcd_bitmap(arrow, 1, 17, 8, 6);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6);
draw_checkbox(settings.display_counter, 1, 33);
if(settings.save_mode == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.save_mode == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2218,15 +2218,15 @@ void general_settings(void)
rb->lcd_puts(2, 5, "Save: Automatic");
else
rb->lcd_puts(2, 5, "Save: Manually");
- rb->lcd_bitmap(arrow, 1, 17, 8, 6);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6);
draw_checkbox(settings.display_counter, 1, 33);
if(settings.save_mode == 1)
- rb->lcd_bitmap(checkbox_onethird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_onethird, 1, 41, 8, 6);
else if(settings.save_mode == 2)
- rb->lcd_bitmap(checkbox_twothird, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_twothird, 1, 41, 8, 6);
else
- rb->lcd_bitmap(checkbox_full, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(checkbox_full, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2323,9 +2323,9 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second)
if(settings.analog_time == 2)
{
if(current_time->tm_hour > 12) /* PM */
- rb->lcd_bitmap(pm, 96, 1, 15, 8);
+ rb->lcd_mono_bitmap(pm, 96, 1, 15, 8);
else /* AM */
- rb->lcd_bitmap(am, 96, 1, 15, 8);
+ rb->lcd_mono_bitmap(am, 96, 1, 15, 8);
}
}
@@ -2460,11 +2460,11 @@ void select_mode(void)
rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel");
/* draw an arrow next to all of them */
- rb->lcd_bitmap(arrow, 1, 9, 8, 6);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6);
- rb->lcd_bitmap(arrow, 1, 33, 8, 6);
- rb->lcd_bitmap(arrow, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 9, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 41, 8, 6);
/* draw line selector */
switch(cursorpos)
@@ -2501,11 +2501,11 @@ void select_mode(void)
rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel");
/* draw an arrow next to all of them */
- rb->lcd_bitmap(arrow, 1, 9, 8, 6);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6);
- rb->lcd_bitmap(arrow, 1, 33, 8, 6);
- rb->lcd_bitmap(arrow, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 9, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2535,11 +2535,11 @@ void select_mode(void)
rb->lcd_puts(0, 7, "PLAY:Go|OFF:Cancel");
/* draw an arrow next to all of them */
- rb->lcd_bitmap(arrow, 1, 9, 8, 6);
- rb->lcd_bitmap(arrow, 1, 17, 8, 6);
- rb->lcd_bitmap(arrow, 1, 25, 8, 6);
- rb->lcd_bitmap(arrow, 1, 33, 8, 6);
- rb->lcd_bitmap(arrow, 1, 41, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 9, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 17, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 25, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 33, 8, 6);
+ rb->lcd_mono_bitmap(arrow, 1, 41, 8, 6);
cursor(0, cursor_y, 112, 8);
rb->lcd_update();
@@ -2580,7 +2580,7 @@ void counter_finished(void)
rb->lcd_clear_display();
/* draw "TIME'S UP" text */
- rb->lcd_bitmap(times_up, 0, xpos, 112, 50);
+ rb->lcd_mono_bitmap(times_up, 0, xpos, 112, 50);
/* invert lcd */
rb->lcd_set_drawmode(DRMODE_COMPLEMENT);
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index d8d8eeb2ec..36411c2978 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -72,9 +72,9 @@ static unsigned char cursor_pic[32] = {
/* draw a spot at the coordinates (x,y), range of p is 0-19 */
static void draw_spot(int p) {
ptr = spot_pic[spots[p]];
- rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8);
+ rb->lcd_mono_bitmap (ptr, (p%5)*16+1, (p/5)*16+1, 14, 8);
ptr += 14;
- rb->lcd_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6);
+ rb->lcd_mono_bitmap (ptr, (p%5)*16+1, (p/5)*16+9, 14, 6);
}
/* draw the cursor at the current cursor position */
@@ -84,9 +84,9 @@ static void draw_cursor(void) {
j = (cursor_pos/5)*16;
rb->lcd_set_drawmode(DRMODE_FG);
ptr = cursor_pic;
- rb->lcd_bitmap (ptr, i, j, 16, 8);
+ rb->lcd_mono_bitmap (ptr, i, j, 16, 8);
ptr += 16;
- rb->lcd_bitmap (ptr, i, j+8, 16, 8);
+ rb->lcd_mono_bitmap (ptr, i, j+8, 16, 8);
rb->lcd_set_drawmode(DRMODE_SOLID);
}
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index 08e0266a75..ad8b8fd025 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -230,7 +230,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) {
while (1) {
#ifdef HAVE_LCD_BITMAP
rb->lcd_clear_display();
- rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
+ rb->lcd_mono_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
#ifdef REMOTE_LOGO
rb->lcd_remote_clear_display();
rb->lcd_remote_bitmap(REMOTE_LOGO,
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 907aaf71b3..aec9ba166b 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -381,7 +381,7 @@ int minesweeper(void)
rb->lcd_putsxy(j*8+1,i*8+1,"b");
} else if(minefield[i][j].neighbors){
rb->lcd_set_drawmode(DRMODE_FG);
- rb->lcd_bitmap(num[minefield[i][j].neighbors],j*8,i*8,8,8);
+ rb->lcd_mono_bitmap(num[minefield[i][j].neighbors],j*8,i*8,8,8);
rb->lcd_set_drawmode(DRMODE_SOLID);
}
} else if(minefield[i][j].flag) {
diff --git a/apps/plugins/rockboy/lcd-gb.h b/apps/plugins/rockboy/lcd-gb.h
index 3a612887e5..0b863b6eea 100644
--- a/apps/plugins/rockboy/lcd-gb.h
+++ b/apps/plugins/rockboy/lcd-gb.h
@@ -16,7 +16,7 @@ struct scan
{
int bg[64];
int wnd[64];
-#ifdef GRAYSCALE
+#if LCD_DEPTH == 2
byte buf[4][256];
#else
byte buf[8][256];
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index 651c82286f..9a7ead798f 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -786,7 +786,7 @@ void lcd_refreshline(void)
recolor(BUF+WX, 0x04, 160-WX);
}
spr_scan();
-#ifdef GRAYSCALE
+#if LCD_DEPTH == 2
if (scanline_ind == 3)
#else
if (scanline_ind == 7)
@@ -800,7 +800,7 @@ void lcd_refreshline(void)
#if LCD_HEIGHT == 64
scanline_ind = (scanline_ind+1) % 8;
#else
-#ifdef GRAYSCALE
+#if LCD_DEPTH == 2
scanline_ind = (scanline_ind+1) % 4;
#else
scanline_ind = (scanline_ind+1) % 8;
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c
index 45608b9f36..e8a4923eee 100644
--- a/apps/plugins/rockboy/sys_rockbox.c
+++ b/apps/plugins/rockboy/sys_rockbox.c
@@ -245,21 +245,21 @@ void vid_update(int scanline)
scanline-=16;
else if (fb.mode==2)
scanline-=8;
-#ifdef GRAYSCALE
+#if LCD_DEPTH == 2
scanline_remapped = scanline / 4;
#else
scanline_remapped = scanline / 8;
#endif
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
while (cnt < 160) {
-#ifdef GRAYSCALE
+#if LCD_DEPTH == 2
*(frameb++) = (scan.buf[0][cnt]&0x3) |
((scan.buf[1][cnt]&0x3)<<2) |
((scan.buf[2][cnt]&0x3)<<4) |
((scan.buf[3][cnt]&0x3)<<6);
cnt++;
}
- rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); //8);
+ rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4);
#else
register unsigned scrbyte = 0;
if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01;
@@ -274,7 +274,7 @@ void vid_update(int scanline)
cnt++;
}
rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8);
-#endif /* GRAYSCALE */
+#endif /* LCD_DEPTH */
#endif /* LCD_HEIGHT */
}
diff --git a/apps/plugins/sliding_puzzle.c b/apps/plugins/sliding_puzzle.c
index 3b9fe01bc8..acd66a033a 100644
--- a/apps/plugins/sliding_puzzle.c
+++ b/apps/plugins/sliding_puzzle.c
@@ -149,7 +149,7 @@ static unsigned char picture[20][32] = {
static void draw_spot(int p, int x, int y)
{
if (pic || p==20) {
- rb->lcd_bitmap (picture[p-1], x, y, 16, 16);
+ rb->lcd_mono_bitmap (picture[p-1], x, y, 16, 16);
} else {
rb->lcd_drawrect(x, y, 16, 16);
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c
index e1f0c32a66..815867af56 100644
--- a/apps/plugins/snake2.c
+++ b/apps/plugins/snake2.c
@@ -625,11 +625,11 @@ void draw_apple( void )
char pscore[5], counter[4];
rb->lcd_set_drawmode(DRMODE_FG);
- rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPHEIGHT_snakebmp);
+ rb->lcd_mono_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPHEIGHT_snakebmp);
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_fillrect(0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp);
rb->lcd_set_drawmode(DRMODE_FG);
- rb->lcd_bitmap(snakeupbmp,0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp);
+ rb->lcd_mono_bitmap(snakeupbmp,0,0,BMPWIDTH_snakeupbmp,BMPHEIGHT_snakeupbmp);
rb->lcd_set_drawmode(DRMODE_SOLID);
rb->snprintf(counter,sizeof(counter),"%d",applecount);
@@ -1303,7 +1303,7 @@ void game_init(void)
#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128
rb->lcd_set_drawmode(DRMODE_FG);
- rb->lcd_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPWIDTH_snakebmp);
+ rb->lcd_mono_bitmap(snakebmp,0,0,BMPWIDTH_snakebmp,BMPWIDTH_snakebmp);
rb->lcd_set_drawmode(DRMODE_SOLID);
rb->snprintf(plevel,sizeof(plevel),"%d",level);
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index 75c561427a..73ce386de9 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -118,8 +118,8 @@ static void snow_move(void)
}
if (particle_exists(i))
#ifdef HAVE_LCD_BITMAP
- rb->lcd_bitmap(flake,particles[i][0],particles[i][1],
- FLAKE_WIDTH,FLAKE_WIDTH);
+ rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1],
+ FLAKE_WIDTH,FLAKE_WIDTH);
#else
pgfx_drawpixel(particles[i][0],particles[i][1]);
#endif
diff --git a/apps/plugins/solitaire.c b/apps/plugins/solitaire.c
index 880b5a0ad9..89cadc3592 100644
--- a/apps/plugins/solitaire.c
+++ b/apps/plugins/solitaire.c
@@ -902,8 +902,8 @@ int solitaire(void){
rb->lcd_set_drawmode(DRMODE_SOLID);
/* known card */
if(deck[c].known){
- rb->lcd_bitmap(numbers[deck[c].num], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1, j, 8, 8);
- rb->lcd_bitmap(colors[deck[c].color], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+7, j, 8, 8);
+ rb->lcd_mono_bitmap(numbers[deck[c].num], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1, j, 8, 8);
+ rb->lcd_mono_bitmap(colors[deck[c].color], i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+7, j, 8, 8);
}
/* draw top line of the card */
rb->lcd_drawline(i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+1,j,i*(LCD_WIDTH - CARD_WIDTH)/COL_NUM+CARD_WIDTH-1,j);
@@ -946,9 +946,9 @@ int solitaire(void){
}
}
if(c != NOT_A_CARD) {
- rb->lcd_bitmap(numbers[deck[c].num], LCD_WIDTH2 - CARD_WIDTH+1, i*CARD_HEIGHT, 8, 8);
+ rb->lcd_mono_bitmap(numbers[deck[c].num], LCD_WIDTH2 - CARD_WIDTH+1, i*CARD_HEIGHT, 8, 8);
}
- rb->lcd_bitmap(colors[i], LCD_WIDTH2 - CARD_WIDTH+7, i*CARD_HEIGHT, 8, 8);
+ rb->lcd_mono_bitmap(colors[i], LCD_WIDTH2 - CARD_WIDTH+7, i*CARD_HEIGHT, 8, 8);
/* draw a selected card */
if(c != NOT_A_CARD) {
if(sel_card == c){
@@ -978,8 +978,8 @@ int solitaire(void){
rb->lcd_drawline(LCD_WIDTH2,LCD_HEIGHT-CARD_HEIGHT,LCD_WIDTH2,LCD_HEIGHT-2);
#endif
if(cur_rem != NOT_A_CARD){
- rb->lcd_bitmap(numbers[deck[cur_rem].num], LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT, 8, 8);
- rb->lcd_bitmap(colors[deck[cur_rem].color], LCD_WIDTH2 - CARD_WIDTH+7, LCD_HEIGHT-CARD_HEIGHT, 8, 8);
+ rb->lcd_mono_bitmap(numbers[deck[cur_rem].num], LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT, 8, 8);
+ rb->lcd_mono_bitmap(colors[deck[cur_rem].color], LCD_WIDTH2 - CARD_WIDTH+7, LCD_HEIGHT-CARD_HEIGHT, 8, 8);
/* draw a selected card */
if(sel_card == cur_rem){
rb->lcd_drawrect(LCD_WIDTH2 - CARD_WIDTH+1, LCD_HEIGHT-CARD_HEIGHT,CARD_WIDTH-1, CARD_HEIGHT-1);
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c
index e6d8551d63..142590d9e8 100644
--- a/apps/plugins/splitedit.c
+++ b/apps/plugins/splitedit.c
@@ -260,18 +260,18 @@ static void update_icons(void)
rb->lcd_set_drawmode(DRMODE_SOLID);
/* The CUT icon */
- rb->lcd_bitmap(CUT_BMP,
+ rb->lcd_mono_bitmap(CUT_BMP,
LCD_WIDTH / 3 / 2 - BMPWIDTH / 2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
/* The loop mode icon */
- rb->lcd_bitmap(LOOP_BMP[splitedit_get_loop_mode()],
+ rb->lcd_mono_bitmap(LOOP_BMP[splitedit_get_loop_mode()],
LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
/* The scale icon */
- rb->lcd_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()],
+ rb->lcd_mono_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs()],
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
#else
@@ -279,7 +279,7 @@ static void update_icons(void)
static int idx;
if (idx < 0 || idx > 1) idx = 0;
idx = 1 - idx;
- rb->lcd_bitmap(SCALE_BMP[idx],
+ rb->lcd_mono_bitmap(SCALE_BMP[idx],
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
}
diff --git a/apps/plugins/star.c b/apps/plugins/star.c
index 9b2e0bb010..9dd3659f52 100644
--- a/apps/plugins/star.c
+++ b/apps/plugins/star.c
@@ -485,11 +485,11 @@ static void star_display_board_info(void)
rb->lcd_putsxy(0, label_offset_y, str_info);
if (control == STAR_CONTROL_BALL)
- rb->lcd_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
- STAR_TILE_SIZE);
+ rb->lcd_mono_bitmap (ball_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
+ STAR_TILE_SIZE);
else
- rb->lcd_bitmap (block_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
- STAR_TILE_SIZE);
+ rb->lcd_mono_bitmap (block_bmp, 103, label_offset_y + 1, STAR_TILE_SIZE,
+ STAR_TILE_SIZE);
rb->lcd_update_rect(0, label_offset_y, LCD_WIDTH, char_height);
}
@@ -520,37 +520,37 @@ static int star_load_level(int current_level)
break;
case STAR_WALL:
- rb->lcd_bitmap (wall_bmp,
- STAR_OFFSET_X + x * STAR_TILE_SIZE,
- STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE);
+ rb->lcd_mono_bitmap (wall_bmp,
+ STAR_OFFSET_X + x * STAR_TILE_SIZE,
+ STAR_OFFSET_Y + y * STAR_TILE_SIZE,
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
break;
case STAR_STAR:
- rb->lcd_bitmap (star_bmp,
- STAR_OFFSET_X + x * STAR_TILE_SIZE,
- STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE);
+ rb->lcd_mono_bitmap (star_bmp,
+ STAR_OFFSET_X + x * STAR_TILE_SIZE,
+ STAR_OFFSET_Y + y * STAR_TILE_SIZE,
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
star_count++;
break;
case STAR_BALL:
ball_x = x;
ball_y = y;
- rb->lcd_bitmap (ball_bmp,
- STAR_OFFSET_X + x * STAR_TILE_SIZE,
- STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE);
+ rb->lcd_mono_bitmap (ball_bmp,
+ STAR_OFFSET_X + x * STAR_TILE_SIZE,
+ STAR_OFFSET_Y + y * STAR_TILE_SIZE,
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
break;
case STAR_BLOCK:
block_x = x;
block_y = y;
- rb->lcd_bitmap (block_bmp,
- STAR_OFFSET_X + x * STAR_TILE_SIZE,
- STAR_OFFSET_Y + y * STAR_TILE_SIZE,
- STAR_TILE_SIZE, STAR_TILE_SIZE);
+ rb->lcd_mono_bitmap (block_bmp,
+ STAR_OFFSET_X + x * STAR_TILE_SIZE,
+ STAR_OFFSET_Y + y * STAR_TILE_SIZE,
+ STAR_TILE_SIZE, STAR_TILE_SIZE);
break;
}
ptr_tab++;
@@ -665,7 +665,7 @@ static int star_run_game(void)
{
for (i = 0 ; i < 7 ; i++)
{
- rb->lcd_bitmap(
+ rb->lcd_mono_bitmap(
ball_bmp,
STAR_OFFSET_X + ball_x * STAR_TILE_SIZE + move_x * i,
STAR_OFFSET_Y + ball_y * STAR_TILE_SIZE + move_y * i,
@@ -697,7 +697,7 @@ static int star_run_game(void)
{
for (i = 0 ; i < 7 ; i++)
{
- rb->lcd_bitmap(
+ rb->lcd_mono_bitmap(
block_bmp,
STAR_OFFSET_X + block_x * STAR_TILE_SIZE + move_x * i,
STAR_OFFSET_Y + block_y * STAR_TILE_SIZE + move_y * i,
@@ -766,8 +766,8 @@ static int star_menu(void)
}
move_y = 0;
- rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
- 2, menu_offset_y + menu_y * char_height, 7, 8);
+ rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
+ 2, menu_offset_y + menu_y * char_height, 7, 8);
rb->lcd_update_rect (2, menu_offset_y + menu_y * 8, 8, 8);
rb->sleep(STAR_SLEEP);
anim_state++;
@@ -842,8 +842,8 @@ static int star_menu(void)
rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
rb->lcd_fillrect (2, 30, 7, 4 * 8);
rb->lcd_set_drawmode(DRMODE_FG);
- rb->lcd_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
- 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8);
+ rb->lcd_mono_bitmap(arrow_bmp[anim_arrow[(anim_state & 0x38) >> 3]],
+ 2, menu_offset_y + menu_y * 8 + move_y * i, 7, 8);
rb->lcd_update_rect(2, 30, 8, 4 * 8);
anim_state++;
rb->sleep(STAR_SLEEP);
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index d54f86de06..c2db45ed88 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -278,54 +278,54 @@ void change_settings(void)
}
void draw_analog_minimeters(void) {
- rb->lcd_bitmap(sound_speaker, 0, 12, 4, 8);
+ rb->lcd_mono_bitmap(sound_speaker, 0, 12, 4, 8);
rb->lcd_set_drawmode(DRMODE_FG);
if(5<left_needle_top_x)
- rb->lcd_bitmap(sound_low_level, 5, 12, 2, 8);
+ rb->lcd_mono_bitmap(sound_low_level, 5, 12, 2, 8);
if(12<left_needle_top_x)
- rb->lcd_bitmap(sound_med_level, 7, 12, 2, 8);
+ rb->lcd_mono_bitmap(sound_med_level, 7, 12, 2, 8);
if(24<left_needle_top_x)
- rb->lcd_bitmap(sound_high_level, 9, 12, 2, 8);
+ rb->lcd_mono_bitmap(sound_high_level, 9, 12, 2, 8);
if(40<left_needle_top_x)
- rb->lcd_bitmap(sound_max_level, 12, 12, 3, 8);
+ rb->lcd_mono_bitmap(sound_max_level, 12, 12, 3, 8);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(sound_speaker, 54, 12, 4, 8);
+ rb->lcd_mono_bitmap(sound_speaker, 54, 12, 4, 8);
rb->lcd_set_drawmode(DRMODE_FG);
if(5<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_low_level, 59, 12, 2, 8);
+ rb->lcd_mono_bitmap(sound_low_level, 59, 12, 2, 8);
if(12<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_med_level, 61, 12, 2, 8);
+ rb->lcd_mono_bitmap(sound_med_level, 61, 12, 2, 8);
if(24<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_high_level, 63, 12, 2, 8);
+ rb->lcd_mono_bitmap(sound_high_level, 63, 12, 2, 8);
if(40<(right_needle_top_x-56))
- rb->lcd_bitmap(sound_max_level, 66, 12, 3, 8);
+ rb->lcd_mono_bitmap(sound_max_level, 66, 12, 3, 8);
rb->lcd_set_drawmode(DRMODE_SOLID);
}
void draw_digital_minimeters(void) {
- rb->lcd_bitmap(sound_speaker, 34, 24, 4, 8);
+ rb->lcd_mono_bitmap(sound_speaker, 34, 24, 4, 8);
rb->lcd_set_drawmode(DRMODE_FG);
if(1<num_left_leds)
- rb->lcd_bitmap(sound_low_level, 39, 24, 2, 8);
+ rb->lcd_mono_bitmap(sound_low_level, 39, 24, 2, 8);
if(2<num_left_leds)
- rb->lcd_bitmap(sound_med_level, 41, 24, 2, 8);
+ rb->lcd_mono_bitmap(sound_med_level, 41, 24, 2, 8);
if(5<num_left_leds)
- rb->lcd_bitmap(sound_high_level, 43, 24, 2, 8);
+ rb->lcd_mono_bitmap(sound_high_level, 43, 24, 2, 8);
if(8<num_left_leds)
- rb->lcd_bitmap(sound_max_level, 46, 24, 3, 8);
+ rb->lcd_mono_bitmap(sound_max_level, 46, 24, 3, 8);
rb->lcd_set_drawmode(DRMODE_SOLID);
- rb->lcd_bitmap(sound_speaker, 34, 40, 4, 8);
+ rb->lcd_mono_bitmap(sound_speaker, 34, 40, 4, 8);
rb->lcd_set_drawmode(DRMODE_FG);
if(1<(num_right_leds))
- rb->lcd_bitmap(sound_low_level, 39, 40, 2, 8);
+ rb->lcd_mono_bitmap(sound_low_level, 39, 40, 2, 8);
if(2<(num_right_leds))
- rb->lcd_bitmap(sound_med_level, 41, 40, 2, 8);
+ rb->lcd_mono_bitmap(sound_med_level, 41, 40, 2, 8);
if(5<(num_right_leds))
- rb->lcd_bitmap(sound_high_level, 43, 40, 2, 8);
+ rb->lcd_mono_bitmap(sound_high_level, 43, 40, 2, 8);
if(8<(num_right_leds))
- rb->lcd_bitmap(sound_max_level, 46, 40, 3, 8);
+ rb->lcd_mono_bitmap(sound_max_level, 46, 40, 3, 8);
rb->lcd_set_drawmode(DRMODE_SOLID);
}
@@ -359,8 +359,8 @@ void analog_meter(void) {
/* Needle covers */
rb->lcd_set_drawmode(DRMODE_FG);
- rb->lcd_bitmap(needle_cover, 22, 59, 13, 5);
- rb->lcd_bitmap(needle_cover, 78, 59, 13, 5);
+ rb->lcd_mono_bitmap(needle_cover, 22, 59, 13, 5);
+ rb->lcd_mono_bitmap(needle_cover, 78, 59, 13, 5);
rb->lcd_set_drawmode(DRMODE_SOLID);
/* Show Left/Right */
@@ -396,10 +396,10 @@ void digital_meter(void) {
rb->lcd_set_drawmode(DRMODE_FG);
/* LEDS */
for(i=0; i<num_left_leds; i++)
- rb->lcd_bitmap(led, i*9+2+i, 14, 9, 5);
+ rb->lcd_mono_bitmap(led, i*9+2+i, 14, 9, 5);
for(i=0; i<num_right_leds; i++)
- rb->lcd_bitmap(led, i*9+2+i, 52, 9, 5);
+ rb->lcd_mono_bitmap(led, i*9+2+i, 52, 9, 5);
rb->lcd_set_drawmode(DRMODE_SOLID);
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c
index 7a5a7bd8f7..6e60905478 100644
--- a/apps/recorder/icons.c
+++ b/apps/recorder/icons.c
@@ -141,98 +141,202 @@ const unsigned char rockbox112x37[]={
#if LCD_WIDTH >= 160
/* iRiver LCD width */
-const unsigned char rockbox160x53[] = {
- 0x00, 0x00, 0x00, 0x04, 0x04, 0xff, 0x04, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4,
- 0xf4, 0xf4, 0xf4, 0xf4, 0xf4, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf0, 0xf0, 0xf8, 0xfa,
- 0xfa, 0xf2, 0xf4, 0xf4, 0xe8, 0xc8, 0x90, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
- 0x00, 0x80, 0x40, 0x20, 0x90, 0xc8, 0xe4, 0xf4, 0xf4, 0xf2, 0xfa, 0xfa, 0xfa,
- 0xf4, 0xf4, 0xf4, 0xe8, 0xc8, 0x98, 0x04, 0x04, 0xf4, 0xf4, 0xf4, 0xf4, 0xf4,
- 0x04, 0xff, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0xf4, 0xf4, 0xf4, 0xf4,
- 0xf4, 0x74, 0x1c, 0x06, 0x05, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x5f, 0x5f, 0x5f, 0x5f, 0x9f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf0,
- 0x00, 0x00, 0xe0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x1f, 0x0f, 0xcf,
- 0x4f, 0x9f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xe1, 0x0e, 0x70, 0x38,
- 0x06, 0xf1, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x1f, 0x9f, 0x4f, 0x0f,
- 0x1f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0xff, 0x00, 0x00, 0x80, 0xe0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x8f,
- 0x83, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x1c, 0x34, 0xc4, 0x08, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0x80, 0x80, 0xc1, 0x3e, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
- 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff,
- 0x00, 0x01, 0x1e, 0xe0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0xc0,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x80, 0x7c, 0x03, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0xff, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x00, 0x00,
- 0x00, 0x00, 0xf0, 0x1f, 0x0f, 0x70, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xfc, 0xff, 0xfe, 0xfe, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x0f, 0x03, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x08, 0x08, 0x3f,
- 0x08, 0x08, 0x08, 0xff, 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xd9, 0x08, 0xff, 0x08, 0x08, 0x08, 0x08, 0xff,
- 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xc0, 0xff, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
- 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x30, 0x60, 0x10, 0x08, 0x04,
- 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00,
- 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06,
- 0x1c, 0x32, 0x1d, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x30, 0x8c,
- 0x67, 0x19, 0x06, 0x01,
- 0x00, 0x1f, 0x7f, 0x60, 0xc4, 0xc2, 0x83, 0x30, 0x0e, 0x9c, 0xc1, 0xff, 0xff,
- 0x03, 0xff, 0x03, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xc0, 0x00,
- 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xc0, 0x3c, 0x83, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x03,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x1f, 0x60, 0x80, 0x00, 0xff,
- 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x0f, 0x19, 0xe3, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xfc, 0x86, 0x01, 0x01, 0x00, 0x00, 0x02, 0x82, 0x85,
- 0x79, 0x02, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x78, 0x86, 0x03, 0x01, 0x00, 0x00, 0x02, 0x02, 0x04, 0xc9, 0x33,
- 0xce, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xec, 0x07, 0x71, 0x8c, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x70, 0x0f, 0xff, 0xff,
- 0x00, 0xff, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xf8, 0xc0, 0x03, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xfa,
- 0xf9, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0x00,
- 0x00, 0x07, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf9, 0xf9, 0xff,
- 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0x00, 0x07, 0x38, 0xc3, 0x1f, 0x7f, 0xff, 0xff, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x05, 0x05, 0x04, 0x04,
- 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x30, 0x18, 0x20, 0xc0, 0x80,
- 0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x03,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0x60, 0xb0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x19, 0x72, 0xcc,
- 0x10, 0x60, 0x80, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x06, 0x07, 0x07, 0x07,
- 0x04, 0x1f, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, 0x07,
- 0x07, 0x07, 0x07, 0x1c, 0x04, 0x04, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f,
- 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x08, 0x08, 0x08, 0x08, 0x09, 0x0b, 0x0b, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
- 0x0f, 0x07, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x07, 0x07, 0x07, 0x07, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x1c, 0x07, 0x07, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x04, 0x06, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x04, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x03, 0x02, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x06, 0x06, 0x07, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x01,
- 0x06, 0x01, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
- 0x07, 0x06, 0x00, 0x06,
+const unsigned char rockbox160x53x2[] = {
+ 0x00, 0x00, 0x00, 0x30, 0x30, 0xff, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
+ 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xcc,
+ 0xcc, 0x0c, 0x30, 0x30, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x30, 0x30, 0x0c, 0xcc, 0xcc, 0xcc,
+ 0x30, 0x30, 0x30, 0xc0, 0xc0, 0xc0, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
+ 0x30, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30,
+ 0x30, 0x30, 0xf0, 0x3c, 0x33, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xfc, 0xfc, 0xfc, 0xf0, 0xc0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc3, 0x0c, 0x30, 0xc0, 0x00, 0x00, 0x00,
+ 0x00, 0xc0, 0x30, 0x0c, 0xc3, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc3, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00,
+ 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xc0, 0x03, 0xfc, 0x00, 0xc0,
+ 0x3c, 0x03, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x33, 0x33, 0x33, 0x33, 0xc3, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x03, 0x00, 0xf0,
+ 0x30, 0xc3, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x3f, 0x0f,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x03, 0xc3, 0x30, 0x00,
+ 0x03, 0x03, 0x0f, 0x3f, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0x00, 0xc0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xc0,
+ 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0xf0, 0x30, 0x30, 0xc0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0x00, 0x03, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x03, 0x0f, 0xf0, 0x00, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0xc0, 0xc0, 0xf0, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0x00, 0x00, 0x03, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf0,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0xff, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
+ 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
+ 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0,
+ 0xc0, 0xc0, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xf0, 0xff, 0xfc, 0xfc, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xff,
+ 0xc0, 0xc0, 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0xc0, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xff,
+ 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x5f, 0x57, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x57, 0x57, 0x5c, 0x5c, 0x70, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x70,
+ 0x5c, 0x5c, 0x57, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x57, 0x57, 0x5f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5f, 0x7c,
+ 0xf0, 0x0c, 0xf3, 0x7c, 0x5f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xf5,
+ 0x3f, 0xc3, 0x3c, 0x03,
+
+ 0x00, 0x00, 0xff, 0x03, 0x00, 0x3f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f,
+ 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5f, 0x7c, 0x57, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0xd5, 0xd5, 0xd5, 0xd5, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x57, 0x5f, 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0xfd, 0x0f, 0xc0,
+ 0x3c, 0x03, 0x00, 0x00,
+
+ 0x00, 0xff, 0xff, 0x00, 0x30, 0x0c, 0x0f, 0x00, 0xfc, 0xf0, 0x03, 0xff, 0xff,
+ 0x0f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xc0, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xf0, 0x0f, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0f,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xc3, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0xf5, 0x3d, 0x03, 0x03, 0x00, 0x00, 0x0c, 0x0c, 0x33,
+ 0xc3, 0x0d, 0xf5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0xd5, 0x3d, 0x0f, 0x03, 0x00, 0x00, 0x0c, 0x0c, 0x30, 0xc3, 0x0f,
+ 0xfd, 0xd5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xf5, 0x3f, 0x03, 0xf0, 0x0f, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x03, 0x3f, 0x3c, 0xf0, 0xf0, 0xc0, 0x0f, 0x00, 0xc3, 0xf0, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00,
+ 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xf0, 0x0f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x03, 0x3c, 0xc0, 0x00, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x03, 0xfc, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0,
+ 0x3f, 0x00, 0xff, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f,
+ 0xf0, 0x7f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x5d, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0xf0, 0x00, 0x3f, 0xc0, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xc0, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc0, 0xcc,
+ 0xc3, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
+ 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf0, 0xc3, 0xc3, 0xff,
+ 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x57, 0x5c, 0x70, 0x70, 0x73, 0x73, 0x70, 0x70,
+ 0x5c, 0x5f, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x57, 0x5c, 0x7c, 0x70, 0x70, 0x73, 0x73, 0x73, 0x7c, 0x5f,
+ 0x57, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5f, 0x7c, 0xc3, 0x0c, 0xf0,
+ 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f, 0x3f, 0x00, 0xff, 0xff,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xf0, 0x00, 0x03, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0f, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x03, 0x3f, 0xff, 0xff, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x35, 0x0f, 0x03, 0x0d, 0xf5, 0xd5,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+ 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5,
+ 0x3d, 0xcf, 0xfd, 0xd5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x57, 0x7f, 0xf0,
+ 0x03, 0x3c, 0xc0, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x3c, 0x3f, 0x3f, 0x3f,
+ 0x30, 0xff, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x3f, 0x3f, 0x3f, 0xf0, 0x30, 0x30, 0x03, 0x0f, 0x3f, 0x3f, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x3f, 0x3f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xc0, 0xc0, 0xc0, 0xc0, 0xc3, 0xcf, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x3f, 0x3f, 0x0f, 0x03, 0x03, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x3f, 0xf0, 0x3f, 0x3f, 0x35, 0x35, 0x35,
+ 0x35, 0x35, 0x35, 0x35, 0x3d, 0x0d, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35,
+ 0x35, 0x35, 0x35, 0x0d, 0x0d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x03, 0x0f, 0x0d, 0x3d, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35,
+ 0x3d, 0x3d, 0x3f, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x3d, 0x03,
+ 0x3c, 0x03, 0x00, 0x03, 0x0d, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35,
+ 0x3f, 0x3c, 0x00, 0x3c,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
};
#endif
@@ -321,9 +425,9 @@ bool statusbar_icon_volume(int percent)
volume = 100;
if (volume==0) {
- lcd_bitmap(bitmap_icons_7x8[Icon_Mute],
- ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 - 4,
- STATUSBAR_Y_POS, 7, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Mute],
+ ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 - 4,
+ STATUSBAR_Y_POS, 7, STATUSBAR_HEIGHT);
}
else {
/* We want to redraw the icon later on */
@@ -370,8 +474,8 @@ bool statusbar_icon_volume(int percent)
*/
void statusbar_icon_play_state(int state)
{
- lcd_bitmap(bitmap_icons_7x8[state], ICON_PLAY_STATE_X_POS, STATUSBAR_Y_POS,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[state], ICON_PLAY_STATE_X_POS, STATUSBAR_Y_POS,
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
}
/*
@@ -379,8 +483,8 @@ void statusbar_icon_play_state(int state)
*/
void statusbar_icon_play_mode(int mode)
{
- lcd_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS, STATUSBAR_Y_POS,
- ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[mode], ICON_PLAY_MODE_X_POS, STATUSBAR_Y_POS,
+ ICON_PLAY_MODE_WIDTH, STATUSBAR_HEIGHT);
}
/*
@@ -388,8 +492,8 @@ void statusbar_icon_play_mode(int mode)
*/
void statusbar_icon_shuffle(void)
{
- lcd_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS,
- STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Shuffle], ICON_SHUFFLE_X_POS,
+ STATUSBAR_Y_POS, ICON_SHUFFLE_WIDTH, STATUSBAR_HEIGHT);
}
/*
@@ -397,8 +501,8 @@ void statusbar_icon_shuffle(void)
*/
void statusbar_icon_lock(void)
{
- lcd_bitmap(bitmap_icons_5x8[Icon_Lock], LOCK_X_POS,
- STATUSBAR_Y_POS, 5, 8);
+ lcd_mono_bitmap(bitmap_icons_5x8[Icon_Lock], LOCK_X_POS,
+ STATUSBAR_Y_POS, 5, 8);
}
#if CONFIG_LED == LED_VIRTUAL
@@ -407,8 +511,8 @@ void statusbar_icon_lock(void)
*/
void statusbar_led(void)
{
- lcd_bitmap(bitmap_icon_disk, ICON_DISK_X_POS,
- STATUSBAR_Y_POS, ICON_DISK_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icon_disk, ICON_DISK_X_POS,
+ STATUSBAR_Y_POS, ICON_DISK_WIDTH, STATUSBAR_HEIGHT);
}
#endif
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h
index b2900a1566..c0b870fbb6 100644
--- a/apps/recorder/icons.h
+++ b/apps/recorder/icons.h
@@ -72,7 +72,7 @@ extern const unsigned char bitmap_icon_disk[];
extern const unsigned char rockbox112x37[];
#endif
#if LCD_WIDTH >= 160
-extern const unsigned char rockbox160x53[];
+extern const unsigned char rockbox160x53x2[];
#endif
#define STATUSBAR_X_POS 0
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index 3bab002574..7746fb9f9f 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -1107,8 +1107,8 @@ void peak_meter_draw_trig(int xpos, int ypos) {
case TRIG_READY:
scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2,
TRIGBAR_WIDTH, 0, 0, HORIZONTAL);
- lcd_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos,
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
case TRIG_STEADY:
@@ -1117,17 +1117,17 @@ void peak_meter_draw_trig(int xpos, int ypos) {
time_left = time_left * TRIGBAR_WIDTH / trig_strt_duration;
scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2,
TRIGBAR_WIDTH, 0, TRIGBAR_WIDTH - time_left, HORIZONTAL);
- lcd_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Stop], xpos, ypos,
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
case TRIG_GO:
case TRIG_CONTINUE:
scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2,
TRIGBAR_WIDTH, TRIGBAR_WIDTH, TRIGBAR_WIDTH, HORIZONTAL);
- lcd_bitmap(bitmap_icons_7x8[Icon_Record],
- TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Record],
+ TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos,
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
case TRIG_POSTREC:
@@ -1135,9 +1135,9 @@ void peak_meter_draw_trig(int xpos, int ypos) {
time_left = time_left * TRIGBAR_WIDTH / trig_stp_hold;
scrollbar(x, ypos + 1, TRIGBAR_WIDTH, TRIG_HEIGHT - 2,
TRIGBAR_WIDTH, time_left, TRIGBAR_WIDTH, HORIZONTAL);
- lcd_bitmap(bitmap_icons_7x8[Icon_Record],
- TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos,
- ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Record],
+ TRIG_WIDTH - ICON_PLAY_STATE_WIDTH, ypos,
+ ICON_PLAY_STATE_WIDTH, STATUSBAR_HEIGHT);
break;
}
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 9e58cec19e..ea71538322 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -869,8 +869,8 @@ bool f2_rec_screen(void)
lcd_putsxy(0, LCD_HEIGHT/2 - h*2, str(LANG_RECORDING_QUALITY));
snprintf(buf, 32, "%d", global_settings.rec_quality);
lcd_putsxy(0, LCD_HEIGHT/2-h, buf);
- lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
- LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward],
+ LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
/* Frequency */
snprintf(buf, sizeof buf, "%s:", str(LANG_RECORDING_FREQUENCY));
@@ -879,8 +879,8 @@ bool f2_rec_screen(void)
ptr = freq_str[global_settings.rec_frequency];
lcd_getstringsize(ptr, &w, &h);
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
- lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow],
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
/* Channel mode */
switch ( global_settings.rec_channels ) {
@@ -900,8 +900,8 @@ bool f2_rec_screen(void)
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, str(LANG_F2_MODE));
lcd_getstringsize(ptr, &w, &h);
lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, ptr);
- lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
- LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastForward],
+ LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8);
lcd_update();
@@ -994,15 +994,15 @@ bool f3_rec_screen(void)
ptr = src_str[global_settings.rec_source];
lcd_getstringsize(ptr, &w, &h);
lcd_putsxy(0, LCD_HEIGHT/2-h, ptr);
- lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
- LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward],
+ LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
/* trigger setup */
ptr = str(LANG_RECORD_TRIGGER);
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h*2, ptr);
- lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow],
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
lcd_update();
diff --git a/apps/screens.c b/apps/screens.c
index 8c90f02707..494acd7e0b 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -95,9 +95,9 @@ void usb_display_info(void)
#ifdef HAVE_LCD_BITMAP
/* Center bitmap on screen */
- lcd_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2,
- LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo,
- BMPHEIGHT_usb_logo);
+ lcd_mono_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2,
+ LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo,
+ BMPHEIGHT_usb_logo);
status_draw(true);
lcd_update();
#else
@@ -234,15 +234,15 @@ void charging_display_info(bool animate)
if (!animate)
{ /* draw the outline */
/* middle part */
- lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
+ lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
lcd_set_drawmode(DRMODE_FG);
/* upper line */
charging_logo[0] = charging_logo[1] = 0x00;
memset(charging_logo+2, 0x80, 34);
- lcd_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8);
+ lcd_mono_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8);
/* lower line */
memset(charging_logo+2, 0x01, 34);
- lcd_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8);
+ lcd_mono_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8);
lcd_set_drawmode(DRMODE_SOLID);
}
else
@@ -258,7 +258,7 @@ void charging_display_info(bool animate)
charging_logo[i] = 0x01 << bitpos;
}
}
- lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
+ lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
phase++;
}
lcd_update();
@@ -415,8 +415,8 @@ int pitch_screen(void)
ptr = str(LANG_PITCH_UP);
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr);
- lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow],
- LCD_WIDTH/2 - 3, h*2, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_UpArrow],
+ LCD_WIDTH/2 - 3, h*2, 7, 8);
snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 );
lcd_getstringsize(buf,&w,&h);
@@ -425,14 +425,14 @@ int pitch_screen(void)
ptr = str(LANG_PITCH_DOWN);
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
- lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow],
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
ptr = str(LANG_PAUSE);
lcd_getstringsize(ptr,&w,&h);
lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr);
- lcd_bitmap(bitmap_icons_7x8[Icon_Pause],
- (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Pause],
+ (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8);
lcd_update();
}
@@ -637,12 +637,12 @@ bool quick_screen(int context, int button)
#endif
}
- lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward],
- LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
- lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow],
- LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
- lcd_bitmap(bitmap_icons_7x8[Icon_FastForward],
- LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward],
+ LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow],
+ LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastForward],
+ LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8);
lcd_update();
key = button_get(true);
@@ -862,24 +862,18 @@ void splash(int ticks, /* how long the splash is displayed */
}
#ifdef HAVE_LCD_BITMAP
- /* If we center the display and it wouldn't cover the full screen,
- then just clear the box we need and put a nice little frame and
- put the text in there! */
+ /* If we center the display, then just clear the box we need and put
+ a nice little frame and put the text in there! */
if(center && (y > 2)) {
- if(maxw < (LCD_WIDTH -4)) {
- int xx = (LCD_WIDTH-maxw)/2 - 2;
- lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
- lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
- lcd_set_drawmode(DRMODE_SOLID);
- lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
- }
- else {
- lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
- lcd_fillrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4);
- lcd_set_drawmode(DRMODE_SOLID);
- lcd_hline(0, LCD_WIDTH-1, y-2);
- lcd_hline(0, LCD_WIDTH-1, LCD_HEIGHT-y+2);
- }
+ int xx = (LCD_WIDTH-maxw)/2 - 2;
+ /* The new graphics routines handle clipping, so no need to check */
+#if LCD_DEPTH > 1
+ lcd_set_background(MAX_LEVEL-1);
+#endif
+ lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+ lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
+ lcd_set_drawmode(DRMODE_SOLID);
+ lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
}
else
#endif
@@ -921,6 +915,9 @@ void splash(int ticks, /* how long the splash is displayed */
x += w+SPACE; /* pixels space! */
next = strtok_r(NULL, " ", &store);
}
+#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
+ lcd_set_background(MAX_LEVEL);
+#endif
lcd_update();
if(ticks)
diff --git a/apps/status.c b/apps/status.c
index 42204a6ee6..3cb6722bca 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -244,12 +244,12 @@ void status_draw(bool force_redraw)
/* draw power plug if charging */
if (info.inserted)
- lcd_bitmap(bitmap_icons_7x8[Icon_Plug], ICON_PLUG_X_POS,
- STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_Plug], ICON_PLUG_X_POS,
+ STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT);
#ifdef HAVE_USB_POWER
else if (info.usb_power)
- lcd_bitmap(bitmap_icons_7x8[Icon_USBPlug], ICON_PLUG_X_POS,
- STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT);
+ lcd_mono_bitmap(bitmap_icons_7x8[Icon_USBPlug], ICON_PLUG_X_POS,
+ STATUSBAR_Y_POS, ICON_PLUG_WIDTH, STATUSBAR_HEIGHT);
#endif
info.redraw_volume = statusbar_icon_volume(info.volume);
diff --git a/apps/tree.c b/apps/tree.c
index b2d46389ae..8e1afb8b67 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -395,9 +395,9 @@ static int showdir(void)
int offset=0;
if ( line_height > 8 )
offset = (line_height - 8) / 2;
- lcd_bitmap(icon,
- CURSOR_X * 6 + CURSOR_WIDTH,
- MARGIN_Y+(i-start)*line_height + offset, 6, 8);
+ lcd_mono_bitmap(icon,
+ CURSOR_X * 6 + CURSOR_WIDTH,
+ MARGIN_Y+(i-start)*line_height + offset, 6, 8);
#else
if (icon < 0 )
icon = Unknown;
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 8c6de43a20..8ba26e5614 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -115,7 +115,7 @@ static void wps_display_images(void) {
lcd_set_drawmode(DRMODE_FG);
for (n = 0; n < MAX_IMAGES; n++) {
if (img[n].loaded) {
- lcd_bitmap(img[n].ptr, img[n].x, img[n].y, img[n].w, img[n].h);
+ lcd_mono_bitmap(img[n].ptr, img[n].x, img[n].y, img[n].w, img[n].h);
}
}
lcd_set_drawmode(DRMODE_SOLID);
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c
index 1a40a2535c..dcc5a42e5d 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/drivers/lcd-h100.c
@@ -60,8 +60,16 @@
/*** globals ***/
-unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH] IDATA_ATTR;
+unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH] IDATA_ATTR;
+/* should be 'const', but this causes a section type conflict */
+static unsigned char dibits[16] IDATA_ATTR = {
+ 0x00, 0x03, 0x0C, 0x0F, 0x30, 0x33, 0x3C, 0x3F,
+ 0xC0, 0xC3, 0xCC, 0xCF, 0xF0, 0xF3, 0xFC, 0xFF
+};
+
+static unsigned fg_pattern IDATA_ATTR = 0xFF; /* initially black */
+static unsigned bg_pattern IDATA_ATTR = 0x00; /* initially white */
static int drawmode = DRMODE_SOLID;
static int xmargin = 0;
static int ymargin = 0;
@@ -131,14 +139,8 @@ void lcd_set_flip(bool yesno)
* The value must be 0 <= pixels < LCD_HEIGHT. */
void lcd_roll(int lines)
{
- char data[2];
-
lines &= LCD_HEIGHT-1;
- data[0] = lines & 0xff;
- data[1] = lines >> 8;
-
- lcd_write_command(LCD_CNTL_DISPLAY_START_LINE);
- lcd_write_data(data, 2);
+ lcd_write_command_ex(LCD_CNTL_DISPLAY_START_LINE, lines, -1);
}
#endif /* !SIMULATOR */
@@ -157,15 +159,15 @@ void lcd_init(void)
{
/* GPO35 is the LCD A0 pin
GPO46 is LCD RESET */
- GPIO1_OUT |= 0x00004008;
- GPIO1_ENABLE |= 0x00004008;
- GPIO1_FUNCTION |= 0x00004008;
+ or_l(0x00004008, &GPIO1_OUT);
+ or_l(0x00004008, &GPIO1_ENABLE);
+ or_l(0x00004008, &GPIO1_FUNCTION);
/* Reset LCD */
sleep(1);
- GPIO1_OUT &= ~0x00004000;
+ and_l(~0x00004000, &GPIO1_OUT);
sleep(1);
- GPIO1_OUT |= 0x00004000;
+ or_l(0x00004000, &GPIO1_OUT);
sleep(1);
lcd_write_command(LCD_CNTL_COLUMN_ADDRESS_DIR | 0); /* Normal */
@@ -190,7 +192,7 @@ void lcd_init(void)
lcd_write_command_ex(LCD_CNTL_DISPLAY_START_LINE, 0, -1);
lcd_write_command_ex(LCD_CNTL_GRAY_SCALE_PATTERN, 0x42, -1);
- lcd_write_command_ex(LCD_CNTL_DISPLAY_MODE, 1, -1); /* Monochrome mode */
+ lcd_write_command_ex(LCD_CNTL_DISPLAY_MODE, 0, -1); /* Greyscale mode */
lcd_write_command(LCD_CNTL_DATA_INPUT_DIR | 0); /* Column mode */
lcd_clear_display();
@@ -204,7 +206,7 @@ void lcd_init(void)
/*** update functions ***/
/* Performance function that works with an external buffer
- note that by and bheight are in 8-pixel units! */
+ note that by and bheight are in 4-pixel units! */
void lcd_blit(const unsigned char* data, int x, int by, int width,
int bheight, int stride)
{
@@ -223,13 +225,13 @@ void lcd_blit(const unsigned char* data, int x, int by, int width,
/* Update the display.
This must be called after all other LCD functions that change the display. */
-void lcd_update(void) __attribute__ ((section (".icode")));
+void lcd_update(void) ICODE_ATTR;
void lcd_update(void)
{
int y;
/* Copy display bitmap to hardware */
- for (y = 0; y < LCD_HEIGHT/8; y++)
+ for (y = 0; y < LCD_HEIGHT/4; y++)
{
lcd_write_command_ex(LCD_CNTL_PAGE, y, -1);
lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1);
@@ -240,21 +242,21 @@ void lcd_update(void)
}
/* Update a fraction of the display. */
-void lcd_update_rect(int, int, int, int) __attribute__ ((section (".icode")));
+void lcd_update_rect(int, int, int, int) ICODE_ATTR;
void lcd_update_rect(int x, int y, int width, int height)
{
int ymax;
/* The Y coordinates have to work on even 8 pixel rows */
- ymax = (y + height-1) >> 3;
- y >>= 3;
+ ymax = (y + height-1) >> 2;
+ y >>= 2;
if(x + width > LCD_WIDTH)
width = LCD_WIDTH - x;
if (width <= 0)
return; /* nothing left to do, 0 is harmful to lcd_write_data() */
- if(ymax >= LCD_HEIGHT/8)
- ymax = LCD_HEIGHT/8-1;
+ if(ymax >= LCD_HEIGHT/4)
+ ymax = LCD_HEIGHT/4-1;
/* Copy specified rectange bitmap to hardware */
for (; y <= ymax; y++)
@@ -280,6 +282,26 @@ int lcd_get_drawmode(void)
return drawmode;
}
+void lcd_set_foreground(int brightness)
+{
+ fg_pattern = 0x55 * (~brightness & 3);
+}
+
+int lcd_get_foreground(void)
+{
+ return ~fg_pattern & 3;
+}
+
+void lcd_set_background(int brightness)
+{
+ bg_pattern = 0x55 * (~brightness & 3);
+}
+
+int lcd_get_background(void)
+{
+ return ~bg_pattern & 3;
+}
+
void lcd_setmargins(int x, int y)
{
xmargin = x;
@@ -310,17 +332,21 @@ int lcd_getstringsize(const unsigned char *str, int *w, int *h)
static void setpixel(int x, int y)
{
- DRAW_PIXEL(x, y);
+ unsigned char *data = &lcd_framebuffer[y>>2][x];
+ unsigned mask = 3 << (2 * (y & 3));
+ *data = (*data & ~mask) | (fg_pattern & mask);
}
static void clearpixel(int x, int y)
{
- CLEAR_PIXEL(x, y);
+ unsigned char *data = &lcd_framebuffer[y>>2][x];
+ unsigned mask = 3 << (2 * (y & 3));
+ *data = (*data & ~mask) | (bg_pattern & mask);
}
static void flippixel(int x, int y)
{
- INVERT_PIXEL(x, y);
+ lcd_framebuffer[y>>2][x] ^= 3 << (2 * (y & 3));
}
static void nopixel(int x, int y)
@@ -333,61 +359,68 @@ lcd_pixelfunc_type* lcd_pixelfuncs[8] = {
flippixel, nopixel, setpixel, setpixel,
nopixel, clearpixel, nopixel, clearpixel
};
-
+
+/* 'mask' and 'bits' contain 2 bits per pixel */
static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address ^= (bits & mask);
+ *address ^= bits & mask;
}
static void bgblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void bgblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address &= (bits | ~mask);
+ mask &= ~bits;
+ *address = (*address & ~mask) | (bg_pattern & mask);
}
static void fgblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void fgblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address |= (bits & mask);
+ mask &= bits;
+ *address = (*address & ~mask) | (fg_pattern & mask);
}
static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address = (*address & ~mask) | (bits & mask);
+ *address = (*address & ~mask) | (bits & mask & fg_pattern)
+ | (~bits & mask & bg_pattern);
}
static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address ^= (~bits & mask);
+ *address ^= ~bits & mask;
}
static void bginvblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void bginvblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address &= ~(bits & mask);
+ mask &= bits;
+ *address = (*address & ~mask) | (bg_pattern & mask);
}
static void fginvblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void fginvblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address |= (~bits & mask);
+ mask &= ~bits;
+ *address = (*address & ~mask) | (fg_pattern & mask);
}
static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits)
{
- *address = (*address & ~mask) | (~bits & mask);
+ *address = (*address & ~mask) | (~bits & mask & fg_pattern)
+ | (bits & mask & bg_pattern);
}
lcd_blockfunc_type* lcd_blockfuncs[8] = {
@@ -400,7 +433,7 @@ lcd_blockfunc_type* lcd_blockfuncs[8] = {
/* Clear the whole display */
void lcd_clear_display(void)
{
- unsigned bits = (drawmode & DRMODE_INVERSEVID) ? 0xFFu : 0;
+ unsigned bits = (drawmode & DRMODE_INVERSEVID) ? fg_pattern : bg_pattern;
memset(lcd_framebuffer, bits, sizeof lcd_framebuffer);
scrolling_lines = 0;
@@ -511,8 +544,8 @@ void lcd_hline(int x1, int x2, int y)
x2 = LCD_WIDTH-1;
bfunc = lcd_blockfuncs[drawmode];
- dst = &lcd_framebuffer[y>>3][x1];
- mask = 1 << (y & 7);
+ dst = &lcd_framebuffer[y>>2][x1];
+ mask = 3 << (2 * (y & 3));
dst_end = dst + x2 - x1;
do
@@ -547,12 +580,12 @@ void lcd_vline(int x, int y1, int y2)
y2 = LCD_HEIGHT-1;
bfunc = lcd_blockfuncs[drawmode];
- dst = &lcd_framebuffer[y1>>3][x];
- ny = y2 - (y1 & ~7);
- mask = 0xFFu << (y1 & 7);
- mask_bottom = 0xFFu >> (7 - (ny & 7));
+ dst = &lcd_framebuffer[y1>>2][x];
+ ny = y2 - (y1 & ~3);
+ mask = 0xFFu << (2 * (y1 & 3));
+ mask_bottom = 0xFFu >> (2 * (~ny & 3));
- for (; ny >= 8; ny -= 8)
+ for (; ny >= 4; ny -= 4)
{
bfunc(dst, mask, 0xFFu);
dst += LCD_WIDTH;
@@ -583,7 +616,7 @@ void lcd_fillrect(int x, int y, int width, int height)
int ny;
unsigned char *dst, *dst_end;
unsigned mask, mask_bottom;
- unsigned bits = 0xFFu;
+ unsigned bits = fg_pattern;
lcd_blockfunc_type *bfunc;
bool fillopt;
@@ -611,14 +644,14 @@ void lcd_fillrect(int x, int y, int width, int height)
fillopt = (drawmode & DRMODE_INVERSEVID) ?
(drawmode & DRMODE_BG) : (drawmode & DRMODE_FG);
if (fillopt &&(drawmode & DRMODE_INVERSEVID))
- bits = 0;
+ bits = bg_pattern;
bfunc = lcd_blockfuncs[drawmode];
- dst = &lcd_framebuffer[y>>3][x];
- ny = height - 1 + (y & 7);
- mask = 0xFFu << (y & 7);
- mask_bottom = 0xFFu >> (7 - (ny & 7));
+ dst = &lcd_framebuffer[y>>2][x];
+ ny = height - 1 + (y & 3);
+ mask = 0xFFu << (2 * (y & 3));
+ mask_bottom = 0xFFu >> (2 * (~ny & 3));
- for (; ny >= 8; ny -= 8)
+ for (; ny >= 4; ny -= 4)
{
if (fillopt && (mask == 0xFFu))
memset(dst, bits, width);
@@ -648,7 +681,7 @@ void lcd_fillrect(int x, int y, int width, int height)
}
}
-/* About Rockbox' internal bitmap format:
+/* About Rockbox' internal monochrome bitmap format:
*
* A bitmap contains one bit for every pixel that defines if that pixel is
* black (1) or white (0). Bits within a byte are arranged vertically, LSB
@@ -657,12 +690,180 @@ void lcd_fillrect(int x, int y, int width, int height)
* byte 1 2nd from left etc. The first row of bytes defines pixel rows
* 0..7, the second row defines pixel row 8..15 etc.
*
+ * This is similar to the internal lcd hw format. */
+
+/* Draw a partial monochrome bitmap */
+void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
+ int stride, int x, int y, int width, int height)
+ ICODE_ATTR;
+void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
+ int stride, int x, int y, int width, int height)
+{
+ int shift, ny;
+ unsigned char *dst, *dst_end;
+ unsigned mask, mask_bottom;
+ lcd_blockfunc_type *bfunc;
+
+ /* nothing to draw? */
+ if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT)
+ || (x + width <= 0) || (y + height <= 0))
+ return;
+
+ /* clipping */
+ if (x < 0)
+ {
+ width += x;
+ src_x -= x;
+ x = 0;
+ }
+ if (y < 0)
+ {
+ height += y;
+ src_y -= y;
+ y = 0;
+ }
+ if (x + width > LCD_WIDTH)
+ width = LCD_WIDTH - x;
+ if (y + height > LCD_HEIGHT)
+ height = LCD_HEIGHT - y;
+
+ src += stride * (src_y >> 3) + src_x; /* move starting point */
+ src_y &= 7;
+ y -= src_y;
+ dst = &lcd_framebuffer[y>>2][x];
+ shift = y & 3;
+ ny = height - 1 + shift + src_y;
+
+ bfunc = lcd_blockfuncs[drawmode];
+ mask = 0xFFu << (shift + src_y);
+ mask_bottom = 0xFFu >> (~ny & 7);
+
+ if (shift == 0)
+ {
+ unsigned dmask1, dmask2, data;
+
+ for (; ny >= 8; ny -= 8)
+ {
+ const unsigned char *src_row = src;
+ unsigned char *dst_row = dst + LCD_WIDTH;
+
+ dmask1 = dibits[mask&0x0F];
+ dmask2 = dibits[(mask>>4)&0x0F];
+ dst_end = dst_row + width;
+
+ if (dmask1 != 0)
+ {
+ do
+ {
+ data = *src_row++;
+ bfunc(dst_row - LCD_WIDTH, dmask1, dibits[data&0x0F]);
+ bfunc(dst_row++, dmask2, dibits[(data>>4)&0x0F]);
+ }
+ while (dst_row < dst_end);
+ }
+ else
+ {
+ do
+ bfunc(dst_row++, dmask2, dibits[((*src_row++)>>4)&0x0F]);
+ while (dst_row < dst_end);
+ }
+ src += stride;
+ dst += 2*LCD_WIDTH;
+ mask = 0xFFu;
+ }
+ mask &= mask_bottom;
+ dmask1 = dibits[mask&0x0F];
+ dmask2 = dibits[(mask>>4)&0x0F];
+ dst_end = dst + width;
+
+ if (dmask1 != 0)
+ {
+ if (dmask2 != 0)
+ {
+ do
+ {
+ data = *src++;
+ bfunc(dst, dmask1, dibits[data&0x0F]);
+ bfunc((dst++) + LCD_WIDTH, dmask2, dibits[(data>>4)&0x0F]);
+ }
+ while (dst < dst_end);
+ }
+ else
+ {
+ do
+ bfunc(dst++, dmask1, dibits[(*src++)&0x0F]);
+ while (dst < dst_end);
+ }
+ }
+ else
+ {
+ do
+ bfunc((dst++) + LCD_WIDTH, dmask2, dibits[((*src++)>>4)&0x0F]);
+ while (dst < dst_end);
+ }
+ }
+ else
+ {
+ dst_end = dst + width;
+ do
+ {
+ const unsigned char *src_col = src++;
+ unsigned char *dst_col = dst++;
+ unsigned mask_col = mask;
+ unsigned data = 0;
+
+ for (y = ny; y >= 8; y -= 8)
+ {
+ data |= *src_col << shift;
+
+ if (mask_col & 0xFFu)
+ {
+ if (mask_col & 0x0F)
+ bfunc(dst_col, dibits[mask_col&0x0F], dibits[data&0x0F]);
+ bfunc(dst_col + LCD_WIDTH, dibits[(mask_col>>4)&0x0F],
+ dibits[(data>>4)&0x0F]);
+ mask_col = 0xFFu;
+ }
+ else
+ mask_col >>= 8;
+
+ src_col += stride;
+ dst_col += 2*LCD_WIDTH;
+ data >>= 8;
+ }
+ data |= *src_col << shift;
+ mask_bottom &= mask_col;
+ if (mask_bottom & 0x0F)
+ bfunc(dst_col, dibits[mask_bottom&0x0F], dibits[data&0x0F]);
+ if (mask_bottom & 0xF0)
+ bfunc(dst_col + LCD_WIDTH, dibits[(mask_bottom&0xF0)>>4],
+ dibits[(data>>4)&0x0F]);
+ }
+ while (dst < dst_end);
+ }
+}
+
+/* Draw a full monochrome bitmap */
+void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height)
+{
+ lcd_mono_bitmap_part(src, 0, 0, width, x, y, width, height);
+}
+
+/* About Rockbox' internal native bitmap format:
+ *
+ * A bitmap contains two bits for every pixel. 00 = white, 01 = light grey,
+ * 10 = dark grey, 11 = black. Bits within a byte are arranged vertically, LSB
+ * at top.
+ * The bytes are stored in row-major order, with byte 0 being top left,
+ * byte 1 2nd from left etc. The first row of bytes defines pixel rows
+ * 0..3, the second row defines pixel row 4..7 etc.
+ *
* This is the same as the internal lcd hw format. */
-/* Draw a partial bitmap */
+/* Draw a partial native bitmap */
void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
int stride, int x, int y, int width, int height)
- __attribute__ ((section(".icode")));
+ ICODE_ATTR;
void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
int stride, int x, int y, int width, int height)
{
@@ -694,32 +895,30 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
if (y + height > LCD_HEIGHT)
height = LCD_HEIGHT - y;
- src += stride * (src_y >> 3) + src_x; /* move starting point */
- src_y &= 7;
+ src += stride * (src_y >> 2) + src_x; /* move starting point */
+ src_y &= 3;
y -= src_y;
- dst = &lcd_framebuffer[y>>3][x];
- shift = y & 7;
+ dst = &lcd_framebuffer[y>>2][x];
+ shift = y & 3;
ny = height - 1 + shift + src_y;
bfunc = lcd_blockfuncs[drawmode];
- mask = 0xFFu << (shift + src_y);
- mask_bottom = 0xFFu >> (7 - (ny & 7));
+ mask = 0xFFu << (2 * (shift + src_y));
+ mask_bottom = 0xFFu >> (2 * (~ny & 3));
if (shift == 0)
{
- bool copyopt = (drawmode == DRMODE_SOLID);
-
- for (; ny >= 8; ny -= 8)
+ for (; ny >= 4; ny -= 4)
{
- if (copyopt && (mask == 0xFFu))
+ if (mask == 0xFFu)
memcpy(dst, src, width);
else
{
const unsigned char *src_row = src;
unsigned char *dst_row = dst;
-
+
dst_end = dst_row + width;
- do
+ do
bfunc(dst_row++, mask, *src_row++);
while (dst_row < dst_end);
}
@@ -730,7 +929,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
}
mask &= mask_bottom;
- if (copyopt && (mask == 0xFFu))
+ if (mask == 0xFFu)
memcpy(dst, src, width);
else
{
@@ -742,6 +941,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
}
else
{
+ shift *= 2;
dst_end = dst + width;
do
{
@@ -750,7 +950,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
unsigned mask_col = mask;
unsigned data = 0;
- for (y = ny; y >= 8; y -= 8)
+ for (y = ny; y >= 4; y -= 4)
{
data |= *src_col << shift;
@@ -773,7 +973,7 @@ void lcd_bitmap_part(const unsigned char *src, int src_x, int src_y,
}
}
-/* Draw a full bitmap */
+/* Draw a full native bitmap */
void lcd_bitmap(const unsigned char *src, int x, int y, int width, int height)
{
lcd_bitmap_part(src, 0, 0, width, x, y, width, height);
@@ -807,7 +1007,7 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str)
bits = pf->bits + (pf->offset ?
pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch));
- lcd_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
+ lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
x += width - ofs;
ofs = 0;
@@ -825,7 +1025,7 @@ void lcd_putsxy(int x, int y, const unsigned char *str)
void lcd_puts_style(int x, int y, const unsigned char *str, int style)
{
int xpos,ypos,w,h;
- int lastmode = lcd_get_drawmode();
+ int lastmode = drawmode;
/* make sure scrolling is turned off on the line we are updating */
scrolling_lines &= ~(1 << y);
@@ -837,14 +1037,14 @@ void lcd_puts_style(int x, int y, const unsigned char *str, int style)
xpos = xmargin + x*w / strlen(str);
ypos = ymargin + y*h;
lcd_putsxy(xpos, ypos, str);
- lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+ drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
lcd_fillrect(xpos + w, ypos, LCD_WIDTH - (xpos + w), h);
if (style & STYLE_INVERT)
{
- lcd_set_drawmode(DRMODE_COMPLEMENT);
+ drawmode = DRMODE_COMPLEMENT;
lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, h);
}
- lcd_set_drawmode(lastmode);
+ drawmode = lastmode;
}
/* put a string at a given char position */
@@ -1006,17 +1206,17 @@ static void scroll_thread(void)
s->offset %= s->width;
}
- lastmode = lcd_get_drawmode();
- lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+ lastmode = drawmode;
+ drawmode = (DRMODE_SOLID|DRMODE_INVERSEVID);
lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
- lcd_set_drawmode(DRMODE_SOLID);
+ drawmode = DRMODE_SOLID;
lcd_putsxyofs(xpos, ypos, s->offset, s->line);
if (s->invert)
{
- lcd_set_drawmode(DRMODE_COMPLEMENT);
+ drawmode = DRMODE_COMPLEMENT;
lcd_fillrect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
}
- lcd_set_drawmode(lastmode);
+ drawmode = lastmode;
lcd_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height);
}
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index b0308c6c77..37a15961d5 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -868,7 +868,7 @@ static void lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str)
bits = pf->bits + (pf->offset ?
pf->offset[ch] : ((pf->height + 7) / 8 * pf->maxwidth * ch));
- lcd_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
+ lcd_mono_bitmap_part(bits, ofs, 0, width, x, y, width - ofs, pf->height);
x += width - ofs;
ofs = 0;
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h
index 464561d90d..57fd7d8d92 100644
--- a/firmware/export/config-player.h
+++ b/firmware/export/config-player.h
@@ -4,6 +4,7 @@
/* LCD dimensions (for the simulator) */
#define LCD_WIDTH (4*11*6) /* Display width in pixels */
#define LCD_HEIGHT (4*16+2*24) /* 4*char + 2*icons */
+#define LCD_DEPTH 1
/* define this if you have the Player's keyboard */
#define CONFIG_KEYPAD PLAYER_PAD
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 5f93e7cbc3..f5f16d0f0a 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -121,7 +121,7 @@ extern void lcd_jump_scroll_delay(int ms);
#define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */
/* Low-level drawing function types */
-typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */
+typedef void lcd_pixelfunc_type(int x, int y);
typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits);
#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
@@ -131,7 +131,12 @@ typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned
#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7))
/* Memory copy of display bitmap */
+#if LCD_DEPTH == 1
extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
+#elif LCD_DEPTH == 2
+#define MAX_LEVEL 3
+extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
+#endif
extern void lcd_set_invert_display(bool yesno);
extern void lcd_set_flip(bool yesno);
@@ -165,6 +170,20 @@ extern void lcd_invertscroll(int x, int y);
extern void lcd_bidir_scroll(int threshold);
extern void lcd_scroll_step(int pixels);
+#if LCD_DEPTH > 1
+extern void lcd_set_foreground(int brightness);
+extern int lcd_get_foreground(void);
+extern void lcd_set_background(int brightness);
+extern int lcd_get_background(void);
+extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
+ int stride, int x, int y, int width, int height);
+extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width,
+ int height);
+#else /* LCD_DEPTH == 1 */
+#define lcd_mono_bitmap lcd_bitmap
+#define lcd_mono_bitmap_part lcd_bitmap_part
+#endif
+
#endif /* CHARCELLS / BITMAP */
/* internal usage, but in multiple drivers */
diff --git a/uisimulator/win32/lcd-win32.c b/uisimulator/win32/lcd-win32.c
index ef85214e8f..11296884b7 100644
--- a/uisimulator/win32/lcd-win32.c
+++ b/uisimulator/win32/lcd-win32.c
@@ -23,33 +23,28 @@
#include "lcd.h"
#include "lcd-playersim.h"
-unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; /* the display */
char bitmap[LCD_HEIGHT][LCD_WIDTH]; /* the ui display */
-BITMAPINFO2 bmi =
+RGBQUAD color_zero = {UI_LCD_BGCOLORLIGHT, 0};
+RGBQUAD color_max = {0, 0, 0, 0};
+
+BITMAPINFO256 bmi =
{
{sizeof (BITMAPINFOHEADER),
LCD_WIDTH, -LCD_HEIGHT, 1, 8,
BI_RGB, 0, 0, 0, 2, 2,
},
- {
- //{UI_LCD_BGCOLOR, 0}, /* green background color */
- {UI_LCD_BGCOLORLIGHT, 0}, /* green background color */
- {UI_LCD_BLACK, 0} /* black color */
- }
-
+ {} /* colour lookup table gets filled later */
}; /* bitmap information */
-#ifdef HAVE_LCD_CHARCELLS
-/* Defined in lcd-playersim.c */
-extern void lcd_print_char(int x, int y);
-extern bool lcd_display_redraw;
-extern unsigned char hardware_buffer_lcd[11][2];
-static unsigned char lcd_buffer_copy[11][2];
-#endif
+#ifdef HAVE_LCD_BITMAP
+
+#if LCD_DEPTH == 1
+extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; /* the display */
+#elif LCD_DEPTH == 2
+extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; /* the display */
+#endif
-/* lcd_update()
- update lcd */
void lcd_update()
{
int x, y;
@@ -58,26 +53,13 @@ void lcd_update()
if (hGUIWnd == NULL)
_endthread ();
-#ifdef HAVE_LCD_CHARCELLS
- for (y = 0; y < 2; y++)
- {
- for (x = 0; x < 11; x++)
- {
- if (lcd_display_redraw ||
- lcd_buffer_copy[x][y] != hardware_buffer_lcd[x][y])
- {
- lcd_buffer_copy[x][y] = hardware_buffer_lcd[x][y];
- lcd_print_char(x, y);
- }
- }
- }
-
- lcd_display_redraw = false;
-#endif
-
for (x = 0; x < LCD_WIDTH; x++)
for (y = 0; y < LCD_HEIGHT; y++)
+#if LCD_DEPTH == 1
bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1);
+#elif LCD_DEPTH == 2
+ bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
+#endif
/* Invalidate only the window part that actually did change */
GetClientRect (hGUIWnd, &r);
@@ -108,7 +90,11 @@ void lcd_update_rect(int x_start, int y_start,
for (x = x_start; x < xmax; x++)
for (y = y_start; y < ymax; y++)
+#if LCD_DEPTH == 1
bitmap[y][x] = ((lcd_framebuffer[y/8][x] >> (y & 7)) & 1);
+#elif LCD_DEPTH == 2
+ bitmap[y][x] = ((lcd_framebuffer[y/4][x] >> (2 * (y & 3))) & 3);
+#endif
/* Invalidate only the window part that actually did change */
GetClientRect (hGUIWnd, &r);
@@ -136,37 +122,55 @@ void lcd_remote_update_rect(int x_start, int y_start,
(void)width;
(void)height;
}
+#endif /* HAVE_LCD_BITMAP */
-/* lcd_backlight()
- set backlight state of lcd */
-void lcd_backlight (bool on)
+#ifdef HAVE_LCD_CHARCELLS
+/* Defined in lcd-playersim.c */
+extern void lcd_print_char(int x, int y);
+extern bool lcd_display_redraw;
+extern unsigned char hardware_buffer_lcd[11][2];
+static unsigned char lcd_buffer_copy[11][2];
+
+void lcd_update()
{
- if (on)
+ int x, y;
+ bool changed = false;
+ RECT r;
+
+ if (hGUIWnd == NULL)
+ _endthread ();
+
+ for (y = 0; y < 2; y++)
{
- RGBQUAD blon = {UI_LCD_BGCOLORLIGHT, 0};
- bmi.bmiColors[0] = blon;
+ for (x = 0; x < 11; x++)
+ {
+ if (lcd_display_redraw ||
+ lcd_buffer_copy[x][y] != hardware_buffer_lcd[x][y])
+ {
+ lcd_buffer_copy[x][y] = hardware_buffer_lcd[x][y];
+ lcd_print_char(x, y);
+ changed = true;
+ }
+ }
}
- else
+ if (changed)
{
- RGBQUAD blon = {UI_LCD_BGCOLOR, 0};
- bmi.bmiColors[0] = blon;
+ /* Invalidate only the window part that actually did change */
+ GetClientRect (hGUIWnd, &r);
+ r.left = UI_LCD_POSX * r.right / UI_WIDTH;
+ r.top = UI_LCD_POSY * r.bottom / UI_HEIGHT;
+ r.right = (UI_LCD_POSX + UI_LCD_WIDTH) * r.right / UI_WIDTH;
+ r.bottom = (UI_LCD_POSY + UI_LCD_HEIGHT) * r.bottom / UI_HEIGHT;
+ InvalidateRect (hGUIWnd, &r, FALSE);
}
-
- InvalidateRect (hGUIWnd, NULL, FALSE);
+ lcd_display_redraw = false;
}
void drawdots(int color, struct coordinate *points, int count)
{
while (count--)
{
- if (color)
- {
- DRAW_PIXEL(points[count].x, points[count].y);
- }
- else
- {
- CLEAR_PIXEL(points[count].x, points[count].y);
- }
+ bitmap[points[count].y][points[count].x] = color;
}
}
@@ -181,17 +185,50 @@ void drawrectangles(int color, struct rectangle *points, int count)
for (x = points[count].x, ix = 0; ix < points[count].width; x++, ix++)
{
- for (y = points[count].y, iy = 0; iy < points[count].width; y++, iy++)
+ for (y = points[count].y, iy = 0; iy < points[count].height; y++, iy++)
{
- if (color)
- {
- DRAW_PIXEL(x, y);
- }
- else
- {
- CLEAR_PIXEL(x, y);
- }
+ bitmap[y][x] = color;
}
}
}
}
+#endif /* HAVE_LCD_CHARCELLS */
+
+#if 0
+/* set backlight state of lcd */
+void lcd_backlight (bool on)
+{
+ if (on)
+ color_zero = {UI_LCD_BGCOLORLIGHT, 0};
+ else
+ color_zero = {UI_LCD_BGCOLOR, 0};
+
+ lcdcolors(0, (1<<LCD_DEPTH), &color_zero, &color_max);
+ InvalidateRect (hGUIWnd, NULL, FALSE);
+}
+#endif
+
+/* set a range of bitmap indices to a gradient from startcolour to endcolour */
+void lcdcolors(int index, int count, RGBQUAD *start, RGBQUAD *end)
+{
+ int i;
+ count--;
+ for (i = 0; i <= count; i++)
+ {
+ bmi.bmiColors[i+index].rgbRed = start->rgbRed
+ + (end->rgbRed - start->rgbRed) * i / count;
+ bmi.bmiColors[i+index].rgbGreen = start->rgbGreen
+ + (end->rgbGreen - start->rgbGreen) * i / count;
+ bmi.bmiColors[i+index].rgbBlue = start->rgbBlue
+ + (end->rgbBlue - start->rgbBlue) * i / count;
+ }
+}
+
+/* initialise simulator lcd driver */
+void simlcdinit(void)
+{
+ bmi.bmiHeader.biClrUsed = (1<<LCD_DEPTH);
+ bmi.bmiHeader.biClrImportant = (1<<LCD_DEPTH);
+ lcdcolors(0, (1<<LCD_DEPTH), &color_zero, &color_max);
+}
+
diff --git a/uisimulator/win32/lcd-win32.h b/uisimulator/win32/lcd-win32.h
index d2627e6a53..26a47208e5 100644
--- a/uisimulator/win32/lcd-win32.h
+++ b/uisimulator/win32/lcd-win32.h
@@ -23,24 +23,16 @@
#include "uisw32.h"
#include "lcd.h"
-// BITMAPINFO2
+// BITMAPINFO256
typedef struct
{
BITMAPINFOHEADER bmiHeader;
- RGBQUAD bmiColors[2];
-} BITMAPINFO2;
+ RGBQUAD bmiColors[256];
+} BITMAPINFO256;
-#ifdef HAVE_LCD_BITMAP
-
-extern unsigned char display[LCD_WIDTH][LCD_HEIGHT/8]; // the display
-#else
-#define DISP_X 112
-#define DISP_Y 64
-#endif
-
-
-extern char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display
-extern BITMAPINFO2 bmi; // bitmap information
+extern char bitmap[LCD_HEIGHT][LCD_WIDTH]; // the ui display
+extern BITMAPINFO256 bmi; // bitmap information
+void simlcdinit(void);
#endif // #ifndef __LCDWIN32_H__
diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c
index 9401153408..fb581c0cf1 100644
--- a/uisimulator/win32/uisw32.c
+++ b/uisimulator/win32/uisw32.c
@@ -239,6 +239,8 @@ BOOL GUIStartup ()
if (hGUIWnd == NULL)
return FALSE;
+
+ simlcdinit();
return TRUE;
}
diff --git a/uisimulator/x11/lcd-x11.c b/uisimulator/x11/lcd-x11.c
index 1ee15f9169..d538cee9df 100644
--- a/uisimulator/x11/lcd-x11.c
+++ b/uisimulator/x11/lcd-x11.c
@@ -40,11 +40,19 @@
#include "lcd-x11.h"
#include "lcd-playersim.h"
-extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
+#if LCD_DEPTH == 2
+#define YBLOCK 4
+#define BITOFFS 1 /* take the MSB of each pixel */
+#else
+#define YBLOCK 8
+#define BITOFFS 0
+#endif
+
extern void screen_resized(int width, int height);
#ifdef HAVE_LCD_BITMAP
-unsigned char lcd_framebuffer_copy[LCD_HEIGHT/8][LCD_WIDTH];
+extern unsigned char lcd_framebuffer[LCD_HEIGHT/YBLOCK][LCD_WIDTH];
+unsigned char lcd_framebuffer_copy[LCD_HEIGHT/YBLOCK][LCD_WIDTH];
void lcd_update (void)
{
@@ -55,21 +63,21 @@ void lcd_update (void)
int cp=0;
struct coordinate clearpoints[LCD_WIDTH * LCD_HEIGHT];
- for(y=0; y<LCD_HEIGHT; y+=8) {
+ for(y=0; y<LCD_HEIGHT; y+=YBLOCK) {
for(x=0; x<LCD_WIDTH; x++) {
- if(lcd_framebuffer[y/8][x] || lcd_framebuffer_copy[y/8][x]) {
+ if(lcd_framebuffer[y/YBLOCK][x] || lcd_framebuffer_copy[y/YBLOCK][x]) {
/* one or more bits/pixels are changed */
unsigned char diff =
- lcd_framebuffer[y/8][x] ^ lcd_framebuffer_copy[y/8][x];
+ lcd_framebuffer[y/YBLOCK][x] ^ lcd_framebuffer_copy[y/YBLOCK][x];
- for(bit=0; bit<8; bit++) {
- if(lcd_framebuffer[y/8][x]&(1<<bit)) {
+ for(bit=0; bit<YBLOCK; bit++) {
+ if(lcd_framebuffer[y/YBLOCK][x]&(1<<(bit*LCD_DEPTH+BITOFFS))) {
/* set a dot */
points[p].x = x + MARGIN_X;
points[p].y = y+bit + MARGIN_Y;
p++; /* increase the point counter */
}
- else if(diff &(1<<bit)) {
+ else if(diff &(1<<(bit*LCD_DEPTH+BITOFFS))) {
/* clear a dot */
clearpoints[cp].x = x + MARGIN_X;
clearpoints[cp].y = y+bit + MARGIN_Y;
@@ -110,33 +118,33 @@ void lcd_update_rect(int x_start, int y_start,
fprintf(stderr, "%04d: lcd_update_rect(%d, %d, %d, %d)\n",
counter++, x_start, y_start, width, height);
#endif
- /* The Y coordinates have to work on even 8 pixel rows */
- ymax = (yline + height)/8;
- yline /= 8;
+ /* The Y coordinates have to work on even YBLOCK pixel rows */
+ ymax = (yline + height)/YBLOCK;
+ yline /= YBLOCK;
xmax = x_start + width;
if(xmax > LCD_WIDTH)
xmax = LCD_WIDTH;
- if(ymax >= LCD_HEIGHT/8)
- ymax = LCD_HEIGHT/8-1;
+ if(ymax >= LCD_HEIGHT/YBLOCK)
+ ymax = LCD_HEIGHT/YBLOCK-1;
for(; yline<=ymax; yline++) {
- y = yline * 8;
+ y = yline * YBLOCK;
for(x=x_start; x<xmax; x++) {
if(lcd_framebuffer[yline][x] || lcd_framebuffer_copy[yline][x]) {
/* one or more bits/pixels are changed */
unsigned char diff =
lcd_framebuffer[yline][x] ^ lcd_framebuffer_copy[yline][x];
- for(bit=0; bit<8; bit++) {
- if(lcd_framebuffer[yline][x]&(1<<bit)) {
+ for(bit=0; bit<YBLOCK; bit++) {
+ if(lcd_framebuffer[yline][x]&(1<<(bit*LCD_DEPTH+BITOFFS))) {
/* set a dot */
points[p].x = x + MARGIN_X;
points[p].y = y+bit + MARGIN_Y;
p++; /* increase the point counter */
}
- else if(diff &(1<<bit)) {
+ else if(diff &(1<<(bit*LCD_DEPTH+BITOFFS))) {
/* clear a dot */
clearpoints[cp].x = x + MARGIN_X;
clearpoints[cp].y = y+bit + MARGIN_Y;