From ad4e3d665734b14a28f1ba5fa874663772dab3e7 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 26 Mar 2007 07:52:13 +0000 Subject: First step of charcell LCD code rework: * Make it fully unicode aware so that adding non-ISO8859-1 scripts becomes possible (limited by the LCD capabilities of course). * Make the API more similar to the bitmap LCD code's API. * Moved hardware dependent parts to target tree. * Simplified code. * Jumpscroll temporarily non-functional. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12916 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-charcell.c | 612 +++++++++++++++++++++++++ firmware/drivers/lcd-charset-player.c | 594 ++++++++++++++++++++++++ firmware/drivers/lcd-player-charset.c | 751 ------------------------------ firmware/drivers/lcd-player.c | 830 ---------------------------------- 4 files changed, 1206 insertions(+), 1581 deletions(-) create mode 100644 firmware/drivers/lcd-charcell.c create mode 100644 firmware/drivers/lcd-charset-player.c delete mode 100644 firmware/drivers/lcd-player-charset.c delete mode 100644 firmware/drivers/lcd-player.c (limited to 'firmware/drivers') diff --git a/firmware/drivers/lcd-charcell.c b/firmware/drivers/lcd-charcell.c new file mode 100644 index 0000000000..ce0eca94ca --- /dev/null +++ b/firmware/drivers/lcd-charcell.c @@ -0,0 +1,612 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 by Jens Arnold + * Based on the work of Alan Korr, Kjell Ericson and others + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "config.h" +#include "hwcompat.h" + +#include "lcd.h" +#include "kernel.h" +#include "thread.h" +#include +#include +#include "file.h" +#include "debug.h" +#include "system.h" +#include "lcd-charcell.h" +#include "rbunicode.h" + +/** definitions **/ + +#define SCROLLABLE_LINES LCD_HEIGHT +#define VARIABLE_XCHARS 16 /* number of software user-definable characters */ + +#define NO_PATTERN (-1) + +#define SCROLL_MODE_OFF 0 +#define SCROLL_MODE_RUN 1 + +/* track usage of user-definable characters */ +struct pattern_info { + short count; + unsigned short xchar; +}; + +struct cursor_info { + unsigned char hw_char; + bool enabled; + bool visible; + int x; + int y; + int divider; + int downcount; +}; + +static int find_xchar(unsigned long ucs); + +/** globals **/ + +/* The "frame"buffer */ +static unsigned char lcd_buffer[LCD_WIDTH][LCD_HEIGHT]; +#ifdef SIMULATOR +unsigned char hardware_buffer_lcd[LCD_WIDTH][LCD_HEIGHT]; +#endif + +static int xmargin = 0; +static int ymargin = 0; + +static unsigned char xfont_variable[VARIABLE_XCHARS][(HW_PATTERN_SIZE+3)&~3]; + /* round up pattern size to a multiple of 4 bytes for faster access */ +static bool xfont_variable_locked[VARIABLE_XCHARS]; +static struct pattern_info hw_pattern[MAX_HW_PATTERNS]; +static struct cursor_info cursor; + +/* scrolling */ +static volatile int scrolling_lines=0; /* Bitpattern of which lines are scrolling */ +static void scroll_thread(void); +static char scroll_stack[DEFAULT_STACK_SIZE]; +static const char scroll_name[] = "scroll"; +static int scroll_ticks = 12; /* # of ticks between updates */ +static int scroll_delay = HZ/2; /* delay before starting scroll */ +static int bidir_limit = 50; /* percent */ +static int jump_scroll_delay = HZ/4; /* delay between jump scroll jumps */ +static int jump_scroll = 0; /* 0=off, 1=once, ..., JUMP_SCROLL_ALWAYS */ +static struct scrollinfo scroll[SCROLLABLE_LINES]; + +static const char scroll_tick_table[16] = { + /* Hz values: + 1, 1.25, 1.55, 2, 2.5, 3.12, 4, 5, 6.25, 8.33, 10, 12.5, 16.7, 20, 25, 33 */ + 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3 +}; + +/* LCD init */ +void lcd_init (void) +{ + lcd_init_device(); + lcd_charset_init(); + memset(hw_pattern, 0, sizeof(hw_pattern)); + memset(lcd_buffer, xchar_info[find_xchar(' ')].hw_char, sizeof(lcd_buffer)); + + create_thread(scroll_thread, scroll_stack, + sizeof(scroll_stack), scroll_name + IF_PRIO(, PRIORITY_USER_INTERFACE) + IF_COP(, CPU, false)); +} + +/** parameter handling **/ + +void lcd_setmargins(int x, int y) +{ + xmargin = x; + ymargin = y; +} + +int lcd_getxmargin(void) +{ + return xmargin; +} + +int lcd_getymargin(void) +{ + return ymargin; +} + +int lcd_getstringsize(const unsigned char *str, int *w, int *h) +{ + int width = utf8length(str); + + if (w) + *w = width; + if (h) + *h = 1; + + return width; +} + +/** low-level functions **/ + +static int find_xchar(unsigned long ucs) +{ + int low = 0; + int high = xchar_info_size - 1; + + do + { + int probe = (low + high) >> 1; + + if (xchar_info[probe].ucs < ucs) + low = probe + 1; + else if (xchar_info[probe].ucs > ucs) + high = probe - 1; + else + return probe; + } + while (low <= high); + + /* Not found: return index of no-char symbol (last symbol, hardcoded). */ + return xchar_info_size - 1; +} + +static int xchar_to_pat(int xchar) +{ + int i; + + for (i = 0; i < hw_pattern_count; i++) + if (hw_pattern[i].xchar == xchar) + return i; + + return NO_PATTERN; +} + +static const unsigned char *xchar_to_glyph(int xchar) +{ + unsigned index = xchar_info[xchar].glyph; + + if (index & 0x8000) + return xfont_variable[index & 0x7fff]; + else + return xfont_fixed[index]; +} + +static void lcd_free_pat(int xchar) +{ + int x, y; + unsigned char substitute; + int pat = xchar_to_pat(xchar); + + if (pat != NO_PATTERN) + { + substitute = xchar_info[xchar].hw_char; + + for (x = 0; x < LCD_WIDTH; x++) + { + for (y = 0; y < LCD_HEIGHT; y++) + { + if (pat == lcd_buffer[x][y]) + { + lcd_buffer[x][y] = substitute; +#ifdef SIMULATOR + hardware_buffer_lcd[x][y] = substitute; +#else + lcd_put_hw_char(x, y, substitute); +#endif + } + } + } + if (cursor.enabled && pat == cursor.hw_char) + cursor.hw_char = substitute; + + hw_pattern[pat].count = 0; +#ifdef SIMULATOR + lcd_update(); +#endif + } +} + +static int lcd_get_free_pat(int xchar) +{ + static int last_used_pat = 0; + + int pat = last_used_pat; /* start from last used pattern */ + int least_pat = pat; /* pattern with least priority */ + int least_priority = xchar_info[hw_pattern[pat].xchar].priority; + int i; + + for (i = 0; i < hw_pattern_count; i++) + { + if (++pat >= hw_pattern_count) /* Keep 'pat' within limits */ + pat = 0; + + if (hw_pattern[pat].count == 0) + { + hw_pattern[pat].xchar = xchar; + last_used_pat = pat; + return pat; + } + if (xchar_info[hw_pattern[pat].xchar].priority < least_priority) + { + least_priority = xchar_info[hw_pattern[pat].xchar].priority; + least_pat = pat; + } + } + if (xchar_info[xchar].priority > least_priority) /* prioritized char */ + { + lcd_free_pat(hw_pattern[least_pat].xchar); + hw_pattern[least_pat].xchar = xchar; + last_used_pat = least_pat; + return least_pat; + } + return NO_PATTERN; +} + +static int map_xchar(int xchar) +{ + int pat; + + if (xchar_info[xchar].priority > 0) /* soft char */ + { + pat = xchar_to_pat(xchar); + + if (pat == NO_PATTERN) /* not yet mapped */ + { + pat = lcd_get_free_pat(xchar); /* try to map */ + if (pat == NO_PATTERN) /* failed: just use substitute */ + return xchar_info[xchar].hw_char; + else /* define pattern */ + lcd_define_hw_pattern(pat, xchar_to_glyph(xchar)); + } + hw_pattern[pat].count++; /* increase reference count */ + return pat; + } + else /* hardware char */ + return xchar_info[xchar].hw_char; +} + +static void lcd_putxchar(int x, int y, int xchar) +{ + int lcd_char = lcd_buffer[x][y]; + + if (lcd_char < hw_pattern_count) /* old char was soft */ + hw_pattern[lcd_char].count--; /* decrease old reference count */ + + lcd_buffer[x][y] = lcd_char = map_xchar(xchar); +#ifdef SIMULATOR + hardware_buffer_lcd[x][y] = lcd_char; + lcd_update(); +#else + lcd_put_hw_char(x, y, lcd_char); +#endif +} + +/** user-definable pattern handling **/ + +unsigned long lcd_get_locked_pattern(void) +{ + int i = 0; + + for (i = 0; i < VARIABLE_XCHARS; i++) + { + if (!xfont_variable_locked[i]) + { + xfont_variable_locked[i] = true; + return 0xe000 + i; /* hard-coded */ + } + } + return 0; +} + +void lcd_unlock_pattern(unsigned long ucs) +{ + int xchar = find_xchar(ucs); + int index = xchar_info[xchar].glyph; + + if (index & 0x8000) /* variable extended char */ + { + lcd_free_pat(xchar); + xfont_variable_locked[index & 0x7fff] = false; + } +} + +void lcd_define_pattern(unsigned long ucs, const char *pattern) +{ + int xchar = find_xchar(ucs); + int index = xchar_info[xchar].glyph; + int pat; + + if (index & 0x8000) /* variable extended char */ + { + memcpy(xfont_variable[index & 0x7fff], pattern, HW_PATTERN_SIZE); + pat = xchar_to_pat(xchar); + if (pat != NO_PATTERN) + lcd_define_hw_pattern(pat, pattern); + } +} + +/** output functions **/ + +/* Clear the whole display */ +void lcd_clear_display(void) +{ + int x, y; + int xchar = find_xchar(' '); + + lcd_stop_scroll(); + lcd_remove_cursor(); + + for (x = 0; x < LCD_WIDTH; x++) + for (y = 0; y < LCD_HEIGHT; y++) + lcd_putxchar(x, y, xchar); +} + +/* Put an unicode character at the given position */ +void lcd_putc(int x, int y, unsigned long ucs) +{ + if ((unsigned)x >= LCD_WIDTH || (unsigned)y >= LCD_HEIGHT) + return; + + lcd_putxchar(x, y, find_xchar(ucs)); +} + +/* Show cursor (alternating with existing character) at the given position */ +void lcd_put_cursor(int x, int y, unsigned long cursor_ucs) +{ + if ((unsigned)x >= LCD_WIDTH || (unsigned)y >= LCD_HEIGHT + || cursor.enabled) + return; + + cursor.enabled = true; + cursor.visible = false; + cursor.hw_char = map_xchar(find_xchar(cursor_ucs)); + cursor.x = x; + cursor.y = y; + cursor.downcount = 0; + cursor.divider = 4; +} + +/* Remove the cursor */ +void lcd_remove_cursor(void) +{ + if (cursor.enabled) + { + if (cursor.hw_char < hw_pattern_count) /* soft char, unmap */ + hw_pattern[cursor.hw_char].count--; + + cursor.enabled = false; +#ifdef SIMULATOR + hardware_buffer_lcd[cursor.x][cursor.y] = lcd_buffer[cursor.x][cursor.y]; +#else + lcd_put_hw_char(cursor.x, cursor.y, lcd_buffer[cursor.x][cursor.y]); +#endif + } +} + +/* Put a string at a given position, skipping first ofs chars */ +static int lcd_putsxyofs(int x, int y, int ofs, const unsigned char *str) +{ + unsigned short ucs; + const unsigned char *utf8 = str; + + while (*utf8 && x < LCD_WIDTH) + { + utf8 = utf8decode(utf8, &ucs); + + if (ofs > 0) + { + ofs--; + continue; + } + lcd_putc(x++, y, ucs); + } + return x; +} + +/* Put a string at a given position */ +void lcd_putsxy(int x, int y, const unsigned char *str) +{ + lcd_putsxyofs(x, y, 0, str); +} + +/*** Line oriented text output ***/ + +/* Put a string at a given char position */ +void lcd_puts(int x, int y, const unsigned char *str) +{ + lcd_puts_offset(x, y, str, 0); +} + +/* Put a string at a given char position, skipping first offset chars */ +void lcd_puts_offset(int x, int y, const unsigned char *str, int offset) +{ + /* make sure scrolling is turned off on the line we are updating */ + scrolling_lines &= ~(1 << y); + + x += xmargin; + y += ymargin; + + x = lcd_putsxyofs(x, y, offset, str); + while (x < LCD_WIDTH) + lcd_putc(x++, y, ' '); +} + +/** scrolling **/ + +void lcd_stop_scroll(void) +{ + scrolling_lines=0; +} + +void lcd_scroll_speed(int speed) +{ + scroll_ticks = scroll_tick_table[speed]; +} + +void lcd_scroll_delay(int ms) +{ + scroll_delay = ms / (HZ / 10); +} + +void lcd_bidir_scroll(int percent) +{ + bidir_limit = percent; +} + +void lcd_jump_scroll(int mode) /* 0=off, 1=once, ..., JUMP_SCROLL_ALWAYS */ +{ + jump_scroll = mode; +} + +void lcd_jump_scroll_delay(int ms) +{ + jump_scroll_delay = ms / (HZ / 10); +} + +void lcd_puts_scroll(int x, int y, const unsigned char *string) +{ + lcd_puts_scroll_offset(x, y, string, 0); +} + +void lcd_puts_scroll_offset(int x, int y, const unsigned char *string, + int offset) +{ + struct scrollinfo* s; + int len; + + s = &scroll[y]; + + s->start_tick = current_tick + scroll_delay; + + lcd_puts_offset(x, y, string, offset); + len = utf8length(string); + + if (LCD_WIDTH - xmargin < len) + { + /* prepare scroll line */ + char *end; + + memset(s->line, 0, sizeof s->line); + strcpy(s->line, string); + + /* get width */ + s->len = utf8length(s->line); + + /* scroll bidirectional or forward only depending on the string width */ + if (bidir_limit) + { + s->bidir = s->len < (LCD_WIDTH - xmargin) * (100 + bidir_limit) / 100; + } + else + s->bidir = false; + + if (!s->bidir) /* add spaces if scrolling in the round */ + { + strcat(s->line, " "); + /* get new width incl. spaces */ + s->len += SCROLL_SPACING; + } + + end = strchr(s->line, '\0'); + strncpy(end, string, LCD_WIDTH); + + s->offset = offset; + s->startx = xmargin + x; + s->backward = false; + scrolling_lines |= (1<start_tick)) + continue; + + if (s->backward) + s->offset--; + else + s->offset++; + + xpos = s->startx; + ypos = ymargin + index; + + if (s->bidir) /* scroll bidirectional */ + { + if (s->offset <= 0) + { + /* at beginning of line */ + s->offset = 0; + s->backward = false; + s->start_tick = current_tick + scroll_delay * 2; + } + if (s->offset >= s->len - (LCD_WIDTH - xpos)) + { + /* at end of line */ + s->offset = s->len - (LCD_WIDTH - xpos); + s->backward = true; + s->start_tick = current_tick + scroll_delay * 2; + } + } + else /* scroll forward the whole time */ + { + if (s->offset >= s->len) + s->offset -= s->len; + } + lcd_putsxyofs(xpos, ypos, s->offset, s->line); + } + if (cursor.enabled) + { + if (--cursor.downcount < 0) + { + int lcd_char; + + cursor.downcount = cursor.divider; + cursor.visible = !cursor.visible; + lcd_char = cursor.visible ? cursor.hw_char + : lcd_buffer[cursor.x][cursor.y]; +#ifdef SIMULATOR + hardware_buffer_lcd[cursor.x][cursor.y] = lcd_char; +#else + lcd_put_hw_char(cursor.x, cursor.y, lcd_char); +#endif + } + } +#ifdef SIMULATOR + lcd_update(); +#endif + sleep(scroll_ticks); + } +} diff --git a/firmware/drivers/lcd-charset-player.c b/firmware/drivers/lcd-charset-player.c new file mode 100644 index 0000000000..1276f2840d --- /dev/null +++ b/firmware/drivers/lcd-charset-player.c @@ -0,0 +1,594 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 by Jens Arnold + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include "config.h" +#include "hwcompat.h" + +#include "lcd-charcell.h" + +int hw_pattern_count; /* actual number of user-definable hw patterns */ + +const struct xchar_info *xchar_info; +int xchar_info_size; /* number of entries */ + +static const struct xchar_info xchar_info_newlcd[] = { + /* Standard ascii */ + { 0x20, 0, 0, 0x20 }, /* */ + { 0x21, 0, 0, 0x21 }, /* ! */ + { 0x22, 0, 0, 0x22 }, /* " */ + { 0x23, 0, 0, 0x23 }, /* # */ + { 0x24, 0, 0, 0x24 }, /* $ */ + { 0x25, 0, 0, 0x25 }, /* % */ + { 0x26, 0, 0, 0x26 }, /* & */ + { 0x27, 0, 0, 0x27 }, /* ' */ + { 0x28, 0, 0, 0x28 }, /* ( */ + { 0x29, 0, 0, 0x29 }, /* ) */ + { 0x2a, 0, 0, 0x2a }, /* * */ + { 0x2b, 0, 0, 0x2b }, /* + */ + { 0x2c, 0, 0, 0x2c }, /* , */ + { 0x2d, 0, 0, 0x2d }, /* - */ + { 0x2e, 0, 0, 0x2e }, /* . */ + { 0x2f, 0, 0, 0x2f }, /* / */ + { 0x30, 0, 0, 0x30 }, /* 0 */ + { 0x31, 0, 0, 0x31 }, /* 1 */ + { 0x32, 0, 0, 0x32 }, /* 2 */ + { 0x33, 0, 0, 0x33 }, /* 3 */ + { 0x34, 0, 0, 0x34 }, /* 4 */ + { 0x35, 0, 0, 0x35 }, /* 5 */ + { 0x36, 0, 0, 0x36 }, /* 6 */ + { 0x37, 0, 0, 0x37 }, /* 7 */ + { 0x38, 0, 0, 0x38 }, /* 8 */ + { 0x39, 0, 0, 0x39 }, /* 9 */ + { 0x3a, 0, 0, 0x3a }, /* : */ + { 0x3b, 0, 0, 0x3b }, /* ; */ + { 0x3c, 0, 0, 0x3c }, /* < */ + { 0x3d, 0, 0, 0x3d }, /* = */ + { 0x3e, 0, 0, 0x3e }, /* > */ + { 0x3f, 0, 0, 0x3f }, /* ? */ + { 0x40, 0, 0, 0x40 }, /* @ */ + { 0x41, 0, 0, 0x41 }, /* A */ + { 0x42, 0, 0, 0x42 }, /* B */ + { 0x43, 0, 0, 0x43 }, /* C */ + { 0x44, 0, 0, 0x44 }, /* D */ + { 0x45, 0, 0, 0x45 }, /* E */ + { 0x46, 0, 0, 0x46 }, /* F */ + { 0x47, 0, 0, 0x47 }, /* G */ + { 0x48, 0, 0, 0x48 }, /* H */ + { 0x49, 0, 0, 0x49 }, /* I */ + { 0x4a, 0, 0, 0x4a }, /* J */ + { 0x4b, 0, 0, 0x4b }, /* K */ + { 0x4c, 0, 0, 0x4c }, /* L */ + { 0x4d, 0, 0, 0x4d }, /* M */ + { 0x4e, 0, 0, 0x4e }, /* N */ + { 0x4f, 0, 0, 0x4f }, /* O */ + { 0x50, 0, 0, 0x50 }, /* P */ + { 0x51, 0, 0, 0x51 }, /* Q */ + { 0x52, 0, 0, 0x52 }, /* R */ + { 0x53, 0, 0, 0x53 }, /* S */ + { 0x54, 0, 0, 0x54 }, /* T */ + { 0x55, 0, 0, 0x55 }, /* U */ + { 0x56, 0, 0, 0x56 }, /* V */ + { 0x57, 0, 0, 0x57 }, /* W */ + { 0x58, 0, 0, 0x58 }, /* X */ + { 0x59, 0, 0, 0x59 }, /* Y */ + { 0x5a, 0, 0, 0x5a }, /* Z */ + { 0x5b, 0, 0, 0x5b }, /* [ */ + { 0x5c, 0, 0, 0x12 }, /* \ */ + { 0x5d, 0, 0, 0x5d }, /* ] */ + { 0x5e, 0, 0, 0x5e }, /* ^ */ + { 0x5f, 0, 0, 0x5f }, /* _ */ + { 0x60, 0, 0, 0x60 }, /* ` */ + { 0x61, 0, 0, 0x61 }, /* a */ + { 0x62, 0, 0, 0x62 }, /* b */ + { 0x63, 0, 0, 0x63 }, /* c */ + { 0x64, 0, 0, 0x64 }, /* d */ + { 0x65, 0, 0, 0x65 }, /* e */ + { 0x66, 0, 0, 0x66 }, /* f */ + { 0x67, 0, 0, 0x67 }, /* g */ + { 0x68, 0, 0, 0x68 }, /* h */ + { 0x69, 0, 0, 0x69 }, /* i */ + { 0x6a, 0, 0, 0x6a }, /* j */ + { 0x6b, 0, 0, 0x6b }, /* k */ + { 0x6c, 0, 0, 0x6c }, /* l */ + { 0x6d, 0, 0, 0x6d }, /* m */ + { 0x6e, 0, 0, 0x6e }, /* n */ + { 0x6f, 0, 0, 0x6f }, /* o */ + { 0x70, 0, 0, 0x70 }, /* p */ + { 0x71, 0, 0, 0x71 }, /* q */ + { 0x72, 0, 0, 0x72 }, /* r */ + { 0x73, 0, 0, 0x73 }, /* s */ + { 0x74, 0, 0, 0x74 }, /* t */ + { 0x75, 0, 0, 0x75 }, /* u */ + { 0x76, 0, 0, 0x76 }, /* v */ + { 0x77, 0, 0, 0x77 }, /* w */ + { 0x78, 0, 0, 0x78 }, /* x */ + { 0x79, 0, 0, 0x79 }, /* y */ + { 0x7a, 0, 0, 0x7a }, /* z */ + { 0x7b, 0, 0, 0x7b }, /* { */ + { 0x7c, 0, 0, 0x7c }, /* | */ + { 0x7d, 0, 0, 0x7d }, /* } */ + { 0x7e, 0, 0, 0xf0 }, /* ~ */ + { 0x7f, 0, 0, 0xfe }, /* (full grid) */ + +#ifndef BOOTLOADER /* bootloader only supports pure ASCII */ + /* Latin 1 */ + { 0xa0, 0, 0, 0x20 }, /* (non-breaking space) */ + + { 0xa3, 0x000f, 1, 0x4c }, /* (pound sign) */ + + { 0xa5, 0, 0, 0x5c }, /* (yen sign) */ + + { 0xa7, 0, 0, 0x15 }, /* (paragraph sign) */ + + { 0xab, 0, 0, 0x9e }, /* (left double-angle quotation mark) */ + + { 0xaf, 0x0010, 1, 0x2d }, /* (macron) */ + + { 0xb1, 0, 0, 0x95 }, /* (plus-minus sign) */ + { 0xb2, 0, 0, 0x99 }, /* (superscript 2) */ + { 0xb3, 0, 0, 0x9a }, /* (superscript 3) */ + + { 0xb5, 0, 0, 0xe6 }, /* (micro sign) */ + { 0xb6, 0, 0, 0x14 }, /* (pilcrow sign) */ + { 0xb7, 0, 0, 0xa5 }, /* (middle dot) */ + + { 0xbb, 0, 0, 0x9f }, /* (right double-angle quotation mark) */ + { 0xbc, 0, 0, 0x9c }, /* (one quarter) */ + { 0xbd, 0, 0, 0x9b }, /* (one half) */ + { 0xbe, 0, 0, 0x9d }, /* (three quarters) */ + { 0xbf, 0x0011, 1, 0x3f }, /* (inverted ?) */ + { 0xc0, 0x0012, 1, 0x41 }, /* (A grave) */ + { 0xc1, 0x0013, 1, 0x41 }, /* (A acute) */ + { 0xc2, 0x0014, 1, 0x41 }, /* (A circumflex) */ + { 0xc3, 0x0015, 1, 0x41 }, /* (A tilde) */ + { 0xc4, 0x0016, 1, 0x41 }, /* (A dieresis) */ + { 0xc5, 0x0017, 1, 0x41 }, /* (A with ring above) */ + { 0xc6, 0x0018, 1, 0x41 }, /* (AE ligature) */ + { 0xc7, 0x0019, 1, 0x43 }, /* (C cedilla) */ + { 0xc8, 0x001a, 1, 0x45 }, /* (E grave) */ + { 0xc9, 0x001b, 1, 0x45 }, /* (E acute) */ + { 0xca, 0x001c, 1, 0x45 }, /* (E circumflex) */ + { 0xcb, 0x001d, 1, 0x45 }, /* (E dieresis) */ + { 0xcc, 0x001e, 1, 0x49 }, /* (I grave) */ + { 0xcd, 0x001f, 1, 0x49 }, /* (I acute) */ + { 0xce, 0, 0, 0x49 }, /* (I circumflex) */ + { 0xcf, 0, 0, 0x49 }, /* (I dieresis) */ + { 0xd0, 0x0020, 1, 0x44 }, /* (ETH) */ + { 0xd1, 0x0021, 1, 0x4e }, /* (N tilde) */ + { 0xd2, 0x0022, 1, 0x4f }, /* (O grave) */ + { 0xd3, 0x0023, 1, 0x4f }, /* (O acute) */ + { 0xd4, 0x0024, 1, 0x4f }, /* (O circumflex) */ + { 0xd5, 0x0025, 1, 0x4f }, /* (O tilde) */ + { 0xd6, 0x0026, 1, 0x4f }, /* (O dieresis) */ + { 0xd7, 0, 0, 0x96 }, /* (multiplication sign) */ + { 0xd8, 0x0027, 1, 0x4f }, /* (O stroke) */ + { 0xd9, 0x0028, 1, 0x55 }, /* (U grave) */ + { 0xda, 0x0029, 1, 0x55 }, /* (U acute) */ + { 0xdb, 0, 0, 0x55 }, /* (U circumflex) */ + { 0xdc, 0x002a, 1, 0x55 }, /* (U dieresis) */ + { 0xdd, 0, 0, 0x59 }, /* (Y acute) */ + + { 0xdf, 0, 0, 0xe1 }, /* (sharp s) */ + { 0xe0, 0x002b, 1, 0x61 }, /* (a grave) */ + { 0xe1, 0x002c, 1, 0x61 }, /* (a acute) */ + { 0xe2, 0x002d, 1, 0x61 }, /* (a circumflex) */ + { 0xe3, 0x002e, 1, 0x61 }, /* (a tilde) */ + { 0xe4, 0x002f, 1, 0x61 }, /* (a dieresis) */ + { 0xe5, 0x0030, 1, 0x61 }, /* (a with ring above) */ + + { 0xe7, 0x0031, 1, 0x63 }, /* (c cedilla) */ + { 0xe8, 0x0032, 1, 0x65 }, /* (e grave) */ + { 0xe9, 0x0033, 1, 0x65 }, /* (e acute) */ + { 0xea, 0x0034, 1, 0x65 }, /* (e circumflex) */ + { 0xeb, 0x0035, 1, 0x65 }, /* (e dieresis) */ + { 0xec, 0, 0, 0x69 }, /* (i grave) */ + { 0xed, 0x0036, 1, 0x69 }, /* (i acute) */ + { 0xee, 0x0037, 1, 0x69 }, /* (i circumflex) */ + { 0xef, 0x0038, 1, 0x69 }, /* (i dieresis) */ + + { 0xf1, 0x0039, 1, 0x6e }, /* (n tilde) */ + { 0xf2, 0x003a, 1, 0x6f }, /* (o grave) */ + { 0xf3, 0x003b, 1, 0x6f }, /* (o acute) */ + { 0xf4, 0x003c, 1, 0x6f }, /* (o circumflex) */ + { 0xf5, 0x003d, 1, 0x6f }, /* (o tilde) */ + { 0xf6, 0x003e, 1, 0x6f }, /* (o dieresis) */ + { 0xf7, 0, 0, 0x97 }, /* (division sign) */ + { 0xf8, 0x003f, 1, 0x6f }, /* (o slash) */ + { 0xf9, 0x0040, 1, 0x75 }, /* (u grave) */ + { 0xfa, 0x0041, 1, 0x75 }, /* (u acute) */ + { 0xfb, 0, 0, 0x75 }, /* (u circumflex) */ + { 0xfc, 0x0042, 1, 0x75 }, /* (u dieresis) */ + { 0xfd, 0x0043, 1, 0x79 }, /* (y acute) */ + + { 0xff, 0, 0, 0x79 }, /* (y dieresis) */ + + /* Runtime-definable characters */ + { 0xe000, 0x8000, 15, 0x20 }, /* variable character 0 */ + { 0xe001, 0x8001, 15, 0x20 }, /* variable character 1 */ + { 0xe002, 0x8002, 15, 0x20 }, /* variable character 2 */ + { 0xe003, 0x8003, 15, 0x20 }, /* variable character 3 */ + { 0xe004, 0x8004, 15, 0x20 }, /* variable character 4 */ + { 0xe005, 0x8005, 15, 0x20 }, /* variable character 5 */ + { 0xe006, 0x8006, 15, 0x20 }, /* variable character 6 */ + { 0xe007, 0x8007, 15, 0x20 }, /* variable character 7 */ + { 0xe008, 0x8008, 15, 0x20 }, /* variable character 8 */ + { 0xe009, 0x8009, 15, 0x20 }, /* variable character 9 */ + { 0xe00a, 0x800a, 15, 0x20 }, /* variable character 10 */ + { 0xe00b, 0x800b, 15, 0x20 }, /* variable character 11 */ + { 0xe00c, 0x800c, 15, 0x20 }, /* variable character 12 */ + { 0xe00d, 0x800d, 15, 0x20 }, /* variable character 13 */ + { 0xe00e, 0x800e, 15, 0x20 }, /* variable character 14 */ + { 0xe00f, 0x800f, 15, 0x20 }, /* variable character 15 */ + + /* Icons and special symbols */ + { 0xe100, 0x0004, 14, 0x3f }, /* unknown icon (mirrored ?) */ + { 0xe101, 0x0005, 14, 0x94 }, /* bookmark icon */ + { 0xe102, 0x0006, 14, 0x29 }, /* plugin icon */ + { 0xe103, 0x0007, 14, 0x91 }, /* folder icon */ + { 0xe104, 0x0008, 14, 0x78 }, /* firmware icon */ + { 0xe105, 0x0009, 14, 0x2b }, /* language icon */ + { 0xe106, 0x000a, 14, 0x13 }, /* audio icon (note) */ + { 0xe107, 0x000b, 14, 0x94 }, /* wps icon */ + { 0xe108, 0x000c, 14, 0xd0 }, /* playlist icon */ + { 0xe109, 0x000d, 14, 0xd0 }, /* text file icon */ + { 0xe10a, 0x000e, 14, 0xd0 }, /* config icon */ + { 0xe10b, 0, 0, 0x7f }, /* left arrow */ + { 0xe10c, 0, 0, 0x7e }, /* right arrow */ + { 0xe10d, 0, 0, 0x18 }, /* up arrow */ + { 0xe10e, 0, 0, 0x19 }, /* down arrow */ + { 0xe10f, 0, 0, 0x11 }, /* filled left arrow */ + { 0xe110, 0, 0, 0x10 }, /* filled right arrow */ + { 0xe111, 0, 0, 0x1f }, /* filled up arrow */ + { 0xe112, 0, 0, 0x1e }, /* filled down arrow */ + { 0xe113, 0, 0, 0x20 }, /* level 0/7 */ + { 0xe114, 0, 0, 0x80 }, /* level 1/7 */ + { 0xe115, 0, 0, 0x81 }, /* level 2/7 */ + { 0xe116, 0, 0, 0x82 }, /* level 3/7 */ + { 0xe117, 0, 0, 0x83 }, /* level 4/7 */ + { 0xe118, 0, 0, 0x84 }, /* level 5/7 */ + { 0xe119, 0, 0, 0x85 }, /* level 6/7 */ + { 0xe11a, 0, 0, 0x86 }, /* level 7/7 */ +#endif /* !BOOTLOADER */ + + /* no-char symbol */ + { 0xfffd, 0, 0, 0x91 }, +}; + +static const struct xchar_info xchar_info_oldlcd[] = { + /* Standard ascii */ + { 0x20, 0, 0, 0x24 }, /* */ + { 0x21, 0, 0, 0x25 }, /* ! */ + { 0x22, 0, 0, 0x26 }, /* " */ + { 0x23, 0, 0, 0x27 }, /* # */ + { 0x24, 0, 0, 0x28 }, /* $ */ + { 0x25, 0, 0, 0x29 }, /* % */ + { 0x26, 0, 0, 0x2a }, /* & */ + { 0x27, 0, 0, 0x2b }, /* ' */ + { 0x28, 0, 0, 0x2c }, /* ( */ + { 0x29, 0, 0, 0x2d }, /* ) */ + { 0x2a, 0, 0, 0x2e }, /* * */ + { 0x2b, 0, 0, 0x2f }, /* + */ + { 0x2c, 0, 0, 0x30 }, /* , */ + { 0x2d, 0, 0, 0x31 }, /* - */ + { 0x2e, 0, 0, 0x32 }, /* . */ + { 0x2f, 0, 0, 0x33 }, /* / */ + { 0x30, 0, 0, 0x34 }, /* 0 */ + { 0x31, 0, 0, 0x35 }, /* 1 */ + { 0x32, 0, 0, 0x36 }, /* 2 */ + { 0x33, 0, 0, 0x37 }, /* 3 */ + { 0x34, 0, 0, 0x38 }, /* 4 */ + { 0x35, 0, 0, 0x39 }, /* 5 */ + { 0x36, 0, 0, 0x3a }, /* 6 */ + { 0x37, 0, 0, 0x3b }, /* 7 */ + { 0x38, 0, 0, 0x3c }, /* 8 */ + { 0x39, 0, 0, 0x3d }, /* 9 */ + { 0x3a, 0, 0, 0x3e }, /* : */ + { 0x3b, 0, 0, 0x3f }, /* ; */ + { 0x3c, 0, 0, 0x40 }, /* < */ + { 0x3d, 0, 0, 0x41 }, /* = */ + { 0x3e, 0, 0, 0x42 }, /* > */ + { 0x3f, 0, 0, 0x43 }, /* ? */ + { 0x40, 0, 0, 0x04 }, /* @ */ + { 0x41, 0, 0, 0x45 }, /* A */ + { 0x42, 0, 0, 0x46 }, /* B */ + { 0x43, 0, 0, 0x47 }, /* C */ + { 0x44, 0, 0, 0x48 }, /* D */ + { 0x45, 0, 0, 0x49 }, /* E */ + { 0x46, 0, 0, 0x4a }, /* F */ + { 0x47, 0, 0, 0x4b }, /* G */ + { 0x48, 0, 0, 0x4c }, /* H */ + { 0x49, 0, 0, 0x4d }, /* I */ + { 0x4a, 0, 0, 0x4e }, /* J */ + { 0x4b, 0, 0, 0x4f }, /* K */ + { 0x4c, 0, 0, 0x50 }, /* L */ + { 0x4d, 0, 0, 0x51 }, /* M */ + { 0x4e, 0, 0, 0x52 }, /* N */ + { 0x4f, 0, 0, 0x53 }, /* O */ + { 0x50, 0, 0, 0x54 }, /* P */ + { 0x51, 0, 0, 0x55 }, /* Q */ + { 0x52, 0, 0, 0x56 }, /* R */ + { 0x53, 0, 0, 0x57 }, /* S */ + { 0x54, 0, 0, 0x58 }, /* T */ + { 0x55, 0, 0, 0x59 }, /* U */ + { 0x56, 0, 0, 0x5a }, /* V */ + { 0x57, 0, 0, 0x5b }, /* W */ + { 0x58, 0, 0, 0x5c }, /* X */ + { 0x59, 0, 0, 0x5d }, /* Y */ + { 0x5a, 0, 0, 0x5e }, /* Z */ + { 0x5b, 0, 0, 0xa9 }, /* [ */ + { 0x5c, 0x0000, 2, 0x33 }, /* \ */ + { 0x5d, 0, 0, 0xce }, /* ] */ + + { 0x5f, 0, 0, 0x15 }, /* _ */ + { 0x60, 0x0001, 2, 0x2b }, /* ` */ + { 0x61, 0, 0, 0x65 }, /* a */ + { 0x62, 0, 0, 0x66 }, /* b */ + { 0x63, 0, 0, 0x67 }, /* c */ + { 0x64, 0, 0, 0x68 }, /* d */ + { 0x65, 0, 0, 0x69 }, /* e */ + { 0x66, 0, 0, 0x6a }, /* f */ + { 0x67, 0, 0, 0x6b }, /* g */ + { 0x68, 0, 0, 0x6c }, /* h */ + { 0x69, 0, 0, 0x6d }, /* i */ + { 0x6a, 0, 0, 0x6e }, /* j */ + { 0x6b, 0, 0, 0x6f }, /* k */ + { 0x6c, 0, 0, 0x70 }, /* l */ + { 0x6d, 0, 0, 0x71 }, /* m */ + { 0x6e, 0, 0, 0x72 }, /* n */ + { 0x6f, 0, 0, 0x73 }, /* o */ + { 0x70, 0, 0, 0x74 }, /* p */ + { 0x71, 0, 0, 0x75 }, /* q */ + { 0x72, 0, 0, 0x76 }, /* r */ + { 0x73, 0, 0, 0x77 }, /* s */ + { 0x74, 0, 0, 0x78 }, /* t */ + { 0x75, 0, 0, 0x79 }, /* u */ + { 0x76, 0, 0, 0x7a }, /* v */ + { 0x77, 0, 0, 0x7b }, /* w */ + { 0x78, 0, 0, 0x7c }, /* x */ + { 0x79, 0, 0, 0x7d }, /* y */ + { 0x7a, 0, 0, 0x7e }, /* z */ + { 0x7b, 0, 0, 0x2c }, /* { (hard-coded ( ) */ + { 0x7c, 0x0002, 2, 0x25 }, /* | */ + { 0x7d, 0, 0, 0x2d }, /* } (hard-coded ) ) */ + { 0x7e, 0x0003, 2, 0x31 }, /* ~ */ + { 0x7f, 0, 0, 0x8b }, /* (full grid) */ + +#ifndef BOOTLOADER /* bootloader only supports pure ASCII */ + /* Latin 1 */ + { 0xa0, 0, 0, 0x24 }, /* (non-breaking space) */ + { 0xa1, 0, 0, 0x44 }, /* (inverted !) */ + { 0xa2, 0, 0, 0xa8 }, /* (cent sign) */ + { 0xa3, 0, 0, 0x05 }, /* (pound sign) */ + { 0xa4, 0, 0, 0x28 }, /* (currency sign) */ + { 0xa5, 0, 0, 0x07 }, /* (yen sign) */ + + { 0xa7, 0, 0, 0x63 }, /* (paragraph sign) */ + + { 0xaf, 0, 0, 0xee }, /* (macron) */ + + { 0xbf, 0, 0, 0x64 }, /* (inverted ?) */ + { 0xc0, 0, 0, 0x8c }, /* (A grave) */ + { 0xc1, 0, 0, 0x8d }, /* (A acute) */ + { 0xc2, 0, 0, 0x8e }, /* (A circumflex) */ + { 0xc3, 0, 0, 0x8f }, /* (A tilde) */ + { 0xc4, 0, 0, 0x5f }, /* (A dieresis) */ + { 0xc5, 0, 0, 0x12 }, /* (A with ring above) */ + { 0xc6, 0, 0, 0x20 }, /* (AE ligature) */ + { 0xc7, 0, 0, 0x0d }, /* (C cedilla) */ + { 0xc8, 0, 0, 0x90 }, /* (E grave) */ + { 0xc9, 0, 0, 0x23 }, /* (E acute) */ + { 0xca, 0, 0, 0x91 }, /* (E circumflex) */ + { 0xcb, 0, 0, 0x92 }, /* (E dieresis) */ + { 0xcc, 0, 0, 0x93 }, /* (I grave) */ + { 0xcd, 0, 0, 0x94 }, /* (I acute) */ + { 0xce, 0, 0, 0x4d }, /* (I circumflex) */ + { 0xcf, 0, 0, 0x4d }, /* (I dieresis) */ + { 0xd0, 0, 0, 0x95 }, /* (ETH) */ + { 0xd1, 0, 0, 0x61 }, /* (N tilde) */ + { 0xd2, 0, 0, 0x96 }, /* (O grave) */ + { 0xd3, 0, 0, 0x97 }, /* (O acute) */ + { 0xd4, 0, 0, 0x98 }, /* (O circumflex) */ + { 0xd5, 0, 0, 0x99 }, /* (O tilde) */ + { 0xd6, 0, 0, 0x60 }, /* (O dieresis) */ + { 0xd7, 0, 0, 0xde }, /* (multiplication sign) */ + { 0xd8, 0, 0, 0x0f }, /* (O stroke) */ + { 0xd9, 0, 0, 0x9a }, /* (U grave) */ + { 0xda, 0, 0, 0x9b }, /* (U acute) */ + { 0xdb, 0, 0, 0x59 }, /* (U circumflex) */ + { 0xdc, 0, 0, 0x62 }, /* (U dieresis) */ + { 0xdd, 0, 0, 0x5d }, /* (Y acute) */ + + { 0xdf, 0, 0, 0x22 }, /* (sharp s) */ + { 0xe0, 0, 0, 0x83 }, /* (a grave) */ + { 0xe1, 0, 0, 0x9c }, /* (a acute) */ + { 0xe2, 0, 0, 0x9d }, /* (a circumflex) */ + { 0xe3, 0, 0, 0x9e }, /* (a tilde) */ + { 0xe4, 0, 0, 0x7f }, /* (a dieresis) */ + { 0xe5, 0, 0, 0x13 }, /* (a with ring above) */ + + { 0xe7, 0, 0, 0x84 }, /* (c cedilla) */ + { 0xe8, 0, 0, 0x08 }, /* (e grave) */ + { 0xe9, 0, 0, 0x09 }, /* (e acute) */ + { 0xea, 0, 0, 0x9f }, /* (e circumflex) */ + { 0xeb, 0, 0, 0xa0 }, /* (e dieresis) */ + { 0xec, 0, 0, 0x6d }, /* (i grave) */ + { 0xed, 0, 0, 0xa1 }, /* (i acute) */ + { 0xee, 0, 0, 0xa2 }, /* (i circumflex) */ + { 0xef, 0, 0, 0xa3 }, /* (i dieresis) */ + + { 0xf1, 0, 0, 0x81 }, /* (n tilde) */ + { 0xf2, 0, 0, 0x0c }, /* (o grave) */ + { 0xf3, 0, 0, 0xa4 }, /* (o acute) */ + { 0xf4, 0, 0, 0xa5 }, /* (o circumflex) */ + { 0xf5, 0, 0, 0xa6 }, /* (o tilde) */ + { 0xf6, 0, 0, 0x80 }, /* (o dieresis) */ + + { 0xf8, 0, 0, 0x10 }, /* (o slash) */ + { 0xf9, 0, 0, 0x0a }, /* (u grave) */ + { 0xfa, 0, 0, 0xa7 }, /* (u acute) */ + { 0xfb, 0, 0, 0x79 }, /* (u circumflex) */ + { 0xfc, 0, 0, 0xa2 }, /* (u dieresis) */ + { 0xfd, 0, 0, 0xaf }, /* (y acute) */ + + { 0xff, 0, 0, 0x7d }, /* (y dieresis) */ + + /* Runtime-definable characters */ + { 0xe000, 0x8000, 15, 0x24 }, /* variable character 0 */ + { 0xe001, 0x8001, 15, 0x24 }, /* variable character 1 */ + { 0xe002, 0x8002, 15, 0x24 }, /* variable character 2 */ + { 0xe003, 0x8003, 15, 0x24 }, /* variable character 3 */ + { 0xe004, 0x8004, 15, 0x24 }, /* variable character 4 */ + { 0xe005, 0x8005, 15, 0x24 }, /* variable character 5 */ + { 0xe006, 0x8006, 15, 0x24 }, /* variable character 6 */ + { 0xe007, 0x8007, 15, 0x24 }, /* variable character 7 */ + { 0xe008, 0x8008, 15, 0x24 }, /* variable character 8 */ + { 0xe009, 0x8009, 15, 0x24 }, /* variable character 9 */ + { 0xe00a, 0x800a, 15, 0x24 }, /* variable character 10 */ + { 0xe00b, 0x800b, 15, 0x24 }, /* variable character 11 */ + { 0xe00c, 0x800c, 15, 0x24 }, /* variable character 12 */ + { 0xe00d, 0x800d, 15, 0x24 }, /* variable character 13 */ + { 0xe00e, 0x800e, 15, 0x24 }, /* variable character 14 */ + { 0xe00f, 0x800f, 15, 0x24 }, /* variable character 15 */ + + /* Icons and special symbols */ + { 0xe100, 0x0004, 14, 0x43 }, /* unknown icon (mirrored ?) */ + { 0xe101, 0x0005, 14, 0xd4 }, /* bookmark icon */ + { 0xe102, 0x0006, 14, 0x2d }, /* plugin icon */ + { 0xe103, 0x0007, 14, 0x34 }, /* folder icon */ + { 0xe104, 0x0008, 14, 0x7c }, /* firmware icon */ + { 0xe105, 0x0009, 14, 0x2f }, /* language icon */ + { 0xe106, 0, 0, 0xfc }, /* audio icon (note) */ + { 0xe107, 0x000b, 14, 0xd4 }, /* wps icon */ + { 0xe108, 0x000c, 14, 0xfa }, /* playlist icon */ + { 0xe109, 0x000f, 14, 0xfa }, /* text file icon */ + { 0xe10a, 0x000e, 14, 0xfa }, /* config icon */ + { 0xe10b, 0, 0, 0x88 }, /* left arrow */ + { 0xe10c, 0, 0, 0x89 }, /* right arrow */ + { 0xe10d, 0, 0, 0x86 }, /* up arrow */ + { 0xe10e, 0, 0, 0x87 }, /* down arrow */ + { 0xe10f, 0, 0, 0x88 }, /* filled left arrow */ + { 0xe110, 0, 0, 0x89 }, /* filled right arrow */ + { 0xe111, 0, 0, 0x86 }, /* filled up arrow */ + { 0xe112, 0, 0, 0x87 }, /* filled down arrow */ + { 0xe113, 0, 0, 0x24 }, /* level 0/7 */ + { 0xe114, 0, 0, 0x15 }, /* level 1/7 */ + { 0xe115, 0, 0, 0xdf }, /* level 2/7 */ + { 0xe116, 0, 0, 0xe0 }, /* level 3/7 */ + { 0xe117, 0, 0, 0xe1 }, /* level 4/7 */ + { 0xe118, 0, 0, 0xe2 }, /* level 5/7 */ + { 0xe119, 0, 0, 0xe3 }, /* level 6/7 */ + { 0xe11a, 0, 0, 0xec }, /* level 7/7 */ +#endif /* !BOOTLOADER */ + + /* no-char symbol */ + { 0xfffd, 0, 0, 0xd8 }, +}; + +const unsigned char xfont_fixed[][8] = { + /* Standard ascii */ + { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00}, /* 0x000 \ */ + { 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x001 ` */ + { 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00}, /* 0x002 | */ + { 0x00, 0x00, 0x08, 0x15, 0x02, 0x00, 0x00, 0x00}, /* 0x003 ~ */ + +#ifndef BOOTLOADER /* bootloader only supports pure ASCII */ + /* Icons and special symbols */ + { 0x0c, 0x12, 0x12, 0x08, 0x08, 0x00, 0x08, 0x00}, /* 0x004 unknown icon */ + { 0x00, 0x03, 0x07, 0x0e, 0x1c, 0x08, 0x00, 0x00}, /* 0x005 bookmark icon */ + { 0x04, 0x1e, 0x07, 0x1f, 0x05, 0x01, 0x06, 0x00}, /* 0x006 plugin icon */ + { 0x0c, 0x13, 0x11, 0x11, 0x11, 0x11, 0x1f, 0x00}, /* 0x007 folder icon */ + { 0x1f, 0x11, 0x1b, 0x15, 0x1b, 0x11, 0x1f, 0x00}, /* 0x008 firmware icon */ + { 0x00, 0x1f, 0x15, 0x1f, 0x15, 0x1f, 0x00, 0x00}, /* 0x009 language icon */ + { 0x03, 0x05, 0x09, 0x09, 0x0b, 0x1b, 0x18, 0x00}, /* 0x00a audio icon (note) */ + { 0x01, 0x01, 0x02, 0x02, 0x14, 0x0c, 0x04, 0x00}, /* 0x00b wps icon */ + { 0x17, 0x00, 0x17, 0x00, 0x17, 0x00, 0x17, 0x00}, /* 0x00c playlist icon */ + { 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00}, /* 0x00d text file icon */ + { 0x0b, 0x10, 0x0b, 0x00, 0x1f, 0x00, 0x1f, 0x00}, /* 0x00e config icon */ + /* Latin 1 */ + { 0x06, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x1f, 0x00}, /* 0x00f (pound sign) */ + { 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0x010 (macron) */ + { 0x04, 0x00, 0x04, 0x08, 0x10, 0x11, 0x0e, 0x00}, /* 0x011 (inverted ?) */ + { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 0x012 (A grave) */ + { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 0x013 (A acute) */ + { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 0x014 (a circumflex) */ + { 0x0d, 0x12, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 0x015 (A tilde) */ + { 0x0a, 0x00, 0x04, 0x0a, 0x11, 0x1f, 0x11, 0x00}, /* 0x016 (A dieresis) */ + { 0x04, 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x00}, /* 0x017 (A with ring above) */ + { 0x0f, 0x14, 0x14, 0x1f, 0x14, 0x14, 0x17, 0x00}, /* 0x018 (AE ligature) */ + { 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x02, 0x0e, 0x00}, /* 0x019 (C cedilla) */ + { 0x08, 0x04, 0x1f, 0x10, 0x1e, 0x10, 0x1f, 0x00}, /* 0x01a (E grave) */ + { 0x02, 0x04, 0x1f, 0x10, 0x1c, 0x10, 0x1f, 0x00}, /* 0x01b (E acute) */ + { 0x04, 0x0a, 0x1f, 0x10, 0x1c, 0x10, 0x1f, 0x00}, /* 0x01c (E circumflex) */ + { 0x0a, 0x00, 0x1f, 0x10, 0x1c, 0x10, 0x1f, 0x00}, /* 0x01d (E dieresis)*/ + { 0x08, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e, 0x00}, /* 0x01e (I grave) */ + { 0x02, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e, 0x00}, /* 0x01f (I acute) */ + { 0x0c, 0x0a, 0x09, 0x1d, 0x09, 0x0a, 0x0c, 0x00}, /* 0x020 (ETH) */ + { 0x0d, 0x12, 0x00, 0x19, 0x15, 0x13, 0x11, 0x00}, /* 0x021 (N tilde) */ + { 0x08, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x022 (O grave) */ + { 0x02, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x023 (O acute) */ + { 0x04, 0x0a, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x024 (O circumflex) */ + { 0x0d, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x025 (O tilde) */ + { 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x026 (O dieresis) */ + { 0x01, 0x0e, 0x13, 0x15, 0x19, 0x0e, 0x10, 0x00}, /* 0x027 (O stroke) */ + { 0x08, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x028 (U grave) */ + { 0x02, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x029 (U acute) */ + { 0x0a, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 0x02a (U dieresis) */ + { 0x08, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 0x02b (a grave) */ + { 0x02, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 0x02c (a acute) */ + { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 0x02d (a circumflex) */ + { 0x0d, 0x12, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 0x02e (a tilde) */ + { 0x0a, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 0x02f (a dieresis) */ + { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 0x030 (a with ring above) */ + { 0x00, 0x0f, 0x10, 0x10, 0x0f, 0x02, 0x04, 0x00}, /* 0x031 (c cedilla) */ + { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 0x032 (e grave) */ + { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 0x033 (e acute) */ + { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 0x034 (e circumflex) */ + { 0x0a, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 0x035 (e dieresis) */ + { 0x02, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e, 0x00}, /* 0x036 (i acute) */ + { 0x04, 0x0a, 0x00, 0x0c, 0x04, 0x04, 0x0e, 0x00}, /* 0x037 (i circumflex) */ + { 0x0a, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x0e, 0x00}, /* 0x038 (i dieresis) */ + { 0x0d, 0x12, 0x00, 0x16, 0x19, 0x11, 0x11, 0x00}, /* 0x039 (n tilde) */ + { 0x08, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 0x03a (o grave) */ + { 0x02, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 0x03b (o acute) */ + { 0x04, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 0x03c (o circumflex) */ + { 0x0d, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 0x03d (o tilde) */ + { 0x00, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 0x03e (o dieresis) */ + { 0x00, 0x02, 0x0e, 0x15, 0x15, 0x0e, 0x08, 0x00}, /* 0x03f (o slash) */ + { 0x08, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d, 0x00}, /* 0x040 (u grave) */ + { 0x02, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d, 0x00}, /* 0x041 (u acute) */ + { 0x00, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d, 0x00}, /* 0x042 (u dieresis) */ + { 0x02, 0x04, 0x11, 0x11, 0x0f, 0x01, 0x0e, 0x00}, /* 0x043 (y acute) */ +#endif /* !BOOTLOADER */ +}; + +void lcd_charset_init(void) +{ + if (is_new_player()) + { + hw_pattern_count = 8; + xchar_info = xchar_info_newlcd; + xchar_info_size = sizeof(xchar_info_newlcd)/sizeof(struct xchar_info); + } + else /* old lcd */ + { + hw_pattern_count = 4; + xchar_info = xchar_info_oldlcd; + xchar_info_size = sizeof(xchar_info_oldlcd)/sizeof(struct xchar_info); + } +} diff --git a/firmware/drivers/lcd-player-charset.c b/firmware/drivers/lcd-player-charset.c deleted file mode 100644 index 790f0df1c4..0000000000 --- a/firmware/drivers/lcd-player-charset.c +++ /dev/null @@ -1,751 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2003 by Kjell Ericson - * - * All files in this archive are subject to the GNU General Public License. - * See the file COPYING in the source tree root for full license agreement. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef __CONFIG_H__ -/* to easier allow this source file to be used even from tools when config.h - cannot be included safely */ -#include "config.h" -#endif - -#ifdef HAVE_LCD_CHARCELLS - -#include "lcd-player-charset.h" - -unsigned short new_lcd_rocklatin1_to_xlcd[] = -{ - NOCHAR_NEW, /* 0x00 reserved never to be used */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - 0x216, /* 0x16 .. "bookmark" icon */ - 0x217, /* 0x17 .. "plugin" icon */ - 0x218, /* 0x18 .. "folder" icon */ - 0x219, /* 0x19 .. "MOD/AJZ" icon (winlatin o (dote in the middle) */ - 0x21a, /* 0x1a .. "language" icon (winlatin - (a bit longer minus sign) */ - 0x21b, /* 0x1b .. "note" icon */ - 0x21c, /* 0x1c .. "WPS" icon */ - 0x21d, /* 0x1d .. "playlist" icon */ - 0x21e, /* 0x1e .. "text file" icon (winlatin - (much longer minus sign) */ - 0x21f, /* 0x1f .. "config file" icon (winlatin ~) */ - - 0x020, /* 0x20 .. */ - 0x021, /* 0x21 .. ! */ - 0x022, /* 0x22 .. " */ - 0x023, /* 0x23 .. # */ - 0x024, /* 0x24 .. $ */ - 0x025, /* 0x25 .. % */ - 0x026, /* 0x26 .. & */ - 0x027, /* 0x27 .. ' */ - 0x028, /* 0x28 .. ( */ - 0x029, /* 0x29 .. ) */ - 0x02a, /* 0x2a .. * */ - 0x02b, /* 0x2b .. + */ - 0x02c, /* 0x2c .. , */ - 0x02d, /* 0x2d .. - */ - 0x02e, /* 0x2e .. . */ - 0x02f, /* 0x2f .. / */ - 0x030, /* 0x30 .. 0 */ - 0x031, /* 0x31 .. 1 */ - 0x032, /* 0x32 .. 2 */ - 0x033, /* 0x33 .. 3 */ - 0x034, /* 0x34 .. 4 */ - 0x035, /* 0x35 .. 5 */ - 0x036, /* 0x36 .. 6 */ - 0x037, /* 0x37 .. 7 */ - 0x038, /* 0x38 .. 8 */ - 0x039, /* 0x39 .. 9 */ - 0x03a, /* 0x3a .. : */ - 0x03b, /* 0x3b .. ; */ - 0x03c, /* 0x3c .. < */ - 0x03d, /* 0x3d .. = */ - 0x03e, /* 0x3e .. > */ - 0x03f, /* 0x3f .. ? */ - 0x040, /* 0x40 .. @ */ - 0x041, /* 0x41 .. A */ - 0x042, /* 0x42 .. B */ - 0x043, /* 0x43 .. C */ - 0x044, /* 0x44 .. D */ - 0x045, /* 0x45 .. E */ - 0x046, /* 0x46 .. F */ - 0x047, /* 0x47 .. G */ - 0x048, /* 0x48 .. H */ - 0x049, /* 0x49 .. I */ - 0x04a, /* 0x4a .. J */ - 0x04b, /* 0x4b .. K */ - 0x04c, /* 0x4c .. L */ - 0x04d, /* 0x4d .. M */ - 0x04e, /* 0x4e .. N */ - 0x04f, /* 0x4f .. O */ - 0x050, /* 0x50 .. P */ - 0x051, /* 0x51 .. Q */ - 0x052, /* 0x52 .. R */ - 0x053, /* 0x53 .. S */ - 0x054, /* 0x54 .. T */ - 0x055, /* 0x55 .. U */ - 0x056, /* 0x56 .. V */ - 0x057, /* 0x57 .. W */ - 0x058, /* 0x58 .. X */ - 0x059, /* 0x59 .. Y */ - 0x05a, /* 0x5a .. Z */ - 0x05b, /* 0x5b .. [ */ - 0x012, /* 0x5c .. \ */ - 0x05d, /* 0x5d .. ] */ - 0x05e, /* 0x5e .. ^ */ - 0x05f, /* 0x5f .. _ */ - 0x060, /* 0x60 .. ` */ - 0x061, /* 0x00 97 .. a */ - 0x062, /* 0x00 98 .. b */ - 0x063, /* 0x00 99 .. c */ - 0x064, /* 0x64 .. d */ - 0x065, /* 0x65 .. e */ - 0x066, /* 0x66 .. f */ - 0x067, /* 0x67 .. g */ - 0x068, /* 0x68 .. h */ - 0x069, /* 0x69 .. i */ - 0x06a, /* 0x6a .. j */ - 0x06b, /* 0x6b .. k */ - 0x06c, /* 0x6c .. l */ - 0x06d, /* 0x6d .. m */ - 0x06e, /* 0x6e .. n */ - 0x06f, /* 0x6f .. o */ - 0x070, /* 0x70 .. p */ - 0x071, /* 0x71 .. q */ - 0x072, /* 0x72 .. r */ - 0x073, /* 0x73 .. s */ - 0x074, /* 0x74 .. t */ - 0x075, /* 0x75 .. u */ - 0x076, /* 0x76 .. v */ - 0x077, /* 0x77 .. w */ - 0x078, /* 0x78 .. x */ - 0x079, /* 0x79 .. y */ - 0x07a, /* 0x7a .. z */ - 0x07b, /* 0x7b ..*/ /* Old LCD hardcoded to "(" */ - 0x07c, /* 0x7c .. | */ - 0x07d, /* 0x7d .. } */ /* Old LCD hardcoded to ")" */ - 0x0f0, /* 0x7e .. ~ */ - 0x0fe, /* 0x7f .. full grid */ - NOCHAR_NEW, /* 0x80 winlatin Eurosign */ - 0x010, /* 0x81 filled-left-arrow (winlatin undefined) */ - 0x011, /* 0x82 filled-right-arrow (winlatin comma) */ - 0x01e, /* 0x83 filled-up-arrow (winlatin f) */ - 0x01f, /* 0x84 filled-up-arrow (winlatin ") */ - 0x224, /* 0x85 .. (three dots) */ - 0x081, /* 0x86 meter level 2 (winlatin undefined) */ - 0x082, /* 0x87 meter level 3 (winlatin undefined) */ - 0x083, /* 0x88 meter level 4 (winlatin undefined) */ - 0x084, /* 0x89 meter level 5 (winlatin Promille) */ - 0x085, /* 0x8a meter level 6 (winlatin 'S' with upside down ^) */ - 0x086, /* 0x8b meter level 7 (full) (winlatin '<') */ - NOCHAR_NEW, /* 0x8c .. CE */ - NOCHAR_NEW, /* 0x8d .. */ - 0x225, /* 0x8e .. 'Z' with upside down ^ */ - NOCHAR_NEW, /* 0x8f .. */ - 0x25d, /* 0x90 "unknown" icon */ - 0x094, /* 0x91 .. */ - 0x07e, /* 0x92 .. */ - 0x091, /* 0x93 .. folder icon susbstitute */ - 0x013, /* 0x94 .. note icon substitute */ - 0x0d0, /* 0x95 .. text/language/config icon substitute (winlatin o (dote in the middle) */ - NOCHAR_NEW, /* 0x96 .. (winlatin - (a bit longer minus sign) */ - NOCHAR_NEW, /* 0x97 .. (winlatin - (much longer minus sign) */ - NOCHAR_NEW, /* 0x98 .. (winlatin ~) */ - NOCHAR_NEW, /* 0x99 .. (winlatin TM) */ - NOCHAR_NEW, /* 0x9a .. 's' with upside down ^ */ - NOCHAR_NEW, /* 0x9b .. > */ - NOCHAR_NEW, /* 0x9c .. oe */ - NOCHAR_NEW, /* 0x9d .. */ - 0x225, /* 0x9e .. 'z' with upside down ^ */ - 0x059, /* 0x9f .. Large (Y with two dots) */ - NOCHAR_NEW, /* 0xa0 .. */ - NOCHAR_NEW, /* 0xa1 .. */ - NOCHAR_NEW, /* 0xa2 .. */ - 0x226, /* 0xa3 .. */ - NOCHAR_NEW, /* 0xa4 .. */ - NOCHAR_NEW, /* 0xa5 .. */ - NOCHAR_NEW, /* 0xa6 .. */ - 0x015, /* 0xa7 .. */ - NOCHAR_NEW, /* 0xa8 .. */ - NOCHAR_NEW, /* 0xa9 .. (copyright) */ - NOCHAR_NEW, /* 0xaa .. */ - NOCHAR_NEW, /* 0xab .. "<<" */ - NOCHAR_NEW, /* 0xac .. (unknown) */ - NOCHAR_NEW, /* 0xad .. (unkown1 */ - NOCHAR_NEW, /* 0xae .. (register)*/ - 0x228, /* 0xaf .. */ - NOCHAR_NEW, /* 0xb0 .. */ - NOCHAR_NEW, /* 0xb1 .. */ - NOCHAR_NEW, /* 0xb2 .. */ - NOCHAR_NEW, /* 0xb3 .. */ - NOCHAR_NEW, /* 0xb4 .. */ - NOCHAR_NEW, /* 0xb5 .. */ - NOCHAR_NEW, /* 0xb6 .. 1 */ - NOCHAR_NEW, /* 0xb7 .. */ - NOCHAR_NEW, /* 0xb8 .. */ - NOCHAR_NEW, /* 0xb9 .. */ - NOCHAR_NEW, /* 0xba .. */ - NOCHAR_NEW, /* 0xbb .. " */ - NOCHAR_NEW, /* 0xbc .. */ - NOCHAR_NEW, /* 0xbd .. */ - NOCHAR_NEW, /* 0xbe .. */ - 0x229, /* 0xbf .. */ - 0x22a, /* 0xc0 .. */ - 0x22b, /* 0xc1 .. */ - 0x22c, /* 0xc2 .. */ - 0x22d, /* 0xc3 .. */ - 0x22e, /* 0xc4 .. */ - 0x22f, /* 0xc5 .. */ - 0x230, /* 0xc6 .. */ - 0x231, /* 0xc7 .. */ - 0x232, /* 0xc8 .. */ - 0x233, /* 0xc9 .. */ - 0x234, /* 0xca .. */ - 0x235, /* 0xcb .. */ - 0x236, /* 0xcc .. */ - 0x237, /* 0xcd .. */ - 0x049, /* 0xce .. */ - 0x049, /* 0xcf .. */ - 0x238, /* 0xd0 .. */ - 0x239, /* 0xd1 .. */ - 0x23a, /* 0xd2 .. */ - 0x23b, /* 0xd3 .. */ - 0x23c, /* 0xd4 .. */ - 0x23d, /* 0xd5 .. */ - 0x23e, /* 0xd6 .. */ - 0x23f, /* 0xd7 .. */ - 0x240, /* 0xd8 .. */ - 0x241, /* 0xd9 .. */ - 0x242, /* 0xda .. */ - 0x055, /* 0xdb .. */ - 0x243, /* 0xdc .. */ - 0x059, /* 0xdd .. */ - NOCHAR_NEW, /* 0xde .. */ - 0x244, /* 0xdf .. */ - 0x245, /* 0xe0 .. */ - 0x246, /* 0xe1 .. */ - 0x247, /* 0xe2 .. */ - 0x248, /* 0xe3 .. */ - 0x249, /* 0xe4 .. */ - 0x24a, /* 0xe5 .. */ - NOCHAR_NEW, /* 0xe6 .. */ - 0x24b, /* 0xe7 .. */ - 0x24c, /* 0xe8 .. */ - 0x24d, /* 0xe9 .. */ - 0x24e, /* 0xea .. */ - 0x24f, /* 0xeb .. */ - 0x069, /* 0xec .. */ - 0x250, /* 0xed .. */ - 0x251, /* 0xee .. */ - 0x252, /* 0xef .. */ - NOCHAR_NEW, /* 0xf0 .. */ - 0x253, /* 0xf1 .. */ - 0x23a, /* 0xf2 .. */ - 0x254, /* 0xf3 .. */ - 0x255, /* 0xf4 .. */ - 0x256, /* 0xf5 .. */ - 0x257, /* 0xf6 .. */ - NOCHAR_NEW, /* 0xf7 .. */ - 0x258, /* 0xf8 .. */ - 0x259, /* 0xf9 .. */ - 0x25a, /* 0xfa .. */ - 0x075, /* 0xfb .. */ - 0x25b, /* 0xfc .. */ - 0x25c, /* 0xfd .. */ - NOCHAR_NEW, /* 0xfe .. */ - 0x079, /* 0xff .. */ -}; - -unsigned short old_lcd_rocklatin1_to_xlcd[] = -{ - /* OLD LCD */ - NOCHAR_OLD, /* 0x00 reserved never to be used */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - RESERVED_CHAR, /* reserved */ - 0x216, /* 0x16 .. "bookmark" icon */ - 0x217, /* 0x17 .. "plugin" icon */ - 0x218, /* 0x18 .. "folder" icon */ - 0x219, /* 0x19 .. "MOD/AJZ" icon (winlatin o (dote in the middle) */ - 0x21a, /* 0x1a .. "language" icon (winlatin - (a bit longer minus sign) */ - 0x0fc, /* 0x1b .. "note" icon */ - 0x0d4, /* 0x1c .. "WPS" icon */ - 0x21d, /* 0x1d .. "playlist" icon */ - 0x21e, /* 0x1e .. "text file" icon (winlatin - (much longer minus sign) */ - 0x21f, /* 0x1f .. "config file" icon (winlatin ~) */ - 0x024, /* 0x20 .. */ - 0x025, /* 0x21 .. ! */ - 0x026, /* 0x22 .. " */ - 0x027, /* 0x23 .. # */ - 0x006, /* 0x24 .. $ */ - 0x029, /* 0x25 .. % */ - 0x02a, /* 0x26 .. & */ - 0x02b, /* 0x27 .. ' */ - 0x02c, /* 0x28 .. ( */ - 0x02d, /* 0x29 .. ) */ - 0x02e, /* 0x2a .. * */ - 0x02f, /* 0x2b .. + */ - 0x030, /* 0x2c .. , */ - 0x031, /* 0x2d .. - */ - 0x032, /* 0x2e .. . */ - 0x033, /* 0x2f .. / */ - 0x034, /* 0x30 .. 0 */ - 0x035, /* 0x31 .. 1 */ - 0x036, /* 0x32 .. 2 */ - 0x037, /* 0x33 .. 3 */ - 0x038, /* 0x34 .. 4 */ - 0x039, /* 0x35 .. 5 */ - 0x03a, /* 0x36 .. 6 */ - 0x03b, /* 0x37 .. 7 */ - 0x03c, /* 0x38 .. 8 */ - 0x03d, /* 0x39 .. 9 */ - 0x03e, /* 0x3a .. : */ - 0x03f, /* 0x3b .. ; */ - 0x040, /* 0x3c .. < */ - 0x041, /* 0x3d .. = */ - 0x042, /* 0x3e .. > */ - 0x043, /* 0x3f .. ? */ - 0x004, /* 0x40 .. @ */ - 0x045, /* 0x41 .. A */ - 0x046, /* 0x42 .. B */ - 0x047, /* 0x43 .. C */ - 0x048, /* 0x44 .. D */ - 0x049, /* 0x45 .. E */ - 0x04a, /* 0x46 .. F */ - 0x04b, /* 0x47 .. G */ - 0x04c, /* 0x48 .. H */ - 0x04d, /* 0x49 .. I */ - 0x04e, /* 0x4a .. J */ - 0x04f, /* 0x4b .. K */ - 0x050, /* 0x4c .. L */ - 0x051, /* 0x4d .. M */ - 0x052, /* 0x4e .. N */ - 0x053, /* 0x4f .. O */ - 0x054, /* 0x50 .. P */ - 0x055, /* 0x51 .. Q */ - 0x056, /* 0x52 .. R */ - 0x057, /* 0x53 .. S */ - 0x058, /* 0x54 .. T */ - 0x059, /* 0x55 .. U */ - 0x05a, /* 0x56 .. V */ - 0x05b, /* 0x57 .. W */ - 0x05c, /* 0x58 .. X */ - 0x05d, /* 0x59 .. Y */ - 0x05e, /* 0x5a .. Z */ - 0x0a9, /* 0x5b .. [ */ /* New LCD hardcoded to "(" */ - 0x220, /* 0x5c .. \ */ - 0x0ce, /* 0x5d .. ] */ /* New LCD hardcoded to ")" */ - NOCHAR_OLD, /* 0x5e .. ^ */ - 0x015, /* 0x5f .. _ */ - 0x221, /* 0x60 .. ` */ - 0x065, /* 0x00 97 .. a */ - 0x066, /* 0x00 98 .. b */ - 0x067, /* 0x00 99 .. c */ - 0x068, /* 0x64 .. d */ - 0x069, /* 0x65 .. e */ - 0x06a, /* 0x66 .. f */ - 0x06b, /* 0x67 .. g */ - 0x06c, /* 0x68 .. h */ - 0x06d, /* 0x69 .. i */ - 0x06e, /* 0x6a .. j */ - 0x06f, /* 0x6b .. k */ - 0x070, /* 0x6c .. l */ - 0x071, /* 0x6d .. m */ - 0x072, /* 0x6e .. n */ - 0x073, /* 0x6f .. o */ - 0x074, /* 0x70 .. p */ - 0x075, /* 0x71 .. q */ - 0x076, /* 0x72 .. r */ - 0x077, /* 0x73 .. s */ - 0x078, /* 0x74 .. t */ - 0x079, /* 0x75 .. u */ - 0x07a, /* 0x76 .. v */ - 0x07b, /* 0x77 .. w */ - 0x07c, /* 0x78 .. x */ - 0x07d, /* 0x79 .. y */ - 0x07e, /* 0x7a .. z */ - 0x02c, /* 0x7b ..*/ /* Old LCD hardcoded to "(" */ - 0x222, /* 0x7c .. | */ - 0x02d, /* 0x7d .. } */ /* Old LCD hardcoded to ")" */ - 0x223, /* 0x7e .. ~ */ - 0x08b, /* 0x7f full grid */ - NOCHAR_OLD, /* 0x80 winlatin Eurosign */ - 0x089, /* 0x81 filled-left-arrow (winlatin undefined) */ - 0x088, /* 0x82 filled-right-arrow (winlatin comma) */ - 0x087, /* 0x83 filled-up-arrow (winlatin f) */ - 0x086, /* 0x84 filled-up-arrow (winlatin ") */ - 0x085, /* 0x85 .. (three dots) */ - 0x0df, /* 0x86 meter level 2 (winlatin undefined) */ - 0x0e0, /* 0x87 meter level 3 (winlatin undefined) */ - 0x0e1, /* 0x88 meter level 4 (winlatin undefined) */ - 0x0e2, /* 0x89 meter level 5 (winlatin Promille) */ - 0x0e3, /* 0x8a meter level 6 (winlatin 'S' with upside down ^) */ - 0x0ec, /* 0x8a meter level 7 (full) (winlatin '<') */ - NOCHAR_OLD, /* 0x8c .. CE */ - NOCHAR_OLD, /* 0x8d .. */ - 0x0bd, /* 0x8e .. 'Z' with upside down ^ */ - NOCHAR_OLD, /* 0x8f .. */ - 0x25d, /* 0x90 "unknown" icon */ - 0x0d4, /* 0x91 .. */ - 0x089, /* 0x92 .. */ - 0x034, /* 0x93 .. folder icon substitute */ - 0x0fc, /* 0x94 .. note icon substitute */ - 0x0fa, /* 0x95 .. text/language/config icon substitute (winlatin o (dote in the middle) */ - NOCHAR_OLD, /* 0x96 .. (winlatin - (a bit longer minus sign) */ - NOCHAR_OLD, /* 0x97 .. (winlatin - (much longer minus sign) */ - NOCHAR_OLD, /* 0x98 .. (winlatin ~) */ - NOCHAR_OLD, /* 0x99 .. (winlatin TM) */ - NOCHAR_OLD, /* 0x9a .. 's' with upside down ^ */ - NOCHAR_OLD, /* 0x9b .. > */ - NOCHAR_OLD, /* 0x9c .. oe */ - NOCHAR_OLD, /* 0x9d .. */ - 0x0bd, /* 0x9e .. 'z' with upside down ^ */ - NOCHAR_OLD, /* 0x9f .. Large (Y with two dots) */ - NOCHAR_OLD, /* 0xa0 .. */ - NOCHAR_OLD, /* 0xa1 .. */ - NOCHAR_OLD, /* 0xa2 .. */ - 0x005, /* 0xa3 .. */ - NOCHAR_OLD, /* 0xa4 .. */ - NOCHAR_OLD, /* 0xa5 .. */ - NOCHAR_OLD, /* 0xa6 .. */ - 0x063, /* 0xa7 .. */ - NOCHAR_OLD, /* 0xa8 .. */ - NOCHAR_OLD, /* 0xa9 .. (copyright) */ - NOCHAR_OLD, /* 0xaa .. */ - NOCHAR_OLD, /* 0xab .. "<<" */ - NOCHAR_OLD, /* 0xac .. (unknown) */ - NOCHAR_OLD, /* 0xad .. (unkown1 */ - NOCHAR_OLD, /* 0xae .. (register)*/ - 0x0ee, /* 0xaf .. */ - NOCHAR_OLD, /* 0xb0 .. */ - NOCHAR_OLD, /* 0xb1 .. */ - NOCHAR_OLD, /* 0xb2 .. */ - NOCHAR_OLD, /* 0xb3 .. */ - NOCHAR_OLD, /* 0xb4 .. */ - NOCHAR_OLD, /* 0xb5 .. */ - NOCHAR_OLD, /* 0xb6 .. 1 */ - NOCHAR_OLD, /* 0xb7 .. */ - NOCHAR_OLD, /* 0xb8 .. */ - NOCHAR_OLD, /* 0xb9 .. */ - NOCHAR_OLD, /* 0xba .. */ - NOCHAR_OLD, /* 0xbb .. " */ - NOCHAR_OLD, /* 0xbc .. */ - NOCHAR_OLD, /* 0xbd .. */ - NOCHAR_OLD, /* 0xbe .. */ - 0x064, /* 0xbf .. */ - 0x08c, /* 0xc0 .. */ - 0x08d, /* 0xc1 .. */ - 0x08e, /* 0xc2 .. */ - 0x08f, /* 0xc3 .. */ - 0x05f, /* 0xc4 .. */ - 0x012, /* 0xc5 .. */ - 0x020, /* 0xc6 .. */ - 0x00d, /* 0xc7 .. */ - 0x090, /* 0xc8 .. */ - 0x023, /* 0xc9 .. */ - 0x091, /* 0xca .. */ - 0x092, /* 0xcb .. */ - 0x093, /* 0xcc .. */ - 0x094, /* 0xcd .. */ - 0x049, /* 0xce .. */ - 0x049, /* 0xcf .. */ - 0x095, /* 0xd0 .. */ - 0x061, /* 0xd1 .. */ - 0x096, /* 0xd2 .. */ - 0x097, /* 0xd3 .. */ - 0x098, /* 0xd4 .. */ - 0x099, /* 0xd5 .. */ - 0x060, /* 0xd6 .. */ - 0x0de, /* 0xd7 .. */ - 0x00f, /* 0xd8 .. */ - 0x09a, /* 0xd9 .. */ - 0x09b, /* 0xda .. */ - 0x059, /* 0xdb .. */ - 0x062, /* 0xdc .. */ - 0x0af, /* 0xdd .. */ - NOCHAR_OLD, /* 0xde .. */ - 0x022, /* 0xdf .. */ - 0x083, /* 0xe0 .. */ - 0x09c, /* 0xe1 .. */ - 0x09d, /* 0xe2 .. */ - 0x09e, /* 0xe3 .. */ - 0x07f, /* 0xe4 .. */ - 0x09d, /* 0xe5 .. */ - NOCHAR_OLD, /* 0xe6 .. */ - 0x084, /* 0xe7 .. */ - 0x008, /* 0xe8 .. */ - 0x009, /* 0xe9 .. */ - 0x09f, /* 0xea .. */ - 0x0a0, /* 0xeb .. */ - 0x06d, /* 0xec .. */ - 0x0a1, /* 0xed .. */ - 0x0a2, /* 0xee .. */ - 0x0a3, /* 0xef .. */ - NOCHAR_OLD, /* 0xf0 .. */ - 0x081, /* 0xf1 .. */ - 0x096, /* 0xf2 .. */ - 0x0a4, /* 0xf3 .. */ - 0x0a5, /* 0xf4 .. */ - 0x0a6, /* 0xf5 .. */ - 0x080, /* 0xf6 .. */ - NOCHAR_OLD, /* 0xf7 .. */ - 0x010, /* 0xf8 .. */ - 0x00a, /* 0xf9 .. */ - 0x0a7, /* 0xfa .. */ - 0x079, /* 0xfb .. */ - 0x082, /* 0xfc .. */ - 0x0af, /* 0xfd .. */ - NOCHAR_OLD, /* 0xfe .. */ - 0x07d, /* 0xff .. */ -}; - -/* second table -- substitute */ -const unsigned char - lcd_player_extended_lcd_to_rocklatin1[NO_EXTENDED_LCD_CHARS] = -{ -/* 00 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 01 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 02 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 03 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 04 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 05 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 06 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 07 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 08 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 09 */ NOCHAR_NEW, /* 0-16 user defined */ -/* 0a */ NOCHAR_NEW, /* 0-16 user defined */ -/* 0b */ NOCHAR_NEW, /* 0-16 user defined */ -/* 0c */ NOCHAR_NEW, /* 0-16 user defined */ -/* 0d */ NOCHAR_NEW, /* 0-16 user defined */ -/* 0e */ NOCHAR_NEW, /* 0-16 user defined */ -/* 0f */ NOCHAR_NEW, /* 0-16 user defined */ -/* 10 */ NOCHAR_NEW, /* reserved */ -/* 11 */ NOCHAR_NEW, /* reserved */ -/* 12 */ NOCHAR_NEW, /* reserved */ -/* 13 */ NOCHAR_NEW, /* reserved */ -/* 14 */ NOCHAR_NEW, /* reserved */ -/* 15 */ NOCHAR_NEW, /* reserved */ -/* 16 */ 0x91, /* bookmark icon */ -/* 17 */ 0x29, /* plugin icon */ -/* 18 */ 0x93, /* folder icon */ -/* 19 */ 'x', /* MOD/AJZ icon */ -/* 1a */ '+', /* language icon */ -/* 1b */ 0x94, /* note icon */ -/* 1c */ 0x91, /* WPS icon */ -/* 1d */ 0x95, /* playlist icon */ -/* 1e */ 0x95, /* text file icon */ -/* 1f */ 0x95, /* config file icon */ -/* 20 */ '/', /* substitute char for old lcd \ */ -/* 21 */ '\'', /* substitute char for old lcd ` */ -/* 22 */ '!', /* substitute char for old lcd | */ -/* 23 */ '-', /* substitute char for old lcd ~ */ -/* 24 */ '.', /* substitute char for new lcd (three dots) */ -/* 25 */ 'z', /* substitue char for new lcd (0x0bd) 'z' with upside down ^ */ -/* 26 */ 'L', /* substitue char for new lcd (0x005) */ -/* 27 */ NOCHAR_NEW, /* empty */ -/* 28 */ '-', /* substitue char for new lcd (0x0ee) */ -/* 29 */ '?', /* substitue char for new lcd (0x064) */ -/* 2a */ 'A', /* substitue char for new lcd (0x08c) */ -/* 2b */ 'A', /* substitue char for new lcd (0x08d) */ -/* 2c */ 'A', /* substitue char for new lcd (0x08e) */ -/* 2d */ 'A', /* substitue char for new lcd (0x08e) */ -/* 2e */ 'A', /* substitue char for new lcd (0x05f) */ -/* 2f */ 'A', /* substitue char for new lcd (0x012) */ -/* 30 */ 'A', /* substitue char for new lcd (0x020) */ -/* 31 */ 'C', /* substitue char for new lcd (0x00d) */ -/* 32 */ 'E', /* substitue char for new lcd (0x090) */ -/* 33 */ 'E', /* substitue char for new lcd (0x023) */ -/* 34 */ 'E', /* substitue char for new lcd (0x091) */ -/* 35 */ 'E', /* substitue char for new lcd (0x092) */ -/* 36 */ 'I', /* substitue char for new lcd (0x093) */ -/* 37 */ 'I', /* substitue char for new lcd (0x094) */ -/* 38 */ 'D', /* substitue char for new lcd (0x095) */ -/* 39 */ 'N', /* substitue char for new lcd (0x061) */ -/* 3a */ 'O', /* substitue char for new lcd (0x096) */ -/* 3b */ 'O', /* substitue char for new lcd (0x097) */ -/* 3c */ 'O', /* substitue char for new lcd (0x098) */ -/* 3d */ 'O', /* substitue char for new lcd (0x099) */ -/* 3e */ 'O', /* substitue char for new lcd (0x060) */ -/* 3f */ 'x', /* substitue char for new lcd (0x0de) */ -/* 40 */ '0', /* substitue char for new lcd (0x00f) */ -/* 41 */ 'U', /* substitue char for new lcd (0x09a) */ -/* 42 */ 'U', /* substitue char for new lcd (0x09b) */ -/* 43 */ 'U', /* substitue char for new lcd (0x062) */ -/* 44 */ 'B', /* substitue char for new lcd (0x022) */ -/* 45 */ 'a', /* substitue char for new lcd (0x083) */ -/* 46 */ 'a', /* substitue char for new lcd (0x09c) */ -/* 47 */ 'a', /* substitue char for new lcd (0x09d) */ -/* 48 */ 'a', /* substitue char for new lcd (0x09e) */ -/* 49 */ 'a', /* substitue char for new lcd (0x07f) */ -/* 4a */ 'a', /* substitue char for new lcd (0x09d) */ -/* 4b */ 'c', /* substitue char for new lcd (0x084) */ -/* 4c */ 'e', /* substitue char for new lcd (0x008) */ -/* 4d */ 'e', /* substitue char for new lcd (0x009) */ -/* 4e */ 'e', /* substitue char for new lcd (0x09f) */ -/* 4f */ 'e', /* substitue char for new lcd (0x0a0) */ -/* 50 */ 'i', /* substitue char for new lcd (0x0a1) */ -/* 51 */ 'i', /* substitue char for new lcd (0x0a2) */ -/* 52 */ 'i', /* substitue char for new lcd (0x0a3) */ -/* 53 */ 'n', /* substitue char for new lcd (0x081) */ -/* 54 */ 'o', /* substitue char for new lcd (0x0a4) */ -/* 55 */ 'o', /* substitue char for new lcd (0x0a5) */ -/* 56 */ 'o', /* substitue char for new lcd (0x0a6) */ -/* 57 */ 'o', /* substitue char for new lcd (0x080) */ -/* 58 */ 'o', /* substitue char for new lcd (0x010) */ -/* 59 */ 'u', /* substitue char for new lcd (0x00a) */ -/* 5a */ 'u', /* substitue char for new lcd (0x0a7) */ -/* 5b */ 'u', /* substitue char for new lcd (0x082) */ -/* 5c */ 'y', /* substitue char for new lcd (0x0af) */ -/* 5d */ '?', /* unknown icon */ - -}; - -unsigned char extended_font_player[NO_EXTENDED_LCD_CHARS][8] = { - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 00 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 01 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 02 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 03 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 04 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 05 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 06 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 07 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 08 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 09 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0a */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0b */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0c */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0d */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0e */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 0f */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 10 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 11 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 12 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 13 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 14 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 15 */ - { 0x00, 0x03, 0x07, 0x0e, 0x1c, 0x08, 0x00, 0x00}, /* 16 Bookmark icon */ - { 0x04, 0x1e, 0x07, 0x1f, 0x05, 0x01, 0x06, 0x00}, /* 17 Plugin file icon */ - { 0x0c, 0x13, 0x11, 0x11, 0x11, 0x11, 0x1f, 0x00}, /* 18 Folder icon */ - { 0x1f, 0x11, 0x1b, 0x15, 0x1b, 0x11, 0x1f, 0x00}, /* 19 MOD/AJZ icon */ - { 0x00, 0x1f, 0x15, 0x1f, 0x15, 0x1f, 0x00, 0x00}, /* 1a Language icon */ - { 0x03, 0x05, 0x09, 0x09, 0x0b, 0x1b, 0x18, 0x00}, /* 1b note icon */ - { 0x01, 0x01, 0x02, 0x02, 0x14, 0x0c, 0x04, 0x00}, /* 1c WPS icon */ - { 0x17, 0x00, 0x17, 0x00, 0x17, 0x00, 0x17, 0x00}, /* 1d Playlist icon */ - { 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00}, /* 1e Text file icon */ - { 0x0b, 0x10, 0x0b, 0x00, 0x1f, 0x00, 0x1f, 0x00}, /* 1f Config file icon */ - - /* Unprioritized chars follows below, least prioritized char last */ - { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00}, /* 20 '\' new lcd 0x12 */ - { 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 21 '`' new lcd 0x60 */ - { 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00}, /* 22 '|' new lcd 0x7c */ - { 0x00, 0x00, 0x08, 0x15, 0x02, 0x00, 0x00, 0x00}, /* 23 '~' new lcd 0xf0 */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00}, /* 24 old lcd 0x85 */ - { 0x0a, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f, 0x00}, /* 25 old lcd 0xbd */ - { 0x06, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x1f, 0x00}, /* 26 old lcd 0x05 */ - { 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x01, 0x0e, 0x00}, /* 27 old lcd 0x63 */ - { 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* 28 old lcd 0xee */ - { 0x04, 0x00, 0x04, 0x08, 0x10, 0x11, 0x0e, 0x00}, /* 29 old lcd 0x64 */ - { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 2a old lcd 0x8c */ - { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 2b old lcd 0x8d */ - { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 2c old lcd 0x8e */ - { 0x0d, 0x12, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x00}, /* 2d old lcd 0x8f */ - { 0x0a, 0x00, 0x04, 0x0a, 0x11, 0x1f, 0x11, 0x00}, /* 2e old lcd 0x5f */ - { 0x04, 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x00}, /* 2f old lcd 0x12 */ - { 0x0f, 0x14, 0x14, 0x1f, 0x14, 0x14, 0x17, 0x00}, /* 30 old lcd 0x20 */ - { 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x02, 0x0e, 0x00}, /* 31 old lcd 0x0d */ - { 0x08, 0x04, 0x1f, 0x10, 0x1e, 0x10, 0x1f, 0x00}, /* 32 old lcd 0x90 */ - { 0x02, 0x04, 0x1f, 0x10, 0x1c, 0x10, 0x1f, 0x00}, /* 33 old lcd 0x23 */ - { 0x04, 0x0a, 0x1f, 0x10, 0x1c, 0x10, 0x1f, 0x00}, /* 34 old lcd 0x91 */ - { 0x0a, 0x00, 0x1f, 0x10, 0x1c, 0x10, 0x1f, 0x00}, /* 35 old lcd 0x92 */ - { 0x08, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e, 0x00}, /* 36 old lcd 0x93 */ - { 0x02, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e, 0x00}, /* 37 old lcd 0x94 */ - { 0x0c, 0x0a, 0x09, 0x1d, 0x09, 0x0a, 0x0c, 0x00}, /* 38 old lcd 0x95 */ - { 0x0d, 0x12, 0x00, 0x19, 0x15, 0x13, 0x11, 0x00}, /* 39 old lcd 0x61 */ - { 0x08, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 3a old lcd 0x96 */ - { 0x02, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 3b old lcd 0x97 */ - { 0x04, 0x0a, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 3c old lcd 0x98 */ - { 0x0d, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 3d old lcd 0x99 */ - { 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 3e old lcd 0x60 */ - { 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x0a, 0x00}, /* 3f old lcd 0xde */ - { 0x01, 0x0e, 0x13, 0x15, 0x19, 0x0e, 0x10, 0x00}, /* 40 old lcd 0x0f */ - { 0x08, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 41 old lcd 0x9a */ - { 0x02, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 42 old lcd 0x9b */ - { 0x0a, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0e, 0x00}, /* 43 old lcd 0x62 */ - { 0x0c, 0x12, 0x16, 0x11, 0x11, 0x16, 0x10, 0x00}, /* 44 old lcd 0x22 */ - { 0x08, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 45 old lcd 0x83 */ - { 0x02, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 46 old lcd 0x9c */ - { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 47 old lcd 0x9d */ - { 0x0d, 0x12, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 48 old lcd 0x9e */ - { 0x0a, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 49 old lcd 0x7f */ - { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x00}, /* 4a old lcd 0x9d */ - { 0x00, 0x0f, 0x10, 0x10, 0x0f, 0x02, 0x04, 0x00}, /* 4b old lcd 0x84 */ - { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 4c old lcd 0x08 */ - { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 4d old lcd 0x09 */ - { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 4e old lcd 0x9f */ - { 0x0a, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x00}, /* 4f old lcd 0xa0 */ - { 0x02, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e, 0x00}, /* 50 old lcd 0xa1 */ - { 0x04, 0x0a, 0x00, 0x0c, 0x04, 0x04, 0x0e, 0x00}, /* 51 old lcd 0xa2 */ - { 0x0a, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x0e, 0x00}, /* 52 old lcd 0xa3 */ - { 0x0d, 0x12, 0x00, 0x16, 0x19, 0x11, 0x11, 0x00}, /* 53 old lcd 0x81 */ - { 0x02, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 54 old lcd 0xa4 */ - { 0x04, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 55 old lcd 0xa5 */ - { 0x0d, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 56 old lcd 0xa6 */ - { 0x00, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e, 0x00}, /* 57 old lcd 0x80 */ - { 0x00, 0x02, 0x0e, 0x15, 0x15, 0x0e, 0x08, 0x00}, /* 58 old lcd 0x10 */ - { 0x08, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d, 0x00}, /* 59 old lcd 0x0a */ - { 0x02, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d, 0x00}, /* 5a old lcd 0xa7 */ - { 0x00, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d, 0x00}, /* 5b old lcd 0x82 */ - { 0x02, 0x04, 0x11, 0x11, 0x0f, 0x01, 0x0e, 0x00}, /* 5c old lcd 0xaf */ - { 0x0c, 0x12, 0x12, 0x08, 0x08, 0x00, 0x08, 0x00}, /* 5d Unknown icon */ -}; - -#endif /* HAVE_LCD_CHARCELLS */ diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c deleted file mode 100644 index dd99246611..0000000000 --- a/firmware/drivers/lcd-player.c +++ /dev/null @@ -1,830 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2002 by Alan Korr - * - * All files in this archive are subject to the GNU General Public License. - * See the file COPYING in the source tree root for full license agreement. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include "config.h" -#include "hwcompat.h" - -#ifdef HAVE_LCD_CHARCELLS - -#include "lcd.h" -#include "kernel.h" -#include "thread.h" -#include -#include -#include "file.h" -#include "debug.h" -#include "system.h" -#include "font.h" -#include "lcd-player-charset.h" -#include "rbunicode.h" - -/*** definitions ***/ - -#define OLD_LCD_CONTRAST_SET ((char)0xA8) -#define OLD_LCD_CRAM ((char)0xB0) /* Characters */ -#define OLD_LCD_PRAM ((char)0x80) /* Patterns */ -#define OLD_LCD_IRAM ((char)0xE0) /* Icons */ - -#define NEW_LCD_CONTRAST_SET ((char)0x50) -#define NEW_LCD_CRAM ((char)0x80) /* Characters */ -#define NEW_LCD_PRAM ((char)0xC0) /* Patterns */ -#define NEW_LCD_IRAM ((char)0x40) /* Icons */ -#define NEW_LCD_FUNCTION_SET ((char)0x10) -#define NEW_LCD_POWER_SAVE_MODE_OSC_CONTROL_SET ((char)0x0c) -#define NEW_LCD_POWER_CONTROL_REGISTER_SET ((char)0x20) -#define NEW_LCD_DISPLAY_CONTROL_SET ((char)0x28) - -#define LCD_CURSOR(x,y) ((char)(lcd_cram+((y)*16+(x)))) -#define LCD_ICON(i) ((char)(lcd_iram+i)) - -#define SCROLLABLE_LINES 2 - -#define SCROLL_MODE_OFF 0 -#define SCROLL_MODE_PAUSE 1 -#define SCROLL_MODE_RUN 2 - -extern unsigned short new_lcd_rocklatin1_to_xlcd[]; -extern unsigned short old_lcd_rocklatin1_to_xlcd[]; -extern const unsigned char lcd_player_extended_lcd_to_rocklatin1[]; -extern unsigned char extended_font_player[NO_EXTENDED_LCD_CHARS][8]; - -/*** generic code ***/ - -#define MAX_CURSOR_CHARS 8 -struct cursorinfo { - int len; - char text[MAX_CURSOR_CHARS]; - int textpos; - int y_pos; - int x_pos; - int divider; - int downcount; -} cursor; - -static void scroll_thread(void); -static char scroll_stack[DEFAULT_STACK_SIZE]; -static const char scroll_name[] = "scroll"; -static int scroll_ticks = 12; /* # of ticks between updates */ -static int scroll_delay = HZ/2; /* delay before starting scroll */ -static int jump_scroll_delay = HZ/4; /* delay between jump scroll jumps */ -static int scroll_spacing = 3; /* spaces between end and start of text */ -static int bidir_limit = 50; /* percent */ -static int jump_scroll = 0; /* 0=off, 1=once, ..., JUMP_SCROLL_ALWAYS */ - -static struct scrollinfo scroll[SCROLLABLE_LINES]; - -static char extended_chars_mapped[NO_EXTENDED_LCD_CHARS]; -static char extended_pattern_content[8]; /* Which char is mapped in pattern */ -static char extended_pattern_usage[8]; /* Counting number of times used */ -static char pattern_size; /* Last pattern, 3 for old LCD, 7 for new LCD */ - -static bool new_lcd; - -unsigned short *lcd_ascii; -static char lcd_contrast_set; -static char lcd_cram; -static char lcd_pram; -static char lcd_iram; - -unsigned short buffer_xlcd[11][2]; -unsigned short buffer_lcd_mirror[11][2]; - -#ifdef SIMULATOR -unsigned char hardware_buffer_lcd[11][2]; -#endif - -#define NO_CHAR -1 - -static void lcd_free_pat(int map_ch) -{ - int x, y; - unsigned char substitute_char; - - int pat; - pat=extended_chars_mapped[map_ch]; - if (pat!=NO_CHAR) { - - substitute_char=lcd_player_extended_lcd_to_rocklatin1[map_ch]; - - /* TODO: use a define for the screen width! */ - for (x=0; x<11; x++) { - /* TODO: use a define for the screen height! */ - for (y=0; y<2; y++) { - if (map_ch==lcd_ascii[buffer_xlcd[x][y]]-512) { - buffer_xlcd[x][y]=substitute_char; - buffer_lcd_mirror[x][y]=substitute_char; -#ifdef SIMULATOR - hardware_buffer_lcd[x][y]=substitute_char; -#else - lcd_write_command_e(LCD_CURSOR(x, y), substitute_char); -#endif - } - } - } - extended_chars_mapped[map_ch]=NO_CHAR; - extended_pattern_content[pat]=NO_CHAR; - extended_pattern_usage[pat]=0; - } -#ifdef SIMULATOR - lcd_update(); -#endif -} - -static int lcd_get_free_pat(int ch) -{ - int pat; - int last_pat=0; - static int last_used_pat=0; - int loop; - - pat=last_used_pat; - for (loop=0; loop<=pattern_size; loop++) { - pat=(pat+1)&pattern_size; /* Keep 'pat' within limits */ - if (extended_pattern_usage[pat]==0) { - int map_ch=extended_pattern_content[pat]; - if (map_ch != NO_CHAR) { - extended_chars_mapped[map_ch]=NO_CHAR; - extended_pattern_content[pat]=NO_CHAR; - } - last_used_pat=pat; - return pat; - } - if (extended_pattern_content[pat]>extended_pattern_content[last_pat]) - last_pat=pat; - } - if (ch<32) { /* Prioritized char */ - /* Remove last_pat */ - lcd_free_pat(extended_pattern_content[last_pat]); - last_used_pat=last_pat; - return last_pat; - } - return NO_CHAR; - -} - -void xlcd_update(void) -{ - int x, y; - for (x=0; x<11; x++) { - for (y=0; y<2; y++) { - unsigned short ch=buffer_xlcd[x][y]; - unsigned char hw_ch=0xff; - if (ch==buffer_lcd_mirror[x][y]) - continue; /* No need to redraw */ - buffer_lcd_mirror[x][y]=ch; - if (ch>=256 && ch<512) { - hw_ch=ch-256; - } else { - int map_ch=lcd_ascii[ch]; - if (map_ch<512) { - hw_ch=map_ch; - } - else { - map_ch=map_ch-512; - if (extended_chars_mapped[map_ch]!=NO_CHAR) { - hw_ch=extended_chars_mapped[map_ch]; - extended_pattern_usage[hw_ch]++; - } - else { - int pat; - pat=lcd_get_free_pat(map_ch); - if (pat<0) { - /* Find substitute char */ - map_ch= - lcd_player_extended_lcd_to_rocklatin1[map_ch]; - hw_ch=lcd_ascii[map_ch]; - } else { -#ifdef DEBUG - if (extended_pattern_usage[pat]!=0) { - DEBUGF("***Pattern %d is not zero!\n", pat); - } -#endif - extended_chars_mapped[map_ch]=pat; - extended_pattern_content[pat]=map_ch; - extended_pattern_usage[pat]=1; - lcd_define_hw_pattern(pat*8, - extended_font_player[map_ch], - 8); - hw_ch=pat; - } - } - } - } -#ifdef SIMULATOR - hardware_buffer_lcd[x][y]=hw_ch; -#else - lcd_write_command_e(LCD_CURSOR(x,y), hw_ch); -#endif - } - } - lcd_update(); -} - -bool lcdx_putc(int x, int y, unsigned short ch) -{ - int lcd_char; - if (buffer_xlcd[x][y]==ch) - return false; /* Same char, ignore any update */ - lcd_char=lcd_ascii[buffer_xlcd[x][y]]; - if (lcd_char>=512) { - /* The removed char is a defined pattern, count down the reference. */ - extended_pattern_usage[(int)extended_chars_mapped[lcd_char-512]]--; -#ifdef DEBUG - if (extended_pattern_usage[(int)extended_chars_mapped[lcd_char]]<0) { - DEBUGF("**** Mapped char %02x is less than 0!\n", lcd_char); - } -#endif - } - - buffer_xlcd[x][y]=ch; - - lcd_char=lcd_ascii[ch]; - if (lcd_char>=256) - return true; /* Caller shall call xlcd_update() when done */ - - buffer_lcd_mirror[x][y]=lcd_char; -#ifdef SIMULATOR - hardware_buffer_lcd[x][y]=lcd_char; -#else - lcd_write_command_e(LCD_CURSOR(x, y), lcd_char); -#endif - return false; -} - -void lcd_clear_display(void) -{ - int i; - bool update=false; - lcd_stop_scroll(); - cursor.len=0; /* Stop cursor */ - for (i=0;i<22;i++) - update|=lcdx_putc(i%11, i/11, ' '); - if (update) - xlcd_update(); -} - -static void lcd_puts_cont_scroll(int x, int y, const unsigned char *string) -{ - bool update=false; - - for (; *string && x<11; x++) - { - /* We should check if char is over 256 */ - update|=lcdx_putc(x, y, *(unsigned char*)string++); - } - - for (; x<11; x++) - update|=lcdx_putc(x, y, ' '); - if (update) - xlcd_update(); -#ifdef SIMULATOR - lcd_update(); -#endif -} -void lcd_puts(int x, int y, const unsigned char *string) -{ - int i=0; - unsigned short ucs; - const unsigned char *utf8 = string; - unsigned char tmp[12]; - - while (*utf8 && i<11) { - utf8 = utf8decode(utf8, &ucs); - if (ucs < 256) - tmp[i++] = ucs; - else - tmp[i++] = '?'; - } - - tmp[i] = 0; - - scroll[y].mode=SCROLL_MODE_OFF; - return lcd_puts_cont_scroll(x, y, tmp); -} - -void lcd_put_cursor(int x, int y, char cursor_char) -{ - if (cursor.len == 0) { - cursor.text[0]=buffer_xlcd[x][y]; - cursor.text[1]=cursor_char; - cursor.len=2; - cursor.textpos=0; - cursor.y_pos=y; - cursor.x_pos=x; - cursor.downcount=0; - cursor.divider=4; - } -} - -void lcd_remove_cursor(void) -{ - if (cursor.len!=0) { - bool up; - cursor.len=0; - up = lcdx_putc(cursor.x_pos, cursor.y_pos, cursor.text[0]); -#ifdef SIMULATOR - if(up) - lcd_update(); -#endif - } -} - -void lcd_putc(int x, int y, unsigned short ch) -{ - bool update; - if (x<0 || y<0) { - return; - } - update=lcdx_putc(x, y, ch); - - if (update) - xlcd_update(); -} - -unsigned char lcd_get_locked_pattern(void) -{ - unsigned char pat=1; - while (pattextlen = strlen(tmp); - - if ( s->textlen > 11-x ) { - s->mode = SCROLL_MODE_RUN; - s->scroll_start_tick = current_tick + scroll_delay; - s->offset=0; - s->startx=x; - s->starty=y; - s->direction=+1; - s->jump_scroll=0; - s->jump_scroll_steps=0; - if (jump_scroll && jump_scroll_delaytextlen-11+x)) { - s->jump_scroll_steps=11-x; - s->jump_scroll=jump_scroll; - } - strncpy(s->text,tmp,sizeof s->text); - s->turn_offset=-1; - if (bidir_limit && (s->textlen < ((11-x)*(100+bidir_limit))/100)) { - s->turn_offset=s->textlen+x-11; - } - else { - for (i=0; itextlen<(int)sizeof(s->text); i++) { - s->text[s->textlen++]=' '; - } - } - if (s->textlen<(int)sizeof(s->text)) - s->text[s->textlen]=' '; - s->text[sizeof s->text - 1] = 0; - } - else - s->mode = SCROLL_MODE_OFF; -} - -void lcd_stop_scroll(void) -{ - struct scrollinfo* s; - int index; - - for ( index = 0; index < SCROLLABLE_LINES; index++ ) { - s = &scroll[index]; - if ( s->mode == SCROLL_MODE_RUN || - s->mode == SCROLL_MODE_PAUSE ) { - /* restore scrolled row */ - lcd_puts(s->startx, s->starty, s->text); - } - } - - lcd_update(); -} - -static const char scroll_tick_table[16] = { - /* Hz values: - 1, 1.25, 1.55, 2, 2.5, 3.12, 4, 5, 6.25, 8.33, 10, 12.5, 16.7, 20, 25, 33 */ - 100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3 -}; - -void lcd_scroll_speed(int speed) -{ - scroll_ticks = scroll_tick_table[speed]; -} - -void lcd_scroll_delay(int ms) -{ - scroll_delay = ms / (HZ / 10); -} - -void lcd_jump_scroll_delay(int ms) -{ - jump_scroll_delay = ms / (HZ / 10); -} - -static void scroll_thread(void) -{ - struct scrollinfo* s; - int index; - int i, o; - bool update; - - /* initialize scroll struct array */ - for (index = 0; index < SCROLLABLE_LINES; index++) { - scroll[index].mode = SCROLL_MODE_OFF; - } - - while ( 1 ) { - - update = false; - - for ( index = 0; index < SCROLLABLE_LINES; index++ ) { - s = &scroll[index]; - if ( s->mode == SCROLL_MODE_RUN ) { - if ( TIME_AFTER(current_tick, s->scroll_start_tick) ) { - char buffer[12]; - int jumping_scroll=s->jump_scroll; - update = true; - if (s->jump_scroll) { - - /* Find new position to start jump scroll by - * finding last white space within - * jump_scroll_steps */ - int i; - o = s->offset = s->offset + s->jump_scroll_steps; - for (i = 0; i < s->jump_scroll_steps; i++, o--) { - if (o < s->textlen && - ((0x20 <= s->text[o] && s->text[o] <= 0x2f) || s->text[o] == '_')) - { - s->offset = o; - break; - } - } - - s->scroll_start_tick = current_tick + - jump_scroll_delay; - /* Eat space */ - while (s->offset < s->textlen && - ((0x20 <= s->text[s->offset] && s->text[s->offset] <= 0x2f) || - s->text[s->offset] == '_')) { - s->offset++; - } - if (s->offset >= s->textlen) { - s->offset=0; - s->scroll_start_tick = current_tick + - scroll_delay; - if (s->jump_scroll != JUMP_SCROLL_ALWAYS) { - s->jump_scroll--; - s->direction=1; - } - } - } else { - if ( s->offset < s->textlen-1 ) { - s->offset+=s->direction; - if (s->offset==0) { - s->direction=+1; - s->scroll_start_tick = current_tick + - scroll_delay; - } else { - if (s->offset == s->turn_offset) { - s->direction=-1; - s->scroll_start_tick = current_tick + - scroll_delay; - } - } - } - else { - s->offset = 0; - } - } - - i=0; - o=s->offset; - while (i<11) { - buffer[i++]=s->text[o++]; - if (o==s->textlen /* || (jump_scroll && buffer[i-1] == ' ') */) - break; - } - o=0; - if (s->turn_offset == -1 && !jumping_scroll) { - while (i<11) { - buffer[i++]=s->text[o++]; - } - } else { - while (i<11) { - buffer[i++]=' '; - } - } - buffer[11]=0; - - lcd_puts_cont_scroll(s->startx, s->starty, buffer); - } - } - if (cursor.len>0) { - if (cursor.downcount--<0) { - cursor.downcount=cursor.divider; - cursor.textpos++; - if (cursor.textpos>=cursor.len) - cursor.textpos=0; -#ifdef SIMULATOR - lcdx_putc(cursor.x_pos, cursor.y_pos, - cursor.text[cursor.textpos]); - update=true; -#else - update|=lcdx_putc(cursor.x_pos, cursor.y_pos, - cursor.text[cursor.textpos]); -#endif - } - } - if (update) { - lcd_update(); - } - } - - sleep(scroll_ticks); - } -} - -#endif /* HAVE_LCD_CHARCELLS */ -- cgit v1.2.3