blob: 693919dbffa0999153454c4dbc9fa61fc6124f2b [file] [log] [blame]
Jens Arnold5a696892007-04-04 00:16:11 +00001/***************************************************************************
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 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000013 * 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.
Jens Arnold5a696892007-04-04 00:16:11 +000017 *
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);
Jens Arnoldd79d2392009-06-20 14:34:27 +0000777 remove("tmp.pnm");
Jens Arnold5a696892007-04-04 00:16:11 +0000778 }
779 }
780}