summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-19 19:38:45 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 21:20:13 +0000
commit0c4f89370d05056faa789aa9cabcccc4e509fb9f (patch)
tree6ddf7fff0a47564db41d39927ea1acbdb03e74ee
parent092c340a2062fa98b7387fc5fd63578ddae7d0b6 (diff)
downloadrockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.tar.gz
rockbox-0c4f89370d05056faa789aa9cabcccc4e509fb9f.zip
[2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant. lcd_bitmap is always-on in features.txt so manual and lang strings don't have to change Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
-rw-r--r--apps/SOURCES6
-rw-r--r--apps/features.txt4
-rw-r--r--apps/filetypes.c7
-rw-r--r--apps/gui/charcell/list.c112
-rw-r--r--apps/gui/icon.h15
-rw-r--r--apps/gui/line.c4
-rw-r--r--apps/gui/list.c5
-rw-r--r--apps/gui/skin_engine/skin_display.c1
-rw-r--r--apps/gui/skin_engine/skin_parser.c8
-rw-r--r--apps/gui/skin_engine/skin_render.c12
-rw-r--r--apps/gui/skin_engine/skin_tokens.c173
-rw-r--r--apps/gui/skin_engine/wps_internals.h3
-rw-r--r--apps/gui/splash.c17
-rw-r--r--apps/gui/statusbar.c38
-rw-r--r--apps/gui/usb_screen.c9
-rw-r--r--apps/gui/viewport.h4
-rw-r--r--apps/gui/wps.c22
-rw-r--r--apps/gui/yesno.c5
-rw-r--r--apps/logfdisp.c7
-rw-r--r--apps/menus/main_menu.c28
-rw-r--r--apps/onplay.c8
-rw-r--r--apps/player/icons.c110
-rw-r--r--apps/plugin.c11
-rw-r--r--apps/plugin.h11
-rw-r--r--apps/plugins/credits.c68
-rw-r--r--apps/plugins/cube.c10
-rw-r--r--apps/plugins/flipit.c75
-rw-r--r--apps/plugins/invadrox.c4
-rw-r--r--apps/plugins/jackpot.c70
-rw-r--r--apps/plugins/lib/SOURCES4
-rw-r--r--apps/plugins/lib/display_text.c4
-rw-r--r--apps/plugins/lib/mylcd.h9
-rw-r--r--apps/plugins/lib/osd.h4
-rw-r--r--apps/plugins/lib/playergfx.c526
-rw-r--r--apps/plugins/lib/playergfx.h55
-rw-r--r--apps/plugins/lib/simple_viewer.c5
-rw-r--r--apps/plugins/logo.c17
-rw-r--r--apps/plugins/lrcplayer.c53
-rw-r--r--apps/plugins/metronome.c5
-rw-r--r--apps/plugins/mosaique.c15
-rw-r--r--apps/plugins/random_folder_advance_config.c2
-rw-r--r--apps/plugins/rockblox.c38
-rw-r--r--apps/plugins/snow.c19
-rw-r--r--apps/plugins/text_viewer/tv_display.c5
-rw-r--r--apps/screen_access.c16
-rw-r--r--apps/screen_access.h13
-rw-r--r--apps/screens.c4
-rw-r--r--apps/status.c28
-rw-r--r--apps/status.h13
-rw-r--r--apps/tree.c8
-rw-r--r--docs/PLUGIN_API130
-rw-r--r--firmware/SOURCES7
-rw-r--r--firmware/drivers/lcd-charcell.c599
-rw-r--r--firmware/drivers/lcd-charset-player.c1321
-rw-r--r--firmware/drivers/lcd-scroll.c17
-rw-r--r--firmware/export/lcd-charcell.h68
-rw-r--r--firmware/export/lcd.h40
-rw-r--r--firmware/export/scroll_engine.h4
-rw-r--r--firmware/panic.c6
-rw-r--r--firmware/scroll_engine.c4
-rw-r--r--firmware/target/hosted/sdl/button-sdl.c1
-rw-r--r--firmware/target/hosted/sdl/lcd-charcells.c206
-rw-r--r--firmware/target/hosted/sdl/lcd-charcells.h34
-rw-r--r--firmware/target/hosted/sdl/system-sdl.c2
-rwxr-xr-xmanual/advanced_topics/main.tex54
-rw-r--r--manual/appendix/wps_tags.tex91
-rw-r--r--manual/plugins/text_viewer.tex2
-rw-r--r--tools/player_unifont.c780
-rw-r--r--uisimulator/common/SOURCES5
-rw-r--r--uisimulator/common/backlight-sim.c2
-rw-r--r--uisimulator/common/font-player.c548
-rw-r--r--uisimulator/common/font-player.h27
-rw-r--r--uisimulator/common/lcd-common.c2
-rw-r--r--uisimulator/common/lcd-playersim.c119
-rw-r--r--uisimulator/common/lcd-playersim.h38
-rw-r--r--uisimulator/common/sim_icons.c312
-rw-r--r--uisimulator/common/stubs.c20
77 files changed, 121 insertions, 6008 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index bf01dbcac4..6a0b817834 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -83,8 +83,6 @@ gui/line.c
83#ifdef HAVE_LCD_BITMAP 83#ifdef HAVE_LCD_BITMAP
84gui/bitmap/list.c 84gui/bitmap/list.c
85gui/bitmap/list-skinned.c 85gui/bitmap/list-skinned.c
86#else
87gui/charcell/list.c
88#endif 86#endif
89gui/option_select.c 87gui/option_select.c
90#ifdef HAVE_PITCHCONTROL 88#ifdef HAVE_PITCHCONTROL
@@ -127,10 +125,6 @@ gui/skin_engine/skin_touchsupport.c
127gui/backdrop.c 125gui/backdrop.c
128#endif 126#endif
129 127
130#ifdef HAVE_LCD_CHARCELLS
131player/icons.c
132player/keyboard.c
133#endif
134#ifdef HAVE_LCD_BITMAP 128#ifdef HAVE_LCD_BITMAP
135recorder/bmp.c 129recorder/bmp.c
136recorder/icons.c 130recorder/icons.c
diff --git a/apps/features.txt b/apps/features.txt
index 7b50b4026c..1c942a7fe2 100644
--- a/apps/features.txt
+++ b/apps/features.txt
@@ -231,10 +231,6 @@ disk_storage
231remote_button_hold 231remote_button_hold
232#endif 232#endif
233 233
234#if defined(HAVE_LCD_CHARCELLS)
235lcd_charcell
236#endif
237
238#if defined(HAVE_LCD_FLIP) 234#if defined(HAVE_LCD_FLIP)
239lcd_flip 235lcd_flip
240#endif 236#endif
diff --git a/apps/filetypes.c b/apps/filetypes.c
index 16a00a423f..a30f012e53 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -605,13 +605,6 @@ int filetype_list_viewers(const char* current_file)
605{ 605{
606 struct simplelist_info info; 606 struct simplelist_info info;
607 struct cb_data data = { current_file }; 607 struct cb_data data = { current_file };
608#ifndef HAVE_LCD_BITMAP
609 if (viewer_count == 0)
610 {
611 splash(HZ*2, ID2P(LANG_NO_VIEWERS));
612 return PLUGIN_OK;
613 }
614#endif
615 simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), viewer_count, &data); 608 simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), viewer_count, &data);
616 info.action_callback = openwith_action_callback; 609 info.action_callback = openwith_action_callback;
617 info.get_name = openwith_get_name; 610 info.get_name = openwith_get_name;
diff --git a/apps/gui/charcell/list.c b/apps/gui/charcell/list.c
deleted file mode 100644
index cbee8b0d9d..0000000000
--- a/apps/gui/charcell/list.c
+++ /dev/null
@@ -1,112 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Jonathan Gordon
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22/* This file contains the code to draw the list widget on BITMAP LCDs. */
23
24#include "config.h"
25#include "lcd.h"
26#include "font.h"
27#include "button.h"
28#include "string.h"
29#include "settings.h"
30#include "kernel.h"
31#include "system.h"
32#include "file.h"
33
34#include "list.h"
35#include "screen_access.h"
36#include "scrollbar.h"
37#include "lang.h"
38#include "sound.h"
39#include "misc.h"
40
41void gui_synclist_scroll_stop(struct gui_synclist *lists)
42{
43 (void)lists;
44 FOR_NB_SCREENS(i)
45 {
46 screens[i].scroll_stop();
47 }
48}
49
50void list_draw(struct screen *display, struct gui_synclist *gui_list)
51{
52 bool draw_icons = (gui_list->callback_get_item_icon != NULL);
53 bool selected;
54 int i;
55 int start, end;
56
57 display->set_viewport(NULL);
58
59 display->clear_display();
60 start = 0;
61 end = display->getnblines();
62
63 struct line_desc desc = {
64 .height = -1,
65 .text_color = 1,
66 .line_color = 1,
67 .line_end_color = 1,
68 .style = STYLE_DEFAULT
69 };
70
71 for (i = start; i < end; i++)
72 {
73 unsigned const char *s;
74 char entry_buffer[MAX_PATH];
75 unsigned char *entry_name;
76 int current_item = gui_list->start_item[display->screen_type] + i;
77
78 /* When there are less items to display than the
79 * current available space on the screen, we stop*/
80 if(current_item >= gui_list->nb_items)
81 break;
82 s = gui_list->callback_get_item_name(current_item,
83 gui_list->data,
84 entry_buffer,
85 sizeof(entry_buffer));
86 entry_name = P2STR(s);
87
88 if (gui_list->show_selection_marker &&
89 current_item >= gui_list->selected_item &&
90 current_item < gui_list->selected_item + gui_list->selected_size)
91 selected = true; /* The selected item must be displayed scrolling */
92 else
93 selected = false;
94
95 desc.nlines = gui_list->selected_size,
96 desc.line = gui_list->selected_size > 1 ? i : 0,
97 desc.scroll = selected ? true : gui_list->scroll_all;
98
99 if (draw_icons)
100 put_line(display, 0, i, &desc, "$i$i$t",
101 selected ? Icon_Cursor : Icon_NOICON,
102 gui_list->callback_get_item_icon(current_item, gui_list->data),
103 entry_name);
104 else
105 put_line(display, 0, i, &desc, "$i$t",
106 selected ? Icon_Cursor : Icon_NOICON,
107 entry_name);
108 }
109
110 display->update_viewport();
111 display->update();
112}
diff --git a/apps/gui/icon.h b/apps/gui/icon.h
index e095ccfc4c..88449c61ca 100644
--- a/apps/gui/icon.h
+++ b/apps/gui/icon.h
@@ -89,10 +89,6 @@ extern void screen_put_cursorxy(struct screen * screen, int x, int y, bool on);
89 */ 89 */
90extern void screen_put_iconxy(struct screen * screen, 90extern void screen_put_iconxy(struct screen * screen,
91 int x, int y, enum themable_icons icon); 91 int x, int y, enum themable_icons icon);
92#ifdef HAVE_LCD_CHARCELLS
93# define screen_put_icon(s, x, y, i) screen_put_iconxy(s, x, y, i)
94# define screen_put_icon_with_offset(s, x, y, w, h, i) screen_put_icon(s, x, y, i)
95#else
96/* For both of these, the icon will be placed in the center of the rectangle */ 92/* For both of these, the icon will be placed in the center of the rectangle */
97/* as above, but x,y are letter position, NOT PIXEL */ 93/* as above, but x,y are letter position, NOT PIXEL */
98extern void screen_put_icon(struct screen * screen, 94extern void screen_put_icon(struct screen * screen,
@@ -101,23 +97,14 @@ extern void screen_put_icon(struct screen * screen,
101extern void screen_put_icon_with_offset(struct screen * display, 97extern void screen_put_icon_with_offset(struct screen * display,
102 int x, int y, int off_x, int off_y, 98 int x, int y, int off_x, int off_y,
103 enum themable_icons icon); 99 enum themable_icons icon);
104#endif
105
106void icons_init(void); 100void icons_init(void);
107 101
108 102
109#ifdef HAVE_LCD_CHARCELLS
110# define CURSOR_CHAR 0xe10c
111# define get_icon_width(a) 1
112# define get_icon_height(a) 1 /* needs to be verified */
113#else
114int get_icon_width(enum screen_type screen_type); 103int get_icon_width(enum screen_type screen_type);
115int get_icon_height(enum screen_type screen_type); 104int get_icon_height(enum screen_type screen_type);
116int get_icon_format(enum screen_type screen_type); 105int get_icon_format(enum screen_type screen_type);
117#endif
118 106
119#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1) \ 107#if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)
120 && !defined(HAVE_LCD_CHARCELLS)
121int get_icon_format(enum screen_type screen_type); 108int get_icon_format(enum screen_type screen_type);
122#else 109#else
123# define get_icon_format(a) FORMAT_MONO 110# define get_icon_format(a) FORMAT_MONO
diff --git a/apps/gui/line.c b/apps/gui/line.c
index 2b1bec2c6b..ea6bcea93b 100644
--- a/apps/gui/line.c
+++ b/apps/gui/line.c
@@ -41,11 +41,7 @@
41#endif 41#endif
42 42
43 43
44#ifdef HAVE_LCD_CHARCELLS
45#define style_line(d, x, y, l)
46#else
47static void style_line(struct screen *display, int x, int y, struct line_desc *line); 44static void style_line(struct screen *display, int x, int y, struct line_desc *line);
48#endif
49 45
50static void put_text(struct screen *display, int x, int y, struct line_desc *line, 46static void put_text(struct screen *display, int x, int y, struct line_desc *line,
51 const char *text, bool prevent_scroll, int text_skip_pixels); 47 const char *text, bool prevent_scroll, int text_skip_pixels);
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 8533f93275..ce444cc9c2 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -279,13 +279,8 @@ static void gui_list_put_selection_on_screen(struct gui_synclist * gui_list,
279 int bottom = MAX(0, gui_list->nb_items - nb_lines); 279 int bottom = MAX(0, gui_list->nb_items - nb_lines);
280 int new_start_item = gui_list->start_item[screen]; 280 int new_start_item = gui_list->start_item[screen];
281 int difference = gui_list->selected_item - gui_list->start_item[screen]; 281 int difference = gui_list->selected_item - gui_list->start_item[screen];
282#ifdef HAVE_LCD_CHARCELLS
283 const int scroll_limit_up = 0;
284 const int scroll_limit_down = 1;
285#else
286 const int scroll_limit_up = (nb_lines < gui_list->selected_size+2 ? 0:1); 282 const int scroll_limit_up = (nb_lines < gui_list->selected_size+2 ? 0:1);
287 const int scroll_limit_down = (scroll_limit_up+gui_list->selected_size); 283 const int scroll_limit_down = (scroll_limit_up+gui_list->selected_size);
288#endif
289 284
290 if (gui_list->show_selection_marker == false) 285 if (gui_list->show_selection_marker == false)
291 { 286 {
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 501d3a305a..7ee349b346 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -662,7 +662,6 @@ bool skin_has_sbs(enum screen_type screen, struct wps_data *data)
662 */ 662 */
663int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout) 663int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout)
664{ 664{
665 (void)skin; /* silence charcell warning */
666 int button = ACTION_NONE; 665 int button = ACTION_NONE;
667#ifdef HAVE_LCD_BITMAP 666#ifdef HAVE_LCD_BITMAP
668 /* when the peak meter is enabled we want to have a 667 /* when the peak meter is enabled we want to have a
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index dce88e9c58..de7c1db372 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1815,14 +1815,6 @@ static void skin_data_reset(struct wps_data *wps_data)
1815 wps_data->peak_meter_enabled = false; 1815 wps_data->peak_meter_enabled = false;
1816 wps_data->wps_sb_tag = false; 1816 wps_data->wps_sb_tag = false;
1817 wps_data->show_sb_on_wps = false; 1817 wps_data->show_sb_on_wps = false;
1818#else /* HAVE_LCD_CHARCELLS */
1819 /* progress bars */
1820 int i;
1821 for (i = 0; i < 8; i++)
1822 {
1823 wps_data->wps_progress_pat[i] = 0;
1824 }
1825 wps_data->full_line_progressbar = false;
1826#endif 1818#endif
1827 wps_data->wps_loaded = false; 1819 wps_data->wps_loaded = false;
1828} 1820}
diff --git a/apps/gui/skin_engine/skin_render.c b/apps/gui/skin_engine/skin_render.c
index 4415619b7e..e14c882dd9 100644
--- a/apps/gui/skin_engine/skin_render.c
+++ b/apps/gui/skin_engine/skin_render.c
@@ -97,10 +97,6 @@ get_child(OFFSETTYPE(struct skin_element**) children, int child)
97static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info, 97static bool do_non_text_tags(struct gui_wps *gwps, struct skin_draw_info *info,
98 struct skin_element *element, struct skin_viewport* skin_vp) 98 struct skin_element *element, struct skin_viewport* skin_vp)
99{ 99{
100#ifndef HAVE_LCD_BITMAP
101 (void)skin_vp; /* silence warnings */
102 (void)info;
103#endif
104 struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data); 100 struct wps_token *token = (struct wps_token *)SKINOFFSETTOPTR(skin_buffer, element->data);
105 101
106#ifdef HAVE_LCD_BITMAP 102#ifdef HAVE_LCD_BITMAP
@@ -832,14 +828,6 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
832 int old_refresh_mode = refresh_mode; 828 int old_refresh_mode = refresh_mode;
833 skin_buffer = get_skin_buffer(gwps->data); 829 skin_buffer = get_skin_buffer(gwps->data);
834 830
835#ifdef HAVE_LCD_CHARCELLS
836 int i;
837 for (i = 0; i < 8; i++)
838 {
839 if (data->wps_progress_pat[i] == 0)
840 data->wps_progress_pat[i] = display->get_locked_pattern();
841 }
842#endif
843 831
844 viewport = SKINOFFSETTOPTR(skin_buffer, data->tree); 832 viewport = SKINOFFSETTOPTR(skin_buffer, data->tree);
845 skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data); 833 skin_viewport = SKINOFFSETTOPTR(skin_buffer, viewport->data);
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 75c3203066..50704fd66e 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -37,9 +37,6 @@
37#include "cuesheet.h" 37#include "cuesheet.h"
38#include "replaygain.h" 38#include "replaygain.h"
39#include "core_alloc.h" 39#include "core_alloc.h"
40#ifdef HAVE_LCD_CHARCELLS
41#include "hwcompat.h"
42#endif
43#include "abrepeat.h" 40#include "abrepeat.h"
44#include "lang.h" 41#include "lang.h"
45#include "misc.h" 42#include "misc.h"
@@ -577,148 +574,6 @@ static struct mp3entry* get_mp3entry_from_offset(int offset, char **filename)
577 return pid3; 574 return pid3;
578} 575}
579 576
580#ifdef HAVE_LCD_CHARCELLS
581static void format_player_progress(struct gui_wps *gwps)
582{
583 struct wps_state *state = skin_get_global_state();
584 struct screen *display = gwps->display;
585 unsigned char progress_pattern[7];
586 int pos = 0;
587 int i;
588
589 int elapsed, length;
590 if (LIKELY(state->id3))
591 {
592 elapsed = state->id3->elapsed;
593 length = state->id3->length;
594 }
595 else
596 {
597 elapsed = 0;
598 length = 0;
599 }
600
601 if (length)
602 pos = 36 * (elapsed + state->ff_rewind_count) / length;
603
604 for (i = 0; i < 7; i++, pos -= 5)
605 {
606 if (pos <= 0)
607 progress_pattern[i] = 0x1fu;
608 else if (pos >= 5)
609 progress_pattern[i] = 0x00u;
610 else
611 progress_pattern[i] = 0x1fu >> pos;
612 }
613
614 display->define_pattern(gwps->data->wps_progress_pat[0], progress_pattern);
615}
616
617static void format_player_fullbar(struct gui_wps *gwps, char* buf, int buf_size)
618{
619 static const unsigned char numbers[10][4] = {
620 {0x0e, 0x0a, 0x0a, 0x0e}, /* 0 */
621 {0x04, 0x0c, 0x04, 0x04}, /* 1 */
622 {0x0e, 0x02, 0x04, 0x0e}, /* 2 */
623 {0x0e, 0x02, 0x06, 0x0e}, /* 3 */
624 {0x08, 0x0c, 0x0e, 0x04}, /* 4 */
625 {0x0e, 0x0c, 0x02, 0x0c}, /* 5 */
626 {0x0e, 0x08, 0x0e, 0x0e}, /* 6 */
627 {0x0e, 0x02, 0x04, 0x08}, /* 7 */
628 {0x0e, 0x0e, 0x0a, 0x0e}, /* 8 */
629 {0x0e, 0x0e, 0x02, 0x0e} /* 9 */
630 };
631
632 struct wps_state *state = skin_get_global_state();
633 struct screen *display = gwps->display;
634 struct wps_data *data = gwps->data;
635 unsigned char progress_pattern[7];
636 char timestr[10];
637 int time;
638 int time_idx = 0;
639 int pos = 0;
640 int pat_idx = 1;
641 int digit, i, j;
642 bool softchar;
643
644 int elapsed, length;
645 if (LIKELY(state->id3))
646 {
647 elapsed = state->id3->elapsed;
648 length = state->id3->length;
649 }
650 else
651 {
652 elapsed = 0;
653 length = 0;
654 }
655
656 if (buf_size < 34) /* worst case: 11x UTF-8 char + \0 */
657 return;
658
659 time = elapsed + state->ff_rewind_count;
660 if (length)
661 pos = 55 * time / length;
662
663 memset(timestr, 0, sizeof(timestr));
664 format_time(timestr, sizeof(timestr)-2, time);
665 timestr[strlen(timestr)] = ':'; /* always safe */
666
667 for (i = 0; i < 11; i++, pos -= 5)
668 {
669 softchar = false;
670 memset(progress_pattern, 0, sizeof(progress_pattern));
671
672 if ((digit = timestr[time_idx]))
673 {
674 softchar = true;
675 digit -= '0';
676
677 if (timestr[time_idx + 1] == ':') /* ones, left aligned */
678 {
679 memcpy(progress_pattern, numbers[digit], 4);
680 time_idx += 2;
681 }
682 else /* tens, shifted right */
683 {
684 for (j = 0; j < 4; j++)
685 progress_pattern[j] = numbers[digit][j] >> 1;
686
687 if (time_idx > 0) /* not the first group, add colon in front */
688 {
689 progress_pattern[1] |= 0x10u;
690 progress_pattern[3] |= 0x10u;
691 }
692 time_idx++;
693 }
694
695 if (pos >= 5)
696 progress_pattern[5] = progress_pattern[6] = 0x1fu;
697 }
698
699 if (pos > 0 && pos < 5)
700 {
701 softchar = true;
702 progress_pattern[5] = progress_pattern[6] = (~0x1fu >> pos) & 0x1fu;
703 }
704
705 if (softchar && pat_idx < 8)
706 {
707 display->define_pattern(data->wps_progress_pat[pat_idx],
708 progress_pattern);
709 buf = utf8encode(data->wps_progress_pat[pat_idx], buf);
710 pat_idx++;
711 }
712 else if (pos <= 0)
713 buf = utf8encode(' ', buf);
714 else
715 buf = utf8encode(0xe115, buf); /* 2/7 _ */
716 }
717 *buf = '\0';
718}
719
720#endif /* HAVE_LCD_CHARCELLS */
721
722/* Don't inline this; it was broken out of get_token_value to reduce stack 577/* Don't inline this; it was broken out of get_token_value to reduce stack
723 * usage. 578 * usage.
724 */ 579 */
@@ -1351,34 +1206,6 @@ const char *get_token_value(struct gui_wps *gwps,
1351 return "-"; 1206 return "-";
1352#endif 1207#endif
1353 1208
1354#ifdef HAVE_LCD_CHARCELLS
1355 case SKIN_TOKEN_PROGRESSBAR:
1356 {
1357 char *end;
1358 format_player_progress(gwps);
1359 end = utf8encode(data->wps_progress_pat[0], buf);
1360 *end = '\0';
1361 return buf;
1362 }
1363
1364 case SKIN_TOKEN_PLAYER_PROGRESSBAR:
1365 if(is_new_player())
1366 {
1367 /* we need 11 characters (full line) for
1368 progress-bar */
1369 strlcpy(buf, " ", buf_size);
1370 format_player_fullbar(gwps,buf,buf_size);
1371 DEBUGF("bar='%s'\n",buf);
1372 }
1373 else
1374 {
1375 /* Tell the user if we have an OldPlayer */
1376 strlcpy(buf, " <Old LCD> ", buf_size);
1377 }
1378 return buf;
1379#endif
1380
1381
1382#ifdef HAVE_LCD_BITMAP 1209#ifdef HAVE_LCD_BITMAP
1383 /* peakmeter */ 1210 /* peakmeter */
1384 case SKIN_TOKEN_PEAKMETER_LEFT: 1211 case SKIN_TOKEN_PEAKMETER_LEFT:
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index e7996b0530..caf43b21cb 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -374,9 +374,6 @@ struct wps_data
374 bool peak_meter_enabled; 374 bool peak_meter_enabled;
375 bool wps_sb_tag; 375 bool wps_sb_tag;
376 bool show_sb_on_wps; 376 bool show_sb_on_wps;
377#else /*HAVE_LCD_CHARCELLS */
378 unsigned short wps_progress_pat[8];
379 bool full_line_progressbar;
380#endif 377#endif
381 bool wps_loaded; 378 bool wps_loaded;
382}; 379};
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index 2608a2e02e..56df77d57a 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -38,12 +38,6 @@
38#define RECT_SPACING 2 38#define RECT_SPACING 2
39#define SPLASH_MEMORY_INTERVAL (HZ) 39#define SPLASH_MEMORY_INTERVAL (HZ)
40 40
41#else /* HAVE_LCD_CHARCELLS */
42
43#define MAXLINES 2
44#define MAXBUFFER 64
45#define RECT_SPACING 0
46
47#endif 41#endif
48 42
49 43
@@ -68,12 +62,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
68 screen->set_viewport(&vp); 62 screen->set_viewport(&vp);
69 63
70 screen->getstringsize(" ", &space_w, &h); 64 screen->getstringsize(" ", &space_w, &h);
71#else /* HAVE_LCD_CHARCELLS */
72 vp.width = screen->lcdwidth;
73 vp.height = screen->lcdheight;
74
75 space_w = h = 1;
76 screen->double_height (false);
77#endif 65#endif
78 y = h; 66 y = h;
79 67
@@ -178,9 +166,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
178 166
179 /* prepare putting the text */ 167 /* prepare putting the text */
180 y = RECT_SPACING; 168 y = RECT_SPACING;
181#else /* HAVE_LCD_CHARCELLS */
182 y = 0; /* vertical centering on 2 lines would be silly */
183 screen->clear_display();
184#endif 169#endif
185 170
186 /* print the message to screen */ 171 /* print the message to screen */
@@ -188,8 +173,6 @@ static void splash_internal(struct screen * screen, const char *fmt, va_list ap)
188 { 173 {
189#ifdef HAVE_LCD_BITMAP 174#ifdef HAVE_LCD_BITMAP
190 screen->putsxy(0, y, lines[i]); 175 screen->putsxy(0, y, lines[i]);
191#else
192 screen->puts(0, y, lines[i]);
193#endif 176#endif
194 } 177 }
195 screen->update_viewport(); 178 screen->update_viewport();
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 30dad95509..90d04a7930 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -191,12 +191,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
191 if (!display) 191 if (!display)
192 return; 192 return;
193 193
194#ifdef HAVE_LCD_CHARCELLS
195 int val;
196 (void)force_redraw; /* The Player always has "redraw" */
197 (void)vp;
198#endif /* HAVE_LCD_CHARCELLS */
199
200 bar->info.battlevel = battery_level(); 194 bar->info.battlevel = battery_level();
201#ifdef HAVE_USB_POWER 195#ifdef HAVE_USB_POWER
202 bar->info.usb_inserted = usb_inserted(); 196 bar->info.usb_inserted = usb_inserted();
@@ -359,38 +353,6 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw, struct vi
359 } 353 }
360#endif /* HAVE_LCD_BITMAP */ 354#endif /* HAVE_LCD_BITMAP */
361 355
362
363#ifdef HAVE_LCD_CHARCELLS
364 display->icon(ICON_BATTERY, bar->info.battery_state);
365
366 if (bar->info.batt_charge_step > -1)
367 val = bar->info.batt_charge_step;
368 else
369 val = (bar->info.battlevel * 3 + 50) / 100;
370 display->icon(ICON_BATTERY_1, val >= 1);
371 display->icon(ICON_BATTERY_2, val >= 2);
372 display->icon(ICON_BATTERY_3, val >= 3);
373
374 val = 10 * (bar->info.volume - sound_min(SOUND_VOLUME))
375 / (sound_max(SOUND_VOLUME) - sound_min(SOUND_VOLUME));
376 display->icon(ICON_VOLUME, true);
377 display->icon(ICON_VOLUME_1, val >= 1);
378 display->icon(ICON_VOLUME_2, val >= 3);
379 display->icon(ICON_VOLUME_3, val >= 5);
380 display->icon(ICON_VOLUME_4, val >= 7);
381 display->icon(ICON_VOLUME_5, val >= 9);
382
383 display->icon(ICON_PLAY, current_playmode() == STATUS_PLAY);
384 display->icon(ICON_PAUSE, current_playmode() == STATUS_PAUSE);
385
386 display->icon(ICON_REPEAT, global_settings.repeat_mode != REPEAT_OFF);
387 display->icon(ICON_1, global_settings.repeat_mode == REPEAT_ONE);
388
389 display->icon(ICON_RECORD, record);
390 display->icon(ICON_AUDIO, audio);
391 display->icon(ICON_PARAM, param);
392 display->icon(ICON_USB, usb);
393#endif /* HAVE_LCD_CHARCELLS */
394} 356}
395 357
396#ifdef HAVE_LCD_BITMAP 358#ifdef HAVE_LCD_BITMAP
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c
index 1b6f9c3b2a..dd1d97df3c 100644
--- a/apps/gui/usb_screen.c
+++ b/apps/gui/usb_screen.c
@@ -269,12 +269,7 @@ void gui_usb_screen_run(bool early_usb)
269 * generic cleanup here */ 269 * generic cleanup here */
270 screen->set_viewport(NULL); 270 screen->set_viewport(NULL);
271 screen->scroll_stop(); 271 screen->scroll_stop();
272#ifdef HAVE_LCD_CHARCELLS
273 /* Quick fix. Viewports should really be enabled proper for charcell */
274 viewport_set_defaults(&usb_screen_vps_ar[i].parent, i);
275#else
276 usb_screen_fix_viewports(screen, &usb_screen_vps_ar[i]); 272 usb_screen_fix_viewports(screen, &usb_screen_vps_ar[i]);
277#endif
278 } 273 }
279 274
280 /* update the UI before disabling fonts, this maximizes the propability 275 /* update the UI before disabling fonts, this maximizes the propability
@@ -327,10 +322,6 @@ void gui_usb_screen_run(bool early_usb)
327 touchscreen_set_mode(old_mode); 322 touchscreen_set_mode(old_mode);
328#endif 323#endif
329 324
330#ifdef HAVE_LCD_CHARCELLS
331 status_set_usb(false);
332#endif /* HAVE_LCD_CHARCELLS */
333
334#ifdef HAVE_LCD_BITMAP 325#ifdef HAVE_LCD_BITMAP
335 if(!early_usb) 326 if(!early_usb)
336 { 327 {
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h
index ecbd325946..c4b90aa64c 100644
--- a/apps/gui/viewport.h
+++ b/apps/gui/viewport.h
@@ -69,10 +69,6 @@ bool viewport_point_within_vp(const struct viewport *vp,
69 const int x, const int y); 69 const int x, const int y);
70#endif 70#endif
71 71
72#else /* HAVE_LCD_CHARCELL */
73#define viewportmanager_theme_changed(a)
74#define viewportmanager_theme_enable(...)
75#define viewportmanager_theme_undo(...)
76#endif 72#endif
77 73
78#endif /* __PCTOOL__ */ 74#endif /* __PCTOOL__ */
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index a930edaded..b417f82922 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -232,11 +232,6 @@ static bool update_onvol_change(enum screen_type screen)
232{ 232{
233 skin_update(WPS, screen, SKIN_REFRESH_NON_STATIC); 233 skin_update(WPS, screen, SKIN_REFRESH_NON_STATIC);
234 234
235#ifdef HAVE_LCD_CHARCELLS
236 splashf(0, "Vol: %3d dB",
237 sound_val2phys(SOUND_VOLUME, global_settings.volume));
238 return true;
239#endif
240 return false; 235 return false;
241} 236}
242 237
@@ -402,10 +397,6 @@ bool ffwd_rew(int button)
402 if (!skin_get_global_state()->paused) 397 if (!skin_get_global_state()->paused)
403 audio_resume(); 398 audio_resume();
404#endif 399#endif
405#ifdef HAVE_LCD_CHARCELLS
406 FOR_NB_SCREENS(i)
407 skin_update(WPS, i, SKIN_REFRESH_ALL);
408#endif
409 exit = true; 400 exit = true;
410 break; 401 break;
411 402
@@ -741,11 +732,6 @@ long gui_wps_show(void)
741 long last_left = 0, last_right = 0; 732 long last_left = 0, last_right = 0;
742 struct wps_state *state = skin_get_global_state(); 733 struct wps_state *state = skin_get_global_state();
743 734
744#ifdef HAVE_LCD_CHARCELLS
745 status_set_audio(true);
746 status_set_param(false);
747#endif
748
749#ifdef AB_REPEAT_ENABLE 735#ifdef AB_REPEAT_ENABLE
750 ab_repeat_init(); 736 ab_repeat_init();
751 ab_reset_markers(); 737 ab_reset_markers();
@@ -833,10 +819,6 @@ long gui_wps_show(void)
833 break; 819 break;
834 820
835 case ACTION_WPS_BROWSE: 821 case ACTION_WPS_BROWSE:
836#ifdef HAVE_LCD_CHARCELLS
837 status_set_record(false);
838 status_set_audio(false);
839#endif
840 gwps_leave_wps(); 822 gwps_leave_wps();
841 return GO_TO_PREVIOUS_BROWSER; 823 return GO_TO_PREVIOUS_BROWSER;
842 break; 824 break;
@@ -1146,10 +1128,6 @@ long gui_wps_show(void)
1146 } 1128 }
1147 1129
1148 if (exit) { 1130 if (exit) {
1149#ifdef HAVE_LCD_CHARCELLS
1150 status_set_record(false);
1151 status_set_audio(false);
1152#endif
1153#if CONFIG_CODEC != SWCODEC 1131#if CONFIG_CODEC != SWCODEC
1154 if (global_settings.fade_on_stop) 1132 if (global_settings.fade_on_stop)
1155 fade(false, true); 1133 fade(false, true);
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c
index b754d5e477..45638b7076 100644
--- a/apps/gui/yesno.c
+++ b/apps/gui/yesno.c
@@ -160,12 +160,7 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message,
160 yn[i].result_message[YESNO_NO]=no_message; 160 yn[i].result_message[YESNO_NO]=no_message;
161 yn[i].display=&screens[i]; 161 yn[i].display=&screens[i];
162 yn[i].vp = &vp[i]; 162 yn[i].vp = &vp[i];
163#ifdef HAVE_LCD_CHARCELLS
164 /* Quick fix. Viewports should really be enabled proper for charcell */
165 viewport_set_defaults(yn[i].vp, i);
166#else
167 viewportmanager_theme_enable(i, true, yn[i].vp); 163 viewportmanager_theme_enable(i, true, yn[i].vp);
168#endif
169 screens[i].scroll_stop(); 164 screens[i].scroll_stop();
170 gui_yesno_draw(&(yn[i])); 165 gui_yesno_draw(&(yn[i]));
171 } 166 }
diff --git a/apps/logfdisp.c b/apps/logfdisp.c
index 20d737e924..0c5f63e8dc 100644
--- a/apps/logfdisp.c
+++ b/apps/logfdisp.c
@@ -209,13 +209,6 @@ bool logfdisplay(void)
209 209
210 return false; 210 return false;
211} 211}
212#else /* HAVE_LCD_BITMAP */
213bool logfdisplay(void)
214
215{
216 /* TODO: implement a browser for charcell bitmaps */
217 return false;
218}
219#endif /* HAVE_LCD_BITMAP */ 212#endif /* HAVE_LCD_BITMAP */
220 213
221bool logfdump(void) 214bool logfdump(void)
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 7f94571226..5e9b935937 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -125,11 +125,7 @@ static int show_credits(void)
125 return 0; 125 return 0;
126} 126}
127 127
128#ifdef HAVE_LCD_CHARCELLS
129#define SIZE_FMT "%s%s"
130#else
131#define SIZE_FMT "%s %s" 128#define SIZE_FMT "%s %s"
132#endif
133struct info_data 129struct info_data
134 130
135{ 131{
@@ -500,29 +496,7 @@ MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu,
500/***********************************/ 496/***********************************/
501/* MAIN MENU */ 497/* MAIN MENU */
502 498
503 499MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), NULL,
504#ifdef HAVE_LCD_CHARCELLS
505static int mainmenu_callback(int action,
506 const struct menu_item_ex *this_item,
507 struct gui_synclist *lists)
508{
509 (void)this_item;
510 (void)lists;
511 switch (action)
512 {
513 case ACTION_ENTER_MENUITEM:
514 status_set_param(true);
515 break;
516 case ACTION_EXIT_MENUITEM:
517 status_set_param(false);
518 break;
519 }
520 return action;
521}
522#else
523#define mainmenu_callback NULL
524#endif
525MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback,
526 Icon_Submenu_Entered, 500 Icon_Submenu_Entered,
527 &sound_settings, 501 &sound_settings,
528 &playback_settings, 502 &playback_settings,
diff --git a/apps/onplay.c b/apps/onplay.c
index f88953ce62..9226f32f4c 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -180,15 +180,7 @@ static int bookmark_menu_callback(int action,
180 else if (!bookmark_is_bookmarkable_state() && !bookmark_exists()) 180 else if (!bookmark_is_bookmarkable_state() && !bookmark_exists())
181 return ACTION_EXIT_MENUITEM; 181 return ACTION_EXIT_MENUITEM;
182 break; 182 break;
183#ifdef HAVE_LCD_CHARCELLS
184 case ACTION_ENTER_MENUITEM:
185 status_set_param(true);
186 break;
187#endif
188 case ACTION_EXIT_MENUITEM: 183 case ACTION_EXIT_MENUITEM:
189#ifdef HAVE_LCD_CHARCELLS
190 status_set_param(false);
191#endif
192 settings_save(); 184 settings_save();
193 break; 185 break;
194 } 186 }
diff --git a/apps/player/icons.c b/apps/player/icons.c
deleted file mode 100644
index dc804560f2..0000000000
--- a/apps/player/icons.c
+++ /dev/null
@@ -1,110 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 Jonathan Gordon
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include "lcd.h"
22#include "icon.h"
23
24#ifdef HAVE_LCD_CHARCELLS
25/* For the moment, charcell cant load custom maps... */
26
27enum old_values{
28 old_Icon_Queued = 'Q',
29 old_Icon_Moving = 'M',
30 old_Icon_Unknown = 0xe100,
31 old_Icon_Bookmark,
32 old_Icon_Plugin,
33 old_Icon_Folder,
34 old_Icon_Firmware,
35 old_Icon_Language,
36 old_Icon_Audio,
37 old_Icon_Wps,
38 old_Icon_Playlist,
39 old_Icon_Text,
40 old_Icon_Config,
41};
42
43static const unsigned short icons[Icon_Last_Themeable] = {
44 [0 ... Icon_Last_Themeable-1] = ' ',
45
46 [Icon_Audio] = old_Icon_Audio,
47 [Icon_Folder] = old_Icon_Folder,
48 [Icon_Playlist] = old_Icon_Playlist,
49 [Icon_Cursor] = CURSOR_CHAR,
50 [Icon_Wps] = old_Icon_Wps,
51 [Icon_Firmware] = old_Icon_Firmware,
52 [Icon_Language] = old_Icon_Language,
53 [Icon_Config] = old_Icon_Config,
54 [Icon_Plugin] = old_Icon_Plugin,
55 [Icon_Bookmark] = old_Icon_Bookmark,
56 [Icon_Queued] = old_Icon_Queued,
57 [Icon_Moving] = old_Icon_Moving,
58
59 /*
60 [Icon_Keyboard] = ,
61 [Icon_Font] = ,
62 [Icon_Preset] = ,
63 [Icon_Reverse_Cursor] = ,
64 [Icon_Questionmark] = ,
65 [Icon_Menu_setting] = ,
66 [Icon_Menu_functioncall] = ,
67 [Icon_Submenu] = ,
68 [Icon_Submenu_Entered] = ,
69 [Icon_Recording] = ,
70 [Icon_Voice] = ,
71 [Icon_General_settings_menu] = ,
72 [Icon_System_menu] = ,
73 [Icon_Playback_menu] = ,
74 [Icon_Display_menu] = ,
75 [Icon_Remote_Display_menu] = ,
76 [Icon_Radio_screen] = ,
77 [Icon_file_view_menu] = ,
78 [Icon_EQ] = ,
79 [Icon_Rockbox] = ,
80 */
81};
82
83/* as above, but x,y are letter position, NOT PIXEL */
84extern void screen_put_iconxy(struct screen * screen,
85 int x, int y, enum themable_icons icon)
86{
87 if (icon <= Icon_NOICON)
88 screen->putchar(x, y, ' ');
89 else if (icon >= Icon_Last_Themeable)
90 screen->putchar(x, y, old_Icon_Unknown);
91 else
92 screen->putchar(x, y, icons[icon]);
93}
94
95void screen_put_cursorxy(struct screen * display, int x, int y, bool on)
96{
97 screen_put_iconxy(display, x, y, on?Icon_Cursor:-1);
98
99}
100
101void icons_init(void)
102{
103}
104
105
106
107
108
109
110#endif
diff --git a/apps/plugin.c b/apps/plugin.c
index 959232ddb7..0ab73281ee 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -195,16 +195,6 @@ static const struct plugin_api rockbox_api = {
195 lcd_putsf, 195 lcd_putsf,
196 lcd_puts_scroll, 196 lcd_puts_scroll,
197 lcd_scroll_stop, 197 lcd_scroll_stop,
198#ifdef HAVE_LCD_CHARCELLS
199 lcd_define_pattern,
200 lcd_get_locked_pattern,
201 lcd_unlock_pattern,
202 lcd_putc,
203 lcd_put_cursor,
204 lcd_remove_cursor,
205 lcd_icon,
206 lcd_double_height,
207#else /* HAVE_LCD_BITMAP */
208 &lcd_static_framebuffer[0][0], 198 &lcd_static_framebuffer[0][0],
209 lcd_set_viewport, 199 lcd_set_viewport,
210 lcd_set_framebuffer, 200 lcd_set_framebuffer,
@@ -270,7 +260,6 @@ static const struct plugin_api rockbox_api = {
270 font_get_width, 260 font_get_width,
271 screen_clear_area, 261 screen_clear_area,
272 gui_scrollbar_draw, 262 gui_scrollbar_draw,
273#endif /* HAVE_LCD_BITMAP */
274 get_codepage_name, 263 get_codepage_name,
275 264
276#ifdef HAVE_REMOTE_LCD 265#ifdef HAVE_REMOTE_LCD
diff --git a/apps/plugin.h b/apps/plugin.h
index ecc662cb7f..8584d45fa7 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -205,16 +205,6 @@ struct plugin_api {
205 void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...); 205 void (*lcd_putsf)(int x, int y, const unsigned char *fmt, ...);
206 bool (*lcd_puts_scroll)(int x, int y, const unsigned char* string); 206 bool (*lcd_puts_scroll)(int x, int y, const unsigned char* string);
207 void (*lcd_scroll_stop)(void); 207 void (*lcd_scroll_stop)(void);
208#ifdef HAVE_LCD_CHARCELLS
209 void (*lcd_define_pattern)(unsigned long ucs, const char *pattern);
210 unsigned long (*lcd_get_locked_pattern)(void);
211 void (*lcd_unlock_pattern)(unsigned long ucs);
212 void (*lcd_putc)(int x, int y, unsigned long ucs);
213 void (*lcd_put_cursor)(int x, int y, unsigned long ucs);
214 void (*lcd_remove_cursor)(void);
215 void (*lcd_icon)(int icon, bool enable);
216 void (*lcd_double_height)(bool on);
217#else /* HAVE_LCD_BITMAP */
218 fb_data* lcd_framebuffer; 208 fb_data* lcd_framebuffer;
219 void (*lcd_set_viewport)(struct viewport* vp); 209 void (*lcd_set_viewport)(struct viewport* vp);
220 void (*lcd_set_framebuffer)(fb_data *fb); 210 void (*lcd_set_framebuffer)(fb_data *fb);
@@ -300,7 +290,6 @@ struct plugin_api {
300 int width, int height, int items, 290 int width, int height, int items,
301 int min_shown, int max_shown, 291 int min_shown, int max_shown,
302 unsigned flags); 292 unsigned flags);
303#endif /* HAVE_LCD_BITMAP */
304 const char* (*get_codepage_name)(int cp); 293 const char* (*get_codepage_name)(int cp);
305 294
306#ifdef HAVE_REMOTE_LCD 295#ifdef HAVE_REMOTE_LCD
diff --git a/apps/plugins/credits.c b/apps/plugins/credits.c
index 6e993b5468..593b54277e 100644
--- a/apps/plugins/credits.c
+++ b/apps/plugins/credits.c
@@ -27,69 +27,6 @@ static const char* const credits[] = {
27#include "credits.raw" /* generated list of names from docs/CREDITS */ 27#include "credits.raw" /* generated list of names from docs/CREDITS */
28}; 28};
29 29
30#ifdef HAVE_LCD_CHARCELLS
31
32static void roll_credits(void)
33{
34 int numnames = sizeof(credits)/sizeof(char*);
35 int curr_name = 0;
36 int curr_len = rb->utf8length(credits[0]);
37 int curr_index = 0;
38 int curr_line = 0;
39 int name, len, new_len, line, x;
40
41 while (1)
42 {
43 rb->lcd_clear_display();
44
45 name = curr_name;
46 x = -curr_index;
47 len = curr_len;
48 line = curr_line;
49
50 while (x < 11)
51 {
52 int x2;
53
54 if (x < 0)
55 rb->lcd_puts(0, line,
56 credits[name] + rb->utf8seek(credits[name], -x));
57 else
58 rb->lcd_puts(x, line, credits[name]);
59
60 if (++name >= numnames)
61 break;
62
63 line ^= 1;
64
65 x2 = x + len/2;
66 if ((unsigned)x2 < 11)
67 rb->lcd_putc(x2, line, '*');
68
69 new_len = rb->utf8length(credits[name]);
70 x += MAX(len/2 + 2, len - new_len/2 + 1);
71 len = new_len;
72 }
73 rb->lcd_update();
74
75 /* abort on keypress */
76 if(rb->action_userabort(HZ/8))
77 return;
78
79 if (++curr_index >= curr_len)
80 {
81 if (++curr_name >= numnames)
82 break;
83 new_len = rb->utf8length(credits[curr_name]);
84 curr_index -= MAX(curr_len/2 + 2, curr_len - new_len/2 + 1);
85 curr_len = new_len;
86 curr_line ^= 1;
87 }
88 }
89}
90
91#else
92
93static bool stop_autoscroll(int action) 30static bool stop_autoscroll(int action)
94{ 31{
95 switch (action) 32 switch (action)
@@ -362,8 +299,6 @@ static void roll_credits(void)
362 } 299 }
363} 300}
364 301
365#endif
366
367enum plugin_status plugin_start(const void* parameter) 302enum plugin_status plugin_start(const void* parameter)
368{ 303{
369 (void)parameter; 304 (void)parameter;
@@ -372,9 +307,6 @@ enum plugin_status plugin_start(const void* parameter)
372 backlight_ignore_timeout(); 307 backlight_ignore_timeout();
373 308
374 rb->show_logo(); 309 rb->show_logo();
375#ifdef HAVE_LCD_CHARCELLS
376 rb->lcd_double_height(false);
377#endif
378 310
379 /* Show the logo for about 3 secs allowing the user to stop */ 311 /* Show the logo for about 3 secs allowing the user to stop */
380 if(!rb->action_userabort(3*HZ)) 312 if(!rb->action_userabort(3*HZ))
diff --git a/apps/plugins/cube.c b/apps/plugins/cube.c
index 4cd314a035..29d2ba2fc1 100644
--- a/apps/plugins/cube.c
+++ b/apps/plugins/cube.c
@@ -22,7 +22,6 @@
22***************************************************************************/ 22***************************************************************************/
23#include "plugin.h" 23#include "plugin.h"
24#include "fixedpoint.h" 24#include "fixedpoint.h"
25#include "lib/playergfx.h"
26#include "lib/pluginlib_exit.h" 25#include "lib/pluginlib_exit.h"
27#if LCD_DEPTH > 1 26#if LCD_DEPTH > 1
28#include "lib/mylcd.h" /* MYLCD_CFG_RB_XLCD or MYLCD_CFG_PGFX */ 27#include "lib/mylcd.h" /* MYLCD_CFG_RB_XLCD or MYLCD_CFG_PGFX */
@@ -746,8 +745,6 @@ static void cleanup(void)
746{ 745{
747#ifdef USEGSLIB 746#ifdef USEGSLIB
748 grey_release(); 747 grey_release();
749#elif defined HAVE_LCD_CHARCELLS
750 pgfx_release();
751#endif 748#endif
752} 749}
753 750
@@ -797,13 +794,6 @@ enum plugin_status plugin_start(const void* parameter)
797 grey_setfont(FONT_SYSFIXED); 794 grey_setfont(FONT_SYSFIXED);
798#endif 795#endif
799 rb->lcd_setfont(FONT_SYSFIXED); 796 rb->lcd_setfont(FONT_SYSFIXED);
800#else /* LCD_CHARCELLS */
801 if (!pgfx_init(4, 2))
802 {
803 rb->splash(HZ*2, "Old LCD :(");
804 return PLUGIN_OK;
805 }
806 pgfx_display(0, 0);
807#endif 797#endif
808 798
809 atexit(cleanup); 799 atexit(cleanup);
diff --git a/apps/plugins/flipit.c b/apps/plugins/flipit.c
index fab409cc14..294bee8f5b 100644
--- a/apps/plugins/flipit.c
+++ b/apps/plugins/flipit.c
@@ -595,75 +595,6 @@ static void draw_info_panel(void)
595 GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s ); 595 GRID_TOP + 4*(TK_HEIGHT+TK_SPACE) + 2, s );
596} 596}
597 597
598#else /* HAVE_LCD_CHARCELLS */
599
600static const unsigned char tk_pat[4][7] = {
601 { 0x0e, 0x11, 0x0e, 0x00, 0x0e, 0x11, 0x0e }, /* white - white */
602 { 0x0e, 0x11, 0x0e, 0x00, 0x0e, 0x1f, 0x0e }, /* white - black */
603 { 0x0e, 0x1f, 0x0e, 0x00, 0x0e, 0x11, 0x0e }, /* black - white */
604 { 0x0e, 0x1f, 0x0e, 0x00, 0x0e, 0x1f, 0x0e } /* black - black */
605};
606
607static unsigned char cur_pat[7];
608static unsigned long gfx_chars[5];
609
610static void release_gfx(void)
611{
612 int i;
613
614 for (i = 0; i < 5; i++)
615 if (gfx_chars[i])
616 rb->lcd_unlock_pattern(gfx_chars[i]);
617}
618
619static bool init_gfx(void)
620{
621 int i;
622
623 for (i = 0; i < 5; i++) {
624 if ((gfx_chars[i] = rb->lcd_get_locked_pattern()) == 0) {
625 release_gfx();
626 return false;
627 }
628 }
629 for (i = 0; i < 4; i++)
630 rb->lcd_define_pattern(gfx_chars[i], tk_pat[i]);
631 return true;
632}
633
634/* draw a spot at the coordinates (x,y), range of p is 0-19 */
635static void draw_spot(int p)
636{
637 if ((p/5) & 1)
638 p -= 5;
639
640 rb->lcd_putc (p%5, p/10, gfx_chars[2*spots[p]+spots[p+5]]);
641}
642
643/* draw the cursor at the current cursor position */
644static void draw_cursor(void)
645{
646 if ((cursor_pos/5) & 1) {
647 rb->memcpy( cur_pat, tk_pat[2*spots[cursor_pos-5]+spots[cursor_pos]], 7 );
648 cur_pat[4] ^= 0x15;
649 cur_pat[6] ^= 0x11;
650 }
651 else {
652 rb->memcpy( cur_pat, tk_pat[2*spots[cursor_pos]+spots[cursor_pos+5]], 7 );
653 cur_pat[0] ^= 0x15;
654 cur_pat[2] ^= 0x11;
655 }
656 rb->lcd_define_pattern(gfx_chars[4], cur_pat);
657 rb->lcd_putc( cursor_pos%5, cursor_pos/10, gfx_chars[4] );
658}
659
660/* draw the info panel ... duh */
661static void draw_info_panel(void)
662{
663 rb->lcd_puts( 6, 0, "Flips" );
664 rb->lcd_putsf( 6, 1, "%d", moves );
665}
666
667#endif /* LCD */ 598#endif /* LCD */
668 599
669/* clear the cursor where it is */ 600/* clear the cursor where it is */
@@ -978,9 +909,6 @@ enum plugin_status plugin_start(const void* parameter)
978#endif 909#endif
979 910
980 rb->lcd_update(); 911 rb->lcd_update();
981#else /* HAVE_LCD_CHARCELLS */
982 if (!init_gfx())
983 return PLUGIN_ERROR;
984#endif 912#endif
985 rb->button_get_w_tmo(HZ*3); 913 rb->button_get_w_tmo(HZ*3);
986 914
@@ -995,8 +923,5 @@ enum plugin_status plugin_start(const void* parameter)
995 rb->srand(*rb->current_tick); 923 rb->srand(*rb->current_tick);
996 924
997 rc = flipit_loop(); 925 rc = flipit_loop();
998#ifdef HAVE_LCD_CHARCELLS
999 release_gfx();
1000#endif
1001 return rc; 926 return rc;
1002} 927}
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 8cf4d67f3e..e7529895ac 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -66,10 +66,6 @@
66/* Original graphics is only 1bpp so it should be portable 66/* Original graphics is only 1bpp so it should be portable
67 * to most targets. But for now, only support the simple ones. 67 * to most targets. But for now, only support the simple ones.
68 */ 68 */
69#ifndef HAVE_LCD_BITMAP
70 #error INVADROX: Unsupported LCD
71#endif
72
73#if (LCD_DEPTH < 2) 69#if (LCD_DEPTH < 2)
74 #error INVADROX: Unsupported LCD 70 #error INVADROX: Unsupported LCD
75#endif 71#endif
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c
index b380e85180..26f8f47e8f 100644
--- a/apps/plugins/jackpot.c
+++ b/apps/plugins/jackpot.c
@@ -30,24 +30,7 @@ const struct button_mapping* plugin_contexts[]={pla_main_ctx};
30#define NB_PICTURES 9 30#define NB_PICTURES 9
31#define NB_SLOTS 3 31#define NB_SLOTS 3
32 32
33#ifdef HAVE_LCD_CHARCELLS 33#ifdef HAVE_LCD_BITMAP
34#define PICTURE_ROTATION_STEPS 7
35static unsigned char jackpot_slots_patterns[]={
36 0x00, 0x0A, 0x1F, 0x1F, 0x1F, 0x0e, 0x04, /* (+00)Heart */
37 0x00, 0x04, 0x0E, 0x1F, 0x1F, 0x04, 0x0E, /* (+07)Spade */
38 0x00, 0x04, 0x0E, 0x1F, 0x0E, 0x04, 0x00, /* (+14)Diamond */
39 0x00, 0x15, 0x0E, 0x1F, 0x0E, 0x15, 0x00, /* (+21)Club */
40 0x03, 0x04, 0x0e, 0x1F, 0x1F, 0x1F, 0x0e, /* (+28)Cherry */
41 0x00, 0x04, 0x04, 0x1F, 0x04, 0x0E, 0x1F, /* (+35)Cross */
42 0x04, 0x0E, 0x15, 0x04, 0x0A, 0x0A, 0x11, /* (+42)Man */
43 0x00, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, /* (+49)Square */
44 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* (+56)Empty */
45 0x00, 0x0A, 0x1F, 0x1F, 0x1F, 0x0e, 0x04 /* (+63)Heart */
46};
47static unsigned long char_patterns[NB_SLOTS];
48#define SLEEP_TIME (HZ/24)
49#else /* bitmaps LCDs */
50
51#define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1)) 34#define PICTURE_HEIGHT (BMPHEIGHT_jackpot_slots/(NB_PICTURES+1))
52#if NB_SCREENS==1 35#if NB_SCREENS==1
53#define PICTURE_ROTATION_STEPS PICTURE_HEIGHT 36#define PICTURE_ROTATION_STEPS PICTURE_HEIGHT
@@ -72,7 +55,7 @@ const struct picture jackpot_pictures[]={
72}; 55};
73 56
74#define SLEEP_TIME (HZ/200) 57#define SLEEP_TIME (HZ/200)
75#endif /* HAVE_LCD_CHARCELLS */ 58#endif /* HAVE_LCD_BITMAP */
76 59
77struct jackpot 60struct jackpot
78{ 61{
@@ -92,29 +75,9 @@ struct jackpot
92 int money; 75 int money;
93}; 76};
94 77
95#ifdef HAVE_LCD_CHARCELLS
96static void patterns_init(struct screen* display)
97{
98 int i;
99 for(i=0;i<NB_SLOTS;i++)
100 char_patterns[i]=display->get_locked_pattern();
101}
102
103static void patterns_deinit(struct screen* display)
104{
105 /* Restore the old pattern */
106 int i;
107 for(i=0;i<NB_SLOTS;i++)
108 display->unlock_pattern(char_patterns[i]);
109}
110#endif /* HAVE_LCD_CHARCELLS */
111
112/*Call when the program exit*/ 78/*Call when the program exit*/
113static void jackpot_exit(void) 79static void jackpot_exit(void)
114{ 80{
115#ifdef HAVE_LCD_CHARCELLS
116 patterns_deinit(rb->screens[SCREEN_MAIN]);
117#endif /* HAVE_LCD_CHARCELLS */
118} 81}
119 82
120static void jackpot_init(struct jackpot* game) 83static void jackpot_init(struct jackpot* game)
@@ -168,47 +131,25 @@ static void jackpot_display_slot_machine(struct jackpot* game, struct screen* di
168 char str[20]; 131 char str[20];
169 int i; 132 int i;
170 bool changes=false; 133 bool changes=false;
171#ifdef HAVE_LCD_CHARCELLS
172 display->putchar(0, 0, '[');
173#else
174 const struct picture* picture= &(jackpot_pictures[display->screen_type]); 134 const struct picture* picture= &(jackpot_pictures[display->screen_type]);
175 int pos_x=(display->getwidth()-NB_SLOTS*(picture->width+1))/2; 135 int pos_x=(display->getwidth()-NB_SLOTS*(picture->width+1))/2;
176 int pos_y=(display->getheight()-(picture->slide_height))/2; 136 int pos_y=(display->getheight()-(picture->slide_height))/2;
177#endif /* HAVE_LCD_CHARCELLS */
178 for(i=0;i<NB_SLOTS;i++) 137 for(i=0;i<NB_SLOTS;i++)
179 { 138 {
180#ifdef HAVE_LCD_CHARCELLS
181 /* the only charcell lcd is 7 pixel high */
182 int state_y=(game->slot_state[i]*7)/PICTURE_ROTATION_STEPS;
183#else
184 int state_y= 139 int state_y=
185 (picture->slide_height*game->slot_state[i])/PICTURE_ROTATION_STEPS; 140 (picture->slide_height*game->slot_state[i])/PICTURE_ROTATION_STEPS;
186#endif /* HAVE_LCD_CHARCELLS */
187 int previous_state_y=game->state_y[display->screen_type][i]; 141 int previous_state_y=game->state_y[display->screen_type][i];
188 if(state_y==previous_state_y) 142 if(state_y==previous_state_y)
189 continue;/*no need to update the picture 143 continue;/*no need to update the picture
190 as it's the same as previous displayed one*/ 144 as it's the same as previous displayed one*/
191 changes=true; 145 changes=true;
192 game->state_y[display->screen_type][i]=state_y; 146 game->state_y[display->screen_type][i]=state_y;
193#ifdef HAVE_LCD_CHARCELLS
194 char* current_pattern=&(jackpot_slots_patterns[state_y]);
195 display->define_pattern(char_patterns[i],
196 current_pattern);
197 display->putchar(i+1, 0, char_patterns[i]);
198#else
199 vertical_picture_draw_part(display, picture, state_y, pos_x, pos_y); 147 vertical_picture_draw_part(display, picture, state_y, pos_x, pos_y);
200 pos_x+=(picture->width+1); 148 pos_x+=(picture->width+1);
201#endif
202 } 149 }
203 if(changes){ 150 if(changes){
204#ifdef HAVE_LCD_CHARCELLS
205 rb->snprintf(str,sizeof(str),"$%d", game->money);
206 display->putchar(++i, 0, ']');
207 display->puts(++i, 0, str);
208#else
209 rb->snprintf(str,sizeof(str),"money : $%d", game->money); 151 rb->snprintf(str,sizeof(str),"money : $%d", game->money);
210 display->puts(0, 0, str); 152 display->puts(0, 0, str);
211#endif
212 display->update(); 153 display->update();
213 } 154 }
214} 155}
@@ -216,9 +157,6 @@ static void jackpot_display_slot_machine(struct jackpot* game, struct screen* di
216 157
217static void jackpot_info_message(struct screen* display, char* message) 158static void jackpot_info_message(struct screen* display, char* message)
218{ 159{
219#ifdef HAVE_LCD_CHARCELLS
220 display->puts_scroll(0,1,message);
221#else
222 int xpos, ypos; 160 int xpos, ypos;
223 int message_height, message_width; 161 int message_height, message_width;
224 display->getstringsize(message, &message_width, &message_height); 162 display->getstringsize(message, &message_width, &message_height);
@@ -228,7 +166,6 @@ static void jackpot_info_message(struct screen* display, char* message)
228 message_height); 166 message_height);
229 display->putsxy(xpos,ypos,message); 167 display->putsxy(xpos,ypos,message);
230 display->update(); 168 display->update();
231#endif /* HAVE_LCD_CHARCELLS */
232} 169}
233 170
234static void jackpot_print_turn_result(struct jackpot* game, 171static void jackpot_print_turn_result(struct jackpot* game,
@@ -299,9 +236,6 @@ enum plugin_status plugin_start(const void* parameter)
299 (void)parameter; 236 (void)parameter;
300 atexit(jackpot_exit); 237 atexit(jackpot_exit);
301 rb->srand(*rb->current_tick); 238 rb->srand(*rb->current_tick);
302#ifdef HAVE_LCD_CHARCELLS
303 patterns_init(rb->screens[SCREEN_MAIN]);
304#endif /* HAVE_LCD_CHARCELLS */
305 jackpot_init(&game); 239 jackpot_init(&game);
306 240
307 FOR_NB_SCREENS(i){ 241 FOR_NB_SCREENS(i){
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES
index 82b9fba4a5..effc076eb7 100644
--- a/apps/plugins/lib/SOURCES
+++ b/apps/plugins/lib/SOURCES
@@ -33,10 +33,6 @@ overlay.c
33profile_plugin.c 33profile_plugin.c
34#endif 34#endif
35 35
36#ifdef HAVE_LCD_CHARCELLS
37playergfx.c
38#endif
39
40#ifdef HAVE_LCD_BITMAP 36#ifdef HAVE_LCD_BITMAP
41 37
42#ifdef CPU_ARM 38#ifdef CPU_ARM
diff --git a/apps/plugins/lib/display_text.c b/apps/plugins/lib/display_text.c
index 5d13fc678d..90712a649f 100644
--- a/apps/plugins/lib/display_text.c
+++ b/apps/plugins/lib/display_text.c
@@ -22,11 +22,7 @@
22#include "plugin.h" 22#include "plugin.h"
23#include "display_text.h" 23#include "display_text.h"
24 24
25#ifdef HAVE_LCD_CHARCELLS
26#define MARGIN 0
27#else
28#define MARGIN 5 25#define MARGIN 5
29#endif
30 26
31static bool wait_key_press(void) 27static bool wait_key_press(void)
32{ 28{
diff --git a/apps/plugins/lib/mylcd.h b/apps/plugins/lib/mylcd.h
index e363111c71..a543d60890 100644
--- a/apps/plugins/lib/mylcd.h
+++ b/apps/plugins/lib/mylcd.h
@@ -32,15 +32,10 @@
32 * targets. On color, mylcd_ub_update_XXXX refer to the proper update 32 * targets. On color, mylcd_ub_update_XXXX refer to the proper update
33 * functions, otherwise they are no-ops. 33 * functions, otherwise they are no-ops.
34 * 34 *
35 * lib/playergfx.h or lib/grey.h should be included before including this 35 * lib/grey.h should be included before including this
36 * header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise. 36 * header. For bitmap LCD's, defaults to rb->lcd_XXXX otherwise.
37 */ 37 */
38#if defined (HAVE_LCD_CHARCELLS) && defined(__PGFX_H__) 38#if defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__)
39#define MYLCD_CFG_PGFX /* using PGFX */
40#define mylcd_(fn) pgfx_##fn
41#define mylcd_ub_(fn) pgfx_##fn
42
43#elif defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__)
44#define MYLCD_CFG_GREYLIB /* using greylib */ 39#define MYLCD_CFG_GREYLIB /* using greylib */
45#define mylcd_(fn) grey_##fn 40#define mylcd_(fn) grey_##fn
46#define myxlcd_(fn) grey_##fn 41#define myxlcd_(fn) grey_##fn
diff --git a/apps/plugins/lib/osd.h b/apps/plugins/lib/osd.h
index b5bf63d9fe..1c2752139a 100644
--- a/apps/plugins/lib/osd.h
+++ b/apps/plugins/lib/osd.h
@@ -23,10 +23,6 @@
23#ifndef OSD_H 23#ifndef OSD_H
24#define OSD_H 24#define OSD_H
25 25
26#ifndef HAVE_LCD_BITMAP
27#error OSD requires bitmapped LCD
28#endif
29
30/* At this time: assumes use of the default viewport for normal drawing */ 26/* At this time: assumes use of the default viewport for normal drawing */
31 27
32/* Callback implemented by user. Paramters are OSD vp-relative coordinates */ 28/* Callback implemented by user. Paramters are OSD vp-relative coordinates */
diff --git a/apps/plugins/lib/playergfx.c b/apps/plugins/lib/playergfx.c
deleted file mode 100644
index b2ba71351f..0000000000
--- a/apps/plugins/lib/playergfx.c
+++ /dev/null
@@ -1,526 +0,0 @@
1/***************************************************************************
2* __________ __ ___.
3* Open \______ \ ____ ____ | | _\_ |__ _______ ___
4* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7* \/ \/ \/ \/ \/
8* $Id$
9*
10* Bitmap graphics on player LCD!
11*
12* Copyright (C) 2005 Jens Arnold
13*
14* This program is free software; you can redistribute it and/or
15* modify it under the terms of the GNU General Public License
16* as published by the Free Software Foundation; either version 2
17* of the License, or (at your option) any later version.
18*
19* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20* KIND, either express or implied.
21*
22****************************************************************************/
23
24#include "plugin.h"
25
26#include "playergfx.h"
27
28/*** globals ***/
29
30static int char_width;
31static int char_height;
32static int pixel_height;
33static int pixel_width;
34static unsigned long gfx_chars[8];
35static unsigned char gfx_buffer[56];
36static int drawmode = DRMODE_SOLID;
37
38/*** Special functions ***/
39
40/* library init */
41bool pgfx_init(int cwidth, int cheight)
42{
43 int i;
44
45 if (((unsigned) cwidth * (unsigned) cheight) > 8 || (unsigned) cheight > 2)
46 return false;
47
48 char_width = cwidth;
49 char_height = cheight;
50 pixel_height = 7 * char_height;
51 pixel_width = 5 * char_width;
52
53 for (i = 0; i < cwidth * cheight; i++)
54 {
55 if ((gfx_chars[i] = rb->lcd_get_locked_pattern()) == 0)
56 {
57 pgfx_release();
58 return false;
59 }
60 }
61
62 return true;
63}
64
65/* library deinit */
66void pgfx_release(void)
67{
68 int i;
69
70 for (i = 0; i < 8; i++)
71 if (gfx_chars[i])
72 rb->lcd_unlock_pattern(gfx_chars[i]);
73}
74
75/* place the display */
76void pgfx_display(int cx, int cy)
77{
78 int i, j;
79 int width = MIN(char_width, 11 - cx);
80 int height = MIN(char_height, 2 - cy);
81
82 for (i = 0; i < width; i++)
83 for (j = 0; j < height; j++)
84 rb->lcd_putc(cx + i, cy + j, gfx_chars[char_height * i + j]);
85}
86
87void pgfx_display_block(int cx, int cy, int x, int y)
88{
89 rb->lcd_putc(cx, cy, gfx_chars[char_height * x + y]);
90}
91
92
93/*** Update functions ***/
94
95void pgfx_update(void)
96{
97 int i;
98
99 for (i = 0; i < char_width * char_height; i++)
100 rb->lcd_define_pattern(gfx_chars[i], gfx_buffer + 7 * i);
101
102 rb->lcd_update();
103}
104
105/*** Parameter handling ***/
106
107void pgfx_set_drawmode(int mode)
108{
109 drawmode = mode & (DRMODE_SOLID|DRMODE_INVERSEVID);
110}
111
112int pgfx_get_drawmode(void)
113{
114 return drawmode;
115}
116
117/*** Low-level drawing functions ***/
118
119static void setpixel(int x, int y)
120{
121 gfx_buffer[pixel_height * (x/5) + y] |= 0x10 >> (x%5);
122}
123
124static void clearpixel(int x, int y)
125{
126 gfx_buffer[pixel_height * (x/5) + y] &= ~(0x10 >> (x%5));
127}
128
129static void flippixel(int x, int y)
130{
131 gfx_buffer[pixel_height * (x/5) + y] ^= 0x10 >> (x%5);
132}
133
134static void nopixel(int x, int y)
135{
136 (void)x;
137 (void)y;
138}
139
140lcd_pixelfunc_type* pgfx_pixelfuncs[8] = {
141 flippixel, nopixel, setpixel, setpixel,
142 nopixel, clearpixel, nopixel, clearpixel
143};
144
145static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
146{
147 *address ^= (bits & mask);
148}
149
150static void bgblock(unsigned char *address, unsigned mask, unsigned bits)
151{
152 *address &= (bits | ~mask);
153}
154
155static void fgblock(unsigned char *address, unsigned mask, unsigned bits)
156{
157 *address |= (bits & mask);
158}
159
160static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
161{
162 unsigned data = *(char *)address;
163
164 bits ^= data;
165 *address = data ^ (bits & mask);
166}
167
168static void flipinvblock(unsigned char *address, unsigned mask, unsigned bits)
169{
170 *address ^= (~bits & mask);
171}
172
173static void bginvblock(unsigned char *address, unsigned mask, unsigned bits)
174{
175 *address &= ~(bits & mask);
176}
177
178static void fginvblock(unsigned char *address, unsigned mask, unsigned bits)
179{
180 *address |= (~bits & mask);
181}
182
183static void solidinvblock(unsigned char *address, unsigned mask, unsigned bits)
184{
185 unsigned data = *(char *)address;
186
187 bits = ~bits ^ data;
188 *address = data ^ (bits & mask);
189}
190
191lcd_blockfunc_type* pgfx_blockfuncs[8] = {
192 flipblock, bgblock, fgblock, solidblock,
193 flipinvblock, bginvblock, fginvblock, solidinvblock
194};
195
196/*** Drawing functions ***/
197
198/* Clear the whole display */
199void pgfx_clear_display(void)
200{
201 unsigned bits = (drawmode & DRMODE_INVERSEVID) ? 0x1F : 0;
202
203 rb->memset(gfx_buffer, bits, char_width * pixel_height);
204}
205
206/* Set a single pixel */
207void pgfx_drawpixel(int x, int y)
208{
209 if (((unsigned)x < (unsigned)pixel_width)
210 && ((unsigned)y < (unsigned)pixel_height))
211 pgfx_pixelfuncs[drawmode](x, y);
212}
213
214/* Draw a line */
215void pgfx_drawline(int x1, int y1, int x2, int y2)
216{
217 int numpixels;
218 int i;
219 int deltax, deltay;
220 int d, dinc1, dinc2;
221 int x, xinc1, xinc2;
222 int y, yinc1, yinc2;
223 lcd_pixelfunc_type *pfunc = pgfx_pixelfuncs[drawmode];
224
225 deltax = abs(x2 - x1);
226 deltay = abs(y2 - y1);
227 xinc2 = 1;
228 yinc2 = 1;
229
230 if (deltax >= deltay)
231 {
232 numpixels = deltax;
233 d = 2 * deltay - deltax;
234 dinc1 = deltay * 2;
235 dinc2 = (deltay - deltax) * 2;
236 xinc1 = 1;
237 yinc1 = 0;
238 }
239 else
240 {
241 numpixels = deltay;
242 d = 2 * deltax - deltay;
243 dinc1 = deltax * 2;
244 dinc2 = (deltax - deltay) * 2;
245 xinc1 = 0;
246 yinc1 = 1;
247 }
248 numpixels++; /* include endpoints */
249
250 if (x1 > x2)
251 {
252 xinc1 = -xinc1;
253 xinc2 = -xinc2;
254 }
255
256 if (y1 > y2)
257 {
258 yinc1 = -yinc1;
259 yinc2 = -yinc2;
260 }
261
262 x = x1;
263 y = y1;
264
265 for (i = 0; i < numpixels; i++)
266 {
267 if (((unsigned)x < (unsigned)pixel_width)
268 && ((unsigned)y < (unsigned)pixel_height))
269 pfunc(x, y);
270
271 if (d < 0)
272 {
273 d += dinc1;
274 x += xinc1;
275 y += yinc1;
276 }
277 else
278 {
279 d += dinc2;
280 x += xinc2;
281 y += yinc2;
282 }
283 }
284}
285
286/* Draw a horizontal line (optimised) */
287void pgfx_hline(int x1, int x2, int y)
288{
289 int nx;
290 unsigned char *dst;
291 unsigned mask, mask_right;
292 lcd_blockfunc_type *bfunc;
293
294 /* direction flip */
295 if (x2 < x1)
296 {
297 nx = x1;
298 x1 = x2;
299 x2 = nx;
300 }
301
302 /* nothing to draw? */
303 if (((unsigned)y >= (unsigned)pixel_height) || (x1 >= pixel_width)
304 || (x2 < 0))
305 return;
306
307 /* clipping */
308 if (x1 < 0)
309 x1 = 0;
310 if (x2 >= pixel_width)
311 x2 = pixel_width - 1;
312
313 bfunc = pgfx_blockfuncs[drawmode];
314 dst = &gfx_buffer[pixel_height * (x1/5) + y];
315 nx = x2 - (x1 - (x1 % 5));
316 mask = 0x1F >> (x1 % 5);
317 mask_right = 0x1F0 >> (nx % 5);
318
319 for (; nx >= 5; nx -= 5)
320 {
321 bfunc(dst, mask, 0xFFu);
322 dst += pixel_height;
323 mask = 0x1F;
324 }
325 mask &= mask_right;
326 bfunc(dst, mask, 0x1F);
327}
328
329/* Draw a vertical line (optimised) */
330void pgfx_vline(int x, int y1, int y2)
331{
332 int y;
333 unsigned char *dst, *dst_end;
334 unsigned mask;
335 lcd_blockfunc_type *bfunc;
336
337 /* direction flip */
338 if (y2 < y1)
339 {
340 y = y1;
341 y1 = y2;
342 y2 = y;
343 }
344
345 /* nothing to draw? */
346 if (((unsigned)x >= (unsigned)pixel_width) || (y1 >= pixel_height)
347 || (y2 < 0))
348 return;
349
350 /* clipping */
351 if (y1 < 0)
352 y1 = 0;
353 if (y2 >= pixel_height)
354 y2 = pixel_height - 1;
355
356 bfunc = pgfx_blockfuncs[drawmode];
357 dst = &gfx_buffer[pixel_height * (x/5) + y1];
358 mask = 0x10 >> (x % 5);
359
360 dst_end = dst + y2 - y1;
361 do
362 bfunc(dst++, mask, 0x1F);
363 while (dst <= dst_end);
364}
365
366/* Draw a rectangular box */
367void pgfx_drawrect(int x, int y, int width, int height)
368{
369 if ((width <= 0) || (height <= 0))
370 return;
371
372 int x2 = x + width - 1;
373 int y2 = y + height - 1;
374
375 pgfx_vline(x, y, y2);
376 pgfx_vline(x2, y, y2);
377 pgfx_hline(x, x2, y);
378 pgfx_hline(x, x2, y2);
379}
380
381/* Fill a rectangular area */
382void pgfx_fillrect(int x, int y, int width, int height)
383{
384 int nx;
385 unsigned char *dst, *dst_end;
386 unsigned mask, mask_right;
387 lcd_blockfunc_type *bfunc;
388
389 /* nothing to draw? */
390 if ((width <= 0) || (height <= 0) || (x >= pixel_width)
391 || (y >= pixel_height) || (x + width <= 0) || (y + height <= 0))
392 return;
393
394 /* clipping */
395 if (x < 0)
396 {
397 width += x;
398 x = 0;
399 }
400 if (y < 0)
401 {
402 height += y;
403 y = 0;
404 }
405 if (x + width > pixel_width)
406 width = pixel_width - x;
407 if (y + height > pixel_height)
408 height = pixel_height - y;
409
410 bfunc = pgfx_blockfuncs[drawmode];
411 dst = &gfx_buffer[pixel_height * (x/5) + y];
412 nx = width - 1 + (x % 5);
413 mask = 0x1F >> (x % 5);
414 mask_right = 0x1F0 >> (nx % 5);
415
416 for (; nx >= 5; nx -= 5)
417 {
418 unsigned char *dst_col = dst;
419
420 dst_end = dst_col + height;
421 do
422 bfunc(dst_col++, mask, 0x1F);
423 while (dst_col < dst_end);
424
425 dst += pixel_height;
426 mask = 0x1F;
427 }
428 mask &= mask_right;
429
430 dst_end = dst + height;
431 do
432 bfunc(dst++, mask, 0x1F);
433 while (dst < dst_end);
434}
435
436/* About PlayerGFX internal bitmap format:
437 *
438 * A bitmap contains one bit for every pixel that defines if that pixel is
439 * black (1) or white (0). Bits within a byte are arranged horizontally,
440 * MSB at the left.
441 * The bytes are stored in row-major order, with byte 0 being top left,
442 * byte 1 2nd from left etc. Each row of bytes defines one pixel row.
443 *
444 * This approximates the (even more strange) internal hardware format. */
445
446/* Draw a partial bitmap. stride is given in pixels */
447void pgfx_bitmap_part(const unsigned char *src, int src_x, int src_y,
448 int stride, int x, int y, int width, int height)
449{
450 int nx, shift;
451 unsigned char *dst, *dst_end;
452 unsigned mask, mask_right;
453 lcd_blockfunc_type *bfunc;
454
455 /* nothing to draw? */
456 if ((width <= 0) || (height <= 0) || (x >= pixel_width)
457 || (y >= pixel_height) || (x + width <= 0) || (y + height <= 0))
458 return;
459
460 /* clipping */
461 if (x < 0)
462 {
463 width += x;
464 src_x -= x;
465 x = 0;
466 }
467 if (y < 0)
468 {
469 height += y;
470 src_y -= y;
471 y = 0;
472 }
473 if (x + width > pixel_width)
474 width = pixel_width - x;
475 if (y + height > pixel_height)
476 height = pixel_height - y;
477
478 stride = (stride + 7) >> 3; /* convert to no. of bytes */
479
480 src += stride * src_y + (src_x >> 3); /* move starting point */
481 dst = &gfx_buffer[pixel_height * (x/5) + y];
482 shift = 3 + (x % 5) - (src_x & 7);
483 nx = width - 1 + (x % 5);
484
485 bfunc = pgfx_blockfuncs[drawmode];
486 mask = 0x1F >> (x % 5);
487 mask_right = 0x1F0 >> (nx % 5);
488
489 dst_end = dst + height;
490 do
491 {
492 const unsigned char *src_row = src;
493 unsigned char *dst_row = dst++;
494 unsigned mask_row = mask;
495 unsigned data = *src_row++;
496 int extrabits = shift;
497
498 for (x = nx; x >= 5; x -= 5)
499 {
500 if (extrabits < 0)
501 {
502 data = (data << 8) | *src_row++;
503 extrabits += 8;
504 }
505 bfunc(dst_row, mask_row, data >> extrabits);
506 extrabits -= 5;
507 dst_row += pixel_height;
508 mask_row = 0x1F;
509 }
510 if (extrabits < 0)
511 {
512 data = (data << 8) | *src_row;
513 extrabits += 8;
514 }
515 bfunc(dst_row, mask_row & mask_right, data >> extrabits);
516
517 src += stride;
518 }
519 while (dst < dst_end);
520}
521
522/* Draw a full bitmap */
523void pgfx_bitmap(const unsigned char *src, int x, int y, int width, int height)
524{
525 pgfx_bitmap_part(src, 0, 0, width, x, y, width, height);
526}
diff --git a/apps/plugins/lib/playergfx.h b/apps/plugins/lib/playergfx.h
deleted file mode 100644
index 9f1305af12..0000000000
--- a/apps/plugins/lib/playergfx.h
+++ /dev/null
@@ -1,55 +0,0 @@
1/***************************************************************************
2* __________ __ ___.
3* Open \______ \ ____ ____ | | _\_ |__ _______ ___
4* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7* \/ \/ \/ \/ \/
8* $Id$
9*
10* Bitmap graphics on player LCD!
11*
12* Copyright (C) 2005 Jens Arnold
13*
14* This program is free software; you can redistribute it and/or
15* modify it under the terms of the GNU General Public License
16* as published by the Free Software Foundation; either version 2
17* of the License, or (at your option) any later version.
18*
19* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20* KIND, either express or implied.
21*
22****************************************************************************/
23
24#ifndef __PGFX_H__
25#define __PGFX_H__
26
27#include "plugin.h"
28
29#ifdef HAVE_LCD_CHARCELLS /* Player only :) */
30
31bool pgfx_init(int cwidth, int cheight);
32void pgfx_release(void);
33void pgfx_display(int cx, int cy);
34void pgfx_display_block(int cx, int cy, int x, int y);
35void pgfx_update(void);
36
37void pgfx_set_drawmode(int mode);
38int pgfx_get_drawmode(void);
39
40void pgfx_clear_display(void);
41void pgfx_drawpixel(int x, int y);
42void pgfx_drawline(int x1, int y1, int x2, int y2);
43void pgfx_hline(int x1, int x2, int y);
44void pgfx_vline(int x, int y1, int y2);
45void pgfx_drawrect(int x, int y, int width, int height);
46void pgfx_fillrect(int x, int y, int width, int height);
47void pgfx_bitmap_part(const unsigned char *src, int src_x, int src_y,
48 int stride, int x, int y, int width, int height);
49void pgfx_bitmap(const unsigned char *src, int x, int y, int width, int height);
50
51#define pgfx_mono_bitmap_part pgfx_bitmap_part
52#define pgfx_mono_bitmap pgfx_bitmap
53
54#endif /* HAVE_LCD_CHARCELLS */
55#endif /* __PGFX_H__ */
diff --git a/apps/plugins/lib/simple_viewer.c b/apps/plugins/lib/simple_viewer.c
index 6927d84a96..4c05ee68c5 100644
--- a/apps/plugins/lib/simple_viewer.c
+++ b/apps/plugins/lib/simple_viewer.c
@@ -64,17 +64,12 @@ static const char* get_next_line(const char *text, struct view_info *info)
64 total = 0; 64 total = 0;
65 while(*ptr) 65 while(*ptr)
66 { 66 {
67#ifdef HAVE_LCD_CHARCELLS
68 n = rb->utf8seek(ptr, 1);
69 w = 1;
70#else
71 unsigned short ch; 67 unsigned short ch;
72 n = ((intptr_t)rb->utf8decode(ptr, &ch) - (intptr_t)ptr); 68 n = ((intptr_t)rb->utf8decode(ptr, &ch) - (intptr_t)ptr);
73 if (rb->is_diacritic(ch, NULL)) 69 if (rb->is_diacritic(ch, NULL))
74 w = 0; 70 w = 0;
75 else 71 else
76 w = rb->font_get_width(info->pf, ch); 72 w = rb->font_get_width(info->pf, ch);
77#endif
78 if (isbrchr(ptr, n)) 73 if (isbrchr(ptr, n))
79 space = ptr+(isspace(*ptr) || total + w <= info->vp.width? n: 0); 74 space = ptr+(isspace(*ptr) || total + w <= info->vp.width? n: 0);
80 if (*ptr == '\n') 75 if (*ptr == '\n')
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index e1c570b6a5..60bed3b826 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -19,7 +19,6 @@
19 * 19 *
20 **************************************************************************/ 20 **************************************************************************/
21#include "plugin.h" 21#include "plugin.h"
22#include "lib/playergfx.h"
23#include "lib/pluginlib_actions.h" 22#include "lib/pluginlib_actions.h"
24 23
25/* this set the context to use with PLA */ 24/* this set the context to use with PLA */
@@ -81,19 +80,9 @@ enum plugin_status plugin_start(const void* parameter) {
81 int y = (DISPLAY_HEIGHT / 2) - (LOGO_HEIGHT / 2); 80 int y = (DISPLAY_HEIGHT / 2) - (LOGO_HEIGHT / 2);
82 int dx; 81 int dx;
83 int dy; 82 int dy;
84#ifdef HAVE_LCD_CHARCELLS
85 int cpos = -1;
86 int old_cpos = -1;
87#endif
88 83
89 (void)parameter; 84 (void)parameter;
90 85
91#ifdef HAVE_LCD_CHARCELLS
92 if (!pgfx_init(4, 2)) {
93 rb->splash(HZ*2, "Old LCD :(");
94 return PLUGIN_OK;
95 }
96#endif
97 rb->srand(*rb->current_tick); 86 rb->srand(*rb->current_tick);
98 dx = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; 87 dx = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE;
99 dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE; 88 dy = rb->rand()%(2*RAND_SCALE+1) - RAND_SCALE;
@@ -159,9 +148,6 @@ enum plugin_status plugin_start(const void* parameter) {
159 switch (button) { 148 switch (button) {
160 case LP_QUIT: 149 case LP_QUIT:
161 case LP_QUIT2: 150 case LP_QUIT2:
162#ifdef HAVE_LCD_CHARCELLS
163 pgfx_release();
164#endif
165 return PLUGIN_OK; 151 return PLUGIN_OK;
166 case LP_DEC_X: 152 case LP_DEC_X:
167 case LP_DEC_X_REPEAT: 153 case LP_DEC_X_REPEAT:
@@ -184,9 +170,6 @@ enum plugin_status plugin_start(const void* parameter) {
184 170
185 default: 171 default:
186 if (rb->default_event_handler(button) == SYS_USB_CONNECTED) { 172 if (rb->default_event_handler(button) == SYS_USB_CONNECTED) {
187#ifdef HAVE_LCD_CHARCELLS
188 pgfx_release();
189#endif
190 return PLUGIN_USB_CONNECTED; 173 return PLUGIN_USB_CONNECTED;
191 } 174 }
192 break; 175 break;
diff --git a/apps/plugins/lrcplayer.c b/apps/plugins/lrcplayer.c
index eb441eab8d..1b017942a9 100644
--- a/apps/plugins/lrcplayer.c
+++ b/apps/plugins/lrcplayer.c
@@ -144,11 +144,7 @@ static struct viewport vp_lyrics[NB_SCREENS];
144 144
145#include "lib/pluginlib_actions.h" 145#include "lib/pluginlib_actions.h"
146#define LST_SET_TIME (LST_SET_MSEC|LST_SET_SEC|LST_SET_MIN|LST_SET_HOUR) 146#define LST_SET_TIME (LST_SET_MSEC|LST_SET_SEC|LST_SET_MIN|LST_SET_HOUR)
147#ifdef HAVE_LCD_CHARCELLS
148#define LST_OFF_Y 0
149#else /* HAVE_LCD_BITMAP */
150#define LST_OFF_Y 1 147#define LST_OFF_Y 1
151#endif
152static int lrc_set_time(const char *title, const char *unit, long *pval, 148static int lrc_set_time(const char *title, const char *unit, long *pval,
153 int step, int min, int max, int flags) 149 int step, int min, int max, int flags)
154{ 150{
@@ -229,17 +225,11 @@ static int lrc_set_time(const char *title, const char *unit, long *pval,
229 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 225 rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
230 rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]); 226 rb->lcd_putsxy(x, y*(1+LST_OFF_Y), &buffer[p_start]);
231 rb->lcd_set_drawmode(DRMODE_SOLID); 227 rb->lcd_set_drawmode(DRMODE_SOLID);
232#else
233 rb->lcd_put_cursor(x+rb->utf8length(&buffer[p_start])-1, y, 0x7F);
234#endif 228#endif
235 } 229 }
236 rb->lcd_update(); 230 rb->lcd_update();
237 int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts)); 231 int button = pluginlib_getaction(TIMEOUT_BLOCK, lst_contexts, ARRAYLEN(lst_contexts));
238 int mult = 1; 232 int mult = 1;
239#ifdef HAVE_LCD_CHARCELLS
240 if (pos_min != pos_max)
241 rb->lcd_remove_cursor();
242#endif
243 switch (button) 233 switch (button)
244 { 234 {
245 case PLA_UP_REPEAT: 235 case PLA_UP_REPEAT:
@@ -452,9 +442,7 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
452 int word_count, word_width; 442 int word_count, word_width;
453 const unsigned char *str; 443 const unsigned char *str;
454 } 444 }
455#ifndef HAVE_LCD_CHARCELLS
456 sp, 445 sp,
457#endif
458 cr; 446 cr;
459 447
460 lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */ 448 lrc_buffer_used = (lrc_buffer_used+3)&~3; /* 4 bytes aligned */
@@ -514,19 +502,15 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
514 cr.nword = lrc_line->nword; 502 cr.nword = lrc_line->nword;
515 lrc_word = lrc_line->words+cr.nword; 503 lrc_word = lrc_line->words+cr.nword;
516 cr.str = (lrc_word-1)->word; 504 cr.str = (lrc_word-1)->word;
517#ifndef HAVE_LCD_CHARCELLS
518 sp.word_count = 0; 505 sp.word_count = 0;
519 sp.word_width = 0; 506 sp.word_width = 0;
520 sp.nword = 0; 507 sp.nword = 0;
521 sp.count = 0; 508 sp.count = 0;
522 sp.width = 0; 509 sp.width = 0;
523#endif
524 do { 510 do {
525 cr.count = 0; 511 cr.count = 0;
526 cr.width = 0; 512 cr.width = 0;
527#ifndef HAVE_LCD_CHARCELLS
528 sp.str = NULL; 513 sp.str = NULL;
529#endif
530 514
531 while (1) 515 while (1)
532 { 516 {
@@ -541,10 +525,6 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
541 break; 525 break;
542 526
543 int c, w; 527 int c, w;
544#ifdef HAVE_LCD_CHARCELLS
545 c = rb->utf8seek(cr.str, 1);
546 w = 1;
547#else
548 c = ((intptr_t)rb->utf8decode(cr.str, &ch) - (intptr_t)cr.str); 528 c = ((intptr_t)rb->utf8decode(cr.str, &ch) - (intptr_t)cr.str);
549 if (rb->is_diacritic(ch, NULL)) 529 if (rb->is_diacritic(ch, NULL))
550 w = 0; 530 w = 0;
@@ -576,7 +556,6 @@ static struct lrc_brpos *calc_brpos(struct lrc_line *lrc_line, int i)
576 } 556 }
577 break; 557 break;
578 } 558 }
579#endif
580 cr.count += c; 559 cr.count += c;
581 cr.width += w; 560 cr.width += w;
582 lrc_word->count += c; 561 lrc_word->count += c;
@@ -1916,38 +1895,6 @@ static void display_lrcs(void)
1916 } 1895 }
1917 if (!lrc_line && ypos < vp_lyrics[i].height) 1896 if (!lrc_line && ypos < vp_lyrics[i].height)
1918 display->putsxy(0, ypos, "[end]"); 1897 display->putsxy(0, ypos, "[end]");
1919#else /* HAVE_LCD_CHARCELLS */
1920 struct lrc_line *lrc_line = lrc_center;
1921 struct lrc_brpos *lrc_brpos = calc_brpos(lrc_line, i);
1922 long elapsed = 0;
1923 const char *str = get_lrc_str(lrc_line);
1924 int x = vp_lyrics[i].width/2, y = 0;
1925
1926 if (rin >= 0 && len > 0)
1927 {
1928 elapsed = rin * lrc_center->width / len;
1929 while (elapsed > lrc_brpos->width)
1930 {
1931 elapsed -= lrc_brpos->width;
1932 str = lrc_skip_space(str+lrc_brpos->count);
1933 lrc_brpos++;
1934 }
1935 }
1936 rb->strlcpy(temp_buf, str, lrc_brpos->count+1);
1937
1938 x -= elapsed;
1939 if (x < 0)
1940 display->puts(0, y, temp_buf + rb->utf8seek(temp_buf, -x));
1941 else
1942 display->puts(x, y, temp_buf);
1943 x += rb->utf8length(temp_buf)+1;
1944 lrc_line = lrc_line->next;
1945 if (!lrc_line && x < vp_lyrics[i].width)
1946 {
1947 if (x < vp_lyrics[i].width/2)
1948 x = vp_lyrics[i].width/2;
1949 display->puts(x, y, "[end]");
1950 }
1951#endif /* HAVE_LCD_BITMAP */ 1898#endif /* HAVE_LCD_BITMAP */
1952 display->update_viewport(); 1899 display->update_viewport();
1953 display->set_viewport(NULL); 1900 display->set_viewport(NULL);
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index 02217390cd..75947df618 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -1022,12 +1022,7 @@ static void play_tock(void)
1022static void metronome_draw(struct screen* display, int state) 1022static void metronome_draw(struct screen* display, int state)
1023{ 1023{
1024 struct part *ps; 1024 struct part *ps;
1025#ifndef HAVE_LCD_BITMAP
1026 char beat1 = ' ';
1027 char beat2 = ' ';
1028#else
1029 int textlen = display->lcdwidth / display->getcharwidth(); 1025 int textlen = display->lcdwidth / display->getcharwidth();
1030#endif
1031 ps = part; 1026 ps = part;
1032 display->clear_display(); 1027 display->clear_display();
1033#ifdef HAVE_LCD_BITMAP 1028#ifdef HAVE_LCD_BITMAP
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c
index 68938a1f13..28ea9efd93 100644
--- a/apps/plugins/mosaique.c
+++ b/apps/plugins/mosaique.c
@@ -19,7 +19,6 @@
19 * 19 *
20 **************************************************************************/ 20 **************************************************************************/
21#include "plugin.h" 21#include "plugin.h"
22#include "lib/playergfx.h"
23#include "lib/mylcd.h" 22#include "lib/mylcd.h"
24#include "lib/pluginlib_actions.h" 23#include "lib/pluginlib_actions.h"
25 24
@@ -59,14 +58,6 @@ enum plugin_status plugin_start(const void* parameter)
59 int sy = 3; 58 int sy = 3;
60 (void)parameter; 59 (void)parameter;
61 60
62#ifdef HAVE_LCD_CHARCELLS
63 if (!pgfx_init(4, 2))
64 {
65 rb->splash(HZ*2, "Old LCD :(");
66 return PLUGIN_OK;
67 }
68 pgfx_display(3, 0);
69#endif
70 mylcd_clear_display(); 61 mylcd_clear_display();
71 mylcd_set_drawmode(DRMODE_COMPLEMENT); 62 mylcd_set_drawmode(DRMODE_COMPLEMENT);
72 while (1) { 63 while (1) {
@@ -117,9 +108,6 @@ enum plugin_status plugin_start(const void* parameter)
117 case MOSAIQUE_QUIT: 108 case MOSAIQUE_QUIT:
118 case MOSAIQUE_QUIT2: 109 case MOSAIQUE_QUIT2:
119 mylcd_set_drawmode(DRMODE_SOLID); 110 mylcd_set_drawmode(DRMODE_SOLID);
120#ifdef HAVE_LCD_CHARCELLS
121 pgfx_release();
122#endif
123 return PLUGIN_OK; 111 return PLUGIN_OK;
124 112
125 case MOSAIQUE_SPEED: 113 case MOSAIQUE_SPEED:
@@ -142,9 +130,6 @@ enum plugin_status plugin_start(const void* parameter)
142 if (rb->default_event_handler(button) == SYS_USB_CONNECTED) 130 if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
143 { 131 {
144 mylcd_set_drawmode(DRMODE_SOLID); 132 mylcd_set_drawmode(DRMODE_SOLID);
145#ifdef HAVE_LCD_CHARCELLS
146 pgfx_release();
147#endif
148 return PLUGIN_USB_CONNECTED; 133 return PLUGIN_USB_CONNECTED;
149 } 134 }
150 break; 135 break;
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c
index add1fc5724..68440e4602 100644
--- a/apps/plugins/random_folder_advance_config.c
+++ b/apps/plugins/random_folder_advance_config.c
@@ -229,9 +229,7 @@ static void generate(void)
229 rb->splashf(HZ, "Couldnt open %s", RFA_FILE); 229 rb->splashf(HZ, "Couldnt open %s", RFA_FILE);
230 return; 230 return;
231 } 231 }
232#ifndef HAVE_LCD_CHARCELLS
233 update_screen(true); 232 update_screen(true);
234#endif
235 lasttick = *rb->current_tick; 233 lasttick = *rb->current_tick;
236 234
237 if(!custom_dir()) 235 if(!custom_dir())
diff --git a/apps/plugins/rockblox.c b/apps/plugins/rockblox.c
index 1732d61277..c7968c3e20 100644
--- a/apps/plugins/rockblox.c
+++ b/apps/plugins/rockblox.c
@@ -25,7 +25,6 @@
25#include "lib/helper.h" 25#include "lib/helper.h"
26#include "lib/highscore.h" 26#include "lib/highscore.h"
27#include "lib/playback_control.h" 27#include "lib/playback_control.h"
28#include "lib/playergfx.h"
29#include "lib/mylcd.h" 28#include "lib/mylcd.h"
30 29
31 30
@@ -770,17 +769,8 @@
770 769
771extern const fb_data rockblox_background[]; 770extern const fb_data rockblox_background[];
772 771
773#else /* HAVE_LCD_CHARCELLS */ 772#else
774 773#error "lcd screen size not defined!"
775#define BOARD_HEIGHT 14
776
777#define BLOCK_WIDTH 1
778#define BLOCK_HEIGHT 1
779#define BOARD_X 5
780#define BOARD_Y 0
781#define PREVIEW_X 15
782#define PREVIEW_Y 1
783
784#endif 774#endif
785 775
786#ifndef HIGHSCORE_SPACE 776#ifndef HIGHSCORE_SPACE
@@ -992,10 +982,6 @@ static void show_details (void)
992 rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score); 982 rb->lcd_putsxyf (LABEL_X, SCORE_Y, "%d", rockblox_status.score);
993 rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level); 983 rb->lcd_putsxyf (LEVEL_X, LEVEL_Y, "%d", rockblox_status.level);
994 rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines); 984 rb->lcd_putsxyf (LINES_X, LINES_Y, "%d", rockblox_status.lines);
995#else /* HAVE_LCD_CHARCELLS */
996 rb->lcd_putsf (5, 0, "L%d/%d", rockblox_status.level,
997 rockblox_status.lines);
998 rb->lcd_putsf (5, 1, "S%d", rockblox_status.score);
999#endif 985#endif
1000} 986}
1001 987
@@ -1066,15 +1052,6 @@ static void init_rockblox (bool resume)
1066 1052
1067#ifdef HAVE_LCD_BITMAP 1053#ifdef HAVE_LCD_BITMAP
1068 rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT); 1054 rb->lcd_bitmap (rockblox_background, 0, 0, LCD_WIDTH, LCD_HEIGHT);
1069#else /* HAVE_LCD_CHARCELLS */
1070 pgfx_display (0, 0);
1071 pgfx_display_block (3, 0, 3, 1);
1072 pgfx_display_block (4, 0, 3, 0);
1073 rb->lcd_puts(4, 1, " ");
1074 pgfx_clear_display();
1075 pgfx_fillrect (3, 0, 2, 14);
1076 pgfx_fillrect (15, 7, 2, 7);
1077 pgfx_update();
1078#endif 1055#endif
1079 if (!resume) 1056 if (!resume)
1080 { 1057 {
@@ -1200,8 +1177,6 @@ static void refresh_board (void)
1200 rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1, 1177 rb->lcd_hline (BOARD_X + i * BLOCK_WIDTH + 1,
1201 BOARD_X + (i + 1) * BLOCK_WIDTH - 1, 1178 BOARD_X + (i + 1) * BLOCK_WIDTH - 1,
1202 BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1); 1179 BOARD_Y + (j + 1) * BLOCK_HEIGHT - 1);
1203#else /* HAVE_LCD_CHARCELLS */
1204 pgfx_drawpixel (BOARD_X + i, BOARD_Y + j);
1205#endif 1180#endif
1206 } 1181 }
1207 } 1182 }
@@ -1246,8 +1221,6 @@ static void refresh_board (void)
1246 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, 1221 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
1247 BOARD_X + (x + 1) * BLOCK_WIDTH - 1, 1222 BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
1248 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); 1223 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
1249#else /* HAVE_LCD_CHARCELLS */
1250 pgfx_drawpixel (BOARD_X + x, BOARD_Y + y);
1251#endif 1224#endif
1252 } 1225 }
1253 1226
@@ -1285,8 +1258,6 @@ static void refresh_board (void)
1285 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1, 1258 rb->lcd_hline (BOARD_X + x * BLOCK_WIDTH + 1,
1286 BOARD_X + (x + 1) * BLOCK_WIDTH - 1, 1259 BOARD_X + (x + 1) * BLOCK_WIDTH - 1,
1287 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1); 1260 BOARD_Y + (y + 1) * BLOCK_HEIGHT - 1);
1288#else /* HAVE_LCD_CHARCELLS */
1289 pgfx_drawpixel (BOARD_X + x, BOARD_Y + y);
1290#endif 1261#endif
1291 } 1262 }
1292 1263
@@ -1355,8 +1326,6 @@ static void draw_next_block (void)
1355 rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1, 1326 rb->lcd_hline (PREVIEW_X + rx * BLOCK_WIDTH + 1,
1356 PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1, 1327 PREVIEW_X + (rx + 1) * BLOCK_WIDTH - 1,
1357 PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1); 1328 PREVIEW_Y + (ry + 1) * BLOCK_HEIGHT - 1);
1358#else /* HAVE_LCD_CHARCELLS */
1359 pgfx_drawpixel (PREVIEW_X + rx, PREVIEW_Y + ry);
1360#endif 1329#endif
1361 } 1330 }
1362 1331
@@ -1787,9 +1756,6 @@ enum plugin_status plugin_start (const void *parameter)
1787 } 1756 }
1788 } 1757 }
1789 1758
1790#ifndef HAVE_LCD_BITMAP
1791 pgfx_release();
1792#endif
1793 /* Save user's HighScore */ 1759 /* Save user's HighScore */
1794 highscore_save(SCORE_FILE, highscores, NUM_SCORES); 1760 highscore_save(SCORE_FILE, highscores, NUM_SCORES);
1795 backlight_use_settings(); 1761 backlight_use_settings();
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index 74efb8ea00..f05d3c2a44 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -19,7 +19,6 @@
19 * 19 *
20 **************************************************************************/ 20 **************************************************************************/
21#include "plugin.h" 21#include "plugin.h"
22#include "lib/playergfx.h"
23#include "lib/mylcd.h" 22#include "lib/mylcd.h"
24#include "lib/pluginlib_actions.h" 23#include "lib/pluginlib_actions.h"
25 24
@@ -143,11 +142,6 @@ static void snow_init(void)
143 particles[i][0]=-1; 142 particles[i][0]=-1;
144 particles[i][1]=-1; 143 particles[i][1]=-1;
145 } 144 }
146#ifdef HAVE_LCD_CHARCELLS
147 pgfx_display(0, 0); /* display three times */
148 pgfx_display(4, 0);
149 pgfx_display(8, 0);
150#endif
151 mylcd_clear_display(); 145 mylcd_clear_display();
152#ifdef HAVE_REMOTE_LCD 146#ifdef HAVE_REMOTE_LCD
153 rb->lcd_remote_clear_display(); 147 rb->lcd_remote_clear_display();
@@ -159,13 +153,6 @@ enum plugin_status plugin_start(const void* parameter)
159 int button; 153 int button;
160 (void)(parameter); 154 (void)(parameter);
161 155
162#ifdef HAVE_LCD_CHARCELLS
163 if (!pgfx_init(4, 2))
164 {
165 rb->splash(HZ*2, "Old LCD :(");
166 return PLUGIN_OK;
167 }
168#endif
169#ifdef HAVE_LCD_COLOR 156#ifdef HAVE_LCD_COLOR
170 rb->lcd_clear_display(); 157 rb->lcd_clear_display();
171 rb->lcd_set_foreground(LCD_WHITE); 158 rb->lcd_set_foreground(LCD_WHITE);
@@ -186,17 +173,11 @@ enum plugin_status plugin_start(const void* parameter)
186 173
187 if ((button == SNOW_QUIT) || (button == SNOW_QUIT2)) 174 if ((button == SNOW_QUIT) || (button == SNOW_QUIT2))
188 { 175 {
189#ifdef HAVE_LCD_CHARCELLS
190 pgfx_release();
191#endif
192 return PLUGIN_OK; 176 return PLUGIN_OK;
193 } 177 }
194 else 178 else
195 if (rb->default_event_handler(button) == SYS_USB_CONNECTED) 179 if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
196 { 180 {
197#ifdef HAVE_LCD_CHARCELLS
198 pgfx_release();
199#endif
200 return PLUGIN_USB_CONNECTED; 181 return PLUGIN_USB_CONNECTED;
201 } 182 }
202 } 183 }
diff --git a/apps/plugins/text_viewer/tv_display.c b/apps/plugins/text_viewer/tv_display.c
index 1f8499bed2..d6175b79cf 100644
--- a/apps/plugins/text_viewer/tv_display.c
+++ b/apps/plugins/text_viewer/tv_display.c
@@ -69,11 +69,6 @@
69#define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width 69#define TV_SCROLLBAR_WIDTH rb->global_settings->scrollbar_width
70#define TV_SCROLLBAR_HEIGHT 4 70#define TV_SCROLLBAR_HEIGHT 4
71 71
72
73#ifndef HAVE_LCD_BITMAP
74#define TV_BOOKMARK_ICON 0xe101
75#endif
76
77struct tv_rect { 72struct tv_rect {
78 int x; 73 int x;
79 int y; 74 int y;
diff --git a/apps/screen_access.c b/apps/screen_access.c
index a966d07876..cdb02a6546 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -237,15 +237,6 @@ struct screen screens[NB_SCREENS] =
237 .scroll_step=&lcd_scroll_step, 237 .scroll_step=&lcd_scroll_step,
238#endif /* HAVE_LCD_BITMAP */ 238#endif /* HAVE_LCD_BITMAP */
239 239
240#ifdef HAVE_LCD_CHARCELLS
241 .double_height=&lcd_double_height,
242 .putchar=&lcd_putc,
243 .get_locked_pattern=&lcd_get_locked_pattern,
244 .define_pattern=&lcd_define_pattern,
245 .unlock_pattern=&lcd_unlock_pattern,
246 .icon=&lcd_icon,
247#endif /* HAVE_LCD_CHARCELLS */
248
249 .putsxy=&lcd_putsxy, 240 .putsxy=&lcd_putsxy,
250 .puts=&lcd_puts, 241 .puts=&lcd_puts,
251 .putsf=&lcd_putsf, 242 .putsf=&lcd_putsf,
@@ -333,13 +324,6 @@ struct screen screens[NB_SCREENS] =
333 .scroll_step=&lcd_remote_scroll_step, 324 .scroll_step=&lcd_remote_scroll_step,
334#endif /* 1 */ 325#endif /* 1 */
335 326
336#if 0 /* no charcell remote LCDs so far */
337 .double_height=&lcd_remote_double_height,
338 .putc=&lcd_remote_putc,
339 .get_locked_pattern=&lcd_remote_get_locked_pattern,
340 .define_pattern=&lcd_remote_define_pattern,
341 .icon=&lcd_remote_icon,
342#endif /* 0 */
343 .putsxy=&lcd_remote_putsxy, 327 .putsxy=&lcd_remote_putsxy,
344 .puts=&lcd_remote_puts, 328 .puts=&lcd_remote_puts,
345 .putsf=&lcd_remote_putsf, 329 .putsf=&lcd_remote_putsf,
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 6b90bc9313..eab84c9129 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -37,10 +37,6 @@ void screen_helper_setfont(int font);
37 37
38#define FOR_NB_SCREENS(i) for(int i = 0; i < NB_SCREENS; i++) 38#define FOR_NB_SCREENS(i) for(int i = 0; i < NB_SCREENS; i++)
39 39
40#ifdef HAVE_LCD_CHARCELLS
41#define MAX_LINES_ON_SCREEN 2
42#endif
43
44typedef void screen_bitmap_part_func(const void *src, int src_x, int src_y, 40typedef void screen_bitmap_part_func(const void *src, int src_x, int src_y,
45 int stride, int x, int y, int width, int height); 41 int stride, int x, int y, int width, int height);
46typedef void screen_bitmap_func(const void *src, int x, int y, int width, 42typedef void screen_bitmap_func(const void *src, int x, int y, int width,
@@ -110,15 +106,6 @@ struct screen
110 void (*hline)(int x1, int x2, int y); 106 void (*hline)(int x1, int x2, int y);
111#endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */ 107#endif /* HAVE_LCD_BITMAP || HAVE_REMOTE_LCD */
112 108
113#ifdef HAVE_LCD_CHARCELLS /* no charcell remote LCDs so far */
114 void (*double_height)(bool on);
115 /* name it putchar, not putc because putc is a c library function */
116 void (*putchar)(int x, int y, unsigned long ucs);
117 void (*icon)(int icon, bool enable);
118 unsigned long (*get_locked_pattern)(void);
119 void (*define_pattern)(unsigned long ucs, const char *pattern);
120 void (*unlock_pattern)(unsigned long ucs);
121#endif
122 void (*putsxy)(int x, int y, const unsigned char *str); 109 void (*putsxy)(int x, int y, const unsigned char *str);
123 void (*puts)(int x, int y, const unsigned char *str); 110 void (*puts)(int x, int y, const unsigned char *str);
124 void (*putsf)(int x, int y, const unsigned char *str, ...); 111 void (*putsf)(int x, int y, const unsigned char *str, ...);
diff --git a/apps/screens.c b/apps/screens.c
index 52e8cadc7e..ecd406037d 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -763,11 +763,7 @@ int view_runtime(void)
763 struct gui_synclist lists; 763 struct gui_synclist lists;
764 int action; 764 int action;
765 gui_synclist_init(&lists, runtime_get_data, NULL, false, 2, NULL); 765 gui_synclist_init(&lists, runtime_get_data, NULL, false, 2, NULL);
766#if !defined(HAVE_LCD_CHARCELLS)
767 gui_synclist_set_title(&lists, str(LANG_RUNNING_TIME), NOICON); 766 gui_synclist_set_title(&lists, str(LANG_RUNNING_TIME), NOICON);
768#else
769 gui_synclist_set_title(&lists, NULL, NOICON);
770#endif
771 if(global_settings.talk_menu) 767 if(global_settings.talk_menu)
772 gui_synclist_set_voice_callback(&lists, runtime_speak_data); 768 gui_synclist_set_voice_callback(&lists, runtime_speak_data);
773 gui_synclist_set_icon_callback(&lists, NULL); 769 gui_synclist_set_icon_callback(&lists, NULL);
diff --git a/apps/status.c b/apps/status.c
index 485ca0aa34..57f2984402 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -79,31 +79,3 @@ int current_playmode(void)
79 79
80 return STATUS_STOP; 80 return STATUS_STOP;
81} 81}
82
83#if defined(HAVE_LCD_CHARCELLS)
84bool record = false;
85bool audio = false;
86bool param = false;
87bool usb = false;
88
89void status_set_record(bool b)
90{
91 record = b;
92}
93
94void status_set_audio(bool b)
95{
96 audio = b;
97}
98
99void status_set_param(bool b)
100{
101 param = b;
102}
103
104void status_set_usb(bool b)
105{
106 usb = b;
107}
108
109#endif /* HAVE_LCD_CHARCELLS */
diff --git a/apps/status.h b/apps/status.h
index c8ec7bb354..1add203a0c 100644
--- a/apps/status.h
+++ b/apps/status.h
@@ -21,13 +21,6 @@
21#ifndef _STATUS_H 21#ifndef _STATUS_H
22#define _STATUS_H 22#define _STATUS_H
23 23
24#if defined(HAVE_LCD_CHARCELLS)
25extern bool record;
26extern bool audio;
27extern bool param;
28extern bool usb;
29#endif
30
31enum playmode 24enum playmode
32{ 25{
33 STATUS_PLAY, 26 STATUS_PLAY,
@@ -48,11 +41,5 @@ int current_playmode(void);
48#if (CONFIG_PLATFORM & PLATFORM_HOSTED) 41#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
49#include <time.h> 42#include <time.h>
50#endif 43#endif
51#ifdef HAVE_LCD_CHARCELLS
52void status_set_record(bool b);
53void status_set_audio(bool b);
54void status_set_param(bool b);
55void status_set_usb(bool b);
56#endif /* HAVE_LCD_CHARCELLS */
57 44
58#endif /* _STATUS_H */ 45#endif /* _STATUS_H */
diff --git a/apps/tree.c b/apps/tree.c
index 9b6ce06af0..fb0d0a3ac5 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -299,10 +299,6 @@ void tree_gui_init(void)
299 299
300 strcpy(tc.currdir, "/"); 300 strcpy(tc.currdir, "/");
301 301
302#ifdef HAVE_LCD_CHARCELLS
303 FOR_NB_SCREENS(i)
304 screens[i].double_height(false);
305#endif
306 gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1, NULL); 302 gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1, NULL);
307 gui_synclist_set_voice_callback(&tree_lists, tree_voice_cb); 303 gui_synclist_set_voice_callback(&tree_lists, tree_voice_cb);
308 gui_synclist_set_icon_callback(&tree_lists, 304 gui_synclist_set_icon_callback(&tree_lists,
@@ -710,14 +706,12 @@ static int dirbrowse(void)
710 if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) || 706 if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) ||
711 ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/")))) 707 ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/"))))
712 { 708 {
713#ifdef HAVE_LCD_BITMAP /* charcell doesnt have ACTION_TREE_PGLEFT so this isnt needed */
714 if (oldbutton == ACTION_TREE_PGLEFT) 709 if (oldbutton == ACTION_TREE_PGLEFT)
715 break; 710 break;
716 else 711 else
717#endif
718 return GO_TO_ROOT; 712 return GO_TO_ROOT;
719 } 713 }
720 714
721#ifdef HAVE_TAGCACHE 715#ifdef HAVE_TAGCACHE
722 if (id3db) 716 if (id3db)
723 tagtree_exit(&tc); 717 tagtree_exit(&tc);
diff --git a/docs/PLUGIN_API b/docs/PLUGIN_API
index b2fb94ed7e..e7ab119f97 100644
--- a/docs/PLUGIN_API
+++ b/docs/PLUGIN_API
@@ -185,7 +185,7 @@ unsigned int battery_voltage(void)
185 \description 185 \description
186 186
187unsigned short *bidi_l2v( const unsigned char *str, int orientation ) 187unsigned short *bidi_l2v( const unsigned char *str, int orientation )
188 \conditions !defined(HAVE_LCD_CHARCELLS) 188 \conditions defined(HAVE_LCD_BITMAP)
189 \param str 189 \param str
190 \param orientation 190 \param orientation
191 \return 191 \return
@@ -353,7 +353,7 @@ bool button_hold(void)
353 \description 353 \description
354 354
355struct event_queue *button_queue 355struct event_queue *button_queue
356 \conditions !defined(HAVE_LCD_CHARCELLS) )) && (defined(HAVE_LCD_ENABLE 356 \conditions defined(HAVE_LCD_BITMAP) )) && (defined(HAVE_LCD_ENABLE
357 \return 357 \return
358 \description 358 \description
359 359
@@ -372,7 +372,7 @@ void cancel_cpu_boost(void)
372 \description Unboosts the CPU for the current thread 372 \description Unboosts the CPU for the current thread
373 373
374const unsigned char *font_get_bits( struct font *pf, unsigned short char_code ) 374const unsigned char *font_get_bits( struct font *pf, unsigned short char_code )
375 \conditions !defined(HAVE_LCD_CHARCELLS) 375 \conditions defined(HAVE_LCD_BITMAP)
376 \param pf 376 \param pf
377 \param char_code 377 \param char_code
378 \return 378 \return
@@ -628,14 +628,14 @@ void flush_icache(void)
628 \description 628 \description
629 629
630struct font* font_get(int font) 630struct font* font_get(int font)
631 \conditions !defined(HAVE_LCD_CHARCELLS) 631 \conditions defined(HAVE_LCD_BITMAP)
632 \param font 632 \param font
633 \return the font structure for =font= 633 \return the font structure for =font=
634 \description If the requested font isn't loaded/compiled-in, decrement the font number and try again. 634 \description If the requested font isn't loaded/compiled-in, decrement the font number and try again.
635 \see [S[firmware/export/font.h]] 635 \see [S[firmware/export/font.h]]
636 636
637int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber) 637int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber)
638 \conditions !defined(HAVE_LCD_CHARCELLS) 638 \conditions defined(HAVE_LCD_BITMAP)
639 \param str 639 \param str
640 \param w 640 \param w
641 \param h 641 \param h
@@ -644,14 +644,14 @@ int font_getstringsize(const unsigned char *str, int *w, int *h, int fontnumber)
644 \description 644 \description
645 645
646int font_get_width(struct font* pf, unsigned short char_code) 646int font_get_width(struct font* pf, unsigned short char_code)
647 \conditions !defined(HAVE_LCD_CHARCELLS) 647 \conditions defined(HAVE_LCD_BITMAP)
648 \param pf 648 \param pf
649 \param char_code 649 \param char_code
650 \return 650 \return
651 \description 651 \description
652 652
653struct font* font_load(const char *path) 653struct font* font_load(const char *path)
654 \conditions !defined(HAVE_LCD_CHARCELLS) 654 \conditions defined(HAVE_LCD_BITMAP)
655 \param path 655 \param path
656 \return 656 \return
657 \description Load font =path= and returns a struct font pointer for it 657 \description Load font =path= and returns a struct font pointer for it
@@ -707,7 +707,7 @@ struct system_status *global_status
707 \see [S[apps/settings.h]] 707 \see [S[apps/settings.h]]
708 708
709void gui_scrollbar_draw(struct screen * screen, int x, int y, int width, int height, int items, int min_shown, int max_shown, unsigned flags) 709void gui_scrollbar_draw(struct screen * screen, int x, int y, int width, int height, int items, int min_shown, int max_shown, unsigned flags)
710 \conditions !defined(HAVE_LCD_CHARCELLS) 710 \conditions defined(HAVE_LCD_BITMAP)
711 \param screen 711 \param screen
712 \param x 712 \param x
713 \param y 713 \param y
@@ -837,7 +837,7 @@ int kbd_input(char* buffer, int buflen)
837 837
838void lcd_bitmap(const fb_data *src, int x, int y, int width, int height) 838void lcd_bitmap(const fb_data *src, int x, int y, int width, int height)
839 \group lcd 839 \group lcd
840 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 840 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
841 \param src 841 \param src
842 \param x 842 \param x
843 \param y 843 \param y
@@ -847,7 +847,7 @@ void lcd_bitmap(const fb_data *src, int x, int y, int width, int height)
847 847
848void lcd_bitmap_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height) 848void lcd_bitmap_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
849 \group lcd 849 \group lcd
850 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 850 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
851 \param src 851 \param src
852 \param src_x 852 \param src_x
853 \param src_y 853 \param src_y
@@ -860,7 +860,7 @@ void lcd_bitmap_part(const fb_data *src, int src_x, int src_y, int stride, int x
860 860
861void lcd_bitmap_transparent(const fb_data *src, int x, int y, int width, int height) 861void lcd_bitmap_transparent(const fb_data *src, int x, int y, int width, int height)
862 \group lcd 862 \group lcd
863 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH == 16) 863 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH == 16)
864 \param src 864 \param src
865 \param x 865 \param x
866 \param y 866 \param y
@@ -870,7 +870,7 @@ void lcd_bitmap_transparent(const fb_data *src, int x, int y, int width, int hei
870 870
871void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height) 871void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
872 \group lcd 872 \group lcd
873 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH == 16) 873 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH == 16)
874 \param src 874 \param src
875 \param src_x 875 \param src_x
876 \param src_y 876 \param src_y
@@ -883,7 +883,7 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, int s
883 883
884void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, int bx, int by, int bwidth, int bheight, int stride) 884void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, int bx, int by, int bwidth, int bheight, int stride)
885 \group lcd 885 \group lcd
886 \conditions !defined(HAVE_LCD_CHARCELLS) )) && ((LCD_DEPTH < 4) && !defined(SIMULATOR 886 \conditions defined(HAVE_LCD_BITMAP) )) && ((LCD_DEPTH < 4) && !defined(SIMULATOR
887 \param values 887 \param values
888 \param phases 888 \param phases
889 \param bx 889 \param bx
@@ -895,7 +895,7 @@ void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, int bx, i
895 895
896void lcd_blit_mono(const unsigned char *data, int x, int by, int width, int bheight, int stride) 896void lcd_blit_mono(const unsigned char *data, int x, int by, int width, int bheight, int stride)
897 \group lcd 897 \group lcd
898 \conditions !defined(HAVE_LCD_CHARCELLS) )) && ((LCD_DEPTH < 4) && !defined(SIMULATOR 898 \conditions defined(HAVE_LCD_BITMAP) )) && ((LCD_DEPTH < 4) && !defined(SIMULATOR
899 \param data 899 \param data
900 \param x 900 \param x
901 \param by 901 \param by
@@ -906,7 +906,7 @@ void lcd_blit_mono(const unsigned char *data, int x, int by, int width, int bhei
906 906
907void lcd_blit_yuv(unsigned char * const src[3], int src_x, int src_y, int stride, int x, int y, int width, int height) 907void lcd_blit_yuv(unsigned char * const src[3], int src_x, int src_y, int stride, int x, int y, int width, int height)
908 \group lcd 908 \group lcd
909 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH == 16) 909 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH == 16)
910 \param src[3] 910 \param src[3]
911 \param src_x 911 \param src_x
912 \param src_y 912 \param src_y
@@ -921,22 +921,9 @@ void lcd_clear_display(void)
921 \group lcd 921 \group lcd
922 \description Clears the LCD and the framebuffer 922 \description Clears the LCD and the framebuffer
923 923
924void lcd_define_pattern(unsigned long ucs, const char *pattern)
925 \group lcd
926 \conditions (defined(HAVE_LCD_CHARCELLS))
927 \param ucs
928 \param pattern is a 8x8 pixelbitmap
929 \description Define a custom pattern for index =ucs=
930
931void lcd_double_height(bool on)
932 \group lcd
933 \conditions (defined(HAVE_LCD_CHARCELLS))
934 \param on
935 \description
936
937void lcd_drawline(int x1, int y1, int x2, int y2) 924void lcd_drawline(int x1, int y1, int x2, int y2)
938 \group lcd 925 \group lcd
939 \conditions !defined(HAVE_LCD_CHARCELLS) 926 \conditions defined(HAVE_LCD_BITMAP)
940 \param x1 X top coordinate 927 \param x1 X top coordinate
941 \param y1 Y top coordinate 928 \param y1 Y top coordinate
942 \param x2 X bottom coordinate 929 \param x2 X bottom coordinate
@@ -945,14 +932,14 @@ void lcd_drawline(int x1, int y1, int x2, int y2)
945 932
946void lcd_drawpixel(int x, int y) 933void lcd_drawpixel(int x, int y)
947 \group lcd 934 \group lcd
948 \conditions !defined(HAVE_LCD_CHARCELLS) 935 \conditions defined(HAVE_LCD_BITMAP)
949 \param x 936 \param x
950 \param y 937 \param y
951 \description Draws a pixel at (=x=, =y=) within current drawing mode 938 \description Draws a pixel at (=x=, =y=) within current drawing mode
952 939
953void lcd_drawrect(int x, int y, int width, int height) 940void lcd_drawrect(int x, int y, int width, int height)
954 \group lcd 941 \group lcd
955 \conditions !defined(HAVE_LCD_CHARCELLS) 942 \conditions defined(HAVE_LCD_BITMAP)
956 \param x 943 \param x
957 \param y 944 \param y
958 \param width 945 \param width
@@ -961,7 +948,7 @@ void lcd_drawrect(int x, int y, int width, int height)
961 948
962void lcd_fillrect(int x, int y, int width, int height) 949void lcd_fillrect(int x, int y, int width, int height)
963 \group lcd 950 \group lcd
964 \conditions !defined(HAVE_LCD_CHARCELLS) 951 \conditions defined(HAVE_LCD_BITMAP)
965 \param x 952 \param x
966 \param y 953 \param y
967 \param width 954 \param width
@@ -970,7 +957,7 @@ void lcd_fillrect(int x, int y, int width, int height)
970 957
971fb_data* lcd_framebuffer 958fb_data* lcd_framebuffer
972 \group lcd 959 \group lcd
973 \conditions !defined(HAVE_LCD_CHARCELLS) 960 \conditions defined(HAVE_LCD_BITMAP)
974 \return 961 \return
975 \description Pointer to the framebuffer 962 \description Pointer to the framebuffer
976 \see [S[firmware/export/lcd.h]] 963 \see [S[firmware/export/lcd.h]]
@@ -985,55 +972,40 @@ int lcd_getstringsize(const unsigned char *str, int *w, int *h)
985 972
986fb_data* lcd_get_backdrop(void) 973fb_data* lcd_get_backdrop(void)
987 \group lcd 974 \group lcd
988 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 975 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
989 \return Pointer to framebuffer data 976 \return Pointer to framebuffer data
990 \description Gets the current backdrop 977 \description Gets the current backdrop
991 \see lcd_framebuffer 978 \see lcd_framebuffer
992 979
993unsigned lcd_get_background(void) 980unsigned lcd_get_background(void)
994 \group lcd 981 \group lcd
995 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 982 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
996 \return 983 \return
997 \description 984 \description
998 985
999int lcd_get_drawmode(void) 986int lcd_get_drawmode(void)
1000 \group lcd 987 \group lcd
1001 \conditions !defined(HAVE_LCD_CHARCELLS) 988 \conditions defined(HAVE_LCD_BITMAP)
1002 \return current LCD drawing mode 989 \return current LCD drawing mode
1003 \description 990 \description
1004 991
1005unsigned lcd_get_foreground(void) 992unsigned lcd_get_foreground(void)
1006 \group lcd 993 \group lcd
1007 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 994 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
1008 \return 995 \return
1009 \description 996 \description
1010 997
1011unsigned long lcd_get_locked_pattern(void)
1012 \group lcd
1013 \conditions (defined(HAVE_LCD_CHARCELLS))
1014 \return
1015 \description Get a locked pattern index
1016 \see [S[firmware/drivers/lcd-player.c]]
1017
1018void lcd_hline(int x1, int x2, int y) 998void lcd_hline(int x1, int x2, int y)
1019 \group lcd 999 \group lcd
1020 \conditions !defined(HAVE_LCD_CHARCELLS) 1000 \conditions defined(HAVE_LCD_BITMAP)
1021 \param x1 X start coordinate 1001 \param x1 X start coordinate
1022 \param x2 X end coordinate 1002 \param x2 X end coordinate
1023 \param y Y coordinate 1003 \param y Y coordinate
1024 \description Draws a horizontal line at (=x1=, =y=) -> (=x2=, =y=) within current drawing mode 1004 \description Draws a horizontal line at (=x1=, =y=) -> (=x2=, =y=) within current drawing mode
1025 1005
1026void lcd_icon(int icon, bool enable)
1027 \group lcd
1028 \conditions (defined(HAVE_LCD_CHARCELLS))
1029 \param icon
1030 \param enable
1031 \description
1032 \see [S[firmware/drivers/lcd-player.c]]
1033
1034void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height) 1006void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int height)
1035 \group lcd 1007 \group lcd
1036 \conditions !defined(HAVE_LCD_CHARCELLS) 1008 \conditions defined(HAVE_LCD_BITMAP)
1037 \param src 1009 \param src
1038 \param x 1010 \param x
1039 \param y 1011 \param y
@@ -1043,7 +1015,7 @@ void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, int heig
1043 1015
1044void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, int stride, int x, int y, int width, int height) 1016void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, int stride, int x, int y, int width, int height)
1045 \group lcd 1017 \group lcd
1046 \conditions !defined(HAVE_LCD_CHARCELLS) 1018 \conditions defined(HAVE_LCD_BITMAP)
1047 \param src 1019 \param src
1048 \param src_x 1020 \param src_x
1049 \param src_y 1021 \param src_y
@@ -1054,14 +1026,6 @@ void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, int st
1054 \param height 1026 \param height
1055 \description 1027 \description
1056 1028
1057void lcd_putc(int x, int y, unsigned long ucs)
1058 \group lcd
1059 \conditions (defined(HAVE_LCD_CHARCELLS))
1060 \param x
1061 \param y
1062 \param ucs
1063 \description Put character =ucs= at coordinates (=x=, =y=)
1064
1065void lcd_puts(int x, int y, const unsigned char *string) 1029void lcd_puts(int x, int y, const unsigned char *string)
1066 \group lcd 1030 \group lcd
1067 \param x Row X 1031 \param x Row X
@@ -1083,15 +1047,6 @@ void lcd_puts_scroll(int x, int y, const unsigned char* string)
1083 \param string 1047 \param string
1084 \description Puts scrolling string on the LCD at row =x= and column =y=. The scrolling style is STYLE_DEFAULT. 1048 \description Puts scrolling string on the LCD at row =x= and column =y=. The scrolling style is STYLE_DEFAULT.
1085 1049
1086void lcd_put_cursor(int x, int y, unsigned long ucs)
1087 \group lcd
1088 \conditions (defined(HAVE_LCD_CHARCELLS))
1089 \param x
1090 \param y
1091 \param ucs
1092 \description Put cursor at coordinates (=x=, =y=)
1093 \see [S[firmware/export/lcd.h]]
1094
1095void lcd_remote_bitmap(const fb_remote_data *src, int x, int y, int width, int height) 1050void lcd_remote_bitmap(const fb_remote_data *src, int x, int y, int width, int height)
1096 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) 1051 \conditions (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
1097 \param src 1052 \param src
@@ -1302,27 +1257,22 @@ void lcd_remote_vline(int x, int y1, int y2)
1302 \param y2 1257 \param y2
1303 \description 1258 \description
1304 1259
1305void lcd_remove_cursor(void)
1306 \group lcd
1307 \conditions (defined(HAVE_LCD_CHARCELLS))
1308 \description Remove the cursor from the screen
1309
1310void lcd_setfont(int font) 1260void lcd_setfont(int font)
1311 \group lcd 1261 \group lcd
1312 \conditions !defined(HAVE_LCD_CHARCELLS) 1262 \conditions defined(HAVE_LCD_BITMAP)
1313 \param font 1263 \param font
1314 \description Set default font 1264 \description Set default font
1315 1265
1316void lcd_set_backdrop(fb_data* backdrop) 1266void lcd_set_backdrop(fb_data* backdrop)
1317 \group lcd 1267 \group lcd
1318 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 1268 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
1319 \param backdrop Pointer to backdrop image 1269 \param backdrop Pointer to backdrop image
1320 \description Set the backdrop to =backdrop= 1270 \description Set the backdrop to =backdrop=
1321 \see lcd_framebuffer 1271 \see lcd_framebuffer
1322 1272
1323void lcd_set_background(unsigned foreground) 1273void lcd_set_background(unsigned foreground)
1324 \group lcd 1274 \group lcd
1325 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 1275 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
1326 \param foreground 1276 \param foreground
1327 \description 1277 \description
1328 1278
@@ -1333,19 +1283,19 @@ void lcd_set_contrast(int x)
1333 1283
1334void lcd_set_drawmode(int mode) 1284void lcd_set_drawmode(int mode)
1335 \group lcd 1285 \group lcd
1336 \conditions !defined(HAVE_LCD_CHARCELLS) 1286 \conditions defined(HAVE_LCD_BITMAP)
1337 \param mode 1287 \param mode
1338 \description 1288 \description
1339 1289
1340void lcd_set_foreground(unsigned foreground) 1290void lcd_set_foreground(unsigned foreground)
1341 \group lcd 1291 \group lcd
1342 \conditions !defined(HAVE_LCD_CHARCELLS) && (LCD_DEPTH > 1) 1292 \conditions defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
1343 \param foreground 1293 \param foreground
1344 \description 1294 \description
1345 1295
1346void lcd_set_invert_display(bool yesno) 1296void lcd_set_invert_display(bool yesno)
1347 \group lcd 1297 \group lcd
1348 \conditions !defined(HAVE_LCD_CHARCELLS) )) && (defined(HAVE_LCD_INVERT 1298 \conditions defined(HAVE_LCD_BITMAP) )) && (defined(HAVE_LCD_INVERT
1349 \param yesno 1299 \param yesno
1350 \description 1300 \description
1351 1301
@@ -1353,19 +1303,13 @@ void lcd_stop_scroll(void)
1353 \group lcd 1303 \group lcd
1354 \description Stop all scrolling lines on the screen 1304 \description Stop all scrolling lines on the screen
1355 1305
1356void lcd_unlock_pattern(unsigned long ucs)
1357 \group lcd
1358 \conditions (defined(HAVE_LCD_CHARCELLS))
1359 \param ucs
1360 \description Unlock pattern of index =ucs=
1361
1362void lcd_update(void) 1306void lcd_update(void)
1363 \group lcd 1307 \group lcd
1364 \description Pushes LCD framebuffer changes to the LCD 1308 \description Pushes LCD framebuffer changes to the LCD
1365 1309
1366void lcd_update_rect(int x, int y, int width, int height) 1310void lcd_update_rect(int x, int y, int width, int height)
1367 \group lcd 1311 \group lcd
1368 \conditions !defined(HAVE_LCD_CHARCELLS) 1312 \conditions defined(HAVE_LCD_BITMAP)
1369 \param x measured in pixels 1313 \param x measured in pixels
1370 \param y measured in pixels 1314 \param y measured in pixels
1371 \param width measured in pixels 1315 \param width measured in pixels
@@ -1374,7 +1318,7 @@ void lcd_update_rect(int x, int y, int width, int height)
1374 1318
1375void lcd_vline(int x, int y1, int y2) 1319void lcd_vline(int x, int y1, int y2)
1376 \group lcd 1320 \group lcd
1377 \conditions !defined(HAVE_LCD_CHARCELLS) 1321 \conditions defined(HAVE_LCD_BITMAP)
1378 \param x X coordinate 1322 \param x X coordinate
1379 \param y1 Y start coordinate 1323 \param y1 Y start coordinate
1380 \param y2 Y end coordinate 1324 \param y2 Y end coordinate
@@ -1382,7 +1326,7 @@ void lcd_vline(int x, int y1, int y2)
1382 1326
1383void lcd_yuv_set_options(unsigned options) 1327void lcd_yuv_set_options(unsigned options)
1384 \group lcd 1328 \group lcd
1385 \conditions !defined(HAVE_LCD_CHARCELLS) )) && (LCD_DEPTH == 16) && (defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) || defined(IRIVER_H10) || defined(COWON_D2 1329 \conditions defined(HAVE_LCD_BITMAP) )) && (LCD_DEPTH == 16) && (defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200) || defined(IRIVER_H10) || defined(COWON_D2
1386 \param options 1330 \param options
1387 \description 1331 \description
1388 1332
@@ -1932,7 +1876,7 @@ struct screen* screens[NB_SCREENS]
1932 \description 1876 \description
1933 1877
1934void screen_clear_area(struct screen * display, int xstart, int ystart, int width, int height) 1878void screen_clear_area(struct screen * display, int xstart, int ystart, int width, int height)
1935 \conditions !defined(HAVE_LCD_CHARCELLS) 1879 \conditions defined(HAVE_LCD_BITMAP)
1936 \param display 1880 \param display
1937 \param xstart 1881 \param xstart
1938 \param ystart 1882 \param ystart
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 90c1f4011c..9cd1a5671c 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -52,8 +52,6 @@ target/hosted/sdl/button-sdl.c
52target/hosted/sdl/kernel-sdl.c 52target/hosted/sdl/kernel-sdl.c
53#ifdef HAVE_LCD_BITMAP 53#ifdef HAVE_LCD_BITMAP
54target/hosted/sdl/lcd-bitmap.c 54target/hosted/sdl/lcd-bitmap.c
55#elif defined(HAVE_LCD_CHARCELLS)
56target/hosted/sdl/lcd-charcells.c
57#endif 55#endif
58#ifdef HAVE_REMOTE_LCD 56#ifdef HAVE_REMOTE_LCD
59target/hosted/sdl/lcd-remote-bitmap.c 57target/hosted/sdl/lcd-remote-bitmap.c
@@ -255,11 +253,6 @@ common/vuprintf.c
255/* Display */ 253/* Display */
256scroll_engine.c 254scroll_engine.c
257 255
258#ifdef HAVE_LCD_CHARCELLS
259drivers/lcd-charcell.c
260drivers/lcd-charset-player.c
261#endif /* HAVE_LCD_CHARCELLS */
262
263#ifdef HAVE_LCD_BITMAP 256#ifdef HAVE_LCD_BITMAP
264arabjoin.c 257arabjoin.c
265bidi.c 258bidi.c
diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c
deleted file mode 100644
index b1f0021ff7..0000000000
--- a/firmware/drivers/lcd-charcell.c
+++ /dev/null
@@ -1,599 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Jens Arnold
11 * Based on the work of Alan Korr, Kjell Ericson and others
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22
23#include <stdio.h>
24#include "config.h"
25#include "hwcompat.h"
26#include "stdarg.h"
27#include "lcd.h"
28#include "kernel.h"
29#include "thread.h"
30#include "string-extra.h"
31#include <stdlib.h>
32#include "debug.h"
33#include "file.h"
34#include "system.h"
35#include "lcd-charcell.h"
36#include "rbunicode.h"
37#include "scroll_engine.h"
38
39/** definitions **/
40
41#define VARIABLE_XCHARS 16 /* number of software user-definable characters */
42/* There must be mappings for this many characters in the 0xe000 unicode range
43 * in lcd-charset-<target>.c */
44
45#define NO_PATTERN (-1)
46
47static int find_xchar(unsigned long ucs);
48
49/** globals **/
50
51unsigned char lcd_charbuffer[LCD_HEIGHT][LCD_WIDTH]; /* The "frame"buffer */
52static unsigned char lcd_substbuffer[LCD_HEIGHT][LCD_WIDTH];
53struct pattern_info lcd_patterns[MAX_HW_PATTERNS];
54struct cursor_info lcd_cursor;
55
56static unsigned char xfont_variable[VARIABLE_XCHARS][HW_PATTERN_SIZE];
57static bool xfont_variable_locked[VARIABLE_XCHARS];
58static int xspace; /* stores xhcar id of ' ' - often needed */
59
60static struct viewport default_vp =
61 {
62 .x = 0,
63 .y = 0,
64 .width = LCD_WIDTH,
65 .height = LCD_HEIGHT,
66 };
67
68static struct viewport* current_vp = &default_vp;
69
70/* LCD init */
71void lcd_init (void)
72{
73 lcd_init_device();
74 lcd_charset_init();
75 memset(lcd_patterns, 0, sizeof(lcd_patterns));
76 xspace = find_xchar(' ');
77 memset(lcd_charbuffer, xchar_info[xspace].hw_char, sizeof(lcd_charbuffer));
78 scroll_init();
79}
80
81/* Viewports */
82
83void lcd_set_viewport(struct viewport* vp)
84{
85 if (vp == NULL)
86 current_vp = &default_vp;
87 else
88 current_vp = vp;
89
90#if defined(SIMULATOR)
91 /* Force the viewport to be within bounds. If this happens it should
92 * be considered an error - the viewport will not draw as it might be
93 * expected.
94 */
95 if((unsigned) current_vp->x > (unsigned) LCD_WIDTH
96 || (unsigned) current_vp->y > (unsigned) LCD_HEIGHT
97 || current_vp->x + current_vp->width > LCD_WIDTH
98 || current_vp->y + current_vp->height > LCD_HEIGHT)
99 {
100#if !defined(HAVE_VIEWPORT_CLIP)
101 DEBUGF("ERROR: "
102#else
103 DEBUGF("NOTE: "
104#endif
105 "set_viewport out of bounds: x: %d y: %d width: %d height:%d\n",
106 current_vp->x, current_vp->y,
107 current_vp->width, current_vp->height);
108 }
109
110#endif
111}
112
113struct viewport *lcd_get_viewport(bool *is_default)
114{
115 *is_default = (current_vp == &default_vp);
116 return current_vp;
117}
118
119void lcd_update_viewport(void)
120{
121 lcd_update();
122}
123
124void lcd_update_viewport_rect(int x, int y, int width, int height)
125{
126 (void) x;
127 (void) y;
128 (void) width;
129 (void) height;
130 lcd_update();
131}
132
133/** parameter handling **/
134
135int lcd_getwidth(void)
136{
137 return current_vp->width;
138}
139
140int lcd_getheight(void)
141{
142 return current_vp->height;
143}
144
145int lcd_getstringsize(const unsigned char *str, int *w, int *h)
146{
147 int width = utf8length(str);
148
149 if (w)
150 *w = width;
151 if (h)
152 *h = 1;
153
154 return width;
155}
156
157/** low-level functions **/
158
159static int find_xchar(unsigned long ucs)
160{
161 int low = 0;
162 int high = xchar_info_size - 1;
163
164 do
165 {
166 int probe = (low + high) >> 1;
167
168 if (xchar_info[probe].ucs < ucs)
169 low = probe + 1;
170 else if (xchar_info[probe].ucs > ucs)
171 high = probe - 1;
172 else
173 return probe;
174 }
175 while (low <= high);
176
177 /* Not found: return index of no-char symbol (last symbol, hardcoded). */
178 return xchar_info_size - 1;
179}
180
181static int glyph_to_pat(unsigned glyph)
182{
183 int i;
184
185 for (i = 0; i < lcd_pattern_count; i++)
186 if (lcd_patterns[i].glyph == glyph)
187 return i;
188
189 return NO_PATTERN;
190}
191
192static void lcd_free_pat(int pat)
193{
194 int x, y;
195
196 if (pat != NO_PATTERN)
197 {
198 for (x = 0; x < LCD_WIDTH; x++)
199 for (y = 0; y < LCD_HEIGHT; y++)
200 if (pat == lcd_charbuffer[y][x])
201 lcd_charbuffer[y][x] = lcd_substbuffer[y][x];
202
203 if (lcd_cursor.enabled && pat == lcd_cursor.hw_char)
204 lcd_cursor.hw_char = lcd_cursor.subst_char;
205
206 lcd_patterns[pat].count = 0;
207 }
208}
209
210static int lcd_get_free_pat(int xchar)
211{
212 static int last_used_pat = 0;
213
214 int pat = last_used_pat; /* start from last used pattern */
215 int least_pat = pat; /* pattern with least priority */
216 int least_priority = lcd_patterns[pat].priority;
217 int i;
218
219 for (i = 0; i < lcd_pattern_count; i++)
220 {
221 if (++pat >= lcd_pattern_count) /* Keep 'pat' within limits */
222 pat = 0;
223
224 if (lcd_patterns[pat].count == 0)
225 {
226 last_used_pat = pat;
227 return pat;
228 }
229 if (lcd_patterns[pat].priority < least_priority)
230 {
231 least_priority = lcd_patterns[pat].priority;
232 least_pat = pat;
233 }
234 }
235 if (xchar_info[xchar].priority > least_priority) /* prioritized char */
236 {
237 lcd_free_pat(least_pat);
238 last_used_pat = least_pat;
239 return least_pat;
240 }
241 return NO_PATTERN;
242}
243
244static const unsigned char *glyph_to_pattern(unsigned glyph)
245{
246 if (glyph & 0x8000)
247 return xfont_variable[glyph & 0x7fff];
248 else
249 return xfont_fixed[glyph];
250}
251
252static int map_xchar(int xchar, unsigned char *substitute)
253{
254 int pat;
255 unsigned glyph;
256
257 if (xchar_info[xchar].priority > 0) /* soft char */
258 {
259 glyph = xchar_info[xchar].glyph;
260 pat = glyph_to_pat(glyph);
261
262 if (pat == NO_PATTERN) /* not yet mapped */
263 {
264 pat = lcd_get_free_pat(xchar); /* try to map */
265
266 if (pat == NO_PATTERN) /* failed: just use substitute */
267 return xchar_info[xchar].hw_char;
268 else
269 { /* define pattern */
270 lcd_patterns[pat].priority = xchar_info[xchar].priority;
271 lcd_patterns[pat].glyph = glyph;
272 memcpy(lcd_patterns[pat].pattern, glyph_to_pattern(glyph),
273 HW_PATTERN_SIZE);
274 }
275 }
276 lcd_patterns[pat].count++; /* increase reference count */
277 *substitute = xchar_info[xchar].hw_char;
278 return pat;
279 }
280 else /* hardware char */
281 return xchar_info[xchar].hw_char;
282}
283
284static void lcd_putxchar(int x, int y, int xchar)
285{
286 int lcd_char;
287
288 /* Adjust for viewport */
289 x += current_vp->x;
290 y += current_vp->y;
291
292#if defined(HAVE_VIEWPORT_CLIP)
293 if((unsigned)x > (unsigned)LCD_WIDTH || (unsigned)y > (unsigned)LCD_HEIGHT)
294 return;
295#endif
296
297 lcd_char = lcd_charbuffer[y][x];
298
299 if (lcd_char < lcd_pattern_count) /* old char was soft */
300 lcd_patterns[lcd_char].count--; /* decrease old reference count */
301
302 lcd_charbuffer[y][x] = map_xchar(xchar, &lcd_substbuffer[y][x]);
303}
304
305/** user-definable pattern handling **/
306
307unsigned long lcd_get_locked_pattern(void)
308{
309 int i = 0;
310
311 for (i = 0; i < VARIABLE_XCHARS; i++)
312 {
313 if (!xfont_variable_locked[i])
314 {
315 xfont_variable_locked[i] = true;
316 return 0xe000 + i; /* hard-coded */
317 }
318 }
319 return 0;
320}
321
322void lcd_unlock_pattern(unsigned long ucs)
323{
324 int xchar = find_xchar(ucs);
325 unsigned glyph = xchar_info[xchar].glyph;
326
327 if (glyph & 0x8000) /* variable extended char */
328 {
329 lcd_free_pat(glyph_to_pat(glyph));
330 xfont_variable_locked[glyph & 0x7fff] = false;
331 }
332}
333
334void lcd_define_pattern(unsigned long ucs, const char *pattern)
335{
336 int xchar = find_xchar(ucs);
337 unsigned glyph = xchar_info[xchar].glyph;
338 int pat;
339
340 if (glyph & 0x8000) /* variable extended char */
341 {
342 memcpy(xfont_variable[glyph & 0x7fff], pattern, HW_PATTERN_SIZE);
343 pat = glyph_to_pat(glyph);
344 if (pat != NO_PATTERN)
345 memcpy(lcd_patterns[pat].pattern, pattern, HW_PATTERN_SIZE);
346 }
347}
348
349/** output functions **/
350
351/* Clear the whole display */
352void lcd_clear_display(void)
353{
354 int x, y;
355 struct viewport* old_vp = current_vp;
356
357 lcd_scroll_stop();
358 lcd_remove_cursor();
359
360 /* Set the default viewport - required for lcd_putxchar */
361 current_vp = &default_vp;
362
363 for (x = 0; x < LCD_WIDTH; x++)
364 for (y = 0; y < LCD_HEIGHT; y++)
365 lcd_putxchar(x, y, xspace);
366
367 current_vp = old_vp;
368}
369
370/* Clear the current viewport */
371void lcd_clear_viewport(void)
372{
373 int x, y;
374
375 if (current_vp == &default_vp)
376 {
377 lcd_clear_display();
378 }
379 else
380 {
381 /* Remove the cursor if it is within the current viewport */
382 if (lcd_cursor.enabled &&
383 (lcd_cursor.x >= current_vp->x) &&
384 (lcd_cursor.x <= current_vp->x + current_vp->width) &&
385 (lcd_cursor.y >= current_vp->y) &&
386 (lcd_cursor.y <= current_vp->y + current_vp->height))
387 {
388 lcd_remove_cursor();
389 }
390
391 for (x = 0; x < current_vp->width; x++)
392 for (y = 0; y < current_vp->height; y++)
393 lcd_putxchar(x, y, xspace);
394
395 lcd_scroll_stop_viewport(current_vp);
396 }
397}
398
399/* Put an unicode character at the given position */
400void lcd_putc(int x, int y, unsigned long ucs)
401{
402 if ((unsigned)x >= (unsigned)current_vp->width ||
403 (unsigned)y >= (unsigned)current_vp->height)
404 return;
405
406 lcd_putxchar(x, y, find_xchar(ucs));
407}
408
409/* Show cursor (alternating with existing character) at the given position */
410void lcd_put_cursor(int x, int y, unsigned long cursor_ucs)
411{
412 if ((unsigned)x >= (unsigned)current_vp->width ||
413 (unsigned)y >= (unsigned)current_vp->height ||
414 lcd_cursor.enabled)
415 return;
416
417 lcd_cursor.enabled = true;
418 lcd_cursor.visible = false;
419 lcd_cursor.hw_char = map_xchar(find_xchar(cursor_ucs), &lcd_cursor.subst_char);
420 lcd_cursor.x = current_vp->x + x;
421 lcd_cursor.y = current_vp->y + y;
422 lcd_cursor.downcount = 0;
423 lcd_cursor.divider = MAX((HZ/2) / lcd_scroll_info.ticks, 1);
424}
425
426/* Remove the cursor */
427void lcd_remove_cursor(void)
428{
429 if (lcd_cursor.enabled)
430 {
431 if (lcd_cursor.hw_char < lcd_pattern_count) /* soft char, unmap */
432 lcd_patterns[lcd_cursor.hw_char].count--;
433
434 lcd_cursor.enabled = lcd_cursor.visible = false;
435 }
436}
437
438/* Put a string at a given position, skipping first ofs chars */
439static int lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str)
440{
441 unsigned short ucs;
442 const unsigned char *utf8 = str;
443
444 while (*utf8 && x < current_vp->width)
445 {
446 utf8 = utf8decode(utf8, &ucs);
447
448 if (ofs > 0)
449 {
450 ofs--;
451 continue;
452 }
453 lcd_putxchar(x++, y, find_xchar(ucs));
454 }
455 return x;
456}
457
458/* Put a string at a given position */
459void lcd_putsxy(int x, int y, const unsigned char *str)
460{
461 if ((unsigned)y >= (unsigned)current_vp->height)
462 return;
463
464 lcd_putsxyofs(x, y, 0, str);
465}
466
467/* Formatting version of lcd_putsxy */
468void lcd_putsxyf(int x, int y, const unsigned char *fmt, ...)
469{
470 va_list ap;
471 char buf[256];
472 va_start(ap, fmt);
473 vsnprintf(buf, sizeof (buf), fmt, ap);
474 va_end(ap);
475 lcd_putsxy(x, y, buf);
476}
477
478/*** Line oriented text output ***/
479
480/* Put a string at a given char position, skipping first offset chars */
481void lcd_putsofs(int x, int y, const unsigned char *str, int offset)
482{
483 if ((unsigned)y >= (unsigned)current_vp->height)
484 return;
485
486 /* make sure scrolling is turned off on the line we are updating */
487 lcd_scroll_stop_viewport_rect(current_vp, x, y, current_vp->width - x, 1);
488
489 x = lcd_putsxyofs(x, y, offset, str);
490 while (x < current_vp->width)
491 lcd_putxchar(x++, y, xspace);
492}
493
494
495/* Put a string at a given char position */
496void lcd_puts(int x, int y, const unsigned char *str)
497{
498 lcd_putsofs(x, y, str, 0);
499}
500
501/* Formatting version of lcd_puts */
502void lcd_putsf(int x, int y, const unsigned char *fmt, ...)
503{
504 va_list ap;
505 char buf[256];
506 va_start(ap, fmt);
507 vsnprintf(buf, sizeof (buf), fmt, ap);
508 va_end(ap);
509 lcd_puts(x, y, buf);
510}
511
512/** scrolling **/
513
514bool lcd_puts_scroll_worker(int x, int y, const unsigned char *string,
515 int offset,
516 void (*scroll_func)(struct scrollinfo *), void *data)
517{
518 struct scrollinfo* s;
519 int len;
520
521 if ((unsigned)y >= (unsigned)current_vp->height)
522 return false;
523
524 /* remove any previously scrolling line at the same location */
525 lcd_scroll_stop_viewport_rect(current_vp, x, y, current_vp->width - x, 1);
526
527 if (lcd_scroll_info.lines >= LCD_SCROLLABLE_LINES)
528 return false;
529
530 s = &lcd_scroll_info.scroll[lcd_scroll_info.lines];
531
532 s->start_tick = current_tick + lcd_scroll_info.delay;
533
534 lcd_putsofs(x, y, string, offset);
535 len = utf8length(string);
536
537 if (current_vp->width - x >= len)
538 return false;
539 /* prepare scroll line */
540 strlcpy(s->linebuffer, string, sizeof s->linebuffer);
541
542 /* scroll bidirectional or forward only depending on the string width */
543 if (lcd_scroll_info.bidir_limit)
544 {
545 s->bidir = len < (current_vp->width) *
546 (100 + lcd_scroll_info.bidir_limit) / 100;
547 }
548 else
549 s->bidir = false;
550
551 s->scroll_func = scroll_func;
552 s->userdata = data;
553
554 s->vp = current_vp;
555 s->x = x;
556 s->y = y;
557 s->height = 1;
558 s->width = current_vp->width - x;
559 s->offset = offset;
560 s->backward = false;
561 lcd_scroll_info.lines++;
562
563 return true;
564}
565
566bool lcd_putsxy_scroll_func(int x, int y, const unsigned char *string,
567 void (*scroll_func)(struct scrollinfo *),
568 void *data, int x_offset)
569{
570 bool retval = false;
571 if (!scroll_func)
572 lcd_putsxyofs(x, y, x_offset, string);
573 else
574 retval = lcd_puts_scroll_worker(x, y, string, x_offset, scroll_func, data);
575
576 return retval;
577}
578
579static void lcd_scroll_fn(struct scrollinfo* s)
580{
581 /* with line == NULL when scrolling stops. This scroller
582 * maintains no userdata so there is nothing left to do */
583 if (!s->line)
584 return;
585 lcd_putsxyofs(s->x, s->y, s->offset, s->line);
586 if (lcd_cursor.enabled)
587 {
588 if (--lcd_cursor.downcount <= 0)
589 {
590 lcd_cursor.downcount = lcd_cursor.divider;
591 lcd_cursor.visible = !lcd_cursor.visible;
592 }
593 }
594}
595
596bool lcd_puts_scroll(int x, int y, const unsigned char *string)
597{
598 return lcd_puts_scroll_worker(x, y, string, 0, lcd_scroll_fn, NULL);
599}
diff --git a/firmware/drivers/lcd-charset-player.c b/firmware/drivers/lcd-charset-player.c
deleted file mode 100644
index b1f6f6dae2..0000000000
--- a/firmware/drivers/lcd-charset-player.c
+++ /dev/null
@@ -1,1321 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Jens Arnold
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include "config.h"
23#include "hwcompat.h"
24
25#include "lcd-charcell.h"
26
27int lcd_pattern_count; /* actual number of user-definable hw patterns */
28
29const struct xchar_info *xchar_info;
30int xchar_info_size; /* number of entries */
31
32enum {
33 /* Standard ascii */
34 XF_BACKSLASH = 0, XF_CIRCUMFLEX, XF_GRAVEACCENT, XF_VERTICALBAR,
35 XF_TILDE,
36#ifndef BOOTLOADER
37 /* Icons and special symbols */
38 XF_ICON_UNKNOWN, XF_ICON_BOOKMARK, XF_ICON_PLUGIN, XF_ICON_FOLDER,
39 XF_ICON_FIRMWARE, XF_ICON_LANGUAGE, XF_ICON_AUDIO, XF_ICON_WPS,
40 XF_ICON_PLAYLIST, XF_ICON_TEXTFILE, XF_ICON_CONFIG,
41
42 /* Latin1 */
43 XF_INVEXCLAMATION, XF_CENTSIGN, XF_POUNDSIGN, XF_CURRENCY,
44 XF_LEFTDBLANGLEQUOT, XF_MACRON, XF_PLUSMINUS, XF_SUPER2,
45 XF_SUPER3, XF_MICRO, XF_MIDDLEDOT, XF_RIGHTDBLANGLEQUOT,
46 XF_ONEQUARTER, XF_ONEHALF, XF_THREEQUARTERS, XF_INVQUESTION,
47 XF_AGRAVE, XF_AACUTE, XF_ACIRCUMFLEX, XF_ATILDE,
48 XF_ADIERESIS, XF_ARING, XF_AELIGATURE, XF_CCEDILLA,
49 XF_EGRAVE, XF_EACUTE, XF_ECIRCUMFLEX, XF_EDIERESIS,
50 XF_IGRAVE, XF_IACUTE, XF_ICIRCUMFLEX, XF_IDIERESIS,
51 XF_ETH, XF_NTILDE, XF_OGRAVE, XF_OACUTE,
52 XF_OCIRCUMFLEX, XF_OTILDE, XF_ODIERESIS, XF_OSTROKE,
53 XF_UGRAVE, XF_UACUTE, XF_UCIRCUMFLEX, XF_UDIERESIS,
54 XF_YACUTE, XF_aGRAVE, XF_aACUTE, XF_aCIRCUMFLEX,
55 XF_aTILDE, XF_aDIERESIS, XF_aRING, XF_aeLIGATURE,
56 XF_cCEDILLA, XF_eGRAVE, XF_eACUTE, XF_eCIRCUMFLEX,
57 XF_eDIERESIS, XF_iGRAVE, XF_iACUTE, XF_iCIRCUMFLEX,
58 XF_iDIERESIS, XF_nTILDE, XF_oGRAVE, XF_oACUTE,
59 XF_oCIRCUMFLEX, XF_oTILDE, XF_oDIERESIS, XF_DIVISION,
60 XF_oSLASH, XF_uGRAVE, XF_uACUTE, XF_uCIRCUMFLEX,
61 XF_uDIERESIS, XF_yACUTE, XF_yDIERESIS,
62
63 /* Latin extended A */
64 XF_aBREVE, XF_aOGONEK, XF_cACUTE, XF_cCARON,
65 XF_dCARON, XF_dSTROKE, XF_eOGONEK, XF_eCARON,
66 XF_GBREVE, XF_gBREVE, XF_IDOT, XF_DOTLESSi,
67 XF_LSTROKE, XF_lSTROKE, XF_nACUTE, XF_nCARON,
68 XF_ODBLACUTE, XF_oDBLACUTE, XF_RCARON, XF_rCARON,
69 XF_sACUTE, XF_SCEDILLA, XF_sCEDILLA, XF_sCARON,
70 XF_tCEDILLA, XF_tCARON, XF_uRING, XF_UDBLACUTE,
71 XF_uDBLACUTE, XF_zACUTE, XF_zDOT, XF_zCARON,
72#define XF_DSTROKE XF_ETH
73#define XF_SACUTE XF_sACUTE
74#define XF_SCARON XF_sCARON
75
76 /* Greek */
77 XF_GR_DELTA, XF_GR_THETA, XF_GR_LAMBDA, XF_GR_XI,
78 XF_GR_PSI, XF_GR_alpha, XF_GR_alphaTONOS, XF_GR_gamma,
79 XF_GR_epsilon, XF_GR_epsilonTONOS, XF_GR_zeta, XF_GR_eta,
80 XF_GR_etaTONOS, XF_GR_iota, XF_GR_lambda, XF_GR_xi,
81 XF_GR_rho, XF_GR_FINALsigma, XF_GR_sigma, XF_GR_upsilon,
82 XF_GR_upsilonTONOS, XF_GR_chi, XF_GR_psi, XF_GR_omega,
83 XF_GR_omegaTONOS,
84#define XF_GR_ANOTELEIA XF_MIDDLEDOT
85#define XF_GR_GAMMA XF_CYR_GHE
86#define XF_GR_PI XF_CYR_PE
87#define XF_GR_delta XF_CYR_be
88#define XF_GR_iotaTONOS XF_iACUTE
89#define XF_GR_iotaDIA XF_iDIERESIS
90#define XF_GR_kappa XF_CYR_ka
91#define XF_GR_mu XF_MICRO
92#define XF_GR_pi XF_CYR_pe
93#define XF_GR_omicronTONOS XF_oACUTE
94#define XF_GR_tau XF_CYR_te
95
96 /* Cyrillic */
97 XF_CYR_BE, XF_CYR_GHE, XF_CYR_DE, XF_CYR_ZHE,
98 XF_CYR_ZE, XF_CYR_I, XF_CYR_SHORTI, XF_CYR_EL,
99 XF_CYR_PE, XF_CYR_TSE, XF_CYR_CHE, XF_CYR_SHA,
100 XF_CYR_SHCHA, XF_CYR_HARD, XF_CYR_YERU, XF_CYR_E,
101 XF_CYR_YU, XF_CYR_YA, XF_CYR_be, XF_CYR_ve,
102 XF_CYR_ghe, XF_CYR_de, XF_CYR_zhe, XF_CYR_ze,
103 XF_CYR_i, XF_CYR_SHORTi, XF_CYR_ka, XF_CYR_el,
104 XF_CYR_em, XF_CYR_en, XF_CYR_pe, XF_CYR_te,
105 XF_CYR_tse, XF_CYR_che, XF_CYR_sha, XF_CYR_shcha,
106 XF_CYR_hard, XF_CYR_yeru, XF_CYR_soft, XF_CYR_e,
107 XF_CYR_yu, XF_CYR_ya,
108#define XF_CYR_IEGRAVE XF_EGRAVE
109#define XF_CYR_IO XF_EDIERESIS
110#define XF_CYR_YI XF_IDIERESIS
111#define XF_CYR_ieGRAVE XF_eGRAVE
112#define XF_CYR_io XF_eDIERESIS
113#define XF_CYR_yi XF_iDIERESIS
114
115#endif
116};
117
118static const struct xchar_info xchar_info_newlcd[] = {
119 /* Standard ascii */
120 { 0x20, 0, 0, 0x20 }, /* */
121 { 0x21, 0, 0, 0x21 }, /* ! */
122 { 0x22, 0, 0, 0x22 }, /* " */
123 { 0x23, 0, 0, 0x23 }, /* # */
124 { 0x24, 0, 0, 0x24 }, /* $ */
125 { 0x25, 0, 0, 0x25 }, /* % */
126 { 0x26, 0, 0, 0x26 }, /* & */
127 { 0x27, 0, 0, 0x27 }, /* ' */
128 { 0x28, 0, 0, 0x28 }, /* ( */
129 { 0x29, 0, 0, 0x29 }, /* ) */
130 { 0x2a, 0, 0, 0x2a }, /* * */
131 { 0x2b, 0, 0, 0x2b }, /* + */
132 { 0x2c, 0, 0, 0x2c }, /* , */
133 { 0x2d, 0, 0, 0x2d }, /* - */
134 { 0x2e, 0, 0, 0x2e }, /* . */
135 { 0x2f, 0, 0, 0x2f }, /* / */
136 { 0x30, 0, 0, 0x30 }, /* 0 */
137 { 0x31, 0, 0, 0x31 }, /* 1 */
138 { 0x32, 0, 0, 0x32 }, /* 2 */
139 { 0x33, 0, 0, 0x33 }, /* 3 */
140 { 0x34, 0, 0, 0x34 }, /* 4 */
141 { 0x35, 0, 0, 0x35 }, /* 5 */
142 { 0x36, 0, 0, 0x36 }, /* 6 */
143 { 0x37, 0, 0, 0x37 }, /* 7 */
144 { 0x38, 0, 0, 0x38 }, /* 8 */
145 { 0x39, 0, 0, 0x39 }, /* 9 */
146 { 0x3a, 0, 0, 0x3a }, /* : */
147 { 0x3b, 0, 0, 0x3b }, /* ; */
148 { 0x3c, 0, 0, 0x3c }, /* < */
149 { 0x3d, 0, 0, 0x3d }, /* = */
150 { 0x3e, 0, 0, 0x3e }, /* > */
151 { 0x3f, 0, 0, 0x3f }, /* ? */
152 { 0x40, 0, 0, 0x40 }, /* @ */
153 { 0x41, 0, 0, 0x41 }, /* A */
154 { 0x42, 0, 0, 0x42 }, /* B */
155 { 0x43, 0, 0, 0x43 }, /* C */
156 { 0x44, 0, 0, 0x44 }, /* D */
157 { 0x45, 0, 0, 0x45 }, /* E */
158 { 0x46, 0, 0, 0x46 }, /* F */
159 { 0x47, 0, 0, 0x47 }, /* G */
160 { 0x48, 0, 0, 0x48 }, /* H */
161 { 0x49, 0, 0, 0x49 }, /* I */
162 { 0x4a, 0, 0, 0x4a }, /* J */
163 { 0x4b, 0, 0, 0x4b }, /* K */
164 { 0x4c, 0, 0, 0x4c }, /* L */
165 { 0x4d, 0, 0, 0x4d }, /* M */
166 { 0x4e, 0, 0, 0x4e }, /* N */
167 { 0x4f, 0, 0, 0x4f }, /* O */
168 { 0x50, 0, 0, 0x50 }, /* P */
169 { 0x51, 0, 0, 0x51 }, /* Q */
170 { 0x52, 0, 0, 0x52 }, /* R */
171 { 0x53, 0, 0, 0x53 }, /* S */
172 { 0x54, 0, 0, 0x54 }, /* T */
173 { 0x55, 0, 0, 0x55 }, /* U */
174 { 0x56, 0, 0, 0x56 }, /* V */
175 { 0x57, 0, 0, 0x57 }, /* W */
176 { 0x58, 0, 0, 0x58 }, /* X */
177 { 0x59, 0, 0, 0x59 }, /* Y */
178 { 0x5a, 0, 0, 0x5a }, /* Z */
179 { 0x5b, 0, 0, 0x5b }, /* [ */
180 { 0x5c, 0, 0, 0x12 }, /* \ */
181 { 0x5d, 0, 0, 0x5d }, /* ] */
182 { 0x5e, 0, 0, 0x5e }, /* ^ */
183 { 0x5f, 0, 0, 0x5f }, /* _ */
184 { 0x60, 0, 0, 0x60 }, /* ` */
185 { 0x61, 0, 0, 0x61 }, /* a */
186 { 0x62, 0, 0, 0x62 }, /* b */
187 { 0x63, 0, 0, 0x63 }, /* c */
188 { 0x64, 0, 0, 0x64 }, /* d */
189 { 0x65, 0, 0, 0x65 }, /* e */
190 { 0x66, 0, 0, 0x66 }, /* f */
191 { 0x67, 0, 0, 0x67 }, /* g */
192 { 0x68, 0, 0, 0x68 }, /* h */
193 { 0x69, 0, 0, 0x69 }, /* i */
194 { 0x6a, 0, 0, 0x6a }, /* j */
195 { 0x6b, 0, 0, 0x6b }, /* k */
196 { 0x6c, 0, 0, 0x6c }, /* l */
197 { 0x6d, 0, 0, 0x6d }, /* m */
198 { 0x6e, 0, 0, 0x6e }, /* n */
199 { 0x6f, 0, 0, 0x6f }, /* o */
200 { 0x70, 0, 0, 0x70 }, /* p */
201 { 0x71, 0, 0, 0x71 }, /* q */
202 { 0x72, 0, 0, 0x72 }, /* r */
203 { 0x73, 0, 0, 0x73 }, /* s */
204 { 0x74, 0, 0, 0x74 }, /* t */
205 { 0x75, 0, 0, 0x75 }, /* u */
206 { 0x76, 0, 0, 0x76 }, /* v */
207 { 0x77, 0, 0, 0x77 }, /* w */
208 { 0x78, 0, 0, 0x78 }, /* x */
209 { 0x79, 0, 0, 0x79 }, /* y */
210 { 0x7a, 0, 0, 0x7a }, /* z */
211 { 0x7b, 0, 0, 0x7b }, /* { */
212 { 0x7c, 0, 0, 0x7c }, /* | */
213 { 0x7d, 0, 0, 0x7d }, /* } */
214 { 0x7e, 0, 0, 0xf0 }, /* ~ */
215 { 0x7f, 0, 0, 0xfe }, /* (full grid) */
216
217#ifndef BOOTLOADER /* bootloader only supports pure ASCII */
218 /* Latin 1 */
219 { 0xa0, 0, 0, 0x20 }, /* (non-breaking space) */
220 { 0xa1, XF_INVEXCLAMATION, 1, 0x21 }, /* ¡ (inverted !) */
221 { 0xa2, XF_CENTSIGN, 1, 0x63 }, /* ¢ (cent sign) */
222 { 0xa3, XF_POUNDSIGN, 1, 0x4c }, /* £ (pound sign) */
223 { 0xa4, XF_CURRENCY, 1, 0x6f }, /* ¤ (currency sign) */
224 { 0xa5, 0, 0, 0x5c }, /* ¥ (yen sign) */
225
226 { 0xa7, 0, 0, 0x15 }, /* § (paragraph sign) */
227
228 { 0xab, 0, 0, 0x9e }, /* « (left double-angle quotation mark) */
229
230 { 0xad, 0, 0, 0x2d }, /* ­ (soft hyphen) */
231
232 { 0xaf, XF_MACRON, 1, 0x2d }, /* ¯ (macron) */
233
234 { 0xb1, 0, 0, 0x95 }, /* ± (plus-minus sign) */
235 { 0xb2, 0, 0, 0x99 }, /* ³ (superscript 2) */
236 { 0xb3, 0, 0, 0x9a }, /* ³ (superscript 3) */
237
238 { 0xb5, 0, 0, 0xe6 }, /* µ (micro sign) */
239 { 0xb6, 0, 0, 0x14 }, /* ¶ (pilcrow sign) */
240 { 0xb7, 0, 0, 0xa5 }, /* · (middle dot) */
241
242 { 0xbb, 0, 0, 0x9f }, /* » (right double-angle quotation mark) */
243 { 0xbc, 0, 0, 0x9c }, /* ¼ (one quarter) */
244 { 0xbd, 0, 0, 0x9b }, /* ½ (one half) */
245 { 0xbe, 0, 0, 0x9d }, /* ¾ (three quarters) */
246 { 0xbf, XF_INVQUESTION, 1, 0x3f }, /* ¿ (inverted ?) */
247 { 0xc0, XF_AGRAVE, 1, 0x41 }, /* À (A grave) */
248 { 0xc1, XF_AACUTE, 1, 0x41 }, /* Á (A acute) */
249 { 0xc2, XF_ACIRCUMFLEX, 1, 0x41 }, /* Â (A circumflex) */
250 { 0xc3, XF_ATILDE, 1, 0x41 }, /* Ã (A tilde) */
251 { 0xc4, XF_ADIERESIS, 1, 0x41 }, /* Ä (A dieresis) */
252 { 0xc5, XF_ARING, 1, 0x41 }, /* Å (A with ring above) */
253 { 0xc6, XF_AELIGATURE, 1, 0x41 }, /* Æ (AE ligature) */
254 { 0xc7, XF_CCEDILLA, 1, 0x43 }, /* Ç (C cedilla) */
255 { 0xc8, XF_EGRAVE, 1, 0x45 }, /* È (E grave) */
256 { 0xc9, XF_EACUTE, 1, 0x45 }, /* É (E acute) */
257 { 0xca, XF_ECIRCUMFLEX, 1, 0x45 }, /* Ê (E circumflex) */
258 { 0xcb, XF_EDIERESIS, 1, 0x45 }, /* Ë (E dieresis) */
259 { 0xcc, XF_IGRAVE, 1, 0x49 }, /* Ì (I grave) */
260 { 0xcd, XF_IACUTE, 1, 0x49 }, /* Í (I acute) */
261 { 0xce, XF_ICIRCUMFLEX, 1, 0x49 }, /* Î (I circumflex) */
262 { 0xcf, XF_IDIERESIS, 1, 0x49 }, /* Ï (I dieresis) */
263 { 0xd0, XF_ETH, 1, 0x44 }, /* Ð (ETH) */
264 { 0xd1, XF_NTILDE, 1, 0x4e }, /* Ñ (N tilde) */
265 { 0xd2, XF_OGRAVE, 1, 0x4f }, /* Ò (O grave) */
266 { 0xd3, XF_OACUTE, 1, 0x4f }, /* Ó (O acute) */
267 { 0xd4, XF_OCIRCUMFLEX, 1, 0x4f }, /* Ô (O circumflex) */
268 { 0xd5, XF_OTILDE, 1, 0x4f }, /* Õ (O tilde) */
269 { 0xd6, XF_ODIERESIS, 1, 0x4f }, /* Ö (O dieresis) */
270 { 0xd7, 0, 0, 0x96 }, /* × (multiplication sign) */
271 { 0xd8, XF_OSTROKE, 1, 0x30 }, /* Ø (O stroke) */
272 { 0xd9, XF_UGRAVE, 1, 0x55 }, /* Ù (U grave) */
273 { 0xda, XF_UACUTE, 1, 0x55 }, /* Ú (U acute) */
274 { 0xdb, XF_UCIRCUMFLEX, 1, 0x55 }, /* Û (U circumflex) */
275 { 0xdc, XF_UDIERESIS, 1, 0x55 }, /* Ü (U dieresis) */
276 { 0xdd, XF_YACUTE, 1, 0x59 }, /* Ý (Y acute) */
277
278 { 0xdf, 0, 0, 0xe1 }, /* ß (sharp s) */
279 { 0xe0, XF_aGRAVE, 1, 0x61 }, /* à (a grave) */
280 { 0xe1, XF_aACUTE, 1, 0x61 }, /* á (a acute) */
281 { 0xe2, XF_aCIRCUMFLEX, 1, 0x61 }, /* â (a circumflex) */
282 { 0xe3, XF_aTILDE, 1, 0x61 }, /* ã (a tilde) */
283 { 0xe4, XF_aDIERESIS, 1, 0x61 }, /* ä (a dieresis) */
284 { 0xe5, XF_aRING, 1, 0x61 }, /* å (a with ring above) */
285 { 0xe6, XF_aeLIGATURE, 1, 0x61 }, /* æ (ae ligature) */
286 { 0xe7, XF_cCEDILLA, 1, 0x63 }, /* ç (c cedilla) */
287 { 0xe8, XF_eGRAVE, 1, 0x65 }, /* è (e grave) */
288 { 0xe9, XF_eACUTE, 1, 0x65 }, /* é (e acute) */
289 { 0xea, XF_eCIRCUMFLEX, 1, 0x65 }, /* ê (e circumflex) */
290 { 0xeb, XF_eDIERESIS, 1, 0x65 }, /* ë (e dieresis) */
291 { 0xec, XF_iGRAVE, 1, 0x69 }, /* ì (i grave) */
292 { 0xed, XF_iACUTE, 1, 0x69 }, /* í (i acute) */
293 { 0xee, XF_iCIRCUMFLEX, 1, 0x69 }, /* î (i circumflex) */
294 { 0xef, XF_iDIERESIS, 1, 0x69 }, /* ï (i dieresis) */
295
296 { 0xf1, XF_nTILDE, 1, 0x6e }, /* ñ (n tilde) */
297 { 0xf2, XF_oGRAVE, 1, 0x6f }, /* ò (o grave) */
298 { 0xf3, XF_oACUTE, 1, 0x6f }, /* ó (o acute) */
299 { 0xf4, XF_oCIRCUMFLEX, 1, 0x6f }, /* ô (o circumflex) */
300 { 0xf5, XF_oTILDE, 1, 0x6f }, /* õ (o tilde) */
301 { 0xf6, XF_oDIERESIS, 1, 0x6f }, /* ö (o dieresis) */
302 { 0xf7, 0, 0, 0x97 }, /* ÷ (division sign) */
303 { 0xf8, XF_oSLASH, 1, 0x6f }, /* ø (o slash) */
304 { 0xf9, XF_uGRAVE, 1, 0x75 }, /* ù (u grave) */
305 { 0xfa, XF_uACUTE, 1, 0x75 }, /* ú (u acute) */
306 { 0xfb, XF_uCIRCUMFLEX, 1, 0x75 }, /* û (u circumflex) */
307 { 0xfc, XF_uDIERESIS, 1, 0x75 }, /* ü (u dieresis) */
308 { 0xfd, XF_yACUTE, 1, 0x79 }, /* ý (y acute) */
309
310 { 0xff, XF_yDIERESIS, 1, 0x79 }, /* ÿ (y dieresis) */
311
312 /* Latin extended A */
313 { 0x0103, XF_aBREVE, 1, 0x61 }, /* a breve */
314 { 0x0105, XF_aOGONEK, 1, 0x61 }, /* a ogonek */
315 { 0x0107, XF_cACUTE, 1, 0x63 }, /* c acute */
316 { 0x010d, XF_cCARON, 1, 0x63 }, /* c caron */
317 { 0x010f, XF_dCARON, 1, 0x64 }, /* d caron */
318 { 0x0110, XF_DSTROKE, 1, 0x44 }, /* D stroke */
319 { 0x0111, XF_dSTROKE, 1, 0x64 }, /* d stroke */
320 { 0x0119, XF_eOGONEK, 1, 0x65 }, /* e ogonek */
321 { 0x011b, XF_eCARON, 1, 0x65 }, /* e caron */
322 { 0x011e, XF_GBREVE, 1, 0x47 }, /* G breve */
323 { 0x011f, XF_gBREVE, 1, 0x67 }, /* g breve */
324 { 0x0130, XF_IDOT, 1, 0x49 }, /* I with dot above */
325 { 0x0131, XF_DOTLESSi, 1, 0x69 }, /* dotless i */
326 { 0x0141, XF_LSTROKE, 1, 0x4c }, /* L stroke */
327 { 0x0142, XF_lSTROKE, 1, 0x6c }, /* l stroke */
328 { 0x0144, XF_nACUTE, 1, 0x6e }, /* n acute */
329 { 0x0148, XF_nCARON, 1, 0x6e }, /* n caron */
330 { 0x0150, XF_ODBLACUTE, 1, 0x4f }, /* O double acute */
331 { 0x0151, XF_oDBLACUTE, 1, 0x6f }, /* o double acute */
332 { 0x0158, XF_RCARON, 1, 0x52 }, /* R caron */
333 { 0x0159, XF_rCARON, 1, 0x72 }, /* r caron */
334 { 0x015a, XF_SACUTE, 1, 0x53 }, /* S acute */
335 { 0x015b, XF_sACUTE, 1, 0x73 }, /* s acute */
336 { 0x015e, XF_SCEDILLA, 1, 0x53 }, /* S cedilla */
337 { 0x015f, XF_sCEDILLA, 1, 0x73 }, /* s cedilla */
338 { 0x0160, XF_SCARON, 1, 0x53 }, /* S caron */
339 { 0x0161, XF_sCARON, 1, 0x73 }, /* s caron */
340 { 0x0163, XF_tCEDILLA, 1, 0x74 }, /* t cedilla */
341 { 0x0165, XF_tCARON, 1, 0x74 }, /* t caron */
342 { 0x016f, XF_uRING, 1, 0x75 }, /* u with ring above */
343 { 0x0170, XF_UDBLACUTE, 1, 0x55 }, /* U double acute */
344 { 0x0171, XF_uDBLACUTE, 1, 0x75 }, /* u double acute */
345 { 0x017a, XF_zACUTE, 1, 0x7a }, /* z acute */
346 { 0x017c, XF_zDOT, 1, 0x7a }, /* z with dot above */
347 { 0x017e, XF_zCARON, 1, 0x7a }, /* z caron */
348
349 /* Greek */
350 { 0x037e, 0, 0, 0x3b }, /* greek question mark */
351
352 { 0x0386, 0, 0, 0x41 }, /* greek ALPHA with tonos */
353 { 0x0387, 0, 0, 0xa5 }, /* greek ano teleia */
354 { 0x0388, 0, 0, 0x45 }, /* greek EPSILON with tonos */
355 { 0x0389, 0, 0, 0x48 }, /* greek ETA with tonos */
356 { 0x038a, 0, 0, 0x49 }, /* greek IOTA with tonos */
357 /* reserved */
358 { 0x038c, 0, 0, 0x4f }, /* greek OMICRON with tonos */
359 /* reserved */
360 { 0x038e, 0, 0, 0x59 }, /* greek YPSILON with tonos */
361 { 0x038f, 0, 0, 0xea }, /* greek OMEGA with tonos */
362 { 0x0390, XF_GR_iotaTONOS, 1, 0x69 }, /* greek iota with dialytica + tonos */
363 { 0x0391, 0, 0, 0x41 }, /* greek ALPHA */
364 { 0x0392, 0, 0, 0x42 }, /* greek BETA */
365 { 0x0393, XF_GR_GAMMA, 2, 0xb2 }, /* greek GAMMA */
366 { 0x0394, XF_GR_DELTA, 2, 0x1f }, /* greek DELTA */
367 { 0x0395, 0, 0, 0x45 }, /* greek EPSILON */
368 { 0x0396, 0, 0, 0x5a }, /* greek ZETA */
369 { 0x0397, 0, 0, 0x48 }, /* greek ETA */
370 { 0x0398, XF_GR_THETA, 1, 0x30 }, /* greek THETA */
371 { 0x0399, 0, 0, 0x49 }, /* greek IOTA */
372 { 0x039a, 0, 0, 0x4b }, /* greek KAPPA */
373 { 0x039b, XF_GR_LAMBDA, 2, 0x4c }, /* greek LAMBDA */
374 { 0x039c, 0, 0, 0x4d }, /* greek MU */
375 { 0x039d, 0, 0, 0x4e }, /* greek NU */
376 { 0x039e, XF_GR_XI, 2, 0xd0 }, /* greek XI */
377 { 0x039f, 0, 0, 0x4f }, /* greek OMICRON */
378 { 0x03a0, XF_GR_PI, 1, 0x14 }, /* greek PI */
379 { 0x03a1, 0, 0, 0x50 }, /* greek RHO */
380 /* reserved */
381 { 0x03a3, 0, 0, 0xe4 }, /* greek SIGMA */
382 { 0x03a4, 0, 0, 0x54 }, /* greek TAU */
383 { 0x03a5, 0, 0, 0x59 }, /* greek UPSILON */
384 { 0x03a6, 0, 0, 0xe8 }, /* greek PHI */
385 { 0x03a7, 0, 0, 0x58 }, /* greek CHI */
386 { 0x03a8, XF_GR_PSI, 2, 0xc2 }, /* greek PSI */
387 { 0x03a9, 0, 0, 0xea }, /* greek OMEGA */
388 { 0x03aa, 0, 0, 0x49 }, /* greek IOTA with dialytica */
389 { 0x03ab, 0, 0, 0x59 }, /* greek UPSILON with dialytica */
390 { 0x03ac, XF_GR_alphaTONOS, 1, 0xe0 }, /* greek alpha with tonos */
391 { 0x03ad, XF_GR_epsilonTONOS, 1, 0xee }, /* greek epsilon with tonos */
392 { 0x03ae, XF_GR_etaTONOS, 1, 0x6e }, /* greek eta with tonos */
393 { 0x03af, XF_GR_iotaTONOS, 1, 0x69 }, /* greek iota with tonos */
394 { 0x03b0, XF_GR_upsilonTONOS, 1, 0x75 }, /* greek upsilon with dialytica + tonos */
395 { 0x03b1, 0, 0, 0xe0 }, /* greek alpha */
396 { 0x03b2, 0, 0, 0xe1 }, /* greek beta */
397 { 0x03b3, 0, 0, 0xe2 }, /* greek gamma */
398 { 0x03b4, 0, 0, 0xeb }, /* greek delta */
399 { 0x03b5, XF_GR_epsilon, 1, 0xee }, /* greek epsilon */
400 { 0x03b6, XF_GR_zeta, 1, 0x7a }, /* greek zeta */
401 { 0x03b7, XF_GR_eta, 1, 0x6e }, /* greek eta */
402 { 0x03b8, 0, 0, 0xe9 }, /* greek theta */
403 { 0x03b9, XF_GR_iota, 1, 0x69 }, /* greek iota */
404 { 0x03ba, XF_GR_kappa, 1, 0x6b }, /* greek kappa */
405 { 0x03bb, XF_GR_lambda, 2, 0xca }, /* greek lambda */
406 { 0x03bc, 0, 0, 0xe6 }, /* greek mu */
407 { 0x03bd, 0, 0, 0x76 }, /* greek nu */
408 { 0x03be, XF_GR_xi, 2, 0xd0 }, /* greek xi */
409 { 0x03bf, 0, 0, 0x6f }, /* greek omicron */
410 { 0x03c0, 0, 0, 0xe3 }, /* greek pi */
411 { 0x03c1, XF_GR_rho, 1, 0x70 }, /* greek rho */
412 { 0x03c2, XF_GR_FINALsigma, 1, 0x73 }, /* greek final sigma */
413 { 0x03c3, 0, 0, 0xe5 }, /* greek sigma */
414 { 0x03c4, 0, 0, 0xe7 }, /* greek tau */
415 { 0x03c5, XF_GR_upsilon, 1, 0x75 }, /* greek upsilon */
416 { 0x03c6, 0, 0, 0xed }, /* greek phi */
417 { 0x03c7, XF_GR_chi, 1, 0x78 }, /* greek chi */
418 { 0x03c8, XF_GR_psi, 2, 0xc2 }, /* greek psi */
419 { 0x03c9, XF_GR_omega, 1, 0x77 }, /* greek omega */
420 { 0x03ca, XF_GR_iotaDIA, 1, 0x69 }, /* greek iota with dialytica */
421 { 0x03cb, XF_GR_upsilon, 1, 0x75 }, /* greek upsilon with dialytica */
422 { 0x03cc, XF_GR_omicronTONOS, 1, 0x6f }, /* greek omicron with tonos */
423 { 0x03cd, XF_GR_upsilonTONOS, 1, 0x75 }, /* greek upsilon with tonos */
424 { 0x03ce, XF_GR_omegaTONOS, 1, 0x77 }, /* greek omega with tonos */
425
426 { 0x03f3, 0, 0, 0x6a }, /* greek yot */
427
428 /* Cyrillic */
429 { 0x0400, XF_CYR_IEGRAVE,1, 0x45 }, /* cyrillic IE grave */
430 { 0x0401, XF_CYR_IO, 1, 0x45 }, /* cyrillic IO */
431
432 { 0x0405, 0, 0, 0x53 }, /* cyrillic DZE */
433 { 0x0406, 0, 0, 0x49 }, /* cyrillic byeloruss-ukr. I */
434 { 0x0407, XF_CYR_YI, 1, 0x49 }, /* cyrillic YI */
435 { 0x0408, 0, 0, 0x4a }, /* cyrillic JE */
436
437 { 0x0410, 0, 0, 0x41 }, /* cyrillic A */
438 { 0x0411, XF_CYR_BE, 1, 0xeb }, /* cyrillic BE */
439 { 0x0412, 0, 0, 0x42 }, /* cyrillic VE */
440 { 0x0413, XF_CYR_GHE, 2, 0xb2 }, /* cyrillic GHE */
441 { 0x0414, XF_CYR_DE, 2, 0x44 }, /* cyrillic DE */
442 { 0x0415, 0, 0, 0x45 }, /* cyrillic IE */
443 { 0x0416, XF_CYR_ZHE, 2, 0x2a }, /* cyrillic ZHE */
444 { 0x0417, XF_CYR_ZE, 1, 0x33 }, /* cyrillic ZE */
445 { 0x0418, XF_CYR_I, 1, 0x55 }, /* cyrillic I */
446 { 0x0419, XF_CYR_SHORTI, 1, 0x55 }, /* cyrillic short I */
447 { 0x041a, 0, 0, 0x4b }, /* cyrillic K */
448 { 0x041b, XF_CYR_EL, 2, 0x4c }, /* cyrillic EL */
449 { 0x041c, 0, 0, 0x4d }, /* cyrillic EM */
450 { 0x041d, 0, 0, 0x48 }, /* cyrillic EN */
451 { 0x041e, 0, 0, 0x4f }, /* cyrillic O */
452 { 0x041f, XF_CYR_PE, 1, 0x14 }, /* cyrillic PE */
453 { 0x0420, 0, 0, 0x50 }, /* cyrillic ER */
454 { 0x0421, 0, 0, 0x43 }, /* cyrillic ES */
455 { 0x0422, 0, 0, 0x54 }, /* cyrillic TE */
456 { 0x0423, 0, 0, 0x59 }, /* cyrillic U */
457 { 0x0424, 0, 0, 0xe8 }, /* cyrillic EF */
458 { 0x0425, 0, 0, 0x58 }, /* cyrillic HA */
459 { 0x0426, XF_CYR_TSE, 2, 0xd9 }, /* cyrillic TSE */
460 { 0x0427, XF_CYR_CHE, 2, 0xd1 }, /* cyrillic CHE */
461 { 0x0428, XF_CYR_SHA, 1, 0x57 }, /* cyrillic SHA */
462 { 0x0429, XF_CYR_SHCHA, 1, 0x57 }, /* cyrillic SHCHA */
463 { 0x042a, XF_CYR_HARD, 1, 0x62 }, /* cyrillic capital hard sign */
464 { 0x042b, XF_CYR_YERU, 2, 0x1a }, /* cyrillic YERU */
465 { 0x042c, 0, 0, 0x62 }, /* cyrillic capital soft sign */
466 { 0x042d, XF_CYR_E, 2, 0xa6 }, /* cyrillic E */
467 { 0x042e, XF_CYR_YU, 2, 0x1b }, /* cyrillic YU */
468 { 0x042f, XF_CYR_YA, 2, 0xf3 }, /* cyrillic YA */
469 { 0x0430, 0, 0, 0x61 }, /* cyrillic a */
470 { 0x0431, 0, 0, 0xeb }, /* cyrillic be */
471 { 0x0432, XF_CYR_ve, 1, 0xe1 }, /* cyrillic ve */
472 { 0x0433, XF_CYR_ghe, 1, 0x72 }, /* cyrillic ghe */
473 { 0x0434, XF_CYR_de, 2, 0x1f }, /* cyrillic de */
474 { 0x0435, 0, 0, 0x65 }, /* cyrillic ie */
475 { 0x0436, XF_CYR_zhe, 1, 0x2a }, /* cyrillic zhe */
476 { 0x0437, XF_CYR_ze, 1, 0xae }, /* cyrillic ze */
477 { 0x0438, XF_CYR_i, 1, 0x75 }, /* cyrillic i */
478 { 0x0439, XF_CYR_SHORTi, 1, 0x75 }, /* cyrillic short i */
479 { 0x043a, XF_CYR_ka, 1, 0x6b }, /* cyrillic ka */
480 { 0x043b, XF_CYR_el, 2, 0xca }, /* cyrillic el */
481 { 0x043c, XF_CYR_em, 1, 0x6d }, /* cyrillic em */
482 { 0x043d, XF_CYR_en, 2, 0x48 }, /* cyrillic en */
483 { 0x043e, 0, 0, 0x6f }, /* cyrillic o */
484 { 0x043f, 0, 0, 0xe3 }, /* cyrillic pe */
485 { 0x0440, 0, 0, 0x70 }, /* cyrillic er */
486 { 0x0441, 0, 0, 0x63 }, /* cyrillic es */
487 { 0x0442, 0, 0, 0xe7 }, /* cyrillic te */
488 { 0x0443, 0, 0, 0x79 }, /* cyrillic u */
489 { 0x0444, 0, 0, 0xed }, /* cyrillic ef */
490 { 0x0445, 0, 0, 0x78 }, /* cyrillic ha */
491 { 0x0446, XF_CYR_tse, 2, 0xd9 }, /* cyrillic tse */
492 { 0x0447, XF_CYR_che, 2, 0xd1 }, /* cyrillic che */
493 { 0x0448, XF_CYR_sha, 1, 0x77 }, /* cyrillic sha */
494 { 0x0449, XF_CYR_shcha, 1, 0x77 }, /* cyrillic shcha */
495 { 0x044a, XF_CYR_hard, 1, 0x62 }, /* cyrillic small hard sign */
496 { 0x044b, XF_CYR_yeru, 2, 0x1a }, /* cyrillic yeru */
497 { 0x044c, XF_CYR_soft, 1, 0x62 }, /* cyrillic small soft sign */
498 { 0x044d, XF_CYR_e, 2, 0xa7 }, /* cyrillic e */
499 { 0x044e, XF_CYR_yu, 2, 0x1b }, /* cyrillic yu */
500 { 0x044f, XF_CYR_ya, 2, 0xfb }, /* cyrillic ya */
501 { 0x0450, XF_CYR_ieGRAVE,1, 0x65 }, /* cyrillic ie grave */
502 { 0x0451, XF_CYR_io, 1, 0x65 }, /* cyrillic io */
503
504 { 0x0455, 0, 0, 0x73 }, /* cyrillic dze */
505 { 0x0456, 0, 0, 0x69 }, /* cyrillic byeloruss-ukr. i */
506 { 0x0457, XF_CYR_yi, 1, 0x69 }, /* cyrillic yi */
507 { 0x0458, 0, 0, 0x6a }, /* cyrillic je */
508
509 /* extra punctuation */
510 { 0x2013, 0, 0, 0x2d }, /* en dash */
511 { 0x2014, 0, 0, 0x2d }, /* em dash */
512
513 { 0x2018, 0, 0, 0x27 }, /* left single quotation mark */
514 { 0x2019, 0, 0, 0x27 }, /* right single quotation mark */
515 { 0x201a, 0, 0, 0x2c }, /* single low-9 quotation mark */
516 { 0x201b, 0, 0, 0x27 }, /* single high-reversed-9 quotation mark */
517 { 0x201c, 0, 0, 0x22 }, /* left double quotation mark */
518 { 0x201d, 0, 0, 0x22 }, /* right double quotation mark */
519 { 0x201e, 0, 0, 0x22 }, /* double low-9 quotation mark */
520 { 0x201f, 0, 0, 0x22 }, /* double high-reversed-9 quotation mark */
521
522 { 0x2022, 0, 0, 0xa5 }, /* bullet */
523
524 { 0x2039, 0, 0, 0x3c }, /* single left-pointing angle quotation mark */
525 { 0x203a, 0, 0, 0x3e }, /* single right-pointing angle quotation mark */
526
527 /* Runtime-definable characters */
528 { 0xe000, 0x8000, 15, 0x20 }, /* variable character 0 */
529 { 0xe001, 0x8001, 15, 0x20 }, /* variable character 1 */
530 { 0xe002, 0x8002, 15, 0x20 }, /* variable character 2 */
531 { 0xe003, 0x8003, 15, 0x20 }, /* variable character 3 */
532 { 0xe004, 0x8004, 15, 0x20 }, /* variable character 4 */
533 { 0xe005, 0x8005, 15, 0x20 }, /* variable character 5 */
534 { 0xe006, 0x8006, 15, 0x20 }, /* variable character 6 */
535 { 0xe007, 0x8007, 15, 0x20 }, /* variable character 7 */
536 { 0xe008, 0x8008, 15, 0x20 }, /* variable character 8 */
537 { 0xe009, 0x8009, 15, 0x20 }, /* variable character 9 */
538 { 0xe00a, 0x800a, 15, 0x20 }, /* variable character 10 */
539 { 0xe00b, 0x800b, 15, 0x20 }, /* variable character 11 */
540 { 0xe00c, 0x800c, 15, 0x20 }, /* variable character 12 */
541 { 0xe00d, 0x800d, 15, 0x20 }, /* variable character 13 */
542 { 0xe00e, 0x800e, 15, 0x20 }, /* variable character 14 */
543 { 0xe00f, 0x800f, 15, 0x20 }, /* variable character 15 */
544
545 /* Icons and special symbols */
546 { 0xe100, XF_ICON_UNKNOWN, 14, 0x3f }, /* unknown icon (mirrored ?) */
547 { 0xe101, XF_ICON_BOOKMARK, 14, 0x94 }, /* bookmark icon */
548 { 0xe102, XF_ICON_PLUGIN, 14, 0x29 }, /* plugin icon */
549 { 0xe103, XF_ICON_FOLDER, 14, 0x91 }, /* folder icon */
550 { 0xe104, XF_ICON_FIRMWARE, 14, 0x78 }, /* firmware icon */
551 { 0xe105, XF_ICON_LANGUAGE, 14, 0x2b }, /* language icon */
552 { 0xe106, XF_ICON_AUDIO, 14, 0x13 }, /* audio icon (note) */
553 { 0xe107, XF_ICON_WPS, 14, 0x94 }, /* wps icon */
554 { 0xe108, XF_ICON_PLAYLIST, 14, 0xd0 }, /* playlist icon */
555 { 0xe109, XF_ICON_TEXTFILE, 14, 0xd0 }, /* text file icon */
556 { 0xe10a, XF_ICON_CONFIG, 14, 0xd0 }, /* config icon */
557 { 0xe10b, 0, 0, 0x7f }, /* left arrow */
558 { 0xe10c, 0, 0, 0x7e }, /* right arrow */
559 { 0xe10d, 0, 0, 0x18 }, /* up arrow */
560 { 0xe10e, 0, 0, 0x19 }, /* down arrow */
561 { 0xe10f, 0, 0, 0x11 }, /* filled left arrow */
562 { 0xe110, 0, 0, 0x10 }, /* filled right arrow */
563 { 0xe111, 0, 0, 0x1f }, /* filled up arrow */
564 { 0xe112, 0, 0, 0x1e }, /* filled down arrow */
565 { 0xe113, 0, 0, 0x20 }, /* level 0/7 */
566 { 0xe114, 0, 0, 0x80 }, /* level 1/7 */
567 { 0xe115, 0, 0, 0x81 }, /* level 2/7 */
568 { 0xe116, 0, 0, 0x82 }, /* level 3/7 */
569 { 0xe117, 0, 0, 0x83 }, /* level 4/7 */
570 { 0xe118, 0, 0, 0x84 }, /* level 5/7 */
571 { 0xe119, 0, 0, 0x85 }, /* level 6/7 */
572 { 0xe11a, 0, 0, 0x86 }, /* level 7/7 */
573
574 /* Halfwidth CJK punctuation and katakana - new LCD only */
575 { 0xff61, 0, 0, 0xa1 }, /* hw ideographic full stop */
576 { 0xff62, 0, 0, 0xa2 }, /* hw left corner bracket */
577 { 0xff63, 0, 0, 0xa3 }, /* hw right corner bracket */
578 { 0xff64, 0, 0, 0xa4 }, /* hw ideographic comma */
579 { 0xff65, 0, 0, 0xa5 }, /* hw katakana middle dot */
580 { 0xff66, 0, 0, 0xa6 }, /* hw katakana WO */
581 { 0xff67, 0, 0, 0xa7 }, /* hw katakana a */
582 { 0xff68, 0, 0, 0xa8 }, /* hw katakana i */
583 { 0xff69, 0, 0, 0xa9 }, /* hw katakana u */
584 { 0xff6a, 0, 0, 0xaa }, /* hw katakana e */
585 { 0xff6b, 0, 0, 0xab }, /* hw katakana o */
586 { 0xff6c, 0, 0, 0xac }, /* hw katakana ya */
587 { 0xff6d, 0, 0, 0xad }, /* hw katakana yu */
588 { 0xff6e, 0, 0, 0xae }, /* hw katakana yo */
589 { 0xff6f, 0, 0, 0xaf }, /* hw katakana tu */
590 { 0xff70, 0, 0, 0xb0 }, /* hw katakana-hiragana prolonged soundmark */
591 { 0xff71, 0, 0, 0xb1 }, /* hw katakana A */
592 { 0xff72, 0, 0, 0xb2 }, /* hw katakana I */
593 { 0xff73, 0, 0, 0xb3 }, /* hw katakana U */
594 { 0xff74, 0, 0, 0xb4 }, /* hw katakana E */
595 { 0xff75, 0, 0, 0xb5 }, /* hw katakana O */
596 { 0xff76, 0, 0, 0xb6 }, /* hw katakana KA */
597 { 0xff77, 0, 0, 0xb7 }, /* hw katakana KI */
598 { 0xff78, 0, 0, 0xb8 }, /* hw katakana KU */
599 { 0xff79, 0, 0, 0xb9 }, /* hw katakana KE */
600 { 0xff7a, 0, 0, 0xba }, /* hw katakana KO */
601 { 0xff7b, 0, 0, 0xbb }, /* hw katakana SA */
602 { 0xff7c, 0, 0, 0xbc }, /* hw katakana SI */
603 { 0xff7d, 0, 0, 0xbd }, /* hw katakana SU */
604 { 0xff7e, 0, 0, 0xbe }, /* hw katakana SE */
605 { 0xff7f, 0, 0, 0xbf }, /* hw katakana SO */
606 { 0xff80, 0, 0, 0xc0 }, /* hw katakana TA */
607 { 0xff81, 0, 0, 0xc1 }, /* hw katakana TI */
608 { 0xff82, 0, 0, 0xc2 }, /* hw katakana TU */
609 { 0xff83, 0, 0, 0xc3 }, /* hw katakana TE */
610 { 0xff84, 0, 0, 0xc4 }, /* hw katakana TO */
611 { 0xff85, 0, 0, 0xc5 }, /* hw katakana NA */
612 { 0xff86, 0, 0, 0xc6 }, /* hw katakana NI */
613 { 0xff87, 0, 0, 0xc7 }, /* hw katakana NU */
614 { 0xff88, 0, 0, 0xc8 }, /* hw katakana NE */
615 { 0xff89, 0, 0, 0xc9 }, /* hw katakana NO */
616 { 0xff8a, 0, 0, 0xca }, /* hw katakana HA */
617 { 0xff8b, 0, 0, 0xcb }, /* hw katakana HI */
618 { 0xff8c, 0, 0, 0xcc }, /* hw katakana HU */
619 { 0xff8d, 0, 0, 0xcd }, /* hw katakana HE */
620 { 0xff8e, 0, 0, 0xce }, /* hw katakana HO */
621 { 0xff8f, 0, 0, 0xcf }, /* hw katakana MA */
622 { 0xff90, 0, 0, 0xd0 }, /* hw katakana MI */
623 { 0xff91, 0, 0, 0xd1 }, /* hw katakana MU */
624 { 0xff92, 0, 0, 0xd2 }, /* hw katakana ME */
625 { 0xff93, 0, 0, 0xd3 }, /* hw katakana MO */
626 { 0xff94, 0, 0, 0xd4 }, /* hw katakana YA */
627 { 0xff95, 0, 0, 0xd5 }, /* hw katakana YU */
628 { 0xff96, 0, 0, 0xd6 }, /* hw katakana YO */
629 { 0xff97, 0, 0, 0xd7 }, /* hw katakana RA */
630 { 0xff98, 0, 0, 0xd8 }, /* hw katakana RI */
631 { 0xff99, 0, 0, 0xd9 }, /* hw katakana RU */
632 { 0xff9a, 0, 0, 0xda }, /* hw katakana RE */
633 { 0xff9b, 0, 0, 0xdb }, /* hw katakana RO */
634 { 0xff9c, 0, 0, 0xdc }, /* hw katakana WA */
635 { 0xff9d, 0, 0, 0xdd }, /* hw katakana N */
636 { 0xff9e, 0, 0, 0xde }, /* hw katakana voiced sound mark */
637 { 0xff9f, 0, 0, 0xdf }, /* hw katakana semi-voiced sound mark */
638#endif /* !BOOTLOADER */
639
640 /* no-char symbol */
641 { 0xfffd, 0, 0, 0x91 },
642};
643
644static const struct xchar_info xchar_info_oldlcd[] = {
645 /* Standard ascii */
646 { 0x20, 0, 0, 0x24 }, /* */
647 { 0x21, 0, 0, 0x25 }, /* ! */
648 { 0x22, 0, 0, 0x26 }, /* " */
649 { 0x23, 0, 0, 0x27 }, /* # */
650 { 0x24, 0, 0, 0x06 }, /* $ */
651 { 0x25, 0, 0, 0x29 }, /* % */
652 { 0x26, 0, 0, 0x2a }, /* & */
653 { 0x27, 0, 0, 0x2b }, /* ' */
654 { 0x28, 0, 0, 0x2c }, /* ( */
655 { 0x29, 0, 0, 0x2d }, /* ) */
656 { 0x2a, 0, 0, 0x2e }, /* * */
657 { 0x2b, 0, 0, 0x2f }, /* + */
658 { 0x2c, 0, 0, 0x30 }, /* , */
659 { 0x2d, 0, 0, 0x31 }, /* - */
660 { 0x2e, 0, 0, 0x32 }, /* . */
661 { 0x2f, 0, 0, 0x33 }, /* / */
662 { 0x30, 0, 0, 0x34 }, /* 0 */
663 { 0x31, 0, 0, 0x35 }, /* 1 */
664 { 0x32, 0, 0, 0x36 }, /* 2 */
665 { 0x33, 0, 0, 0x37 }, /* 3 */
666 { 0x34, 0, 0, 0x38 }, /* 4 */
667 { 0x35, 0, 0, 0x39 }, /* 5 */
668 { 0x36, 0, 0, 0x3a }, /* 6 */
669 { 0x37, 0, 0, 0x3b }, /* 7 */
670 { 0x38, 0, 0, 0x3c }, /* 8 */
671 { 0x39, 0, 0, 0x3d }, /* 9 */
672 { 0x3a, 0, 0, 0x3e }, /* : */
673 { 0x3b, 0, 0, 0x3f }, /* ; */
674 { 0x3c, 0, 0, 0x40 }, /* < */
675 { 0x3d, 0, 0, 0x41 }, /* = */
676 { 0x3e, 0, 0, 0x42 }, /* > */
677 { 0x3f, 0, 0, 0x43 }, /* ? */
678 { 0x40, 0, 0, 0x04 }, /* @ */
679 { 0x41, 0, 0, 0x45 }, /* A */
680 { 0x42, 0, 0, 0x46 }, /* B */
681 { 0x43, 0, 0, 0x47 }, /* C */
682 { 0x44, 0, 0, 0x48 }, /* D */
683 { 0x45, 0, 0, 0x49 }, /* E */
684 { 0x46, 0, 0, 0x4a }, /* F */
685 { 0x47, 0, 0, 0x4b }, /* G */
686 { 0x48, 0, 0, 0x4c }, /* H */
687 { 0x49, 0, 0, 0x4d }, /* I */
688 { 0x4a, 0, 0, 0x4e }, /* J */
689 { 0x4b, 0, 0, 0x4f }, /* K */
690 { 0x4c, 0, 0, 0x50 }, /* L */
691 { 0x4d, 0, 0, 0x51 }, /* M */
692 { 0x4e, 0, 0, 0x52 }, /* N */
693 { 0x4f, 0, 0, 0x53 }, /* O */
694 { 0x50, 0, 0, 0x54 }, /* P */
695 { 0x51, 0, 0, 0x55 }, /* Q */
696 { 0x52, 0, 0, 0x56 }, /* R */
697 { 0x53, 0, 0, 0x57 }, /* S */
698 { 0x54, 0, 0, 0x58 }, /* T */
699 { 0x55, 0, 0, 0x59 }, /* U */
700 { 0x56, 0, 0, 0x5a }, /* V */
701 { 0x57, 0, 0, 0x5b }, /* W */
702 { 0x58, 0, 0, 0x5c }, /* X */
703 { 0x59, 0, 0, 0x5d }, /* Y */
704 { 0x5a, 0, 0, 0x5e }, /* Z */
705 { 0x5b, 0, 0, 0xa9 }, /* [ */
706 { 0x5c, XF_BACKSLASH, 2, 0x33 }, /* \ */
707 { 0x5d, 0, 0, 0xce }, /* ] */
708 { 0x5e, XF_CIRCUMFLEX, 2, 0xee }, /* ^ */
709 { 0x5f, 0, 0, 0x15 }, /* _ */
710 { 0x60, XF_GRAVEACCENT, 2, 0x2b }, /* ` */
711 { 0x61, 0, 0, 0x65 }, /* a */
712 { 0x62, 0, 0, 0x66 }, /* b */
713 { 0x63, 0, 0, 0x67 }, /* c */
714 { 0x64, 0, 0, 0x68 }, /* d */
715 { 0x65, 0, 0, 0x69 }, /* e */
716 { 0x66, 0, 0, 0x6a }, /* f */
717 { 0x67, 0, 0, 0x6b }, /* g */
718 { 0x68, 0, 0, 0x6c }, /* h */
719 { 0x69, 0, 0, 0x6d }, /* i */
720 { 0x6a, 0, 0, 0x6e }, /* j */
721 { 0x6b, 0, 0, 0x6f }, /* k */
722 { 0x6c, 0, 0, 0x70 }, /* l */
723 { 0x6d, 0, 0, 0x71 }, /* m */
724 { 0x6e, 0, 0, 0x72 }, /* n */
725 { 0x6f, 0, 0, 0x73 }, /* o */
726 { 0x70, 0, 0, 0x74 }, /* p */
727 { 0x71, 0, 0, 0x75 }, /* q */
728 { 0x72, 0, 0, 0x76 }, /* r */
729 { 0x73, 0, 0, 0x77 }, /* s */
730 { 0x74, 0, 0, 0x78 }, /* t */
731 { 0x75, 0, 0, 0x79 }, /* u */
732 { 0x76, 0, 0, 0x7a }, /* v */
733 { 0x77, 0, 0, 0x7b }, /* w */
734 { 0x78, 0, 0, 0x7c }, /* x */
735 { 0x79, 0, 0, 0x7d }, /* y */
736 { 0x7a, 0, 0, 0x7e }, /* z */
737 { 0x7b, 0, 0, 0x2c }, /* { (hard-coded ( ) */
738 { 0x7c, XF_VERTICALBAR, 2, 0x25 }, /* | */
739 { 0x7d, 0, 0, 0x2d }, /* } (hard-coded ) ) */
740 { 0x7e, XF_TILDE, 2, 0x31 }, /* ~ */
741 { 0x7f, 0, 0, 0x8b }, /* (full grid) */
742
743#ifndef BOOTLOADER /* bootloader only supports pure ASCII */
744 /* Latin 1 */
745 { 0xa0, 0, 0, 0x24 }, /* (non-breaking space) */
746 { 0xa1, 0, 0, 0x44 }, /* ¡ (inverted !) */
747 { 0xa2, 0, 0, 0xa8 }, /* ¢ (cent sign) */
748 { 0xa3, 0, 0, 0x05 }, /* £ (pound sign) */
749 { 0xa4, 0, 0, 0x28 }, /* ¤ (currency sign) */
750 { 0xa5, 0, 0, 0x07 }, /* ¥ (yen sign) */
751
752 { 0xa7, 0, 0, 0x63 }, /* § (paragraph sign) */
753
754 { 0xab, XF_LEFTDBLANGLEQUOT, 1, 0x40 }, /* « (left double-angle quotation mark) */
755
756 { 0xad, 0, 0, 0x31 }, /* ­ (soft hyphen) */
757
758 { 0xaf, 0, 0, 0xee }, /* ¯ (macron) */
759
760 { 0xb1, XF_PLUSMINUS, 1, 0x2f }, /* ± (plus-minus sign) */
761 { 0xb2, XF_SUPER2, 1, 0x36 }, /* ³ (superscript 2) */
762 { 0xb3, XF_SUPER3, 1, 0x37 }, /* ³ (superscript 3) */
763
764 { 0xb5, XF_MICRO, 1, 0x79 }, /* µ (micro sign) */
765 { 0xb6, 0, 0, 0x1a }, /* ¶ (pilcrow sign) */
766 { 0xb7, XF_MIDDLEDOT, 1, 0x32 }, /* · (middle dot) */
767
768 { 0xbb, XF_RIGHTDBLANGLEQUOT, 1, 0x42 }, /* » (right double-angle quotation mark) */
769 { 0xbc, XF_ONEQUARTER, 1, 0x29 }, /* ¼ (one quarter) */
770 { 0xbd, XF_ONEHALF, 1, 0x29 }, /* ½ (one half) */
771 { 0xbe, XF_THREEQUARTERS, 1, 0x29 }, /* ¾ (three quarters) */
772 { 0xbf, 0, 0, 0x64 }, /* ¿ (inverted ?) */
773 { 0xc0, 0, 0, 0x8c }, /* À (A grave) */
774 { 0xc1, 0, 0, 0x8d }, /* Á (A acute) */
775 { 0xc2, 0, 0, 0x8e }, /* Â (A circumflex) */
776 { 0xc3, 0, 0, 0x8f }, /* Ã (A tilde) */
777 { 0xc4, 0, 0, 0x5f }, /* Ä (A dieresis) */
778 { 0xc5, 0, 0, 0x12 }, /* Å (A with ring above) */
779 { 0xc6, 0, 0, 0x20 }, /* Æ (AE ligature) */
780 { 0xc7, 0, 0, 0x0d }, /* Ç (C cedilla) */
781 { 0xc8, 0, 0, 0x90 }, /* È (E grave) */
782 { 0xc9, 0, 0, 0x23 }, /* É (E acute) */
783 { 0xca, 0, 0, 0x91 }, /* Ê (E circumflex) */
784 { 0xcb, 0, 0, 0x92 }, /* Ë (E dieresis) */
785 { 0xcc, 0, 0, 0x93 }, /* Ì (I grave) */
786 { 0xcd, 0, 0, 0x94 }, /* Í (I acute) */
787 { 0xce, XF_ICIRCUMFLEX, 1, 0x4d }, /* Î (I circumflex) */
788 { 0xcf, XF_IDIERESIS, 1, 0x4d }, /* Ï (I dieresis) */
789 { 0xd0, 0, 0, 0x95 }, /* Ð (ETH) */
790 { 0xd1, 0, 0, 0x61 }, /* Ñ (N tilde) */
791 { 0xd2, 0, 0, 0x96 }, /* Ò (O grave) */
792 { 0xd3, 0, 0, 0x97 }, /* Ó (O acute) */
793 { 0xd4, 0, 0, 0x98 }, /* Ô (O circumflex) */
794 { 0xd5, 0, 0, 0x99 }, /* Õ (O tilde) */
795 { 0xd6, 0, 0, 0x60 }, /* Ö (O dieresis) */
796 { 0xd7, 0, 0, 0xde }, /* × (multiplication sign) */
797 { 0xd8, 0, 0, 0x0f }, /* Ø (O stroke) */
798 { 0xd9, 0, 0, 0x9a }, /* Ù (U grave) */
799 { 0xda, 0, 0, 0x9b }, /* Ú (U acute) */
800 { 0xdb, XF_UCIRCUMFLEX, 1, 0x59 }, /* Û (U circumflex) */
801 { 0xdc, 0, 0, 0x62 }, /* Ü (U dieresis) */
802 { 0xdd, XF_YACUTE, 1, 0x5d }, /* Ý (Y acute) */
803
804 { 0xdf, 0, 0, 0x22 }, /* ß (sharp s) */
805 { 0xe0, 0, 0, 0x83 }, /* à (a grave) */
806 { 0xe1, 0, 0, 0x9c }, /* á (a acute) */
807 { 0xe2, 0, 0, 0x9d }, /* â (a circumflex) */
808 { 0xe3, 0, 0, 0x9e }, /* ã (a tilde) */
809 { 0xe4, 0, 0, 0x7f }, /* ä (a dieresis) */
810 { 0xe5, 0, 0, 0x13 }, /* å (a with ring above) */
811 { 0xe6, 0, 0, 0x21 }, /* æ (ae ligature */
812 { 0xe7, 0, 0, 0x84 }, /* ç (c cedilla) */
813 { 0xe8, 0, 0, 0x08 }, /* è (e grave) */
814 { 0xe9, 0, 0, 0x09 }, /* é (e acute) */
815 { 0xea, 0, 0, 0x9f }, /* ê (e circumflex) */
816 { 0xeb, 0, 0, 0xa0 }, /* ë (e dieresis) */
817 { 0xec, XF_iGRAVE, 1, 0x6d }, /* ì (i grave) */
818 { 0xed, 0, 0, 0xa1 }, /* í (i acute) */
819 { 0xee, 0, 0, 0xa2 }, /* î (i circumflex) */
820 { 0xef, 0, 0, 0xa3 }, /* ï (i dieresis) */
821
822 { 0xf1, 0, 0, 0x81 }, /* ñ (n tilde) */
823 { 0xf2, 0, 0, 0x0c }, /* ò (o grave) */
824 { 0xf3, 0, 0, 0xa4 }, /* ó (o acute) */
825 { 0xf4, 0, 0, 0xa5 }, /* ô (o circumflex) */
826 { 0xf5, 0, 0, 0xa6 }, /* õ (o tilde) */
827 { 0xf6, 0, 0, 0x80 }, /* ö (o dieresis) */
828 { 0xf7, XF_DIVISION, 1, 0x2f }, /* ÷ (division sign) */
829 { 0xf8, 0, 0, 0x10 }, /* ø (o slash) */
830 { 0xf9, 0, 0, 0x0a }, /* ù (u grave) */
831 { 0xfa, 0, 0, 0xa7 }, /* ú (u acute) */
832 { 0xfb, XF_uCIRCUMFLEX, 1, 0x79 }, /* û (u circumflex) */
833 { 0xfc, 0, 0, 0xa2 }, /* ü (u dieresis) */
834 { 0xfd, 0, 0, 0xaf }, /* ý (y acute) */
835
836 { 0xff, XF_yDIERESIS, 1, 0x7d }, /* ÿ (y dieresis) */
837
838 /* Latin extended A */
839 { 0x0103, 0, 0, 0xe9 }, /* a breve */
840 { 0x0105, 0, 0, 0xb3 }, /* a ogonek */
841 { 0x0107, 0, 0, 0xb1 }, /* c acute */
842 { 0x010d, 0, 0, 0xab }, /* c caron */
843 { 0x010f, 0, 0, 0xbc }, /* d caron */
844 { 0x0110, 0, 0, 0x95 }, /* D stroke */
845 { 0x0111, 0, 0, 0xb0 }, /* d stroke */
846 { 0x0119, 0, 0, 0xb2 }, /* e ogonek */
847 { 0x011b, 0, 0, 0xad }, /* e caron */
848 { 0x011e, 0, 0, 0xc1 }, /* G breve */
849 { 0x011f, 0, 0, 0xc2 }, /* g breve */
850 { 0x0130, 0, 0, 0xc5 }, /* I with dot above */
851 { 0x0131, 0, 0, 0xc6 }, /* dotless i */
852 { 0x0141, XF_LSTROKE, 1, 0x50 }, /* L stroke */
853 { 0x0142, 0, 0, 0xb8 }, /* l stroke */
854 { 0x0144, 0, 0, 0xb7 }, /* n acute */
855 { 0x0148, 0, 0, 0xba }, /* n caron */
856 { 0x0150, 0, 0, 0xc8 }, /* O double acute */
857 { 0x0151, 0, 0, 0xca }, /* o double acute */
858 { 0x0158, XF_RCARON, 1, 0x56 }, /* R caron */
859 { 0x0159, 0, 0, 0xaa }, /* r caron */
860 { 0x015a, 0, 0, 0xb6 }, /* S acute */
861 { 0x015b, 0, 0, 0xb6 }, /* s acute */
862 { 0x015e, 0, 0, 0xc3 }, /* S cedilla */
863 { 0x015f, 0, 0, 0xc4 }, /* s cedilla */
864 { 0x0160, 0, 0, 0xac }, /* S caron */
865 { 0x0161, 0, 0, 0xac }, /* s caron */
866 { 0x0163, 0, 0, 0xd9 }, /* t cedilla */
867 { 0x0165, 0, 0, 0xbb }, /* t caron */
868 { 0x016f, 0, 0, 0xae }, /* u with ring above */
869 { 0x0170, 0, 0, 0xc7 }, /* U double acute */
870 { 0x0171, 0, 0, 0xc9 }, /* u double acute */
871 { 0x017a, 0, 0, 0xb5 }, /* z acute */
872 { 0x017c, 0, 0, 0xb4 }, /* z with dot above */
873 { 0x017e, 0, 0, 0xbd }, /* z caron */
874
875 /* Greek */
876 { 0x037e, 0, 0, 0x3f }, /* greek question mark */
877
878 { 0x0386, 0, 0, 0x45 }, /* greek ALPHA with tonos */
879 { 0x0387, XF_GR_ANOTELEIA,1, 0x32 }, /* greek ano teleia */
880 { 0x0388, 0, 0, 0x49 }, /* greek EPSILON with tonos */
881 { 0x0389, 0, 0, 0x4c }, /* greek ETA with tonos */
882 { 0x038a, 0, 0, 0x4d }, /* greek IOTA with tonos */
883 /* reserved */
884 { 0x038c, 0, 0, 0x53 }, /* greek OMICRON with tonos */
885 /* reserved */
886 { 0x038e, 0, 0, 0x5d }, /* greek YPSILON with tonos */
887 { 0x038f, 0, 0, 0x19 }, /* greek OMEGA with tonos */
888 { 0x0390, 0, 0, 0xa1 }, /* greek iota with dialytica + tonos */
889 { 0x0391, 0, 0, 0x45 }, /* greek ALPHA */
890 { 0x0392, 0, 0, 0x46 }, /* greek BETA */
891 { 0x0393, 0, 0, 0x17 }, /* greek GAMMA */
892 { 0x0394, 0, 0, 0x14 }, /* greek DELTA */
893 { 0x0395, 0, 0, 0x49 }, /* greek EPSILON */
894 { 0x0396, 0, 0, 0x5e }, /* greek ZETA */
895 { 0x0397, 0, 0, 0x4c }, /* greek ETA */
896 { 0x0398, 0, 0, 0x1d }, /* greek THETA */
897 { 0x0399, 0, 0, 0x4d }, /* greek IOTA */
898 { 0x039a, 0, 0, 0x4f }, /* greek KAPPA */
899 { 0x039b, 0, 0, 0x18 }, /* greek LAMBDA */
900 { 0x039c, 0, 0, 0x51 }, /* greek MU */
901 { 0x039d, 0, 0, 0x52 }, /* greek NU */
902 { 0x039e, 0, 0, 0x1e }, /* greek XI */
903 { 0x039f, 0, 0, 0x53 }, /* greek OMICRON */
904 { 0x03a0, 0, 0, 0x1a }, /* greek PI */
905 { 0x03a1, 0, 0, 0x54 }, /* greek RHO */
906 /* reserved */
907 { 0x03a3, 0, 0, 0x1c }, /* greek SIGMA */
908 { 0x03a4, 0, 0, 0x58 }, /* greek TAU */
909 { 0x03a5, 0, 0, 0x5d }, /* greek UPSILON */
910 { 0x03a6, 0, 0, 0x16 }, /* greek PHI */
911 { 0x03a7, 0, 0, 0x5c }, /* greek CHI */
912 { 0x03a8, 0, 0, 0x1b }, /* greek PSI */
913 { 0x03a9, 0, 0, 0x19 }, /* greek OMEGA */
914 { 0x03aa, 0, 0, 0x4d }, /* greek IOTA with dialytica */
915 { 0x03ab, 0, 0, 0x5d }, /* greek UPSILON with dialytica */
916 { 0x03ac, XF_GR_alphaTONOS, 1, 0x9c }, /* greek alpha with tonos */
917 { 0x03ad, XF_GR_epsilonTONOS, 1, 0x69 }, /* greek epsilon with tonos */
918 { 0x03ae, XF_GR_etaTONOS, 1, 0x72 }, /* greek eta with tonos */
919 { 0x03af, 0, 0, 0xa1 }, /* greek iota with tonos */
920 { 0x03b0, XF_GR_upsilonTONOS, 1, 0xa7 }, /* greek upsilon with dialytica + tonos */
921 { 0x03b1, XF_GR_alpha, 1, 0x65 }, /* greek alpha */
922 { 0x03b2, 0, 0, 0x22 }, /* greek beta */
923 { 0x03b3, XF_GR_gamma, 1, 0x7d }, /* greek gamma */
924 { 0x03b4, XF_GR_delta, 2, 0x14 }, /* greek delta */
925 { 0x03b5, XF_GR_epsilon, 1, 0x69 }, /* greek epsilon */
926 { 0x03b6, XF_GR_zeta, 1, 0x7e }, /* greek zeta */
927 { 0x03b7, XF_GR_eta, 1, 0x72 }, /* greek eta */
928 { 0x03b8, 0, 0, 0x1d }, /* greek theta */
929 { 0x03b9, 0, 0, 0xc6 }, /* greek iota */
930 { 0x03ba, XF_GR_kappa, 1, 0x6f }, /* greek kappa */
931 { 0x03bb, XF_GR_lambda, 1, 0x18 }, /* greek lambda */
932 { 0x03bc, XF_GR_mu, 1, 0x79 }, /* greek mu */
933 { 0x03bd, 0, 0, 0x7a }, /* greek nu */
934 { 0x03be, XF_GR_xi, 2, 0x1e }, /* greek xi */
935 { 0x03bf, 0, 0, 0x73 }, /* greek omicron */
936 { 0x03c0, XF_GR_pi, 1, 0x72 }, /* greek pi */
937 { 0x03c1, XF_GR_rho, 1, 0x74 }, /* greek rho */
938 { 0x03c2, XF_GR_FINALsigma, 1, 0x77 }, /* greek final sigma */
939 { 0x03c3, XF_GR_sigma, 1, 0x73 }, /* greek sigma */
940 { 0x03c4, XF_GR_tau, 1, 0x78 }, /* greek tau */
941 { 0x03c5, XF_GR_upsilon, 1, 0x79 }, /* greel upsilon */
942 { 0x03c6, 0, 0, 0x10 }, /* greek phi */
943 { 0x03c7, XF_GR_chi, 1, 0x7c }, /* greek chi */
944 { 0x03c8, XF_GR_psi, 1, 0x1b }, /* greek psi */
945 { 0x03c9, XF_GR_omega, 1, 0x7b }, /* greek omega */
946 { 0x03ca, 0, 0, 0xa3 }, /* greek iota with dialytica */
947 { 0x03cb, XF_GR_upsilon, 1, 0x82 }, /* greek upsilon with dialytica */
948 { 0x03cc, 0, 0, 0xa4 }, /* greek omicron with tonos */
949 { 0x03cd, XF_GR_upsilonTONOS, 1, 0xa7 }, /* greek upsilon with tonos */
950 { 0x03ce, XF_GR_omegaTONOS, 1, 0x7b }, /* greek omega with tonos */
951
952 { 0x03f3, 0, 0, 0x6e }, /* greek yot */
953
954 /* Cyrillic */
955 { 0x0400, 0, 0, 0x90 }, /* cyrillic IE grave */
956 { 0x0401, 0, 0, 0x92 }, /* cyrillic IO */
957
958 { 0x0405, 0, 0, 0x57 }, /* cyrillic DZE */
959 { 0x0406, 0, 0, 0x4d }, /* cyrillic byeloruss-ukr. I */
960 { 0x0407, XF_CYR_YI, 1, 0x4d }, /* cyrillic YI */
961 { 0x0408, 0, 0, 0x4e }, /* cyrillic JE */
962
963 { 0x0410, 0, 0, 0x45 }, /* cyrillic A */
964 { 0x0411, XF_CYR_BE, 1, 0x3a }, /* cyrillic BE */
965 { 0x0412, 0, 0, 0x46 }, /* cyrillic VE */
966 { 0x0413, 0, 0, 0x17 }, /* cyrillic GHE */
967 { 0x0414, XF_CYR_DE, 1, 0x14 }, /* cyrillic DE */
968 { 0x0415, 0, 0, 0x49 }, /* cyrillic IE */
969 { 0x0416, XF_CYR_ZHE, 2, 0x2e }, /* cyrillic ZHE */
970 { 0x0417, XF_CYR_ZE, 1, 0x37 }, /* cyrillic ZE */
971 { 0x0418, XF_CYR_I, 1, 0x59 }, /* cyrillic I */
972 { 0x0419, XF_CYR_SHORTI, 1, 0x9b }, /* cyrillic short I */
973 { 0x041a, 0, 0, 0x4f }, /* cyrillic K */
974 { 0x041b, XF_CYR_EL, 1, 0x18 }, /* cyrillic EL */
975 { 0x041c, 0, 0, 0x51 }, /* cyrillic EM */
976 { 0x041d, 0, 0, 0x4c }, /* cyrillic EN */
977 { 0x041e, 0, 0, 0x53 }, /* cyrillic O */
978 { 0x041f, 0, 0, 0x1a }, /* cyrillic PE */
979 { 0x0420, 0, 0, 0x54 }, /* cyrillic ER */
980 { 0x0421, 0, 0, 0x47 }, /* cyrillic ES */
981 { 0x0422, 0, 0, 0x58 }, /* cyrillic TE */
982 { 0x0423, 0, 0, 0x5d }, /* cyrillic U */
983 { 0x0424, 0, 0, 0x16 }, /* cyrillic EF */
984 { 0x0425, 0, 0, 0x5c }, /* cyrillic HA */
985 { 0x0426, XF_CYR_TSE, 2, 0x5e }, /* cyrillic TSE */
986 { 0x0427, XF_CYR_CHE, 2, 0x0e }, /* cyrillic CHE */
987 { 0x0428, XF_CYR_SHA, 1, 0x5b }, /* cyrillic SHA */
988 { 0x0429, XF_CYR_SHCHA, 1, 0x5b }, /* cyrillic SHCHA */
989 { 0x042a, XF_CYR_HARD, 1, 0x66 }, /* cyrillic capital hard sign */
990 { 0x042b, XF_CYR_YERU, 2, 0x66 }, /* cyrillic YERU */
991 { 0x042c, 0, 0, 0x66 }, /* cyrillic capital soft sign */
992 { 0x042d, XF_CYR_E, 2, 0x89 }, /* cyrillic E */
993 { 0x042e, XF_CYR_YU, 2, 0x95 }, /* cyrillic YU */
994 { 0x042f, XF_CYR_YA, 1, 0x0d }, /* cyrillic YA */
995 { 0x0430, 0, 0, 0x65 }, /* cyrillic a */
996 { 0x0431, XF_CYR_be, 1, 0x97 }, /* cyrillic be */
997 { 0x0432, XF_CYR_ve, 1, 0x22 }, /* cyrillic ve */
998 { 0x0433, XF_CYR_ghe, 1, 0x76 }, /* cyrillic ghe */
999 { 0x0434, XF_CYR_de, 2, 0x14 }, /* cyrillic de */
1000 { 0x0435, 0, 0, 0x69 }, /* cyrillic ie */
1001 { 0x0436, XF_CYR_zhe, 1, 0x2e }, /* cyrillic zhe */
1002 { 0x0437, XF_CYR_ze, 1, 0x37 }, /* cyrillic ze */
1003 { 0x0438, XF_CYR_i, 1, 0x79 }, /* cyrillic i */
1004 { 0x0439, XF_CYR_SHORTi, 1, 0xa7 }, /* cyrillic short i */
1005 { 0x043a, XF_CYR_ka, 1, 0x6f }, /* cyrillic ka */
1006 { 0x043b, XF_CYR_el, 1, 0x18 }, /* cyrillic el */
1007 { 0x043c, XF_CYR_em, 1, 0x71 }, /* cyrillic em */
1008 { 0x043d, XF_CYR_en, 2, 0x4c }, /* cyrillic en */
1009 { 0x043e, 0, 0, 0x73 }, /* cyrillic o */
1010 { 0x043f, XF_CYR_pe, 1, 0x72 }, /* cyrillic pe */
1011 { 0x0440, 0, 0, 0x74 }, /* cyrillic er */
1012 { 0x0441, 0, 0, 0x67 }, /* cyrillic es */
1013 { 0x0442, XF_CYR_te, 1, 0x78 }, /* cyrillic te */
1014 { 0x0443, 0, 0, 0x7d }, /* cyrillic u */
1015 { 0x0444, 0, 0, 0x10 }, /* cyrillic ef */
1016 { 0x0445, 0, 0, 0x7c }, /* cyrillic ha */
1017 { 0x0446, XF_CYR_tse, 2, 0x7e }, /* cyrillic tse */
1018 { 0x0447, XF_CYR_che, 2, 0x0e }, /* cyrillic che */
1019 { 0x0448, XF_CYR_sha, 1, 0x7b }, /* cyrillic sha */
1020 { 0x0449, XF_CYR_shcha, 1, 0x7b }, /* cyrillic shcha */
1021 { 0x044a, XF_CYR_hard, 1, 0x66 }, /* cyrillic small hard sign */
1022 { 0x044b, XF_CYR_yeru, 2, 0x66 }, /* cyrillic yeru */
1023 { 0x044c, XF_CYR_soft, 1, 0x66 }, /* cyrillic small soft sign */
1024 { 0x044d, XF_CYR_e, 2, 0x89 }, /* cyrillic e */
1025 { 0x044e, XF_CYR_yu, 2, 0x95 }, /* cyrillic yu */
1026 { 0x044f, XF_CYR_ya, 2, 0x84 }, /* cyrillic ya */
1027 { 0x0450, 0, 0, 0x08 }, /* cyrillic ie grave */
1028 { 0x0451, 0, 0, 0xa0 }, /* cyrillic io */
1029
1030 { 0x0455, 0, 0, 0x77 }, /* cyrillic dze */
1031 { 0x0456, 0, 0, 0x6d }, /* cyrillic byeloruss-ukr. i */
1032 { 0x0457, 0, 0, 0xa3 }, /* cyrillic yi */
1033 { 0x0458, 0, 0, 0x6e }, /* cyrillic je */
1034
1035 /* extra punctuation */
1036 { 0x2013, 0, 0, 0x31 }, /* en dash */
1037 { 0x2014, 0, 0, 0x31 }, /* em dash */
1038
1039 { 0x2018, 0, 0, 0x2b }, /* left single quotation mark */
1040 { 0x2019, 0, 0, 0x2b }, /* right single quotation mark */
1041 { 0x201a, 0, 0, 0x30 }, /* single low-9 quotation mark */
1042 { 0x201b, 0, 0, 0x2b }, /* single high-reversed-9 quotation mark */
1043 { 0x201c, 0, 0, 0x26 }, /* left double quotation mark */
1044 { 0x201d, 0, 0, 0x26 }, /* right double quotation mark */
1045 { 0x201e, 0, 0, 0x26 }, /* double low-9 quotation mark */
1046 { 0x201f, 0, 0, 0x26 }, /* double high-reversed-9 quotation mark */
1047
1048 { 0x2022, XF_MIDDLEDOT, 1, 0x32 }, /* bullet */
1049
1050 { 0x2039, 0, 0, 0x40 }, /* single left-pointing angle quotation mark */
1051 { 0x203a, 0, 0, 0x42 }, /* single right-pointing angle quotation mark */
1052
1053 /* Runtime-definable characters */
1054 { 0xe000, 0x8000, 15, 0x24 }, /* variable character 0 */
1055 { 0xe001, 0x8001, 15, 0x24 }, /* variable character 1 */
1056 { 0xe002, 0x8002, 15, 0x24 }, /* variable character 2 */
1057 { 0xe003, 0x8003, 15, 0x24 }, /* variable character 3 */
1058 { 0xe004, 0x8004, 15, 0x24 }, /* variable character 4 */
1059 { 0xe005, 0x8005, 15, 0x24 }, /* variable character 5 */
1060 { 0xe006, 0x8006, 15, 0x24 }, /* variable character 6 */
1061 { 0xe007, 0x8007, 15, 0x24 }, /* variable character 7 */
1062 { 0xe008, 0x8008, 15, 0x24 }, /* variable character 8 */
1063 { 0xe009, 0x8009, 15, 0x24 }, /* variable character 9 */
1064 { 0xe00a, 0x800a, 15, 0x24 }, /* variable character 10 */
1065 { 0xe00b, 0x800b, 15, 0x24 }, /* variable character 11 */
1066 { 0xe00c, 0x800c, 15, 0x24 }, /* variable character 12 */
1067 { 0xe00d, 0x800d, 15, 0x24 }, /* variable character 13 */
1068 { 0xe00e, 0x800e, 15, 0x24 }, /* variable character 14 */
1069 { 0xe00f, 0x800f, 15, 0x24 }, /* variable character 15 */
1070
1071 /* Icons and special symbols */
1072 { 0xe100, XF_ICON_UNKNOWN, 14, 0x43 }, /* unknown icon (mirrored ?) */
1073 { 0xe101, XF_ICON_BOOKMARK, 14, 0xd4 }, /* bookmark icon */
1074 { 0xe102, XF_ICON_PLUGIN, 14, 0x2d }, /* plugin icon */
1075 { 0xe103, XF_ICON_FOLDER, 14, 0x34 }, /* folder icon */
1076 { 0xe104, XF_ICON_FIRMWARE, 14, 0x7c }, /* firmware icon */
1077 { 0xe105, XF_ICON_LANGUAGE, 14, 0x2f }, /* language icon */
1078 { 0xe106, 0, 0, 0xfc }, /* audio icon (note) */
1079 { 0xe107, XF_ICON_WPS, 14, 0xd4 }, /* wps icon */
1080 { 0xe108, XF_ICON_PLAYLIST, 14, 0xfa }, /* playlist icon */
1081 { 0xe109, XF_ICON_TEXTFILE, 14, 0xfa }, /* text file icon */
1082 { 0xe10a, XF_ICON_CONFIG, 14, 0xfa }, /* config icon */
1083 { 0xe10b, 0, 0, 0x88 }, /* left arrow */
1084 { 0xe10c, 0, 0, 0x89 }, /* right arrow */
1085 { 0xe10d, 0, 0, 0x86 }, /* up arrow */
1086 { 0xe10e, 0, 0, 0x87 }, /* down arrow */
1087 { 0xe10f, 0, 0, 0x88 }, /* filled left arrow */
1088 { 0xe110, 0, 0, 0x89 }, /* filled right arrow */
1089 { 0xe111, 0, 0, 0x86 }, /* filled up arrow */
1090 { 0xe112, 0, 0, 0x87 }, /* filled down arrow */
1091 { 0xe113, 0, 0, 0x24 }, /* level 0/7 */
1092 { 0xe114, 0, 0, 0x15 }, /* level 1/7 */
1093 { 0xe115, 0, 0, 0xdf }, /* level 2/7 */
1094 { 0xe116, 0, 0, 0xe0 }, /* level 3/7 */
1095 { 0xe117, 0, 0, 0xe1 }, /* level 4/7 */
1096 { 0xe118, 0, 0, 0xe2 }, /* level 5/7 */
1097 { 0xe119, 0, 0, 0xe3 }, /* level 6/7 */
1098 { 0xe11a, 0, 0, 0xec }, /* level 7/7 */
1099#endif /* !BOOTLOADER */
1100
1101 /* no-char symbol */
1102 { 0xfffd, 0, 0, 0xd8 },
1103};
1104
1105const unsigned char xfont_fixed[][HW_PATTERN_SIZE] = {
1106 /* Standard ascii */
1107 [XF_BACKSLASH] = { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00}, /* \ */
1108 [XF_CIRCUMFLEX] = { 0x04, 0x0a, 0x11, 0x00, 0x00, 0x00, 0x00}, /* ^ */
1109 [XF_GRAVEACCENT] = { 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00}, /* ` */
1110 [XF_VERTICALBAR] = { 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04}, /* | */
1111 [XF_TILDE] = { 0x00, 0x00, 0x08, 0x15, 0x02, 0x00, 0x00}, /* ~ */
1112
1113#ifndef BOOTLOADER /* bootloader only supports pure ASCII */
1114 /* Icons and special symbols */
1115 [XF_ICON_UNKNOWN] = { 0x0c, 0x12, 0x12, 0x08, 0x08, 0x00, 0x08},
1116 [XF_ICON_BOOKMARK] = { 0x00, 0x03, 0x07, 0x0e, 0x1c, 0x08, 0x00},
1117 [XF_ICON_PLUGIN] = { 0x04, 0x1e, 0x07, 0x1f, 0x05, 0x01, 0x06},
1118 [XF_ICON_FOLDER] = { 0x0c, 0x13, 0x11, 0x11, 0x11, 0x11, 0x1f},
1119 [XF_ICON_FIRMWARE] = { 0x1f, 0x11, 0x1b, 0x15, 0x1b, 0x11, 0x1f},
1120 [XF_ICON_LANGUAGE] = { 0x00, 0x1f, 0x15, 0x1f, 0x15, 0x1f, 0x00},
1121 [XF_ICON_AUDIO] = { 0x03, 0x05, 0x09, 0x09, 0x0b, 0x1b, 0x18},
1122 [XF_ICON_WPS] = { 0x01, 0x01, 0x02, 0x02, 0x14, 0x0c, 0x04},
1123 [XF_ICON_PLAYLIST] = { 0x17, 0x00, 0x17, 0x00, 0x17, 0x00, 0x17},
1124 [XF_ICON_TEXTFILE] = { 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f},
1125 [XF_ICON_CONFIG] = { 0x0b, 0x10, 0x0b, 0x00, 0x1f, 0x00, 0x1f},
1126 /* Latin 1 */
1127 [XF_INVEXCLAMATION]= { 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04}, /* ¡ */
1128 [XF_CENTSIGN] = { 0x04, 0x04, 0x0f, 0x10, 0x10, 0x0f, 0x04}, /* ¢ */
1129 [XF_POUNDSIGN] = { 0x06, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x1f}, /* £ */
1130 [XF_CURRENCY] = { 0x00, 0x11, 0x0e, 0x0a, 0x0e, 0x11, 0x00}, /* ¤ */
1131 [XF_LEFTDBLANGLEQUOT] = { 0x00, 0x05, 0x0a, 0x14, 0x0a, 0x05, 0x00}, /* « */
1132 [XF_MACRON] = { 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* ¯ */
1133 [XF_PLUSMINUS] = { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00, 0x1f}, /* ± */
1134 [XF_SUPER2] = { 0x1c, 0x04, 0x1c, 0x10, 0x1c, 0x00, 0x00}, /* ³ */
1135 [XF_SUPER3] = { 0x1c, 0x04, 0x1c, 0x04, 0x1c, 0x00, 0x00}, /* ³ */
1136 [XF_MICRO] = { 0x00, 0x09, 0x09, 0x09, 0x0f, 0x08, 0x10}, /* µ */
1137 [XF_MIDDLEDOT] = { 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00}, /* · */
1138 [XF_RIGHTDBLANGLEQUOT] = { 0x00, 0x14, 0x0a, 0x05, 0x0a, 0x14, 0x00}, /* » */
1139 [XF_ONEQUARTER] = { 0x11, 0x12, 0x14, 0x09, 0x13, 0x07, 0x01}, /* ¼ */
1140 [XF_ONEHALF] = { 0x11, 0x12, 0x17, 0x09, 0x17, 0x04, 0x07}, /* ½ */
1141 [XF_THREEQUARTERS] = { 0x18, 0x09, 0x1a, 0x0d, 0x1b, 0x17, 0x01}, /* ¾ */
1142 [XF_INVQUESTION] = { 0x04, 0x00, 0x04, 0x08, 0x10, 0x11, 0x0e}, /* ¿ */
1143 [XF_AGRAVE] = { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11}, /* À */
1144 [XF_AACUTE] = { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11}, /* Á */
1145 [XF_ACIRCUMFLEX] = { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x11, 0x11}, /* Â */
1146 [XF_ATILDE] = { 0x0d, 0x12, 0x0e, 0x11, 0x1f, 0x11, 0x11}, /* Ã */
1147 [XF_ADIERESIS] = { 0x0a, 0x00, 0x04, 0x0a, 0x11, 0x1f, 0x11}, /* Ä */
1148 [XF_ARING] = { 0x04, 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x11}, /* Å */
1149 [XF_AELIGATURE] = { 0x0f, 0x14, 0x14, 0x1f, 0x14, 0x14, 0x17}, /* Æ */
1150 [XF_CCEDILLA] = { 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x02, 0x0e}, /* Ç */
1151 [XF_EGRAVE] = { 0x08, 0x04, 0x1f, 0x10, 0x1e, 0x10, 0x1f}, /* È */
1152 [XF_EACUTE] = { 0x02, 0x04, 0x1f, 0x10, 0x1c, 0x10, 0x1f}, /* É */
1153 [XF_ECIRCUMFLEX] = { 0x04, 0x0a, 0x1f, 0x10, 0x1c, 0x10, 0x1f}, /* Ê */
1154 [XF_EDIERESIS] = { 0x0a, 0x00, 0x1f, 0x10, 0x1c, 0x10, 0x1f}, /* Ë */
1155 [XF_IGRAVE] = { 0x08, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e}, /* Ì */
1156 [XF_IACUTE] = { 0x02, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e}, /* Í */
1157 [XF_ICIRCUMFLEX] = { 0x04, 0x0a, 0x0e, 0x04, 0x04, 0x04, 0x0e}, /* Î */
1158 [XF_IDIERESIS] = { 0x0a, 0x00, 0x0e, 0x04, 0x04, 0x04, 0x0e}, /* Ï */
1159 [XF_ETH] = { 0x0c, 0x0a, 0x09, 0x1d, 0x09, 0x0a, 0x0c}, /* Ð */
1160 [XF_NTILDE] = { 0x0d, 0x12, 0x00, 0x19, 0x15, 0x13, 0x11}, /* Ñ */
1161 [XF_OGRAVE] = { 0x08, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e}, /* Ò */
1162 [XF_OACUTE] = { 0x02, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e}, /* Ó */
1163 [XF_OCIRCUMFLEX] = { 0x04, 0x0a, 0x0e, 0x11, 0x11, 0x11, 0x0e}, /* Ô */
1164 [XF_OTILDE] = { 0x0d, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e}, /* Õ */
1165 [XF_ODIERESIS] = { 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e}, /* Ö */
1166 [XF_OSTROKE] = { 0x01, 0x0e, 0x13, 0x15, 0x19, 0x0e, 0x10}, /* Ø */
1167 [XF_UGRAVE] = { 0x08, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e}, /* Ù */
1168 [XF_UACUTE] = { 0x02, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e}, /* Ú */
1169 [XF_UCIRCUMFLEX] = { 0x04, 0x0a, 0x11, 0x11, 0x11, 0x11, 0x0e}, /* Û */
1170 [XF_UDIERESIS] = { 0x0a, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0e}, /* Ü */
1171 [XF_YACUTE] = { 0x02, 0x04, 0x11, 0x11, 0x0a, 0x04, 0x04}, /* Ý */
1172 [XF_aGRAVE] = { 0x08, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f}, /* à */
1173 [XF_aACUTE] = { 0x02, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f}, /* á */
1174 [XF_aCIRCUMFLEX] = { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f}, /* â */
1175 [XF_aTILDE] = { 0x0d, 0x12, 0x0e, 0x01, 0x0f, 0x11, 0x0f}, /* ã */
1176 [XF_aDIERESIS] = { 0x0a, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f}, /* ä */
1177 [XF_aRING] = { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f}, /* å */
1178 [XF_aeLIGATURE] = { 0x00, 0x00, 0x1a, 0x05, 0x0f, 0x14, 0x0f}, /* æ */
1179 [XF_cCEDILLA] = { 0x00, 0x0f, 0x10, 0x10, 0x0f, 0x02, 0x04}, /* ç */
1180 [XF_eGRAVE] = { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e}, /* è */
1181 [XF_eACUTE] = { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e}, /* é */
1182 [XF_eCIRCUMFLEX] = { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x10, 0x0e}, /* ê */
1183 [XF_eDIERESIS] = { 0x0a, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e}, /* ë */
1184 [XF_iGRAVE] = { 0x08, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e}, /* ì */
1185 [XF_iACUTE] = { 0x02, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e}, /* í */
1186 [XF_iCIRCUMFLEX] = { 0x04, 0x0a, 0x00, 0x0c, 0x04, 0x04, 0x0e}, /* î */
1187 [XF_iDIERESIS] = { 0x0a, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x0e}, /* ï */
1188 [XF_nTILDE] = { 0x0d, 0x12, 0x00, 0x16, 0x19, 0x11, 0x11}, /* ñ */
1189 [XF_oGRAVE] = { 0x08, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e}, /* ò */
1190 [XF_oACUTE] = { 0x02, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e}, /* ó */
1191 [XF_oCIRCUMFLEX] = { 0x04, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e}, /* ô */
1192 [XF_oTILDE] = { 0x0d, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e}, /* õ */
1193 [XF_oDIERESIS] = { 0x00, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e}, /* ö */
1194 [XF_DIVISION] = { 0x00, 0x04, 0x00, 0x1f, 0x00, 0x04, 0x00}, /* ÷ */
1195 [XF_oSLASH] = { 0x00, 0x02, 0x0e, 0x15, 0x15, 0x0e, 0x08}, /* ø */
1196 [XF_uGRAVE] = { 0x08, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d}, /* ù */
1197 [XF_uACUTE] = { 0x02, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d}, /* ú */
1198 [XF_uCIRCUMFLEX] = { 0x04, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d}, /* û */
1199 [XF_uDIERESIS] = { 0x00, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d}, /* ü */
1200 [XF_yACUTE] = { 0x02, 0x04, 0x11, 0x11, 0x0f, 0x01, 0x0e}, /* ý */
1201 [XF_yDIERESIS] = { 0x0a, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x0e}, /* ÿ */
1202 /* Latin extended A */
1203 [XF_aBREVE] = { 0x09, 0x06, 0x0e, 0x01, 0x0f, 0x11, 0x0f},
1204 [XF_aOGONEK] = { 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x02, 0x03},
1205 [XF_cACUTE] = { 0x02, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f},
1206 [XF_cCARON] = { 0x0a, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f},
1207 [XF_dCARON] = { 0x05, 0x05, 0x0c, 0x14, 0x14, 0x14, 0x0c},
1208 [XF_dSTROKE] = { 0x02, 0x0f, 0x02, 0x0e, 0x12, 0x12, 0x0e},
1209 [XF_eOGONEK] = { 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x04, 0x06},
1210 [XF_eCARON] = { 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e},
1211 [XF_GBREVE] = { 0x1f, 0x00, 0x0e, 0x10, 0x17, 0x11, 0x0e},
1212 [XF_gBREVE] = { 0x1f, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e},
1213 [XF_IDOT] = { 0x04, 0x00, 0x0e, 0x04, 0x04, 0x04, 0x0e},
1214 [XF_DOTLESSi] = { 0x00, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e},
1215 [XF_LSTROKE] = { 0x10, 0x10, 0x14, 0x18, 0x10, 0x10, 0x1f},
1216 [XF_lSTROKE] = { 0x0c, 0x04, 0x06, 0x0c, 0x04, 0x04, 0x0e},
1217 [XF_nACUTE] = { 0x02, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11},
1218 [XF_nCARON] = { 0x0a, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11},
1219 [XF_ODBLACUTE] = { 0x09, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e},
1220 [XF_oDBLACUTE] = { 0x09, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e},
1221 [XF_RCARON] = { 0x0a, 0x04, 0x1e, 0x11, 0x1e, 0x12, 0x11},
1222 [XF_rCARON] = { 0x0a, 0x04, 0x0b, 0x0c, 0x08, 0x08, 0x08},
1223 [XF_sACUTE] = { 0x02, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e},
1224 [XF_SCEDILLA] = { 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04, 0x0c},
1225 [XF_sCEDILLA] = { 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04},
1226 [XF_sCARON] = { 0x0a, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e},
1227 [XF_tCEDILLA] = { 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03, 0x06},
1228 [XF_tCARON] = { 0x09, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x06},
1229 [XF_uRING] = { 0x04, 0x0a, 0x04, 0x11, 0x11, 0x13, 0x0d},
1230 [XF_UDBLACUTE] = { 0x05, 0x0a, 0x11, 0x11, 0x11, 0x11, 0x0e},
1231 [XF_uDBLACUTE] = { 0x09, 0x12, 0x00, 0x11, 0x11, 0x13, 0x0d},
1232 [XF_zACUTE] = { 0x02, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f},
1233 [XF_zDOT] = { 0x04, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f},
1234 [XF_zCARON] = { 0x0a, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f},
1235 /* Greek */
1236 [XF_GR_DELTA] = { 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x11, 0x1f},
1237 [XF_GR_THETA] = { 0x0e, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x0e},
1238 [XF_GR_LAMBDA] = { 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x11, 0x11},
1239 [XF_GR_XI] = { 0x1f, 0x11, 0x00, 0x0e, 0x00, 0x11, 0x1f},
1240 [XF_GR_PSI] = { 0x15, 0x15, 0x15, 0x15, 0x0e, 0x04, 0x04},
1241 [XF_GR_alpha] = { 0x00, 0x00, 0x09, 0x15, 0x12, 0x12, 0x0d},
1242 [XF_GR_alphaTONOS] = { 0x02, 0x04, 0x09, 0x15, 0x12, 0x12, 0x0d},
1243 [XF_GR_gamma] = { 0x00, 0x11, 0x0a, 0x0a, 0x04, 0x04, 0x08},
1244 [XF_GR_epsilon] = { 0x00, 0x00, 0x0f, 0x10, 0x0e, 0x10, 0x0f},
1245 [XF_GR_epsilonTONOS] = { 0x02, 0x04, 0x0f, 0x10, 0x0e, 0x10, 0x0f},
1246 [XF_GR_zeta] = { 0x1e, 0x08, 0x10, 0x10, 0x0e, 0x01, 0x06},
1247 [XF_GR_eta] = { 0x00, 0x16, 0x19, 0x11, 0x11, 0x11, 0x01},
1248 [XF_GR_etaTONOS] = { 0x02, 0x04, 0x16, 0x19, 0x11, 0x11, 0x01},
1249 [XF_GR_iota] = { 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x02},
1250 [XF_GR_lambda] = { 0x88, 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x11},
1251 [XF_GR_xi] = { 0x0c, 0x10, 0x0c, 0x10, 0x0e, 0x01, 0x06},
1252 [XF_GR_rho] = { 0x00, 0x0e, 0x11, 0x11, 0x19, 0x16, 0x10},
1253 [XF_GR_FINALsigma] = { 0x00, 0x0e, 0x10, 0x10, 0x0e, 0x01, 0x06},
1254 [XF_GR_sigma] = { 0x00, 0x00, 0x0f, 0x14, 0x12, 0x11, 0x0e},
1255 [XF_GR_upsilon] = { 0x00, 0x00, 0x11, 0x09, 0x09, 0x09, 0x06},
1256 [XF_GR_upsilonTONOS] = { 0x02, 0x04, 0x11, 0x09, 0x09, 0x09, 0x06},
1257 [XF_GR_chi] = { 0x00, 0x12, 0x0a, 0x04, 0x04, 0x0a, 0x09},
1258 [XF_GR_psi] = { 0x00, 0x15, 0x15, 0x15, 0x0e, 0x04, 0x04},
1259 [XF_GR_omega] = { 0x00, 0x00, 0x0a, 0x11, 0x15, 0x15, 0x0a},
1260 [XF_GR_omegaTONOS] = { 0x02, 0x04, 0x0a, 0x11, 0x15, 0x15, 0x0a},
1261 /* Cyrillic */
1262 [XF_CYR_BE] = { 0x1f, 0x10, 0x10, 0x1e, 0x11, 0x11, 0x1e},
1263 [XF_CYR_GHE] = { 0x1f, 0x11, 0x10, 0x10, 0x10, 0x10, 0x10},
1264 [XF_CYR_DE] = { 0x07, 0x09, 0x09, 0x09, 0x09, 0x1f, 0x11},
1265 [XF_CYR_ZHE] = { 0x15, 0x15, 0x0e, 0x04, 0x0e, 0x15, 0x15},
1266 [XF_CYR_ZE] = { 0x0e, 0x11, 0x01, 0x0e, 0x01, 0x11, 0x0e},
1267 [XF_CYR_I] = { 0x11, 0x11, 0x13, 0x15, 0x19, 0x11, 0x11},
1268 [XF_CYR_SHORTI] = { 0x0a, 0x04, 0x11, 0x13, 0x15, 0x19, 0x11},
1269 [XF_CYR_EL] = { 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x11},
1270 [XF_CYR_PE] = { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11},
1271 [XF_CYR_TSE] = { 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f, 0x01},
1272 [XF_CYR_CHE] = { 0x11, 0x11, 0x11, 0x0f, 0x01, 0x01, 0x01},
1273 [XF_CYR_SHA] = { 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x1f},
1274 [XF_CYR_SHCHA] = { 0x15, 0x15, 0x15, 0x15, 0x15, 0x1f, 0x01},
1275 [XF_CYR_HARD] = { 0x18, 0x08, 0x0e, 0x09, 0x09, 0x09, 0x0e},
1276 [XF_CYR_YERU] = { 0x11, 0x11, 0x19, 0x15, 0x15, 0x15, 0x19},
1277 [XF_CYR_E] = { 0x0e, 0x11, 0x01, 0x07, 0x01, 0x11, 0x0e},
1278 [XF_CYR_YU] = { 0x12, 0x15, 0x15, 0x1d, 0x15, 0x15, 0x12},
1279 [XF_CYR_YA] = { 0x0f, 0x11, 0x11, 0x0f, 0x05, 0x09, 0x11},
1280 [XF_CYR_be] = { 0x0f, 0x10, 0x0e, 0x11, 0x11, 0x11, 0x0e},
1281 [XF_CYR_ve] = { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x11, 0x1e},
1282 [XF_CYR_ghe] = { 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10},
1283 [XF_CYR_de] = { 0x00, 0x00, 0x06, 0x0a, 0x0a, 0x1f, 0x11},
1284 [XF_CYR_zhe] = { 0x00, 0x00, 0x15, 0x0e, 0x04, 0x0e, 0x15},
1285 [XF_CYR_ze] = { 0x00, 0x00, 0x1e, 0x01, 0x0e, 0x01, 0x1e},
1286 [XF_CYR_i] = { 0x00, 0x00, 0x11, 0x13, 0x15, 0x19, 0x11},
1287 [XF_CYR_SHORTi] = { 0x0a, 0x04, 0x00, 0x11, 0x13, 0x15, 0x19},
1288 [XF_CYR_ka] = { 0x00, 0x00, 0x11, 0x12, 0x1c, 0x12, 0x11},
1289 [XF_CYR_el] = { 0x00, 0x00, 0x0f, 0x09, 0x09, 0x09, 0x11},
1290 [XF_CYR_em] = { 0x00, 0x00, 0x11, 0x1b, 0x15, 0x11, 0x11},
1291 [XF_CYR_en] = { 0x00, 0x00, 0x11, 0x11, 0x1f, 0x11, 0x11},
1292 [XF_CYR_pe] = { 0x00, 0x00, 0x1f, 0x11, 0x11, 0x11, 0x11},
1293 [XF_CYR_te] = { 0x00, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x02},
1294 [XF_CYR_tse] = { 0x00, 0x00, 0x11, 0x11, 0x11, 0x1f, 0x01},
1295 [XF_CYR_che] = { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x01},
1296 [XF_CYR_sha] = { 0x00, 0x00, 0x15, 0x15, 0x15, 0x15, 0x1f},
1297 [XF_CYR_shcha] = { 0x00, 0x00, 0x15, 0x15, 0x15, 0x1f, 0x01},
1298 [XF_CYR_hard] = { 0x00, 0x00, 0x18, 0x0e, 0x09, 0x09, 0x0e},
1299 [XF_CYR_yeru] = { 0x00, 0x00, 0x11, 0x19, 0x15, 0x15, 0x19},
1300 [XF_CYR_soft] = { 0x00, 0x00, 0x08, 0x0e, 0x09, 0x09, 0x0e},
1301 [XF_CYR_e] = { 0x00, 0x00, 0x0e, 0x11, 0x03, 0x11, 0x0e},
1302 [XF_CYR_yu] = { 0x00, 0x00, 0x12, 0x15, 0x1d, 0x15, 0x12},
1303 [XF_CYR_ya] = { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x09, 0x11},
1304#endif /* !BOOTLOADER */
1305};
1306
1307void lcd_charset_init(void)
1308{
1309 if (is_new_player())
1310 {
1311 lcd_pattern_count = 8;
1312 xchar_info = xchar_info_newlcd;
1313 xchar_info_size = sizeof(xchar_info_newlcd)/sizeof(struct xchar_info);
1314 }
1315 else /* old lcd */
1316 {
1317 lcd_pattern_count = 4;
1318 xchar_info = xchar_info_oldlcd;
1319 xchar_info_size = sizeof(xchar_info_oldlcd)/sizeof(struct xchar_info);
1320 }
1321}
diff --git a/firmware/drivers/lcd-scroll.c b/firmware/drivers/lcd-scroll.c
index 0e17303bd3..7916556dfb 100644
--- a/firmware/drivers/lcd-scroll.c
+++ b/firmware/drivers/lcd-scroll.c
@@ -42,10 +42,6 @@ struct scroll_screen_info LCDFN(scroll_info) =
42#ifdef HAVE_LCD_BITMAP 42#ifdef HAVE_LCD_BITMAP
43 .step = 6, 43 .step = 6,
44#endif 44#endif
45#ifdef HAVE_LCD_CHARCELLS
46 .jump_scroll_delay = HZ/4,
47 .jump_scroll = 0,
48#endif
49}; 45};
50 46
51 47
@@ -121,17 +117,6 @@ void LCDFN(bidir_scroll)(int percent)
121 LCDFN(scroll_info).bidir_limit = percent; 117 LCDFN(scroll_info).bidir_limit = percent;
122} 118}
123 119
124#ifdef HAVE_LCD_CHARCELLS
125void LCDFN(jump_scroll)(int mode) /* 0=off, 1=once, ..., JUMP_SCROLL_ALWAYS */
126{
127 LCDFN(scroll_info).jump_scroll = mode;
128}
129
130void LCDFN(jump_scroll_delay)(int ms)
131{
132 LCDFN(scroll_info).jump_scroll_delay = ms / (HZ / 10);
133}
134#endif
135 120
136/* This renders the scrolling line described by s immediatly. 121/* This renders the scrolling line described by s immediatly.
137 * This can be called to update a scrolling line if the text has changed 122 * This can be called to update a scrolling line if the text has changed
@@ -201,7 +186,7 @@ bool LCDFN(scroll_now)(struct scrollinfo *s)
201 return ended; 186 return ended;
202} 187}
203 188
204#if !defined(BOOTLOADER) || defined(HAVE_REMOTE_LCD) || defined(HAVE_LCD_CHARCELLS) 189#if !defined(BOOTLOADER) || defined(HAVE_REMOTE_LCD)
205static void LCDFN(scroll_worker)(void) 190static void LCDFN(scroll_worker)(void)
206{ 191{
207 int index; 192 int index;
diff --git a/firmware/export/lcd-charcell.h b/firmware/export/lcd-charcell.h
deleted file mode 100644
index 8dace07d8e..0000000000
--- a/firmware/export/lcd-charcell.h
+++ /dev/null
@@ -1,68 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Jens Arnold
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include "config.h"
23
24/* target dependent - to be adjusted for other charcell targets */
25#define HW_PATTERN_SIZE 7 /* number of bytes per pattern */
26#define MAX_HW_PATTERNS 8 /* max. number of user-definable hw patterns */
27
28struct cursor_info {
29 unsigned char hw_char;
30 unsigned char subst_char;
31 bool enabled;
32 bool visible;
33 int x;
34 int y;
35 int divider;
36 int downcount;
37};
38
39/* map unicode characters to hardware or extended lcd characters */
40struct xchar_info {
41 unsigned short ucs;
42 unsigned short glyph;
43 /* 0x0000..0x7fff: fixed extended characters
44 * 0x8000..0xffff: variable extended characters
45 * Dontcare if priority == 0 */
46 unsigned char priority;
47 unsigned char hw_char; /* direct or substitute */
48};
49
50/* track usage of user-definable characters */
51struct pattern_info {
52 short count;
53 unsigned short glyph;
54 unsigned char priority;
55 unsigned char pattern[HW_PATTERN_SIZE];
56};
57
58extern int lcd_pattern_count; /* actual number of user-definable hw patterns */
59
60extern unsigned char lcd_charbuffer[LCD_HEIGHT][LCD_WIDTH];
61extern struct pattern_info lcd_patterns[MAX_HW_PATTERNS];
62extern struct cursor_info lcd_cursor;
63
64extern const struct xchar_info *xchar_info;
65extern int xchar_info_size; /* number of entries */
66extern const unsigned char xfont_fixed[][HW_PATTERN_SIZE];
67
68void lcd_charset_init(void);
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 80ef45a573..0975df4c79 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -144,9 +144,6 @@ typedef unsigned long fb_data;
144#endif 144#endif
145#define FB_DATA_SZ 4 145#define FB_DATA_SZ 4
146#endif /* LCD_DEPTH */ 146#endif /* LCD_DEPTH */
147
148#else /* LCD_CHARCELLS */
149typedef unsigned char fb_data;
150#endif 147#endif
151 148
152#if defined(HAVE_LCD_MODES) 149#if defined(HAVE_LCD_MODES)
@@ -226,43 +223,6 @@ extern void lcd_remote_update_rect(int x, int y, int width, int height);
226#endif /* HAVE_REMOTE_LCD */ 223#endif /* HAVE_REMOTE_LCD */
227#endif /* HAVE_LCD_BITMAP */ 224#endif /* HAVE_LCD_BITMAP */
228 225
229#ifdef HAVE_LCD_CHARCELLS
230
231/* Icon definitions for lcd_icon() */
232enum
233{
234 ICON_BATTERY = 0,
235 ICON_BATTERY_1,
236 ICON_BATTERY_2,
237 ICON_BATTERY_3,
238 ICON_USB,
239 ICON_PLAY,
240 ICON_RECORD,
241 ICON_PAUSE,
242 ICON_AUDIO,
243 ICON_REPEAT,
244 ICON_1,
245 ICON_VOLUME,
246 ICON_VOLUME_1,
247 ICON_VOLUME_2,
248 ICON_VOLUME_3,
249 ICON_VOLUME_4,
250 ICON_VOLUME_5,
251 ICON_PARAM
252};
253
254void lcd_icon(int icon, bool enable);
255void lcd_double_height(bool on);
256void lcd_define_pattern(unsigned long ucs, const char *pattern);
257unsigned long lcd_get_locked_pattern(void);
258void lcd_unlock_pattern(unsigned long ucs);
259void lcd_put_cursor(int x, int y, unsigned long cursor_ucs);
260void lcd_remove_cursor(void);
261#define JUMP_SCROLL_ALWAYS 5
262extern void lcd_jump_scroll(int mode); /* 0=off, 1=once, ..., ALWAYS */
263extern void lcd_jump_scroll_delay(int ms);
264#endif /* HAVE_LCD_CHARCELLS */
265
266/* Bitmap formats */ 226/* Bitmap formats */
267enum 227enum
268{ 228{
diff --git a/firmware/export/scroll_engine.h b/firmware/export/scroll_engine.h
index 1326812265..051e367506 100644
--- a/firmware/export/scroll_engine.h
+++ b/firmware/export/scroll_engine.h
@@ -95,10 +95,6 @@ struct scroll_screen_info
95 long ticks; /* # of ticks between updates*/ 95 long ticks; /* # of ticks between updates*/
96 long delay; /* ticks delay before start */ 96 long delay; /* ticks delay before start */
97 int bidir_limit; /* percent */ 97 int bidir_limit; /* percent */
98#ifdef HAVE_LCD_CHARCELLS
99 long jump_scroll_delay; /* delay between jump scroll jumps */
100 int jump_scroll; /* 0=off, 1=once, ..., JUMP_SCROLL_ALWAYS */
101#endif
102#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD) 98#if defined(HAVE_LCD_BITMAP) || defined(HAVE_REMOTE_LCD)
103 int step; /* pixels per scroll step */ 99 int step; /* pixels per scroll step */
104#endif 100#endif
diff --git a/firmware/panic.c b/firmware/panic.c
index 90e727d5e4..358be42924 100644
--- a/firmware/panic.c
+++ b/firmware/panic.c
@@ -86,11 +86,7 @@ void panicf( const char *fmt, ...)
86 86
87 lcd_set_viewport(NULL); 87 lcd_set_viewport(NULL);
88 88
89#ifdef HAVE_LCD_CHARCELLS 89#if defined(HAVE_LCD_BITMAP)
90 lcd_double_height(false);
91 lcd_puts(0, 0, "*PANIC*");
92 lcd_puts(0, 1, panic_buf);
93#elif defined(HAVE_LCD_BITMAP)
94 int y = 1; 90 int y = 1;
95 91
96#if LCD_DEPTH > 1 92#if LCD_DEPTH > 1
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index aacaa496e7..b584345a9a 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -185,12 +185,12 @@ static void scroll_thread(void)
185 while (1) 185 while (1)
186 { 186 {
187 sleep(lcd_scroll_info.ticks); 187 sleep(lcd_scroll_info.ticks);
188#if !defined(BOOTLOADER) || defined(HAVE_LCD_CHARCELLS) 188#if !defined(BOOTLOADER)
189#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) 189#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
190 if (lcd_active()) 190 if (lcd_active())
191#endif 191#endif
192 lcd_scroll_worker(); 192 lcd_scroll_worker();
193#endif /*!BOOTLOADER\HAVE_LCD_CHARCELLS*/ 193#endif /* !BOOTLOADER */
194 } 194 }
195} 195}
196#endif /* HAVE_REMOTE_LCD */ 196#endif /* HAVE_REMOTE_LCD */
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c
index 8c716bc7b9..beb84ee77f 100644
--- a/firmware/target/hosted/sdl/button-sdl.c
+++ b/firmware/target/hosted/sdl/button-sdl.c
@@ -22,7 +22,6 @@
22#include <math.h> 22#include <math.h>
23#include <stdlib.h> /* EXIT_SUCCESS */ 23#include <stdlib.h> /* EXIT_SUCCESS */
24#include "sim-ui-defines.h" 24#include "sim-ui-defines.h"
25#include "lcd-charcells.h"
26#ifdef HAVE_REMOTE_LCD 25#ifdef HAVE_REMOTE_LCD
27#include "lcd-remote.h" 26#include "lcd-remote.h"
28#endif 27#endif
diff --git a/firmware/target/hosted/sdl/lcd-charcells.c b/firmware/target/hosted/sdl/lcd-charcells.c
deleted file mode 100644
index 1020e7269a..0000000000
--- a/firmware/target/hosted/sdl/lcd-charcells.c
+++ /dev/null
@@ -1,206 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dan Everton
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#include <string.h>
23#include <unistd.h>
24#include <fcntl.h>
25#include "system.h"
26#include "debug.h"
27#include "lcd.h"
28#include "lcd-charcell.h"
29#include "screendump.h"
30#include "general.h"
31
32#include "lcd-playersim.h"
33#include "sim-ui-defines.h"
34#include "lcd-sdl.h"
35
36/* can't include file.h here */
37#ifndef MAX_PATH
38#define MAX_PATH 260
39#endif
40
41/* extern functions, needed for screendump() */
42extern int sim_creat(const char *name, mode_t mode);
43
44SDL_Surface* lcd_surface;
45
46SDL_Color lcd_bl_color_dark = {RED_CMP(LCD_BL_DARKCOLOR),
47 GREEN_CMP(LCD_BL_DARKCOLOR),
48 BLUE_CMP(LCD_BL_DARKCOLOR), 0};
49SDL_Color lcd_bl_color_bright = {RED_CMP(LCD_BL_BRIGHTCOLOR),
50 GREEN_CMP(LCD_BL_BRIGHTCOLOR),
51 BLUE_CMP(LCD_BL_BRIGHTCOLOR), 0};
52SDL_Color lcd_color_dark = {RED_CMP(LCD_DARKCOLOR),
53 GREEN_CMP(LCD_DARKCOLOR),
54 BLUE_CMP(LCD_DARKCOLOR), 0};
55SDL_Color lcd_color_bright = {RED_CMP(LCD_BRIGHTCOLOR),
56 GREEN_CMP(LCD_BRIGHTCOLOR),
57 BLUE_CMP(LCD_BRIGHTCOLOR), 0};
58
59
60static unsigned long get_lcd_pixel(int x, int y)
61{
62 return sim_lcd_framebuffer[y][x];
63}
64
65void sim_lcd_update_rect(int x_start, int y_start, int width, int height)
66{
67 sdl_update_rect(lcd_surface, x_start, y_start, width, height,
68 SIM_LCD_WIDTH, SIM_LCD_HEIGHT, get_lcd_pixel);
69 sdl_gui_update(lcd_surface, x_start, y_start, width, height,
70 SIM_LCD_WIDTH, SIM_LCD_HEIGHT,
71 background ? UI_LCD_POSX : 0, background ? UI_LCD_POSY : 0);
72}
73
74void lcd_update(void)
75{
76 int x, y;
77
78 for (y = 0; y < lcd_pattern_count; y++)
79 if (lcd_patterns[y].count > 0)
80 sim_lcd_define_pattern(y, lcd_patterns[y].pattern);
81
82 for (y = 0; y < LCD_HEIGHT; y++)
83 for (x = 0; x < LCD_WIDTH; x++)
84 lcd_print_char(x, y, lcd_charbuffer[y][x]);
85
86 if (lcd_cursor.visible)
87 lcd_print_char(lcd_cursor.x, lcd_cursor.y, lcd_cursor.hw_char);
88
89 sim_lcd_update_rect(0, ICON_HEIGHT, SIM_LCD_WIDTH,
90 LCD_HEIGHT*CHAR_HEIGHT*CHAR_PIXEL);
91}
92
93#ifdef HAVE_BACKLIGHT
94void sim_backlight(int value)
95{
96 if (value > 0) {
97 sdl_set_gradient(lcd_surface, &lcd_bl_color_bright,
98 &lcd_bl_color_dark, 0, (1<<LCD_DEPTH));
99 } else {
100 sdl_set_gradient(lcd_surface, &lcd_color_bright,
101 &lcd_color_dark, 0, (1<<LCD_DEPTH));
102 }
103
104 sim_lcd_update_rect(0, 0, SIM_LCD_WIDTH, SIM_LCD_HEIGHT);
105}
106#endif
107
108/* initialise simulator lcd driver */
109void lcd_init_device(void)
110{
111 lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
112 SIM_LCD_WIDTH * display_zoom,
113 SIM_LCD_HEIGHT * display_zoom,
114 8, 0, 0, 0, 0);
115
116 sdl_set_gradient(lcd_surface, &lcd_bl_color_bright,
117 &lcd_bl_color_dark, 0, (1<<LCD_DEPTH));
118}
119
120#define BMP_COMPRESSION 0 /* BI_RGB */
121#define BMP_NUMCOLORS (1 << LCD_DEPTH)
122#define BMP_BPP 1
123#define BMP_LINESIZE (((SIM_LCD_WIDTH + 31) / 32) * 4)
124
125#define BMP_HEADERSIZE (54 + 4 * BMP_NUMCOLORS)
126#define BMP_DATASIZE (BMP_LINESIZE * SIM_LCD_HEIGHT)
127#define BMP_TOTALSIZE (BMP_HEADERSIZE + BMP_DATASIZE)
128
129#define LE16_CONST(x) (x)&0xff, ((x)>>8)&0xff
130#define LE32_CONST(x) (x)&0xff, ((x)>>8)&0xff, ((x)>>16)&0xff, ((x)>>24)&0xff
131
132static const unsigned char bmpheader[] =
133{
134 0x42, 0x4d, /* 'BM' */
135 LE32_CONST(BMP_TOTALSIZE), /* Total file size */
136 0x00, 0x00, 0x00, 0x00, /* Reserved */
137 LE32_CONST(BMP_HEADERSIZE), /* Offset to start of pixel data */
138
139 0x28, 0x00, 0x00, 0x00, /* Size of (2nd) header */
140 LE32_CONST(SIM_LCD_WIDTH), /* Width in pixels */
141 LE32_CONST(SIM_LCD_HEIGHT), /* Height in pixels */
142 0x01, 0x00, /* Number of planes (always 1) */
143 LE16_CONST(BMP_BPP), /* Bits per pixel 1/4/8/16/24 */
144 LE32_CONST(BMP_COMPRESSION),/* Compression mode */
145 LE32_CONST(BMP_DATASIZE), /* Size of bitmap data */
146 0xc4, 0x0e, 0x00, 0x00, /* Horizontal resolution (pixels/meter) */
147 0xc4, 0x0e, 0x00, 0x00, /* Vertical resolution (pixels/meter) */
148 LE32_CONST(BMP_NUMCOLORS), /* Number of used colours */
149 LE32_CONST(BMP_NUMCOLORS), /* Number of important colours */
150
151 BMP_COLOR(LCD_BL_BRIGHTCOLOR),
152 BMP_COLOR(LCD_BL_DARKCOLOR)
153};
154
155void screen_dump(void)
156{
157 int fd;
158 char filename[MAX_PATH];
159 int x, y;
160 static unsigned char line[BMP_LINESIZE];
161
162 create_numbered_filename(filename, "", "dump_", ".bmp", 4
163 IF_CNFN_NUM_(, NULL));
164 DEBUGF("screen_dump\n");
165
166 fd = sim_creat(filename, 0666);
167 if (fd < 0)
168 return;
169
170 if(write(fd, bmpheader, sizeof(bmpheader)) != sizeof(bmpheader))
171 {
172 close(fd);
173 return;
174 }
175 SDL_LockSurface(lcd_surface);
176
177 /* BMP image goes bottom up */
178 for (y = SIM_LCD_HEIGHT - 1; y >= 0; y--)
179 {
180 Uint8 *src = (Uint8 *)lcd_surface->pixels
181 + y * SIM_LCD_WIDTH * (int)display_zoom * (int)display_zoom;
182 unsigned char *dst = line;
183 unsigned dst_mask = 0x80;
184
185 memset(line, 0, sizeof(line));
186 for (x = SIM_LCD_WIDTH; x > 0; x--)
187 {
188 if (*src)
189 *dst |= dst_mask;
190 src += (int)display_zoom;
191 dst_mask >>= 1;
192 if (dst_mask == 0)
193 {
194 dst++;
195 dst_mask = 0x80;
196 }
197 }
198 if(write(fd, line, sizeof(line)) != sizeof(line))
199 {
200 close(fd);
201 return;
202 }
203 }
204 SDL_UnlockSurface(lcd_surface);
205 close(fd);
206}
diff --git a/firmware/target/hosted/sdl/lcd-charcells.h b/firmware/target/hosted/sdl/lcd-charcells.h
deleted file mode 100644
index 890594f766..0000000000
--- a/firmware/target/hosted/sdl/lcd-charcells.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dan Everton
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef __LCDCHARCELL_H__
23#define __LCDCHARCELL_H__
24
25#include "lcd.h"
26#include "SDL.h"
27
28#ifdef HAVE_LCD_CHARCELLS
29void sim_lcd_init(void);
30void screen_dump(void);
31#endif
32
33#endif /* #ifndef __LCDCHARCELL_H__ */
34
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c
index 37580ede7d..6aaab6e8a5 100644
--- a/firmware/target/hosted/sdl/system-sdl.c
+++ b/firmware/target/hosted/sdl/system-sdl.c
@@ -35,8 +35,6 @@
35#include "lcd-sdl.h" 35#include "lcd-sdl.h"
36#ifdef HAVE_LCD_BITMAP 36#ifdef HAVE_LCD_BITMAP
37#include "lcd-bitmap.h" 37#include "lcd-bitmap.h"
38#elif defined(HAVE_LCD_CHARCELLS)
39#include "lcd-charcells.h"
40#endif 38#endif
41#ifdef HAVE_REMOTE_LCD 39#ifdef HAVE_REMOTE_LCD
42#include "lcd-remote-bitmap.h" 40#include "lcd-remote-bitmap.h"
diff --git a/manual/advanced_topics/main.tex b/manual/advanced_topics/main.tex
index 786c109772..00b1688e11 100755
--- a/manual/advanced_topics/main.tex
+++ b/manual/advanced_topics/main.tex
@@ -168,32 +168,30 @@ file find the instructions on the Rockbox website:
168 the \fname{/.rockbox/backdrops} directory. 168 the \fname{/.rockbox/backdrops} directory.
169}% 169}%
170 170
171\nopt{lcd_charcell}{ 171\subsection{UI Viewport}
172 \subsection{UI Viewport} 172By default, the UI is drawn on the whole screen. This can be changed so that
173 By default, the UI is drawn on the whole screen. This can be changed so that 173the UI is confined to a specific area of the screen, by use of a UI
174 the UI is confined to a specific area of the screen, by use of a UI 174viewport. This is done by adding the following line to the
175 viewport. This is done by adding the following line to the 175\fname{.cfg} file for a theme:\\*
176 \fname{.cfg} file for a theme:\\* 176
177 177\nopt{lcd_non-mono}{\config{ui viewport: X,Y,[width],[height],[font]}}
178 \nopt{lcd_non-mono}{\config{ui viewport: X,Y,[width],[height],[font]}} 178\nopt{lcd_color}{\opt{lcd_non-mono}{
179 \config{ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
180\opt{lcd_color}{
181 \config{ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
182\\*
183
184\opt{HAVE_REMOTE_LCD}{
185 The dimensions of the menu that is displayed on the remote control of your
186 \dap\ can be set in the same way. The line to be added to the theme
187 \fname{.cfg} is the following:\\*
188
189 \nopt{lcd_non-mono}{\config{remote ui viewport: X,Y,[width],[height],[font]}}
179 \nopt{lcd_color}{\opt{lcd_non-mono}{ 190 \nopt{lcd_color}{\opt{lcd_non-mono}{
180 \config{ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}} 191 \config{remote ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
181 \opt{lcd_color}{ 192 \opt{lcd_color}{
182 \config{ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}} 193 \config{remote ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
183 \\* 194\\*
184
185 \opt{HAVE_REMOTE_LCD}{
186 The dimensions of the menu that is displayed on the remote control of your
187 \dap\ can be set in the same way. The line to be added to the theme
188 \fname{.cfg} is the following:\\*
189
190 \nopt{lcd_non-mono}{\config{remote ui viewport: X,Y,[width],[height],[font]}}
191 \nopt{lcd_color}{\opt{lcd_non-mono}{
192 \config{remote ui viewport: X,Y,[width],[height],[font],[fgshade],[bgshade]}}}
193 \opt{lcd_color}{
194 \config{remote ui viewport: X,Y,[width],[height],[font],[fgcolour],[bgcolour]}}
195 \\*
196 }
197 195
198 Only the first two parameters \emph{have} to be specified, the others can 196 Only the first two parameters \emph{have} to be specified, the others can
199 be omitted using `$-$' as a placeholder. The syntax is very similar to WPS 197 be omitted using `$-$' as a placeholder. The syntax is very similar to WPS
@@ -202,7 +200,6 @@ file find the instructions on the Rockbox website:
202 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-uivp-syntax.tex}} 200 \nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-uivp-syntax.tex}}
203 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-uivp-syntax.tex}}} 201 \nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-uivp-syntax.tex}}}
204 \opt{lcd_color}{\input{advanced_topics/viewports/colour-uivp-syntax.tex}} 202 \opt{lcd_color}{\input{advanced_topics/viewports/colour-uivp-syntax.tex}}
205}
206 203
207\section{\label{ref:ConfiguringtheWPS}Configuring the Theme} 204\section{\label{ref:ConfiguringtheWPS}Configuring the Theme}
208 205
@@ -265,7 +262,6 @@ are discussed below.
265 } 262 }
266} 263}
267 264
268\nopt{lcd_charcell}{
269\subsubsection{\label{ref:Viewports}Viewports} 265\subsubsection{\label{ref:Viewports}Viewports}
270 266
271By default, a viewport filling the whole screen contains all the elements 267By default, a viewport filling the whole screen contains all the elements
@@ -279,7 +275,7 @@ be defined. A viewport is a rectangular window on the screen%
279\opt{lcd_non-mono}{ with its own foreground/background 275\opt{lcd_non-mono}{ with its own foreground/background
280\opt{lcd_color}{colours}\nopt{lcd_color}{shades}}. 276\opt{lcd_color}{colours}\nopt{lcd_color}{shades}}.
281This window also has variable dimensions. To 277This window also has variable dimensions. To
282define a viewport a line starting \config{{\%V(\dots}} has to be 278define a viewport a line starting \config{{\%V(\dots)}} has to be
283present in the theme file. The full syntax will be explained later in 279present in the theme file. The full syntax will be explained later in
284this section. All elements placed before the 280this section. All elements placed before the
285line defining a viewport are displayed in the default viewport. Elements 281line defining a viewport are displayed in the default viewport. Elements
@@ -293,6 +289,7 @@ cannot be layered \emph{transparently} over one another. Subsequent viewports
293will be drawn over any other viewports already drawn onto that 289will be drawn over any other viewports already drawn onto that
294area of the screen. 290area of the screen.
295 291
292
296\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-vp-syntax.tex}} 293\nopt{lcd_non-mono}{\input{advanced_topics/viewports/mono-vp-syntax.tex}}
297\nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-vp-syntax.tex}}} 294\nopt{lcd_color}{\opt{lcd_non-mono}{\input{advanced_topics/viewports/grayscale-vp-syntax.tex}}}
298\opt{lcd_color}{\input{advanced_topics/viewports/colour-vp-syntax.tex}} 295\opt{lcd_color}{\input{advanced_topics/viewports/colour-vp-syntax.tex}}
@@ -318,11 +315,10 @@ Mode can be the following:
318 the end colour\\} 315 the end colour\\}
319\end{rbtabular} 316\end{rbtabular}
320} 317}
321
322\subsubsection{Conditional Viewports} 318\subsubsection{Conditional Viewports}
323 319
324Any viewport can be displayed either permanently or conditionally. 320Any viewport can be displayed either permanently or conditionally.
325Defining a viewport as \config{{\%V(\dots}} 321Defining a viewport as \config{{\%V(\dots)}}
326will display it permanently. 322will display it permanently.
327 323
328\begin{itemize} 324\begin{itemize}
diff --git a/manual/appendix/wps_tags.tex b/manual/appendix/wps_tags.tex
index 1aec7bae99..1a0661c008 100644
--- a/manual/appendix/wps_tags.tex
+++ b/manual/appendix/wps_tags.tex
@@ -53,61 +53,58 @@ conditionals to show alternate information in preference to assuming.
53These tags, when written with a capital ``I'' (e.g. \config{\%Ia} or \config{\%Ic}), 53These tags, when written with a capital ``I'' (e.g. \config{\%Ia} or \config{\%Ic}),
54show the information for the next song to be played. 54show the information for the next song to be played.
55 55
56\nopt{lcd_charcell}{ 56\section{Viewports}
57 \section{Viewports} 57 \begin{tagmap}
58 \begin{tagmap} 58 \nopt{lcd_non-mono}{%
59 \nopt{lcd_non-mono}{% 59 \config{\%V(x,y,[width],\tabnlindent[height],[font])}
60 \config{\%V(x,y,[width],\tabnlindent[height],[font])} 60 & See section \ref{ref:Viewports}\\}
61 & See section \ref{ref:Viewports}\\} 61
62 62 \nopt{lcd_color}{\opt{lcd_non-mono}{%
63 \nopt{lcd_color}{\opt{lcd_non-mono}{% 63 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline
64 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline 64 \config{\%Vf([fgshade])}\newline
65 \config{\%Vf([fgshade])}\newline 65 \config{\%Vb([bgshade])}
66 \config{\%Vb([bgshade])} 66 & See section \ref{ref:Viewports}\\}}
67 & See section \ref{ref:Viewports}\\}} 67
68 68 \opt{lcd_color}{%
69 \opt{lcd_color}{% 69 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline
70 \config{\%V(x,y,[width],\tabnlindent[height],[font])}\newline 70 \config{\%Vf([fgcolour])}\newline
71 \config{\%Vf([fgcolour])}\newline 71 \config{\%Vb([bgcolour])}\newline
72 \config{\%Vb([bgcolour])}\newline 72 \config{\%Vg(start,end \tabnlindent[,text])}
73 \config{\%Vg(start,end \tabnlindent[,text])} 73 & See section \ref{ref:Viewports}\\}
74 & See section \ref{ref:Viewports}\\} 74
75 75 \opt{lcd_non-mono}{%
76 \opt{lcd_non-mono}{% 76 \config{\%Vs(mode[,param])}
77 \config{\%Vs(mode[,param])} 77 & See section \ref{ref:Viewports}\\}
78 & See section \ref{ref:Viewports}\\} 78 \config{\%Vl('identifier',\newline\dots)} & Preloads a viewport for later
79
80 \config{\%Vl('identifier',\newline\dots)} & Preloads a viewport for later
81 display. `identifier' is a single lowercase letter (a-z) and the `\dots' 79 display. `identifier' is a single lowercase letter (a-z) and the `\dots'
82 parameters use the same logic as the \%V tag explained above.\\ 80 parameters use the same logic as the \%V tag explained above.\\
83 81
84 \config{\%Vd('identifier')} & Display the `identifier' viewport. E.g. 82 \config{\%Vd('identifier')} & Display the `identifier' viewport. E.g.
85 \config{\%?C<\%Vd(a)|\%Vd(b)>} 83 \config{\%?C<\%Vd(a)|\%Vd(b)>}
86 will show viewport `a' if album art is found, and `b' if it isn't.\\ 84 will show viewport `a' if album art is found, and `b' if it isn't.\\
87 85
88 \config{\%Vi('label',\dots)} & 86 \config{\%Vi('label',\dots)} &
89 Declare a Custom UI Viewport. The `\dots' parameters use the same logic as 87 Declare a Custom UI Viewport. The `\dots' parameters use the same logic as
90 the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\ 88 the \config{\%V} tag explained above. See section \ref{ref:Viewports}.\\
91 89
92 \config{\%VI('label')} & Set the Info Viewport to use the viewport called 90 \config{\%VI('label')} & Set the Info Viewport to use the viewport called
93 label, as declared with the previous tag.\\ 91 label, as declared with the previous tag.\\
94 92
95 \config{\%VB} & Draw this viewport on the backdrop layer.\\ 93 \config{\%VB} & Draw this viewport on the backdrop layer.\\
96 \end{tagmap} 94 \end{tagmap}
97 95
98 \section{Additional Fonts} 96\section{Additional Fonts}
99 \begin{tagmap} 97 \begin{tagmap}
100 \config{\%Fl('id',filename)} & See section \ref{ref:multifont}.\\ 98 \config{\%Fl('id',filename)} & See section \ref{ref:multifont}.\\
101 \end{tagmap} 99 \end{tagmap}
102 100
103 \section{Misc Coloring Tags} 101\section{Misc Coloring Tags}
104 \begin{tagmap} 102 \begin{tagmap}
105 \config{\%dr(x,y,width,height,[color1,color2])} & Color a rectangle. \\ 103 \config{\%dr(x,y,width,height,[color1,color2])} & Color a rectangle. \\
106 \end{tagmap} 104 \end{tagmap}
107 width and height can be ``$-$'' to fill the viewport. If no color is 105 width and height can be ``$-$'' to fill the viewport. If no color is
108 specified the viewports foreground color will be used. If two 106 specified the viewports foreground color will be used. If two
109 colors are specified it will do a gradient fill. 107 colors are specified it will do a gradient fill.
110}
111 108
112\section{Power Related Information} 109\section{Power Related Information}
113 \begin{tagmap} 110 \begin{tagmap}
diff --git a/manual/plugins/text_viewer.tex b/manual/plugins/text_viewer.tex
index 60b38e7a7e..fe369d1c90 100644
--- a/manual/plugins/text_viewer.tex
+++ b/manual/plugins/text_viewer.tex
@@ -196,8 +196,6 @@ by using \emph{Open with} from the \emph{Context Menu}
196\item[Viewer Options] Change settings for the current file. 196\item[Viewer Options] Change settings for the current file.
197 \begin{description} 197 \begin{description}
198 \item[Encoding] Set the codepage in the text viewer. 198 \item[Encoding] Set the codepage in the text viewer.
199% ToDo: wrap some of the following settings into a \opt{lcd_bitmap} to exlude
200% ones that don't work on charcell - as soon as the plugin itself does
201 Available settings: 199 Available settings:
202 \setting{ISO-8859-1} (Latin 1). 200 \setting{ISO-8859-1} (Latin 1).
203 \setting{ISO-8859-7} (Greek), 201 \setting{ISO-8859-7} (Greek),
diff --git a/tools/player_unifont.c b/tools/player_unifont.c
deleted file mode 100644
index 693919dbff..0000000000
--- a/tools/player_unifont.c
+++ /dev/null
@@ -1,780 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Jens Arnold
11 * Based on the work of Kjell Ericson
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22
23#include <stdio.h>
24#include <stdlib.h>
25#include <stdbool.h>
26#include <string.h>
27#include "lcd-charcell.h"
28
29#define CHAR_WIDTH 8
30#define CHAR_HEIGHT 8
31#define BITMAP_WIDTH (CHAR_WIDTH*(16+3))
32#define SIZE 2
33
34#define CHAR_BG_STD 0xc0c0c0
35#define CHAR_BG_ALT 0x808080
36#define CHAR_FG_STD 0x000000
37#define CHAR_FG_ALT 0xf00000
38
39static unsigned char font_player_newlcd[256][7] = {
40 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
41 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
42 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
43 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
44 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 04 */
45 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 05 */
46 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 06 */
47 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 07 */
48 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 08 */
49 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 09 */
50 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0a */
51 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0b */
52 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0c */
53 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0d */
54 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0e */
55 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0f */
56 { 0x00, 0x10, 0x1c, 0x1f, 0x1c, 0x10, 0x00 }, /* 10 */
57 { 0x00, 0x01, 0x07, 0x1f, 0x07, 0x01, 0x00 }, /* 11 */
58 { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00 }, /* 12 */
59 { 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x0a }, /* 13 */
60 { 0x0f, 0x1d, 0x1d, 0x0d, 0x05, 0x05, 0x05 }, /* 14 */
61 { 0x07, 0x08, 0x0e, 0x11, 0x0e, 0x02, 0x1c }, /* 15 */
62 { 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00 }, /* 16 */
63 { 0x01, 0x01, 0x05, 0x09, 0x1f, 0x08, 0x04 }, /* 17 */
64 { 0x04, 0x0e, 0x15, 0x04, 0x04, 0x04, 0x04 }, /* 18 */
65 { 0x04, 0x04, 0x04, 0x04, 0x15, 0x0e, 0x04 }, /* 19 */
66 { 0x11, 0x19, 0x1d, 0x1f, 0x1d, 0x19, 0x11 }, /* 1a */
67 { 0x11, 0x13, 0x17, 0x1f, 0x17, 0x13, 0x11 }, /* 1b */
68 { 0x10, 0x14, 0x12, 0x1f, 0x12, 0x14, 0x10 }, /* 1c */
69 { 0x01, 0x05, 0x09, 0x1f, 0x09, 0x05, 0x01 }, /* 1d */
70 { 0x00, 0x1f, 0x0e, 0x0e, 0x04, 0x04, 0x00 }, /* 1e */
71 { 0x00, 0x04, 0x04, 0x0e, 0x0e, 0x1f, 0x00 }, /* 1f */
72 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 20 */
73 { 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x04 }, /* 21 */
74 { 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00 }, /* 22 */
75 { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 23 */
76 { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 24 */
77 { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 25 */
78 { 0x0c, 0x12, 0x14, 0x08, 0x15, 0x12, 0x0d }, /* 26 */
79 { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 27 */
80 { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 28 */
81 { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 29 */
82 { 0x00, 0x04, 0x15, 0x0e, 0x15, 0x04, 0x00 }, /* 2a */
83 { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2b */
84 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 2c */
85 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 2d */
86 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 2e */
87 { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 2f */
88 { 0x0e, 0x11, 0x13, 0x15, 0x19, 0x11, 0x0e }, /* 30 */
89 { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 31 */
90 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 32 */
91 { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 33 */
92 { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 34 */
93 { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 35 */
94 { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 36 */
95 { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 37 */
96 { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 38 */
97 { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 39 */
98 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3a */
99 { 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x04, 0x08 }, /* 3b */
100 { 0x02, 0x04, 0x08, 0x10, 0x08, 0x04, 0x02 }, /* 3c */
101 { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 3d */
102 { 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08 }, /* 3e */
103 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 3f */
104 { 0x0e, 0x11, 0x01, 0x0d, 0x15, 0x15, 0x0e }, /* 40 */
105 { 0x0e, 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 41 */
106 { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 42 */
107 { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 43 */
108 { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 44 */
109 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 45 */
110 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 46 */
111 { 0x0e, 0x11, 0x10, 0x17, 0x11, 0x11, 0x0f }, /* 47 */
112 { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 48 */
113 { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 49 */
114 { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4a */
115 { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4b */
116 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 4c */
117 { 0x11, 0x1b, 0x15, 0x15, 0x11, 0x11, 0x11 }, /* 4d */
118 { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 4e */
119 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 4f */
120 { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 50 */
121 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 51 */
122 { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 52 */
123 { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 53 */
124 { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 54 */
125 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 55 */
126 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 56 */
127 { 0x11, 0x11, 0x11, 0x15, 0x15, 0x15, 0x0a }, /* 57 */
128 { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 58 */
129 { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 59 */
130 { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5a */
131 { 0x0e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0e }, /* 5b */
132 { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 5c */
133 { 0x0e, 0x02, 0x02, 0x02, 0x02, 0x02, 0x0e }, /* 5d */
134 { 0x04, 0x0a, 0x11, 0x00, 0x00, 0x00, 0x00 }, /* 5e */
135 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 5f */
136 { 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, /* 60 */
137 { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 61 */
138 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x1e }, /* 62 */
139 { 0x00, 0x00, 0x0e, 0x10, 0x10, 0x11, 0x0e }, /* 63 */
140 { 0x01, 0x01, 0x0d, 0x13, 0x11, 0x11, 0x0f }, /* 64 */
141 { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 65 */
142 { 0x06, 0x09, 0x08, 0x1c, 0x08, 0x08, 0x08 }, /* 66 */
143 { 0x00, 0x0f, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* 67 */
144 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 68 */
145 { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 69 */
146 { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6a */
147 { 0x10, 0x10, 0x12, 0x14, 0x18, 0x14, 0x12 }, /* 6b */
148 { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 6c */
149 { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x11, 0x11 }, /* 6d */
150 { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6e */
151 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 6f */
152 { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 70 */
153 { 0x00, 0x00, 0x0d, 0x13, 0x0f, 0x01, 0x01 }, /* 71 */
154 { 0x00, 0x00, 0x16, 0x19, 0x10, 0x10, 0x10 }, /* 72 */
155 { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 73 */
156 { 0x08, 0x08, 0x1c, 0x08, 0x08, 0x09, 0x06 }, /* 74 */
157 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 75 */
158 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 76 */
159 { 0x00, 0x00, 0x11, 0x11, 0x15, 0x15, 0x0a }, /* 77 */
160 { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 78 */
161 { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 79 */
162 { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7a */
163 { 0x02, 0x04, 0x04, 0x08, 0x04, 0x04, 0x02 }, /* 7b */
164 { 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 7c */
165 { 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x08 }, /* 7d */
166 { 0x00, 0x04, 0x02, 0x1f, 0x02, 0x04, 0x00 }, /* 7e */
167 { 0x00, 0x04, 0x08, 0x1f, 0x08, 0x04, 0x00 }, /* 7f */
168 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 80 */
169 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* 81 */
170 { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* 82 */
171 { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* 83 */
172 { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 84 */
173 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 85 */
174 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 86 */
175 { 0x00, 0x0a, 0x04, 0x1f, 0x04, 0x0a, 0x00 }, /* 87 */
176 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 }, /* 88 */
177 { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 }, /* 89 */
178 { 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d }, /* 8a */
179 { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 }, /* 8b */
180 { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c }, /* 8c */
181 { 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* 8d */
182 { 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f }, /* 8e */
183 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00 }, /* 8f */
184 { 0x00, 0x0e, 0x1f, 0x1f, 0x1f, 0x0e, 0x00 }, /* 90 */
185 { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* 91 */
186 { 0x1f, 0x1b, 0x13, 0x1b, 0x1b, 0x11, 0x1f }, /* 92 */
187 { 0x1f, 0x11, 0x1d, 0x1b, 0x17, 0x11, 0x1f }, /* 93 */
188 { 0x00, 0x00, 0x07, 0x04, 0x04, 0x14, 0x08 }, /* 94 */
189 { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00, 0x1f }, /* 95 */
190 { 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x00 }, /* 96 */
191 { 0x00, 0x04, 0x00, 0x1f, 0x00, 0x04, 0x00 }, /* 97 */
192 { 0x1f, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 98 */
193 { 0x1c, 0x04, 0x1c, 0x10, 0x1c, 0x00, 0x00 }, /* 99 */
194 { 0x1c, 0x04, 0x1c, 0x04, 0x1c, 0x00, 0x00 }, /* 9a */
195 { 0x11, 0x12, 0x17, 0x09, 0x17, 0x04, 0x07 }, /* 9b */
196 { 0x11, 0x12, 0x14, 0x09, 0x13, 0x07, 0x01 }, /* 9c */
197 { 0x18, 0x09, 0x1a, 0x0d, 0x1b, 0x17, 0x01 }, /* 9d */
198 { 0x00, 0x05, 0x0a, 0x14, 0x0a, 0x05, 0x00 }, /* 9e */
199 { 0x00, 0x14, 0x0a, 0x05, 0x0a, 0x14, 0x00 }, /* 9f */
200 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* a0 */
201 { 0x00, 0x00, 0x00, 0x00, 0x1c, 0x14, 0x1c }, /* a1 */
202 { 0x07, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00 }, /* a2 */
203 { 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x1c }, /* a3 */
204 { 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x04 }, /* a4 */
205 { 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00 }, /* a5 */
206 { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x02, 0x04 }, /* a6 */
207 { 0x00, 0x00, 0x1f, 0x01, 0x06, 0x04, 0x08 }, /* a7 */
208 { 0x00, 0x00, 0x02, 0x04, 0x0c, 0x14, 0x04 }, /* a8 */
209 { 0x00, 0x00, 0x04, 0x1f, 0x11, 0x01, 0x06 }, /* a9 */
210 { 0x00, 0x00, 0x00, 0x1f, 0x04, 0x04, 0x1f }, /* aa */
211 { 0x00, 0x00, 0x02, 0x1f, 0x06, 0x0a, 0x12 }, /* ab */
212 { 0x00, 0x00, 0x08, 0x1f, 0x09, 0x0a, 0x08 }, /* ac */
213 { 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x1f }, /* ad */
214 { 0x00, 0x00, 0x1e, 0x02, 0x1e, 0x02, 0x1e }, /* ae */
215 { 0x00, 0x00, 0x00, 0x15, 0x15, 0x01, 0x06 }, /* af */
216 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* b0 */
217 { 0x1f, 0x01, 0x05, 0x06, 0x04, 0x04, 0x08 }, /* b1 */
218 { 0x01, 0x02, 0x04, 0x0c, 0x14, 0x04, 0x04 }, /* b2 */
219 { 0x04, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* b3 */
220 { 0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x1f }, /* b4 */
221 { 0x02, 0x1f, 0x02, 0x06, 0x0a, 0x12, 0x02 }, /* b5 */
222 { 0x08, 0x1f, 0x09, 0x09, 0x09, 0x09, 0x12 }, /* b6 */
223 { 0x04, 0x1f, 0x04, 0x1f, 0x04, 0x04, 0x04 }, /* b7 */
224 { 0x00, 0x0f, 0x09, 0x11, 0x01, 0x02, 0x0c }, /* b8 */
225 { 0x08, 0x0f, 0x12, 0x02, 0x02, 0x02, 0x04 }, /* b9 */
226 { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x01, 0x1f }, /* ba */
227 { 0x0a, 0x1f, 0x0a, 0x02, 0x02, 0x02, 0x04 }, /* bb */
228 { 0x00, 0x18, 0x00, 0x18, 0x01, 0x02, 0x1c }, /* bc */
229 { 0x00, 0x1f, 0x01, 0x02, 0x04, 0x0a, 0x11 }, /* bd */
230 { 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08, 0x07 }, /* be */
231 { 0x00, 0x11, 0x11, 0x09, 0x01, 0x02, 0x0c }, /* bf */
232 { 0x00, 0x0f, 0x09, 0x15, 0x03, 0x02, 0x0c }, /* c0 */
233 { 0x02, 0x1c, 0x04, 0x1f, 0x04, 0x04, 0x08 }, /* c1 */
234 { 0x00, 0x15, 0x15, 0x15, 0x01, 0x02, 0x04 }, /* c2 */
235 { 0x0e, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x08 }, /* c3 */
236 { 0x08, 0x08, 0x08, 0x0c, 0x0a, 0x08, 0x08 }, /* c4 */
237 { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x08, 0x10 }, /* c5 */
238 { 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c6 */
239 { 0x00, 0x1f, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* c7 */
240 { 0x04, 0x1f, 0x02, 0x04, 0x0e, 0x15, 0x04 }, /* c8 */
241 { 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* c9 */
242 { 0x00, 0x04, 0x02, 0x11, 0x11, 0x11, 0x11 }, /* ca */
243 { 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x0f }, /* cb */
244 { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x02, 0x0c }, /* cc */
245 { 0x00, 0x08, 0x14, 0x02, 0x01, 0x01, 0x00 }, /* cd */
246 { 0x04, 0x1f, 0x04, 0x04, 0x15, 0x15, 0x04 }, /* ce */
247 { 0x00, 0x1f, 0x01, 0x01, 0x0a, 0x04, 0x02 }, /* cf */
248 { 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x01 }, /* d0 */
249 { 0x00, 0x04, 0x08, 0x10, 0x11, 0x1f, 0x01 }, /* d1 */
250 { 0x00, 0x01, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* d2 */
251 { 0x00, 0x1f, 0x08, 0x1f, 0x08, 0x08, 0x07 }, /* d3 */
252 { 0x08, 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08 }, /* d4 */
253 { 0x00, 0x0e, 0x02, 0x02, 0x02, 0x02, 0x1f }, /* d5 */
254 { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x01, 0x1f }, /* d6 */
255 { 0x0e, 0x00, 0x1f, 0x01, 0x01, 0x02, 0x04 }, /* d7 */
256 { 0x12, 0x12, 0x12, 0x12, 0x12, 0x04, 0x08 }, /* d8 */
257 { 0x00, 0x04, 0x14, 0x14, 0x15, 0x15, 0x16 }, /* d9 */
258 { 0x00, 0x10, 0x10, 0x11, 0x12, 0x14, 0x18 }, /* da */
259 { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* db */
260 { 0x00, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* dc */
261 { 0x00, 0x18, 0x00, 0x01, 0x01, 0x02, 0x1c }, /* dd */
262 { 0x04, 0x12, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* de */
263 { 0x1c, 0x14, 0x1c, 0x00, 0x00, 0x00, 0x00 }, /* df */
264 { 0x00, 0x00, 0x09, 0x15, 0x12, 0x12, 0x0d }, /* e0 */
265 { 0x00, 0x0e, 0x11, 0x1e, 0x11, 0x1e, 0x10 }, /* e1 */
266 { 0x00, 0x11, 0x0a, 0x0a, 0x04, 0x04, 0x08 }, /* e2 */
267 { 0x00, 0x00, 0x1f, 0x0a, 0x0a, 0x0a, 0x13 }, /* e3 */
268 { 0x1f, 0x10, 0x08, 0x04, 0x08, 0x10, 0x1f }, /* e4 */
269 { 0x00, 0x00, 0x0f, 0x14, 0x12, 0x11, 0x0e }, /* e5 */
270 { 0x00, 0x09, 0x09, 0x09, 0x0f, 0x08, 0x10 }, /* e6 */
271 { 0x00, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x03 }, /* e7 */
272 { 0x1f, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x1f }, /* e8 */
273 { 0x00, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* e9 */
274 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x0a, 0x1b }, /* ea */
275 { 0x0f, 0x10, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* eb */
276 { 0x00, 0x00, 0x00, 0x00, 0x0b, 0x15, 0x1a }, /* ec */
277 { 0x02, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x08 }, /* ed */
278 { 0x00, 0x0e, 0x10, 0x0e, 0x10, 0x0e, 0x00 }, /* ee */
279 { 0x06, 0x09, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* ef */
280 { 0x00, 0x00, 0x08, 0x15, 0x02, 0x00, 0x00 }, /* f0 */
281 { 0x00, 0x08, 0x15, 0x0a, 0x15, 0x02, 0x00 }, /* f1 */
282 { 0x08, 0x0f, 0x12, 0x0f, 0x0a, 0x1f, 0x02 }, /* f2 */
283 { 0x0f, 0x09, 0x0f, 0x09, 0x0f, 0x09, 0x11 }, /* f3 */
284 { 0x04, 0x15, 0x15, 0x04, 0x04, 0x0a, 0x11 }, /* f4 */
285 { 0x04, 0x04, 0x1d, 0x06, 0x0e, 0x15, 0x04 }, /* f5 */
286 { 0x04, 0x04, 0x1f, 0x04, 0x0e, 0x15, 0x04 }, /* f6 */
287 { 0x04, 0x0a, 0x11, 0x0e, 0x04, 0x0e, 0x1f }, /* f7 */
288 { 0x04, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x1f }, /* f8 */
289 { 0x1f, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x1f }, /* f9 */
290 { 0x00, 0x01, 0x1e, 0x04, 0x1f, 0x04, 0x04 }, /* fa */
291 { 0x00, 0x00, 0x1f, 0x08, 0x0f, 0x09, 0x11 }, /* fb */
292 { 0x00, 0x00, 0x1f, 0x15, 0x1f, 0x11, 0x11 }, /* fc */
293 { 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a }, /* fd */
294 { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* fe */
295 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ff */
296};
297static unsigned char font_player_oldlcd[256][7] = {
298 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
299 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
300 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
301 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
302 { 0x0e, 0x11, 0x17, 0x15, 0x17, 0x10, 0x0e }, /* 04 */
303 { 0x06, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x1f }, /* 05 */
304 { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 06 */
305 { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 07 */
306 { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 08 */
307 { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 09 */
308 { 0x08, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 0a */
309 { 0x08, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* 0b */
310 { 0x08, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 0c */
311 { 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x02, 0x0e }, /* 0d */
312 { 0x10, 0x10, 0x17, 0x14, 0x1e, 0x04, 0x04 }, /* 0e */
313 { 0x01, 0x0e, 0x13, 0x15, 0x19, 0x0e, 0x10 }, /* 0f */
314 { 0x00, 0x02, 0x0e, 0x15, 0x15, 0x0e, 0x08 }, /* 10 */
315 { 0x1c, 0x10, 0x17, 0x1d, 0x07, 0x06, 0x05 }, /* 11 */
316 { 0x04, 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x11 }, /* 12 */
317 { 0x04, 0x0a, 0x04, 0x01, 0x0f, 0x11, 0x0f }, /* 13 */
318 { 0x00, 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x1f }, /* 14 */
319 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 15 */
320 { 0x0e, 0x04, 0x1f, 0x15, 0x1f, 0x04, 0x0e }, /* 16 */
321 { 0x1f, 0x11, 0x11, 0x10, 0x10, 0x10, 0x10 }, /* 17 */
322 { 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x11, 0x11 }, /* 18 */
323 { 0x0e, 0x11, 0x11, 0x11, 0x0a, 0x0a, 0x1b }, /* 19 */
324 { 0x1f, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a }, /* 1a */
325 { 0x15, 0x15, 0x15, 0x15, 0x0e, 0x04, 0x04 }, /* 1b */
326 { 0x1f, 0x08, 0x04, 0x02, 0x04, 0x08, 0x1f }, /* 1c */
327 { 0x0e, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* 1d */
328 { 0x1f, 0x11, 0x00, 0x0e, 0x00, 0x11, 0x1f }, /* 1e */
329 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 1f */
330 { 0x0f, 0x14, 0x14, 0x1f, 0x14, 0x14, 0x17 }, /* 20 */
331 { 0x00, 0x00, 0x1a, 0x05, 0x0f, 0x14, 0x0f }, /* 21 */
332 { 0x0c, 0x12, 0x16, 0x11, 0x11, 0x16, 0x10 }, /* 22 */
333 { 0x02, 0x04, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 23 */
334 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 24 */
335 { 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04 }, /* 25 */
336 { 0x1b, 0x09, 0x12, 0x00, 0x00, 0x00, 0x00 }, /* 26 */
337 { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 27 */
338 { 0x00, 0x11, 0x0e, 0x0a, 0x0e, 0x11, 0x00 }, /* 28 */
339 { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 29 */
340 { 0x08, 0x14, 0x14, 0x09, 0x15, 0x12, 0x0d }, /* 2a */
341 { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 2b */
342 { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 2c */
343 { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 2d */
344 { 0x04, 0x15, 0x0e, 0x04, 0x0e, 0x15, 0x04 }, /* 2e */
345 { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2f */
346 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 30 */
347 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 31 */
348 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 32 */
349 { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 33 */
350 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 34 */
351 { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 35 */
352 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 36 */
353 { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 37 */
354 { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 38 */
355 { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 39 */
356 { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 3a */
357 { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 3b */
358 { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 3c */
359 { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 3d */
360 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3e */
361 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x04, 0x08 }, /* 3f */
362 { 0x03, 0x06, 0x0c, 0x18, 0x0c, 0x06, 0x03 }, /* 40 */
363 { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 41 */
364 { 0x18, 0x0c, 0x06, 0x03, 0x06, 0x0c, 0x18 }, /* 42 */
365 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 43 */
366 { 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 44 */
367 { 0x04, 0x0a, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 45 */
368 { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 46 */
369 { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 47 */
370 { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 48 */
371 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 49 */
372 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 4a */
373 { 0x0e, 0x10, 0x10, 0x17, 0x11, 0x11, 0x0e }, /* 4b */
374 { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 4c */
375 { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 4d */
376 { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4e */
377 { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4f */
378 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 50 */
379 { 0x11, 0x1b, 0x15, 0x11, 0x11, 0x11, 0x11 }, /* 51 */
380 { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 52 */
381 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 53 */
382 { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 54 */
383 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 55 */
384 { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 56 */
385 { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 57 */
386 { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 58 */
387 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 59 */
388 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 5a */
389 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 5b */
390 { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 5c */
391 { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 5d */
392 { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5e */
393 { 0x0a, 0x00, 0x04, 0x0a, 0x11, 0x1f, 0x11 }, /* 5f */
394 { 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 60 */
395 { 0x0d, 0x12, 0x00, 0x19, 0x15, 0x13, 0x11 }, /* 61 */
396 { 0x0a, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 62 */
397 { 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x01, 0x0e }, /* 63 */
398 { 0x04, 0x00, 0x04, 0x08, 0x10, 0x11, 0x0e }, /* 64 */
399 { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 65 */
400 { 0x10, 0x10, 0x1e, 0x11, 0x11, 0x11, 0x1e }, /* 66 */
401 { 0x00, 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* 67 */
402 { 0x01, 0x01, 0x0f, 0x11, 0x11, 0x11, 0x0f }, /* 68 */
403 { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0f }, /* 69 */
404 { 0x03, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x04 }, /* 6a */
405 { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* 6b */
406 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6c */
407 { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 6d */
408 { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6e */
409 { 0x08, 0x08, 0x09, 0x0a, 0x0c, 0x0a, 0x09 }, /* 6f */
410 { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 70 */
411 { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x15, 0x15 }, /* 71 */
412 { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 72 */
413 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 73 */
414 { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 74 */
415 { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x01 }, /* 75 */
416 { 0x00, 0x00, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* 76 */
417 { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 77 */
418 { 0x04, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03 }, /* 78 */
419 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 79 */
420 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 7a */
421 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 7b */
422 { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 7c */
423 { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 7d */
424 { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7e */
425 { 0x0a, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 7f */
426 { 0x00, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 80 */
427 { 0x0d, 0x12, 0x00, 0x16, 0x19, 0x11, 0x11 }, /* 81 */
428 { 0x00, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 82 */
429 { 0x08, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 83 */
430 { 0x00, 0x0f, 0x10, 0x10, 0x0f, 0x02, 0x04 }, /* 84 */
431 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00 }, /* 85 */
432 { 0x00, 0x00, 0x04, 0x0e, 0x1f, 0x00, 0x00 }, /* 86 */
433 { 0x00, 0x00, 0x1f, 0x0e, 0x04, 0x00, 0x00 }, /* 87 */
434 { 0x02, 0x06, 0x0e, 0x1e, 0x0e, 0x06, 0x02 }, /* 88 */
435 { 0x08, 0x0c, 0x0e, 0x0f, 0x0e, 0x0c, 0x08 }, /* 89 */
436 { 0x1c, 0x1f, 0x13, 0x10, 0x10, 0x10, 0x10 }, /* 8a */
437 { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* 8b */
438 { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8c */
439 { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8d */
440 { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8e */
441 { 0x0d, 0x12, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8f */
442 { 0x08, 0x04, 0x1f, 0x10, 0x1e, 0x10, 0x1f }, /* 90 */
443 { 0x04, 0x0a, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 91 */
444 { 0x0a, 0x00, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 92 */
445 { 0x08, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 93 */
446 { 0x02, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 94 */
447 { 0x0c, 0x0a, 0x09, 0x1d, 0x09, 0x0a, 0x0c }, /* 95 */
448 { 0x08, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 96 */
449 { 0x02, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 97 */
450 { 0x04, 0x0a, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 98 */
451 { 0x0d, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 99 */
452 { 0x08, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9a */
453 { 0x02, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9b */
454 { 0x02, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9c */
455 { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9d */
456 { 0x0d, 0x12, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9e */
457 { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 9f */
458 { 0x0a, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* a0 */
459 { 0x02, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a1 */
460 { 0x04, 0x0a, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a2 */
461 { 0x0a, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a3 */
462 { 0x02, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a4 */
463 { 0x04, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a5 */
464 { 0x0d, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a6 */
465 { 0x02, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* a7 */
466 { 0x04, 0x04, 0x0f, 0x10, 0x10, 0x0f, 0x04 }, /* a8 */
467 { 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03 }, /* a9 */
468 { 0x0a, 0x04, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* aa */
469 { 0x0a, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* ab */
470 { 0x0a, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* ac */
471 { 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* ad */
472 { 0x04, 0x0a, 0x04, 0x11, 0x11, 0x13, 0x0d }, /* ae */
473 { 0x02, 0x04, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* af */
474 { 0x02, 0x0f, 0x02, 0x0e, 0x12, 0x12, 0x0e }, /* b0 */
475 { 0x02, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* b1 */
476 { 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x04, 0x06 }, /* b2 */
477 { 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x02, 0x03 }, /* b3 */
478 { 0x04, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b4 */
479 { 0x02, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b5 */
480 { 0x02, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* b6 */
481 { 0x02, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* b7 */
482 { 0x0c, 0x04, 0x06, 0x0c, 0x04, 0x04, 0x0e }, /* b8 */
483 { 0x04, 0x0e, 0x1f, 0x1f, 0x1b, 0x04, 0x0e }, /* b9 */
484 { 0x0a, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* ba */
485 { 0x09, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x06 }, /* bb */
486 { 0x05, 0x05, 0x0c, 0x14, 0x14, 0x14, 0x0c }, /* bc */
487 { 0x0a, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* bd */
488 { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* be */
489 { 0x0f, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01 }, /* bf */
490 { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c0 */
491 { 0x1f, 0x00, 0x0e, 0x10, 0x17, 0x11, 0x0e }, /* c1 */
492 { 0x1f, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* c2 */
493 { 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04, 0x0c }, /* c3 */
494 { 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04 }, /* c4 */
495 { 0x04, 0x00, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* c5 */
496 { 0x00, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* c6 */
497 { 0x05, 0x0a, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* c7 */
498 { 0x09, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* c8 */
499 { 0x09, 0x12, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* c9 */
500 { 0x09, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* ca */
501 { 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x0f }, /* cb */
502 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x01, 0x1e }, /* cc */
503 { 0x00, 0x1b, 0x1f, 0x1f, 0x0e, 0x04, 0x00 }, /* cd */
504 { 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18 }, /* ce */
505 { 0x0e, 0x11, 0x04, 0x0a, 0x1b, 0x1f, 0x00 }, /* cf */
506 { 0x0a, 0x15, 0x04, 0x07, 0x00, 0x11, 0x0a }, /* d0 */
507 { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* d1 */
508 { 0x01, 0x03, 0x1d, 0x11, 0x1d, 0x03, 0x01 }, /* d2 */
509 { 0x0e, 0x11, 0x11, 0x1f, 0x1b, 0x1b, 0x1f }, /* d3 */
510 { 0x00, 0x01, 0x02, 0x0a, 0x04, 0x04, 0x00 }, /* d4 */
511 { 0x04, 0x0e, 0x1f, 0x00, 0x1f, 0x0e, 0x04 }, /* d5 */
512 { 0x02, 0x02, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* d6 */
513 { 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b }, /* d7 */
514 { 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b }, /* d8 */
515 { 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03, 0x06 }, /* d9 */
516 { 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b }, /* da */
517 { 0x00, 0x04, 0x0e, 0x1f, 0x0e, 0x04, 0x00 }, /* db */
518 { 0x00, 0x00, 0x1f, 0x1b, 0x15, 0x11, 0x1f }, /* dc */
519 { 0x0e, 0x0e, 0x04, 0x1f, 0x0e, 0x0e, 0x0a }, /* dd */
520 { 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x0a }, /* de */
521 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* df */
522 { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* e0 */
523 { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* e1 */
524 { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e2 */
525 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e3 */
526 { 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04 }, /* e4 */
527 { 0x04, 0x09, 0x0a, 0x0a, 0x0a, 0x09, 0x04 }, /* e5 */
528 { 0x00, 0x1f, 0x11, 0x11, 0x1f, 0x04, 0x1f }, /* e6 */
529 { 0x00, 0x07, 0x03, 0x05, 0x08, 0x10, 0x00 }, /* e7 */
530 { 0x00, 0x10, 0x08, 0x05, 0x03, 0x07, 0x00 }, /* e8 */
531 { 0x09, 0x06, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* e9 */
532 { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ea */
533 { 0x00, 0x00, 0x10, 0x08, 0x04, 0x04, 0x04 }, /* eb */
534 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ec */
535 { 0x1f, 0x18, 0x14, 0x12, 0x15, 0x18, 0x1f }, /* ed */
536 { 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ee */
537 { 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ef */
538 { 0x00, 0x03, 0x07, 0x0c, 0x18, 0x1c, 0x1c }, /* f0 */
539 { 0x1c, 0x10, 0x1c, 0x07, 0x1c, 0x04, 0x07 }, /* f1 */
540 { 0x00, 0x1e, 0x03, 0x09, 0x19, 0x09, 0x1d }, /* f2 */
541 { 0x1e, 0x01, 0x19, 0x05, 0x09, 0x1d, 0x01 }, /* f3 */
542 { 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00 }, /* f4 */
543 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f }, /* f5 */
544 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e }, /* f6 */
545 { 0x04, 0x04, 0x04, 0x08, 0x10, 0x00, 0x00 }, /* f7 */
546 { 0x07, 0x03, 0x05, 0x08, 0x10, 0x10, 0x0f }, /* f8 */
547 { 0x04, 0x0e, 0x1f, 0x11, 0x11, 0x15, 0x1f }, /* f9 */
548 { 0x1f, 0x03, 0x1a, 0x02, 0x1a, 0x02, 0x1e }, /* fa */
549 { 0x00, 0x0e, 0x1f, 0x11, 0x1f, 0x0e, 0x00 }, /* fb */
550 { 0x03, 0x05, 0x09, 0x09, 0x0b, 0x1b, 0x18 }, /* fc */
551 { 0x1f, 0x03, 0x05, 0x09, 0x15, 0x03, 0x1f }, /* fd */
552 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x1c, 0x1c }, /* fe */
553 { 0x1c, 0x1c, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ff */
554};
555
556static unsigned char (*font_player)[256][7];
557
558static unsigned bitmap[BITMAP_WIDTH][CHAR_HEIGHT];
559static bool show_subst, show_hardware;
560static bool newlcd;
561
562bool is_new_player(void)
563{
564 return newlcd;
565}
566
567static void draw_pattern(int fg, int bg, int x, const unsigned char *pattern)
568{
569 int x2, y2;
570
571 for (y2 = 0; y2 < 7; y2++)
572 {
573 unsigned data = pattern[y2];
574
575 for (x2 = 0; x2 < 5; x2++)
576 bitmap[x+x2][y2] = (data & (0x10 >> x2)) ? fg : bg;
577 }
578}
579
580static void draw_hexdigit(int x, int digit)
581{
582 int x2, y2;
583
584 draw_pattern(CHAR_FG_STD, CHAR_BG_STD, x + 1,
585 font_player_newlcd[digit+(digit<10?'0':'A'-10)]);
586
587 for (y2 = 0; y2 < CHAR_HEIGHT; y2++)
588 for (x2 = 0; x2 < CHAR_WIDTH; x2++)
589 bitmap[x+x2][y2] ^= 0xffffff;
590}
591
592static void flush_bitmap(FILE *fp)
593{
594 int x, y;
595
596 for (y = 0; y < CHAR_HEIGHT; y++)
597 {
598 int i, z;
599
600 for (i = 0; i < SIZE; i++)
601 {
602 for (x = 0; x < BITMAP_WIDTH; x++)
603 {
604 unsigned int col = bitmap[x][y];
605
606 for (z = 0; z < SIZE; z++)
607 {
608 fprintf(fp, "%d %d %d ", (col >> 16) & 255,
609 (col >> 8) & 255, (col) & 255);
610 }
611 }
612 fprintf(fp, "\n");
613 }
614 }
615}
616
617
618int main(int argc, char **argv)
619{
620 int x, y;
621 int i, lines, block, oldblock;
622 int loop;
623 char *filename;
624 FILE *fp;
625
626 printf("This tool will generate gif-pictures that reflect the current "
627 "unicode charset of the Player.\n");
628
629 for (loop = 0; loop < 6; loop++)
630 {
631 switch (loop)
632 {
633 case 0:
634 font_player = &font_player_oldlcd;
635 newlcd = false;
636 lcd_charset_init();
637 filename = "lcd_old.gif";
638 show_subst = false;
639 show_hardware = false;
640 break;
641 case 1:
642 font_player = &font_player_newlcd;
643 newlcd = true;
644 lcd_charset_init();
645 filename = "lcd_new.gif";
646 show_subst = false;
647 show_hardware = false;
648 break;
649 case 2:
650 font_player = &font_player_oldlcd;
651 newlcd = false;
652 lcd_charset_init();
653 filename = "lcd_old_subst.gif";
654 show_subst = true;
655 show_hardware = false;
656 break;
657 case 3:
658 font_player = &font_player_newlcd;
659 newlcd = true;
660 lcd_charset_init();
661 filename = "lcd_new_subst.gif";
662 show_subst = true;
663 show_hardware = false;
664 break;
665 case 4:
666 font_player = &font_player_oldlcd;
667 xchar_info = NULL;
668 xchar_info_size = 256;
669 filename = "lcd_old_hw.gif";
670 show_subst = true;
671 show_hardware = true;
672 break;
673 case 5:
674 font_player = &font_player_newlcd;
675 xchar_info = NULL;
676 xchar_info_size = 256;
677 filename = "lcd_new_hw.gif";
678 show_subst = true;
679 show_hardware = true;
680 break;
681 default:
682 printf("Not in loop!\n");
683 exit(0);
684 }
685 fp = fopen("tmp.pnm", "wb");
686 if (!fp)
687 {
688 printf("Error opening %s!\n", filename);
689 exit(0);
690 }
691 if (show_hardware)
692 {
693 /* hardware mapping is always 16 lines */
694 lines = 16;
695 }
696 else
697 {
698 /* count lines */
699 for (lines = 0, oldblock = -1, i = 0; i < xchar_info_size; i++)
700 {
701 block = xchar_info[i].ucs >> 4;
702 if (block != oldblock)
703 {
704 lines++;
705 oldblock = block;
706 }
707 }
708 }
709 fprintf(fp, "P3\n#PNM showing a picture of the Player unicode charset\n");
710 fprintf(fp, "%d %d\n255\n", BITMAP_WIDTH*SIZE, CHAR_HEIGHT*SIZE*(lines+1));
711
712 memset(bitmap, 255, sizeof(bitmap));
713 for (x = 0; x < 16; x++)
714 {
715 draw_hexdigit(3*CHAR_WIDTH + x * CHAR_WIDTH, x);
716 }
717
718 for (oldblock = -1, i = 0; i < xchar_info_size; i++)
719 {
720 block = show_hardware ? (i >> 4) : (xchar_info[i].ucs >> 4);
721 if (block != oldblock)
722 {
723 flush_bitmap(fp);
724 memset(bitmap, 255, sizeof(bitmap));
725 draw_hexdigit(0, (block >> 8) & 0xf);
726 draw_hexdigit(CHAR_WIDTH, (block >> 4) & 0xf);
727 draw_hexdigit(2*CHAR_WIDTH, block & 0xf);
728 oldblock = block;
729 }
730 if (show_hardware)
731 {
732 draw_pattern(CHAR_FG_STD, CHAR_BG_STD,
733 3*CHAR_WIDTH+1 + (i & 0xf) * CHAR_WIDTH,
734 (*font_player)[i]);
735 }
736 else
737 {
738 if (xchar_info[i].priority == 0)
739 {
740 draw_pattern(CHAR_FG_STD, CHAR_BG_STD,
741 3*CHAR_WIDTH+1
742 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
743 (*font_player)[xchar_info[i].hw_char]);
744 }
745 else
746 {
747 if (show_subst)
748 {
749 draw_pattern(CHAR_FG_ALT, CHAR_BG_STD,
750 3*CHAR_WIDTH+1
751 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
752 (*font_player)[xchar_info[i].hw_char]);
753 }
754 else
755 {
756 if ((xchar_info[i].glyph & 0x8000) == 0)
757 draw_pattern(CHAR_FG_ALT, CHAR_BG_STD,
758 3*CHAR_WIDTH+1
759 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
760 xfont_fixed[xchar_info[i].glyph]);
761 else
762 draw_pattern(CHAR_FG_STD, CHAR_BG_ALT,
763 3*CHAR_WIDTH+1
764 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
765 font_player_newlcd[' ']);
766 }
767 }
768 }
769 }
770 flush_bitmap(fp);
771 fclose(fp);
772 {
773 char buffer[200];
774
775 sprintf(buffer, "convert tmp.pnm %s", filename);
776 system(buffer);
777 remove("tmp.pnm");
778 }
779 }
780}
diff --git a/uisimulator/common/SOURCES b/uisimulator/common/SOURCES
index 9833753236..6d15a04c41 100644
--- a/uisimulator/common/SOURCES
+++ b/uisimulator/common/SOURCES
@@ -1,11 +1,6 @@
1#ifdef SIMULATOR 1#ifdef SIMULATOR
2 2
3lcd-common.c 3lcd-common.c
4#ifdef HAVE_LCD_CHARCELLS
5font-player.c
6lcd-playersim.c
7sim_icons.c
8#endif
9sim_tasks.c 4sim_tasks.c
10fmradio.c 5fmradio.c
11backlight-sim.c 6backlight-sim.c
diff --git a/uisimulator/common/backlight-sim.c b/uisimulator/common/backlight-sim.c
index 0d6440b7f3..7acdee84ae 100644
--- a/uisimulator/common/backlight-sim.c
+++ b/uisimulator/common/backlight-sim.c
@@ -27,7 +27,7 @@
27#ifdef HAVE_LCD_SLEEP 27#ifdef HAVE_LCD_SLEEP
28extern void lcd_awake(void); 28extern void lcd_awake(void);
29#endif 29#endif
30/* in uisimulator/sdl/lcd-bitmap.c and lcd-charcell.c */ 30/* in uisimulator/sdl/lcd-bitmap.c */
31extern void sim_backlight(int value); 31extern void sim_backlight(int value);
32 32
33bool backlight_hw_init(void) 33bool backlight_hw_init(void)
diff --git a/uisimulator/common/font-player.c b/uisimulator/common/font-player.c
deleted file mode 100644
index f08a98348f..0000000000
--- a/uisimulator/common/font-player.c
+++ /dev/null
@@ -1,548 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include "font-player.h"
21#include "hwcompat.h"
22
23static unsigned char font_player_newlcd[256][7] = {
24 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
25 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
26 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
27 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
28 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 04 */
29 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 05 */
30 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 06 */
31 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 07 */
32 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 08 */
33 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 09 */
34 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0a */
35 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0b */
36 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0c */
37 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0d */
38 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0e */
39 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0f */
40 { 0x00, 0x10, 0x1c, 0x1f, 0x1c, 0x10, 0x00 }, /* 10 */
41 { 0x00, 0x01, 0x07, 0x1f, 0x07, 0x01, 0x00 }, /* 11 */
42 { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00 }, /* 12 */
43 { 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x0a }, /* 13 */
44 { 0x0f, 0x1d, 0x1d, 0x0d, 0x05, 0x05, 0x05 }, /* 14 */
45 { 0x07, 0x08, 0x0e, 0x11, 0x0e, 0x02, 0x1c }, /* 15 */
46 { 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00 }, /* 16 */
47 { 0x01, 0x01, 0x05, 0x09, 0x1f, 0x08, 0x04 }, /* 17 */
48 { 0x04, 0x0e, 0x15, 0x04, 0x04, 0x04, 0x04 }, /* 18 */
49 { 0x04, 0x04, 0x04, 0x04, 0x15, 0x0e, 0x04 }, /* 19 */
50 { 0x11, 0x19, 0x1d, 0x1f, 0x1d, 0x19, 0x11 }, /* 1a */
51 { 0x11, 0x13, 0x17, 0x1f, 0x17, 0x13, 0x11 }, /* 1b */
52 { 0x10, 0x14, 0x12, 0x1f, 0x12, 0x14, 0x10 }, /* 1c */
53 { 0x01, 0x05, 0x09, 0x1f, 0x09, 0x05, 0x01 }, /* 1d */
54 { 0x00, 0x1f, 0x0e, 0x0e, 0x04, 0x04, 0x00 }, /* 1e */
55 { 0x00, 0x04, 0x04, 0x0e, 0x0e, 0x1f, 0x00 }, /* 1f */
56 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 20 */
57 { 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x04 }, /* 21 */
58 { 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00 }, /* 22 */
59 { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 23 */
60 { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 24 */
61 { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 25 */
62 { 0x0c, 0x12, 0x14, 0x08, 0x15, 0x12, 0x0d }, /* 26 */
63 { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 27 */
64 { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 28 */
65 { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 29 */
66 { 0x00, 0x04, 0x15, 0x0e, 0x15, 0x04, 0x00 }, /* 2a */
67 { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2b */
68 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 2c */
69 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 2d */
70 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 2e */
71 { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 2f */
72 { 0x0e, 0x11, 0x13, 0x15, 0x19, 0x11, 0x0e }, /* 30 */
73 { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 31 */
74 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 32 */
75 { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 33 */
76 { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 34 */
77 { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 35 */
78 { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 36 */
79 { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 37 */
80 { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 38 */
81 { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 39 */
82 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3a */
83 { 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x04, 0x08 }, /* 3b */
84 { 0x02, 0x04, 0x08, 0x10, 0x08, 0x04, 0x02 }, /* 3c */
85 { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 3d */
86 { 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08 }, /* 3e */
87 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 3f */
88 { 0x0e, 0x11, 0x01, 0x0d, 0x15, 0x15, 0x0e }, /* 40 */
89 { 0x0e, 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 41 */
90 { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 42 */
91 { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 43 */
92 { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 44 */
93 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 45 */
94 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 46 */
95 { 0x0e, 0x11, 0x10, 0x17, 0x11, 0x11, 0x0f }, /* 47 */
96 { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 48 */
97 { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 49 */
98 { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4a */
99 { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4b */
100 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 4c */
101 { 0x11, 0x1b, 0x15, 0x15, 0x11, 0x11, 0x11 }, /* 4d */
102 { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 4e */
103 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 4f */
104 { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 50 */
105 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 51 */
106 { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 52 */
107 { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 53 */
108 { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 54 */
109 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 55 */
110 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 56 */
111 { 0x11, 0x11, 0x11, 0x15, 0x15, 0x15, 0x0a }, /* 57 */
112 { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 58 */
113 { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 59 */
114 { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5a */
115 { 0x0e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0e }, /* 5b */
116 { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 5c */
117 { 0x0e, 0x02, 0x02, 0x02, 0x02, 0x02, 0x0e }, /* 5d */
118 { 0x04, 0x0a, 0x11, 0x00, 0x00, 0x00, 0x00 }, /* 5e */
119 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 5f */
120 { 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, /* 60 */
121 { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 61 */
122 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x1e }, /* 62 */
123 { 0x00, 0x00, 0x0e, 0x10, 0x10, 0x11, 0x0e }, /* 63 */
124 { 0x01, 0x01, 0x0d, 0x13, 0x11, 0x11, 0x0f }, /* 64 */
125 { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 65 */
126 { 0x06, 0x09, 0x08, 0x1c, 0x08, 0x08, 0x08 }, /* 66 */
127 { 0x00, 0x0f, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* 67 */
128 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 68 */
129 { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 69 */
130 { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6a */
131 { 0x10, 0x10, 0x12, 0x14, 0x18, 0x14, 0x12 }, /* 6b */
132 { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 6c */
133 { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x11, 0x11 }, /* 6d */
134 { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6e */
135 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 6f */
136 { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 70 */
137 { 0x00, 0x00, 0x0d, 0x13, 0x0f, 0x01, 0x01 }, /* 71 */
138 { 0x00, 0x00, 0x16, 0x19, 0x10, 0x10, 0x10 }, /* 72 */
139 { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 73 */
140 { 0x08, 0x08, 0x1c, 0x08, 0x08, 0x09, 0x06 }, /* 74 */
141 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 75 */
142 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 76 */
143 { 0x00, 0x00, 0x11, 0x11, 0x15, 0x15, 0x0a }, /* 77 */
144 { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 78 */
145 { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 79 */
146 { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7a */
147 { 0x02, 0x04, 0x04, 0x08, 0x04, 0x04, 0x02 }, /* 7b */
148 { 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 7c */
149 { 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x08 }, /* 7d */
150 { 0x00, 0x04, 0x02, 0x1f, 0x02, 0x04, 0x00 }, /* 7e */
151 { 0x00, 0x04, 0x08, 0x1f, 0x08, 0x04, 0x00 }, /* 7f */
152 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 80 */
153 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* 81 */
154 { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* 82 */
155 { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* 83 */
156 { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 84 */
157 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 85 */
158 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 86 */
159 { 0x00, 0x0a, 0x04, 0x1f, 0x04, 0x0a, 0x00 }, /* 87 */
160 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 }, /* 88 */
161 { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 }, /* 89 */
162 { 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d }, /* 8a */
163 { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 }, /* 8b */
164 { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c }, /* 8c */
165 { 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* 8d */
166 { 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f }, /* 8e */
167 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00 }, /* 8f */
168 { 0x00, 0x0e, 0x1f, 0x1f, 0x1f, 0x0e, 0x00 }, /* 90 */
169 { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* 91 */
170 { 0x1f, 0x1b, 0x13, 0x1b, 0x1b, 0x11, 0x1f }, /* 92 */
171 { 0x1f, 0x11, 0x1d, 0x1b, 0x17, 0x11, 0x1f }, /* 93 */
172 { 0x00, 0x00, 0x07, 0x04, 0x04, 0x14, 0x08 }, /* 94 */
173 { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00, 0x1f }, /* 95 */
174 { 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x00 }, /* 96 */
175 { 0x00, 0x04, 0x00, 0x1f, 0x00, 0x04, 0x00 }, /* 97 */
176 { 0x1f, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 98 */
177 { 0x1c, 0x04, 0x1c, 0x10, 0x1c, 0x00, 0x00 }, /* 99 */
178 { 0x1c, 0x04, 0x1c, 0x04, 0x1c, 0x00, 0x00 }, /* 9a */
179 { 0x11, 0x12, 0x17, 0x09, 0x17, 0x04, 0x07 }, /* 9b */
180 { 0x11, 0x12, 0x14, 0x09, 0x13, 0x07, 0x01 }, /* 9c */
181 { 0x18, 0x09, 0x1a, 0x0d, 0x1b, 0x17, 0x01 }, /* 9d */
182 { 0x00, 0x05, 0x0a, 0x14, 0x0a, 0x05, 0x00 }, /* 9e */
183 { 0x00, 0x14, 0x0a, 0x05, 0x0a, 0x14, 0x00 }, /* 9f */
184 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* a0 */
185 { 0x00, 0x00, 0x00, 0x00, 0x1c, 0x14, 0x1c }, /* a1 */
186 { 0x07, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00 }, /* a2 */
187 { 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x1c }, /* a3 */
188 { 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x04 }, /* a4 */
189 { 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00 }, /* a5 */
190 { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x02, 0x04 }, /* a6 */
191 { 0x00, 0x00, 0x1f, 0x01, 0x06, 0x04, 0x08 }, /* a7 */
192 { 0x00, 0x00, 0x02, 0x04, 0x0c, 0x14, 0x04 }, /* a8 */
193 { 0x00, 0x00, 0x04, 0x1f, 0x11, 0x01, 0x06 }, /* a9 */
194 { 0x00, 0x00, 0x00, 0x1f, 0x04, 0x04, 0x1f }, /* aa */
195 { 0x00, 0x00, 0x02, 0x1f, 0x06, 0x0a, 0x12 }, /* ab */
196 { 0x00, 0x00, 0x08, 0x1f, 0x09, 0x0a, 0x08 }, /* ac */
197 { 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x1f }, /* ad */
198 { 0x00, 0x00, 0x1e, 0x02, 0x1e, 0x02, 0x1e }, /* ae */
199 { 0x00, 0x00, 0x00, 0x15, 0x15, 0x01, 0x06 }, /* af */
200 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* b0 */
201 { 0x1f, 0x01, 0x05, 0x06, 0x04, 0x04, 0x08 }, /* b1 */
202 { 0x01, 0x02, 0x04, 0x0c, 0x14, 0x04, 0x04 }, /* b2 */
203 { 0x04, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* b3 */
204 { 0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x1f }, /* b4 */
205 { 0x02, 0x1f, 0x02, 0x06, 0x0a, 0x12, 0x02 }, /* b5 */
206 { 0x08, 0x1f, 0x09, 0x09, 0x09, 0x09, 0x12 }, /* b6 */
207 { 0x04, 0x1f, 0x04, 0x1f, 0x04, 0x04, 0x04 }, /* b7 */
208 { 0x00, 0x0f, 0x09, 0x11, 0x01, 0x02, 0x0c }, /* b8 */
209 { 0x08, 0x0f, 0x12, 0x02, 0x02, 0x02, 0x04 }, /* b9 */
210 { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x01, 0x1f }, /* ba */
211 { 0x0a, 0x1f, 0x0a, 0x02, 0x02, 0x02, 0x04 }, /* bb */
212 { 0x00, 0x18, 0x00, 0x18, 0x01, 0x02, 0x1c }, /* bc */
213 { 0x00, 0x1f, 0x01, 0x02, 0x04, 0x0a, 0x11 }, /* bd */
214 { 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08, 0x07 }, /* be */
215 { 0x00, 0x11, 0x11, 0x09, 0x01, 0x02, 0x0c }, /* bf */
216 { 0x00, 0x0f, 0x09, 0x15, 0x03, 0x02, 0x0c }, /* c0 */
217 { 0x02, 0x1c, 0x04, 0x1f, 0x04, 0x04, 0x08 }, /* c1 */
218 { 0x00, 0x15, 0x15, 0x15, 0x01, 0x02, 0x04 }, /* c2 */
219 { 0x0e, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x08 }, /* c3 */
220 { 0x08, 0x08, 0x08, 0x0c, 0x0a, 0x08, 0x08 }, /* c4 */
221 { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x08, 0x10 }, /* c5 */
222 { 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c6 */
223 { 0x00, 0x1f, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* c7 */
224 { 0x04, 0x1f, 0x02, 0x04, 0x0e, 0x15, 0x04 }, /* c8 */
225 { 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* c9 */
226 { 0x00, 0x04, 0x02, 0x11, 0x11, 0x11, 0x11 }, /* ca */
227 { 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x0f }, /* cb */
228 { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x02, 0x0c }, /* cc */
229 { 0x00, 0x08, 0x14, 0x02, 0x01, 0x01, 0x00 }, /* cd */
230 { 0x04, 0x1f, 0x04, 0x04, 0x15, 0x15, 0x04 }, /* ce */
231 { 0x00, 0x1f, 0x01, 0x01, 0x0a, 0x04, 0x02 }, /* cf */
232 { 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x01 }, /* d0 */
233 { 0x00, 0x04, 0x08, 0x10, 0x11, 0x1f, 0x01 }, /* d1 */
234 { 0x00, 0x01, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* d2 */
235 { 0x00, 0x1f, 0x08, 0x1f, 0x08, 0x08, 0x07 }, /* d3 */
236 { 0x08, 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08 }, /* d4 */
237 { 0x00, 0x0e, 0x02, 0x02, 0x02, 0x02, 0x1f }, /* d5 */
238 { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x01, 0x1f }, /* d6 */
239 { 0x0e, 0x00, 0x1f, 0x01, 0x01, 0x02, 0x04 }, /* d7 */
240 { 0x12, 0x12, 0x12, 0x12, 0x12, 0x04, 0x08 }, /* d8 */
241 { 0x00, 0x04, 0x14, 0x14, 0x15, 0x15, 0x16 }, /* d9 */
242 { 0x00, 0x10, 0x10, 0x11, 0x12, 0x14, 0x18 }, /* da */
243 { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* db */
244 { 0x00, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* dc */
245 { 0x00, 0x18, 0x00, 0x01, 0x01, 0x02, 0x1c }, /* dd */
246 { 0x04, 0x12, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* de */
247 { 0x1c, 0x14, 0x1c, 0x00, 0x00, 0x00, 0x00 }, /* df */
248 { 0x00, 0x00, 0x09, 0x15, 0x12, 0x12, 0x0d }, /* e0 */
249 { 0x00, 0x0e, 0x11, 0x1e, 0x11, 0x1e, 0x10 }, /* e1 */
250 { 0x00, 0x11, 0x0a, 0x0a, 0x04, 0x04, 0x08 }, /* e2 */
251 { 0x00, 0x00, 0x1f, 0x0a, 0x0a, 0x0a, 0x13 }, /* e3 */
252 { 0x1f, 0x10, 0x08, 0x04, 0x08, 0x10, 0x1f }, /* e4 */
253 { 0x00, 0x00, 0x0f, 0x14, 0x12, 0x11, 0x0e }, /* e5 */
254 { 0x00, 0x09, 0x09, 0x09, 0x0f, 0x08, 0x10 }, /* e6 */
255 { 0x00, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x03 }, /* e7 */
256 { 0x1f, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x1f }, /* e8 */
257 { 0x00, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* e9 */
258 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x0a, 0x1b }, /* ea */
259 { 0x0f, 0x10, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* eb */
260 { 0x00, 0x00, 0x00, 0x00, 0x0b, 0x15, 0x1a }, /* ec */
261 { 0x02, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x08 }, /* ed */
262 { 0x00, 0x0e, 0x10, 0x0e, 0x10, 0x0e, 0x00 }, /* ee */
263 { 0x06, 0x09, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* ef */
264 { 0x00, 0x00, 0x08, 0x15, 0x02, 0x00, 0x00 }, /* f0 */
265 { 0x00, 0x08, 0x15, 0x0a, 0x15, 0x02, 0x00 }, /* f1 */
266 { 0x08, 0x0f, 0x12, 0x0f, 0x0a, 0x1f, 0x02 }, /* f2 */
267 { 0x0f, 0x09, 0x0f, 0x09, 0x0f, 0x09, 0x11 }, /* f3 */
268 { 0x04, 0x15, 0x15, 0x04, 0x04, 0x0a, 0x11 }, /* f4 */
269 { 0x04, 0x04, 0x1d, 0x06, 0x0e, 0x15, 0x04 }, /* f5 */
270 { 0x04, 0x04, 0x1f, 0x04, 0x0e, 0x15, 0x04 }, /* f6 */
271 { 0x04, 0x0a, 0x11, 0x0e, 0x04, 0x0e, 0x1f }, /* f7 */
272 { 0x04, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x1f }, /* f8 */
273 { 0x1f, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x1f }, /* f9 */
274 { 0x00, 0x01, 0x1e, 0x04, 0x1f, 0x04, 0x04 }, /* fa */
275 { 0x00, 0x00, 0x1f, 0x08, 0x0f, 0x09, 0x11 }, /* fb */
276 { 0x00, 0x00, 0x1f, 0x15, 0x1f, 0x11, 0x11 }, /* fc */
277 { 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a }, /* fd */
278 { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* fe */
279 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ff */
280};
281static unsigned char font_player_oldlcd[256][7] = {
282 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
283 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
284 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
285 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
286 { 0x0e, 0x11, 0x17, 0x15, 0x17, 0x10, 0x0e }, /* 04 */
287 { 0x06, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x1f }, /* 05 */
288 { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 06 */
289 { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 07 */
290 { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 08 */
291 { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 09 */
292 { 0x08, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 0a */
293 { 0x08, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* 0b */
294 { 0x08, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 0c */
295 { 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x02, 0x0e }, /* 0d */
296 { 0x10, 0x10, 0x17, 0x14, 0x1e, 0x04, 0x04 }, /* 0e */
297 { 0x01, 0x0e, 0x13, 0x15, 0x19, 0x0e, 0x10 }, /* 0f */
298 { 0x00, 0x02, 0x0e, 0x15, 0x15, 0x0e, 0x08 }, /* 10 */
299 { 0x1c, 0x10, 0x17, 0x1d, 0x07, 0x06, 0x05 }, /* 11 */
300 { 0x04, 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x11 }, /* 12 */
301 { 0x04, 0x0a, 0x04, 0x01, 0x0f, 0x11, 0x0f }, /* 13 */
302 { 0x00, 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x1f }, /* 14 */
303 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 15 */
304 { 0x0e, 0x04, 0x1f, 0x15, 0x1f, 0x04, 0x0e }, /* 16 */
305 { 0x1f, 0x11, 0x11, 0x10, 0x10, 0x10, 0x10 }, /* 17 */
306 { 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x11, 0x11 }, /* 18 */
307 { 0x0e, 0x11, 0x11, 0x11, 0x0a, 0x0a, 0x1b }, /* 19 */
308 { 0x1f, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a }, /* 1a */
309 { 0x15, 0x15, 0x15, 0x15, 0x0e, 0x04, 0x04 }, /* 1b */
310 { 0x1f, 0x08, 0x04, 0x02, 0x04, 0x08, 0x1f }, /* 1c */
311 { 0x0e, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* 1d */
312 { 0x1f, 0x11, 0x00, 0x0e, 0x00, 0x11, 0x1f }, /* 1e */
313 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 1f */
314 { 0x0f, 0x14, 0x14, 0x1f, 0x14, 0x14, 0x17 }, /* 20 */
315 { 0x00, 0x00, 0x1a, 0x05, 0x0f, 0x14, 0x0f }, /* 21 */
316 { 0x0c, 0x12, 0x16, 0x11, 0x11, 0x16, 0x10 }, /* 22 */
317 { 0x02, 0x04, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 23 */
318 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 24 */
319 { 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04 }, /* 25 */
320 { 0x1b, 0x09, 0x12, 0x00, 0x00, 0x00, 0x00 }, /* 26 */
321 { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 27 */
322 { 0x00, 0x11, 0x0e, 0x0a, 0x0e, 0x11, 0x00 }, /* 28 */
323 { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 29 */
324 { 0x08, 0x14, 0x14, 0x09, 0x15, 0x12, 0x0d }, /* 2a */
325 { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 2b */
326 { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 2c */
327 { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 2d */
328 { 0x04, 0x15, 0x0e, 0x04, 0x0e, 0x15, 0x04 }, /* 2e */
329 { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2f */
330 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 30 */
331 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 31 */
332 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 32 */
333 { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 33 */
334 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 34 */
335 { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 35 */
336 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 36 */
337 { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 37 */
338 { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 38 */
339 { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 39 */
340 { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 3a */
341 { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 3b */
342 { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 3c */
343 { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 3d */
344 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3e */
345 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x04, 0x08 }, /* 3f */
346 { 0x03, 0x06, 0x0c, 0x18, 0x0c, 0x06, 0x03 }, /* 40 */
347 { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 41 */
348 { 0x18, 0x0c, 0x06, 0x03, 0x06, 0x0c, 0x18 }, /* 42 */
349 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 43 */
350 { 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 44 */
351 { 0x04, 0x0a, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 45 */
352 { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 46 */
353 { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 47 */
354 { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 48 */
355 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 49 */
356 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 4a */
357 { 0x0e, 0x10, 0x10, 0x17, 0x11, 0x11, 0x0e }, /* 4b */
358 { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 4c */
359 { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 4d */
360 { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4e */
361 { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4f */
362 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 50 */
363 { 0x11, 0x1b, 0x15, 0x11, 0x11, 0x11, 0x11 }, /* 51 */
364 { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 52 */
365 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 53 */
366 { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 54 */
367 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 55 */
368 { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 56 */
369 { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 57 */
370 { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 58 */
371 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 59 */
372 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 5a */
373 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 5b */
374 { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 5c */
375 { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 5d */
376 { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5e */
377 { 0x0a, 0x00, 0x04, 0x0a, 0x11, 0x1f, 0x11 }, /* 5f */
378 { 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 60 */
379 { 0x0d, 0x12, 0x00, 0x19, 0x15, 0x13, 0x11 }, /* 61 */
380 { 0x0a, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 62 */
381 { 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x01, 0x0e }, /* 63 */
382 { 0x04, 0x00, 0x04, 0x08, 0x10, 0x11, 0x0e }, /* 64 */
383 { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 65 */
384 { 0x10, 0x10, 0x1e, 0x11, 0x11, 0x11, 0x1e }, /* 66 */
385 { 0x00, 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* 67 */
386 { 0x01, 0x01, 0x0f, 0x11, 0x11, 0x11, 0x0f }, /* 68 */
387 { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0f }, /* 69 */
388 { 0x03, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x04 }, /* 6a */
389 { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* 6b */
390 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6c */
391 { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 6d */
392 { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6e */
393 { 0x08, 0x08, 0x09, 0x0a, 0x0c, 0x0a, 0x09 }, /* 6f */
394 { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 70 */
395 { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x15, 0x15 }, /* 71 */
396 { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 72 */
397 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 73 */
398 { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 74 */
399 { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x01 }, /* 75 */
400 { 0x00, 0x00, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* 76 */
401 { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 77 */
402 { 0x04, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03 }, /* 78 */
403 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 79 */
404 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 7a */
405 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 7b */
406 { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 7c */
407 { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 7d */
408 { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7e */
409 { 0x0a, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 7f */
410 { 0x00, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 80 */
411 { 0x0d, 0x12, 0x00, 0x16, 0x19, 0x11, 0x11 }, /* 81 */
412 { 0x00, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 82 */
413 { 0x08, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 83 */
414 { 0x00, 0x0f, 0x10, 0x10, 0x0f, 0x02, 0x04 }, /* 84 */
415 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00 }, /* 85 */
416 { 0x00, 0x00, 0x04, 0x0e, 0x1f, 0x00, 0x00 }, /* 86 */
417 { 0x00, 0x00, 0x1f, 0x0e, 0x04, 0x00, 0x00 }, /* 87 */
418 { 0x02, 0x06, 0x0e, 0x1e, 0x0e, 0x06, 0x02 }, /* 88 */
419 { 0x08, 0x0c, 0x0e, 0x0f, 0x0e, 0x0c, 0x08 }, /* 89 */
420 { 0x1c, 0x1f, 0x13, 0x10, 0x10, 0x10, 0x10 }, /* 8a */
421 { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* 8b */
422 { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8c */
423 { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8d */
424 { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8e */
425 { 0x0d, 0x12, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8f */
426 { 0x08, 0x04, 0x1f, 0x10, 0x1e, 0x10, 0x1f }, /* 90 */
427 { 0x04, 0x0a, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 91 */
428 { 0x0a, 0x00, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 92 */
429 { 0x08, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 93 */
430 { 0x02, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 94 */
431 { 0x0c, 0x0a, 0x09, 0x1d, 0x09, 0x0a, 0x0c }, /* 95 */
432 { 0x08, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 96 */
433 { 0x02, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 97 */
434 { 0x04, 0x0a, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 98 */
435 { 0x0d, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 99 */
436 { 0x08, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9a */
437 { 0x02, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9b */
438 { 0x02, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9c */
439 { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9d */
440 { 0x0d, 0x12, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9e */
441 { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 9f */
442 { 0x0a, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* a0 */
443 { 0x02, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a1 */
444 { 0x04, 0x0a, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a2 */
445 { 0x0a, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a3 */
446 { 0x02, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a4 */
447 { 0x04, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a5 */
448 { 0x0d, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a6 */
449 { 0x02, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* a7 */
450 { 0x04, 0x04, 0x0f, 0x10, 0x10, 0x0f, 0x04 }, /* a8 */
451 { 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03 }, /* a9 */
452 { 0x0a, 0x04, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* aa */
453 { 0x0a, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* ab */
454 { 0x0a, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* ac */
455 { 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* ad */
456 { 0x04, 0x0a, 0x04, 0x11, 0x11, 0x13, 0x0d }, /* ae */
457 { 0x02, 0x04, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* af */
458 { 0x02, 0x0f, 0x02, 0x0e, 0x12, 0x12, 0x0e }, /* b0 */
459 { 0x02, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* b1 */
460 { 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x04, 0x06 }, /* b2 */
461 { 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x02, 0x03 }, /* b3 */
462 { 0x04, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b4 */
463 { 0x02, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b5 */
464 { 0x02, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* b6 */
465 { 0x02, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* b7 */
466 { 0x0c, 0x04, 0x06, 0x0c, 0x04, 0x04, 0x0e }, /* b8 */
467 { 0x04, 0x0e, 0x1f, 0x1f, 0x1b, 0x04, 0x0e }, /* b9 */
468 { 0x0a, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* ba */
469 { 0x09, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x06 }, /* bb */
470 { 0x05, 0x05, 0x0c, 0x14, 0x14, 0x14, 0x0c }, /* bc */
471 { 0x0a, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* bd */
472 { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* be */
473 { 0x0f, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01 }, /* bf */
474 { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c0 */
475 { 0x1f, 0x00, 0x0e, 0x10, 0x17, 0x11, 0x0e }, /* c1 */
476 { 0x1f, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* c2 */
477 { 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04, 0x0c }, /* c3 */
478 { 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04 }, /* c4 */
479 { 0x04, 0x00, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* c5 */
480 { 0x00, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* c6 */
481 { 0x05, 0x0a, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* c7 */
482 { 0x09, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* c8 */
483 { 0x09, 0x12, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* c9 */
484 { 0x09, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* ca */
485 { 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x0f }, /* cb */
486 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x01, 0x1e }, /* cc */
487 { 0x00, 0x1b, 0x1f, 0x1f, 0x0e, 0x04, 0x00 }, /* cd */
488 { 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18 }, /* ce */
489 { 0x0e, 0x11, 0x04, 0x0a, 0x1b, 0x1f, 0x00 }, /* cf */
490 { 0x0a, 0x15, 0x04, 0x07, 0x00, 0x11, 0x0a }, /* d0 */
491 { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* d1 */
492 { 0x01, 0x03, 0x1d, 0x11, 0x1d, 0x03, 0x01 }, /* d2 */
493 { 0x0e, 0x11, 0x11, 0x1f, 0x1b, 0x1b, 0x1f }, /* d3 */
494 { 0x00, 0x01, 0x02, 0x0a, 0x04, 0x04, 0x00 }, /* d4 */
495 { 0x04, 0x0e, 0x1f, 0x00, 0x1f, 0x0e, 0x04 }, /* d5 */
496 { 0x02, 0x02, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* d6 */
497 { 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b }, /* d7 */
498 { 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b }, /* d8 */
499 { 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03, 0x06 }, /* d9 */
500 { 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b }, /* da */
501 { 0x00, 0x04, 0x0e, 0x1f, 0x0e, 0x04, 0x00 }, /* db */
502 { 0x00, 0x00, 0x1f, 0x1b, 0x15, 0x11, 0x1f }, /* dc */
503 { 0x0e, 0x0e, 0x04, 0x1f, 0x0e, 0x0e, 0x0a }, /* dd */
504 { 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x0a }, /* de */
505 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* df */
506 { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* e0 */
507 { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* e1 */
508 { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e2 */
509 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e3 */
510 { 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04 }, /* e4 */
511 { 0x04, 0x09, 0x0a, 0x0a, 0x0a, 0x09, 0x04 }, /* e5 */
512 { 0x00, 0x1f, 0x11, 0x11, 0x1f, 0x04, 0x1f }, /* e6 */
513 { 0x00, 0x07, 0x03, 0x05, 0x08, 0x10, 0x00 }, /* e7 */
514 { 0x00, 0x10, 0x08, 0x05, 0x03, 0x07, 0x00 }, /* e8 */
515 { 0x09, 0x06, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* e9 */
516 { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ea */
517 { 0x00, 0x00, 0x10, 0x08, 0x04, 0x04, 0x04 }, /* eb */
518 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ec */
519 { 0x1f, 0x18, 0x14, 0x12, 0x15, 0x18, 0x1f }, /* ed */
520 { 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ee */
521 { 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ef */
522 { 0x00, 0x03, 0x07, 0x0c, 0x18, 0x1c, 0x1c }, /* f0 */
523 { 0x1c, 0x10, 0x1c, 0x07, 0x1c, 0x04, 0x07 }, /* f1 */
524 { 0x00, 0x1e, 0x03, 0x09, 0x19, 0x09, 0x1d }, /* f2 */
525 { 0x1e, 0x01, 0x19, 0x05, 0x09, 0x1d, 0x01 }, /* f3 */
526 { 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00 }, /* f4 */
527 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f }, /* f5 */
528 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e }, /* f6 */
529 { 0x04, 0x04, 0x04, 0x08, 0x10, 0x00, 0x00 }, /* f7 */
530 { 0x07, 0x03, 0x05, 0x08, 0x10, 0x10, 0x0f }, /* f8 */
531 { 0x04, 0x0e, 0x1f, 0x11, 0x11, 0x15, 0x1f }, /* f9 */
532 { 0x1f, 0x03, 0x1a, 0x02, 0x1a, 0x02, 0x1e }, /* fa */
533 { 0x00, 0x0e, 0x1f, 0x11, 0x1f, 0x0e, 0x00 }, /* fb */
534 { 0x03, 0x05, 0x09, 0x09, 0x0b, 0x1b, 0x18 }, /* fc */
535 { 0x1f, 0x03, 0x05, 0x09, 0x15, 0x03, 0x1f }, /* fd */
536 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x1c, 0x1c }, /* fe */
537 { 0x1c, 0x1c, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ff */
538};
539
540unsigned char (*font_player)[256][7] = &font_player_newlcd;
541
542void font_init(void)
543{
544 if (is_new_player())
545 font_player = &font_player_newlcd;
546 else
547 font_player = &font_player_oldlcd;
548}
diff --git a/uisimulator/common/font-player.h b/uisimulator/common/font-player.h
deleted file mode 100644
index bfa88d7321..0000000000
--- a/uisimulator/common/font-player.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef __FONT_PLAYER_H__
21#define __FONT_PLAYER_H__
22
23extern unsigned char (*font_player)[256][7];
24
25void font_init(void);
26
27#endif /* __FONT_PLAYER_H__ */
diff --git a/uisimulator/common/lcd-common.c b/uisimulator/common/lcd-common.c
index 0c8e0dcad5..97cc17638e 100644
--- a/uisimulator/common/lcd-common.c
+++ b/uisimulator/common/lcd-common.c
@@ -27,7 +27,7 @@
27#include "system.h" 27#include "system.h"
28#include "lcd.h" 28#include "lcd.h"
29#if defined(HAVE_TRANSFLECTIVE_LCD) && defined(HAVE_LCD_SLEEP) 29#if defined(HAVE_TRANSFLECTIVE_LCD) && defined(HAVE_LCD_SLEEP)
30/* in uisimulator/sdl/lcd-bitmap.c and lcd-charcell.c */ 30/* in uisimulator/sdl/lcd-bitmap.c */
31extern void sim_backlight(int value); 31extern void sim_backlight(int value);
32#endif 32#endif
33 33
diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c
deleted file mode 100644
index 14efded5d4..0000000000
--- a/uisimulator/common/lcd-playersim.c
+++ /dev/null
@@ -1,119 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Alan Korr
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include "config.h"
22#include "hwcompat.h"
23
24#include "lcd.h"
25#include "lcd-charcell.h"
26#include "kernel.h"
27#include "thread.h"
28#include <string.h>
29#include <stdlib.h>
30#include "debug.h"
31#include "system.h"
32
33#include "font-player.h"
34#include "lcd-playersim.h"
35
36/*** definitions ***/
37
38bool sim_lcd_framebuffer[SIM_LCD_HEIGHT][SIM_LCD_WIDTH];
39
40static int double_height = 1;
41
42void lcd_print_icon(int x, int icon_line, bool enable, char **icon)
43{
44 int row = 0, col = 0; /* shut up gcc */
45 int y = (ICON_HEIGHT+(CHAR_HEIGHT*2+2)*CHAR_PIXEL) * icon_line;
46
47 y += BORDER_MARGIN;
48 x += BORDER_MARGIN;
49
50 for (; icon[row]; row++)
51 {
52 for (col = 0; icon[row][col]; col++)
53 {
54 switch (icon[row][col])
55 {
56 case '*':
57 sim_lcd_framebuffer[y+row][x+col] = enable;
58 break;
59
60 case ' ':
61 sim_lcd_framebuffer[y+row][x+col] = false;
62 break;
63 }
64 }
65 }
66 sim_lcd_update_rect(x, y, col, row);
67 /* icon drawing updates immediately */
68}
69
70void lcd_print_char(int x, int y, unsigned char ch)
71{
72 int xpos = x * CHAR_WIDTH*CHAR_PIXEL;
73 int ypos = y * CHAR_HEIGHT*CHAR_PIXEL + ICON_HEIGHT;
74 int row, col, r, c;
75
76 if (double_height > 1 && y == 1)
77 return; /* only one row available if text is double height */
78
79 for (row = 0; row < 7; row ++)
80 {
81 unsigned fontbitmap = (*font_player)[ch][row];
82 int height = (row == 3) ? 1 : double_height;
83
84 y = ypos + row * CHAR_PIXEL * double_height;
85 for (col = 0; col < 5; col++)
86 {
87 bool fontbit = fontbitmap & (0x10 >> col);
88
89 x = xpos + col * CHAR_PIXEL;
90 for (r = 0; r < height * CHAR_PIXEL; r++)
91 for (c = 0; c < CHAR_PIXEL; c++)
92 sim_lcd_framebuffer[y+r][x+c] = fontbit;
93 }
94 }
95 if (double_height > 1)
96 {
97 y = ypos + 15*CHAR_PIXEL;
98 for (r = 0; r < CHAR_PIXEL; r++)
99 for (c = 0; c < 5*CHAR_PIXEL; c++)
100 sim_lcd_framebuffer[y+r][xpos+c] = false;
101 }
102}
103
104void lcd_double_height(bool on)
105{
106 int newval = (is_new_player() && on) ? 2 : 1;
107
108 if (newval != double_height)
109 {
110 double_height = newval;
111 lcd_update();
112 }
113}
114
115void sim_lcd_define_pattern(int pat, const char *pattern)
116{
117 if (pat < lcd_pattern_count)
118 memcpy((*font_player)[pat], pattern, 7);
119}
diff --git a/uisimulator/common/lcd-playersim.h b/uisimulator/common/lcd-playersim.h
deleted file mode 100644
index 63e8b80eba..0000000000
--- a/uisimulator/common/lcd-playersim.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by Kjell Ericson
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#define ICON_HEIGHT 12
23#define CHAR_HEIGHT 8
24
25#ifdef CHAR_WIDTH
26 #undef CHAR_WIDTH
27#endif
28
29#define CHAR_WIDTH 6
30#define CHAR_PIXEL 2
31#define BORDER_MARGIN 1
32
33extern bool sim_lcd_framebuffer[SIM_LCD_HEIGHT][SIM_LCD_WIDTH];
34
35void lcd_print_icon(int x, int icon_line, bool enable, char **icon);
36void lcd_print_char(int x, int y, unsigned char ch);
37void sim_lcd_update_rect(int x, int y, int width, int height);
38void sim_lcd_define_pattern(int pat, const char *pattern);
diff --git a/uisimulator/common/sim_icons.c b/uisimulator/common/sim_icons.c
deleted file mode 100644
index b72f6003e8..0000000000
--- a/uisimulator/common/sim_icons.c
+++ /dev/null
@@ -1,312 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Mats Lidell <matsl@contactor.se>
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include <stdio.h>
22#include "config.h"
23
24#include <lcd.h>
25#include <kernel.h>
26#include <string.h>
27#include <debug.h>
28
29extern void lcd_print_icon(int x, int icon_line, bool enable, char **icon);
30
31static char* icon_battery_bit[]=
32{
33 "-----",
34 " ",
35 "*****",
36 "*****",
37 "*****",
38 "*****",
39 "*****",
40 "*****",
41 " ",
42 "-----",
43 NULL
44};
45
46static char* icon_battery[]=
47{
48 "********************* ",
49 "* * ",
50 "* ----- ----- ----- * ",
51 "* ----- ----- ----- ***",
52 "* ----- ----- ----- * *",
53 "* ----- ----- ----- * *",
54 "* ----- ----- ----- ***",
55 "* ----- ----- ----- * ",
56 "* * ",
57 "********************* ",
58 NULL
59};
60
61static char* icon_volume[]=
62{
63 " ",
64 " ",
65 " ",
66 " ",
67 "* * * ",
68 "* * * ",
69 " * * *** * ",
70 " * * * * * ",
71 " * * * * ",
72 " * *** * ",
73 NULL
74};
75
76static char* icon_volume_1[]=
77{
78 " ",
79 " ",
80 " ",
81 " ",
82 "**",
83 "**",
84 "**",
85 "**",
86 "**",
87 "**",
88 NULL
89};
90
91static char* icon_volume_2[]=
92{
93 " ",
94 " ",
95 " ",
96 "**",
97 "**",
98 "**",
99 "**",
100 "**",
101 "**",
102 "**",
103 NULL
104};
105
106static char* icon_volume_3[]=
107{
108 " ",
109 " ",
110 "**",
111 "**",
112 "**",
113 "**",
114 "**",
115 "**",
116 "**",
117 "**",
118 NULL
119};
120
121static char* icon_volume_4[]=
122{
123 " ",
124 "**",
125 "**",
126 "**",
127 "**",
128 "**",
129 "**",
130 "**",
131 "**",
132 "**",
133 NULL
134};
135
136static char* icon_volume_5[]=
137{
138 "**",
139 "**",
140 "**",
141 "**",
142 "**",
143 "**",
144 "**",
145 "**",
146 "**",
147 "**",
148 NULL
149};
150
151static char* icon_pause[]=
152{
153 " **** **** ",
154 " **** **** ",
155 " **** **** ",
156 " **** **** ",
157 " **** **** ",
158 " **** **** ",
159 " **** **** ",
160 " **** **** ",
161 " **** **** ",
162 " **** **** ",
163 NULL
164};
165
166static char* icon_play[]=
167{
168 "** ",
169 "***** ",
170 "******* ",
171 "********* ",
172 "*********** ",
173 "********* ",
174 "******* ",
175 "***** ",
176 "** ",
177 " ",
178 NULL
179};
180
181static char* icon_record[]=
182{
183 " *** ",
184 " ***** ",
185 " ******* ",
186 " ********* ",
187 " ********* ",
188 " ********* ",
189 " ******* ",
190 " ***** ",
191 " *** ",
192 " ",
193 NULL
194};
195
196static char* icon_usb[]=
197{
198 " ********* ",
199 " ** ** ",
200 " * ",
201 " ** * ** ",
202 "***********************",
203 " ** * ** ",
204 " * ",
205 " ** ** ",
206 " ******** ",
207 " ** ",
208 NULL
209};
210
211static char* icon_audio[]=
212{
213 " *************************** ",
214 " ** ** ",
215 "* ** * * **** * *** *",
216 "* * * * * * * * * * *",
217 "* * * * * * * * * * *",
218 "* ****** * * * * * * * *",
219 "* * * * * * * * * * *",
220 "* * * *** **** * *** *",
221 " ** ** ",
222 " *************************** ",
223 NULL
224};
225
226static char* icon_param[]=
227{
228 " ********************************* ",
229 " ** ** ",
230 "* **** ** **** ** ** ** *",
231 "* * * * * * * * * ** ** *",
232 "* * * * * * * * * * * * * *",
233 "* **** ****** **** ****** * * * * *",
234 "* * * * * * * * * * * *",
235 "* * * * * * * * * * * *",
236 " ** ** ",
237 " ********************************* ",
238 NULL
239};
240
241static char* icon_repeat[]=
242{
243 " ",
244 " *************",
245 " * ",
246 " * ",
247 "* ",
248 "* ",
249 "* ** ",
250 " * **** ",
251 " * ****** ",
252 " *************",
253 NULL
254};
255
256static char* icon_repeat2[]=
257{
258 " ",
259 " *",
260 " **",
261 "***",
262 " *",
263 " *",
264 " *",
265 " *",
266 " *",
267 " *",
268 NULL
269};
270
271
272struct icon_info
273{
274 char** bitmap;
275 int xpos;
276 int row;
277};
278
279#define ICON_VOLUME_POS 102
280#define ICON_VOLUME_SIZE 14
281#define ICON_VOLUME_X_SIZE 2
282
283static struct icon_info icons [] =
284{
285
286 {icon_battery, 0, 0},
287 {icon_battery_bit, 2, 0},
288 {icon_battery_bit, 8, 0},
289 {icon_battery_bit, 14, 0},
290 {icon_usb, 0, 1},
291 {icon_play, 36, 0},
292 {icon_record, 48, 0},
293 {icon_pause, 60, 0},
294 {icon_audio, 37, 1},
295 {icon_repeat, 74, 0},
296 {icon_repeat2, 94, 0},
297 {icon_volume, ICON_VOLUME_POS, 0},
298 {icon_volume_1, ICON_VOLUME_POS+ICON_VOLUME_SIZE, 0},
299 {icon_volume_2, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(1*ICON_VOLUME_X_SIZE)+1, 0},
300 {icon_volume_3, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(2*ICON_VOLUME_X_SIZE)+2, 0},
301 {icon_volume_4, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(3*ICON_VOLUME_X_SIZE)+3, 0},
302 {icon_volume_5, ICON_VOLUME_POS+ICON_VOLUME_SIZE+(4*ICON_VOLUME_X_SIZE)+4, 0},
303 {icon_param, 90, 1}
304};
305
306void
307lcd_icon(int icon, bool enable)
308{
309 lcd_print_icon(icons[icon].xpos, icons[icon].row, enable,
310 icons[icon].bitmap);
311}
312
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 0ad78fdb7c..9374a97d66 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -304,26 +304,6 @@ void mpeg_set_pitch(int pitch)
304 (void)pitch; 304 (void)pitch;
305} 305}
306 306
307#ifdef HAVE_LCD_CHARCELLS
308void lcd_clearrect (int x, int y, int nx, int ny)
309{
310 /* Reprint char if you want to change anything */
311 (void)x;
312 (void)y;
313 (void)nx;
314 (void)ny;
315}
316
317void lcd_fillrect (int x, int y, int nx, int ny)
318{
319 /* Reprint char if you want to change display anything */
320 (void)x;
321 (void)y;
322 (void)nx;
323 (void)ny;
324}
325#endif
326
327void cpu_sleep(bool enabled) 307void cpu_sleep(bool enabled)
328{ 308{
329 (void)enabled; 309 (void)enabled;