convert the last of the menus in text_editor to the new api
[Rockbox.git] / tools / player_unifont.c
blob2b5121d50133cfbd445262cea5222d9ee03daf4c
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Jens Arnold
11 * Based on the work of Kjell Ericson
13 * All files in this archive are subject to the GNU General Public License.
14 * See the file COPYING in the source tree root for full license agreement.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <stdbool.h>
24 #include <string.h>
25 #include "lcd-charcell.h"
27 #define CHAR_WIDTH 8
28 #define CHAR_HEIGHT 8
29 #define BITMAP_WIDTH (CHAR_WIDTH*(16+3))
30 #define SIZE 2
32 #define CHAR_BG_STD 0xc0c0c0
33 #define CHAR_BG_ALT 0x808080
34 #define CHAR_FG_STD 0x000000
35 #define CHAR_FG_ALT 0xf00000
37 static unsigned char font_player_newlcd[256][7] = {
38 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
39 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
40 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
41 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
42 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 04 */
43 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 05 */
44 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 06 */
45 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 07 */
46 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 08 */
47 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 09 */
48 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0a */
49 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0b */
50 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0c */
51 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0d */
52 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0e */
53 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0f */
54 { 0x00, 0x10, 0x1c, 0x1f, 0x1c, 0x10, 0x00 }, /* 10 */
55 { 0x00, 0x01, 0x07, 0x1f, 0x07, 0x01, 0x00 }, /* 11 */
56 { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00 }, /* 12 */
57 { 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x0a }, /* 13 */
58 { 0x0f, 0x1d, 0x1d, 0x0d, 0x05, 0x05, 0x05 }, /* 14 */
59 { 0x07, 0x08, 0x0e, 0x11, 0x0e, 0x02, 0x1c }, /* 15 */
60 { 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00 }, /* 16 */
61 { 0x01, 0x01, 0x05, 0x09, 0x1f, 0x08, 0x04 }, /* 17 */
62 { 0x04, 0x0e, 0x15, 0x04, 0x04, 0x04, 0x04 }, /* 18 */
63 { 0x04, 0x04, 0x04, 0x04, 0x15, 0x0e, 0x04 }, /* 19 */
64 { 0x11, 0x19, 0x1d, 0x1f, 0x1d, 0x19, 0x11 }, /* 1a */
65 { 0x11, 0x13, 0x17, 0x1f, 0x17, 0x13, 0x11 }, /* 1b */
66 { 0x10, 0x14, 0x12, 0x1f, 0x12, 0x14, 0x10 }, /* 1c */
67 { 0x01, 0x05, 0x09, 0x1f, 0x09, 0x05, 0x01 }, /* 1d */
68 { 0x00, 0x1f, 0x0e, 0x0e, 0x04, 0x04, 0x00 }, /* 1e */
69 { 0x00, 0x04, 0x04, 0x0e, 0x0e, 0x1f, 0x00 }, /* 1f */
70 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 20 */
71 { 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x04 }, /* 21 */
72 { 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00 }, /* 22 */
73 { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 23 */
74 { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 24 */
75 { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 25 */
76 { 0x0c, 0x12, 0x14, 0x08, 0x15, 0x12, 0x0d }, /* 26 */
77 { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 27 */
78 { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 28 */
79 { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 29 */
80 { 0x00, 0x04, 0x15, 0x0e, 0x15, 0x04, 0x00 }, /* 2a */
81 { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2b */
82 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 2c */
83 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 2d */
84 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 2e */
85 { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 2f */
86 { 0x0e, 0x11, 0x13, 0x15, 0x19, 0x11, 0x0e }, /* 30 */
87 { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 31 */
88 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 32 */
89 { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 33 */
90 { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 34 */
91 { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 35 */
92 { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 36 */
93 { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 37 */
94 { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 38 */
95 { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 39 */
96 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3a */
97 { 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x04, 0x08 }, /* 3b */
98 { 0x02, 0x04, 0x08, 0x10, 0x08, 0x04, 0x02 }, /* 3c */
99 { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 3d */
100 { 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08 }, /* 3e */
101 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 3f */
102 { 0x0e, 0x11, 0x01, 0x0d, 0x15, 0x15, 0x0e }, /* 40 */
103 { 0x0e, 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 41 */
104 { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 42 */
105 { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 43 */
106 { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 44 */
107 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 45 */
108 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 46 */
109 { 0x0e, 0x11, 0x10, 0x17, 0x11, 0x11, 0x0f }, /* 47 */
110 { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 48 */
111 { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 49 */
112 { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4a */
113 { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4b */
114 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 4c */
115 { 0x11, 0x1b, 0x15, 0x15, 0x11, 0x11, 0x11 }, /* 4d */
116 { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 4e */
117 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 4f */
118 { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 50 */
119 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 51 */
120 { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 52 */
121 { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 53 */
122 { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 54 */
123 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 55 */
124 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 56 */
125 { 0x11, 0x11, 0x11, 0x15, 0x15, 0x15, 0x0a }, /* 57 */
126 { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 58 */
127 { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 59 */
128 { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5a */
129 { 0x0e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0e }, /* 5b */
130 { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 5c */
131 { 0x0e, 0x02, 0x02, 0x02, 0x02, 0x02, 0x0e }, /* 5d */
132 { 0x04, 0x0a, 0x11, 0x00, 0x00, 0x00, 0x00 }, /* 5e */
133 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 5f */
134 { 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, /* 60 */
135 { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 61 */
136 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x1e }, /* 62 */
137 { 0x00, 0x00, 0x0e, 0x10, 0x10, 0x11, 0x0e }, /* 63 */
138 { 0x01, 0x01, 0x0d, 0x13, 0x11, 0x11, 0x0f }, /* 64 */
139 { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 65 */
140 { 0x06, 0x09, 0x08, 0x1c, 0x08, 0x08, 0x08 }, /* 66 */
141 { 0x00, 0x0f, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* 67 */
142 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 68 */
143 { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 69 */
144 { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6a */
145 { 0x10, 0x10, 0x12, 0x14, 0x18, 0x14, 0x12 }, /* 6b */
146 { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 6c */
147 { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x11, 0x11 }, /* 6d */
148 { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6e */
149 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 6f */
150 { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 70 */
151 { 0x00, 0x00, 0x0d, 0x13, 0x0f, 0x01, 0x01 }, /* 71 */
152 { 0x00, 0x00, 0x16, 0x19, 0x10, 0x10, 0x10 }, /* 72 */
153 { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 73 */
154 { 0x08, 0x08, 0x1c, 0x08, 0x08, 0x09, 0x06 }, /* 74 */
155 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 75 */
156 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 76 */
157 { 0x00, 0x00, 0x11, 0x11, 0x15, 0x15, 0x0a }, /* 77 */
158 { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 78 */
159 { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 79 */
160 { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7a */
161 { 0x02, 0x04, 0x04, 0x08, 0x04, 0x04, 0x02 }, /* 7b */
162 { 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 7c */
163 { 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x08 }, /* 7d */
164 { 0x00, 0x04, 0x02, 0x1f, 0x02, 0x04, 0x00 }, /* 7e */
165 { 0x00, 0x04, 0x08, 0x1f, 0x08, 0x04, 0x00 }, /* 7f */
166 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 80 */
167 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* 81 */
168 { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* 82 */
169 { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* 83 */
170 { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 84 */
171 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 85 */
172 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 86 */
173 { 0x00, 0x0a, 0x04, 0x1f, 0x04, 0x0a, 0x00 }, /* 87 */
174 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 }, /* 88 */
175 { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 }, /* 89 */
176 { 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d }, /* 8a */
177 { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 }, /* 8b */
178 { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c }, /* 8c */
179 { 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* 8d */
180 { 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f }, /* 8e */
181 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00 }, /* 8f */
182 { 0x00, 0x0e, 0x1f, 0x1f, 0x1f, 0x0e, 0x00 }, /* 90 */
183 { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* 91 */
184 { 0x1f, 0x1b, 0x13, 0x1b, 0x1b, 0x11, 0x1f }, /* 92 */
185 { 0x1f, 0x11, 0x1d, 0x1b, 0x17, 0x11, 0x1f }, /* 93 */
186 { 0x00, 0x00, 0x07, 0x04, 0x04, 0x14, 0x08 }, /* 94 */
187 { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00, 0x1f }, /* 95 */
188 { 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x00 }, /* 96 */
189 { 0x00, 0x04, 0x00, 0x1f, 0x00, 0x04, 0x00 }, /* 97 */
190 { 0x1f, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 98 */
191 { 0x1c, 0x04, 0x1c, 0x10, 0x1c, 0x00, 0x00 }, /* 99 */
192 { 0x1c, 0x04, 0x1c, 0x04, 0x1c, 0x00, 0x00 }, /* 9a */
193 { 0x11, 0x12, 0x17, 0x09, 0x17, 0x04, 0x07 }, /* 9b */
194 { 0x11, 0x12, 0x14, 0x09, 0x13, 0x07, 0x01 }, /* 9c */
195 { 0x18, 0x09, 0x1a, 0x0d, 0x1b, 0x17, 0x01 }, /* 9d */
196 { 0x00, 0x05, 0x0a, 0x14, 0x0a, 0x05, 0x00 }, /* 9e */
197 { 0x00, 0x14, 0x0a, 0x05, 0x0a, 0x14, 0x00 }, /* 9f */
198 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* a0 */
199 { 0x00, 0x00, 0x00, 0x00, 0x1c, 0x14, 0x1c }, /* a1 */
200 { 0x07, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00 }, /* a2 */
201 { 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x1c }, /* a3 */
202 { 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x04 }, /* a4 */
203 { 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00 }, /* a5 */
204 { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x02, 0x04 }, /* a6 */
205 { 0x00, 0x00, 0x1f, 0x01, 0x06, 0x04, 0x08 }, /* a7 */
206 { 0x00, 0x00, 0x02, 0x04, 0x0c, 0x14, 0x04 }, /* a8 */
207 { 0x00, 0x00, 0x04, 0x1f, 0x11, 0x01, 0x06 }, /* a9 */
208 { 0x00, 0x00, 0x00, 0x1f, 0x04, 0x04, 0x1f }, /* aa */
209 { 0x00, 0x00, 0x02, 0x1f, 0x06, 0x0a, 0x12 }, /* ab */
210 { 0x00, 0x00, 0x08, 0x1f, 0x09, 0x0a, 0x08 }, /* ac */
211 { 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x1f }, /* ad */
212 { 0x00, 0x00, 0x1e, 0x02, 0x1e, 0x02, 0x1e }, /* ae */
213 { 0x00, 0x00, 0x00, 0x15, 0x15, 0x01, 0x06 }, /* af */
214 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* b0 */
215 { 0x1f, 0x01, 0x05, 0x06, 0x04, 0x04, 0x08 }, /* b1 */
216 { 0x01, 0x02, 0x04, 0x0c, 0x14, 0x04, 0x04 }, /* b2 */
217 { 0x04, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* b3 */
218 { 0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x1f }, /* b4 */
219 { 0x02, 0x1f, 0x02, 0x06, 0x0a, 0x12, 0x02 }, /* b5 */
220 { 0x08, 0x1f, 0x09, 0x09, 0x09, 0x09, 0x12 }, /* b6 */
221 { 0x04, 0x1f, 0x04, 0x1f, 0x04, 0x04, 0x04 }, /* b7 */
222 { 0x00, 0x0f, 0x09, 0x11, 0x01, 0x02, 0x0c }, /* b8 */
223 { 0x08, 0x0f, 0x12, 0x02, 0x02, 0x02, 0x04 }, /* b9 */
224 { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x01, 0x1f }, /* ba */
225 { 0x0a, 0x1f, 0x0a, 0x02, 0x02, 0x02, 0x04 }, /* bb */
226 { 0x00, 0x18, 0x00, 0x18, 0x01, 0x02, 0x1c }, /* bc */
227 { 0x00, 0x1f, 0x01, 0x02, 0x04, 0x0a, 0x11 }, /* bd */
228 { 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08, 0x07 }, /* be */
229 { 0x00, 0x11, 0x11, 0x09, 0x01, 0x02, 0x0c }, /* bf */
230 { 0x00, 0x0f, 0x09, 0x15, 0x03, 0x02, 0x0c }, /* c0 */
231 { 0x02, 0x1c, 0x04, 0x1f, 0x04, 0x04, 0x08 }, /* c1 */
232 { 0x00, 0x15, 0x15, 0x15, 0x01, 0x02, 0x04 }, /* c2 */
233 { 0x0e, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x08 }, /* c3 */
234 { 0x08, 0x08, 0x08, 0x0c, 0x0a, 0x08, 0x08 }, /* c4 */
235 { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x08, 0x10 }, /* c5 */
236 { 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c6 */
237 { 0x00, 0x1f, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* c7 */
238 { 0x04, 0x1f, 0x02, 0x04, 0x0e, 0x15, 0x04 }, /* c8 */
239 { 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* c9 */
240 { 0x00, 0x04, 0x02, 0x11, 0x11, 0x11, 0x11 }, /* ca */
241 { 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x0f }, /* cb */
242 { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x02, 0x0c }, /* cc */
243 { 0x00, 0x08, 0x14, 0x02, 0x01, 0x01, 0x00 }, /* cd */
244 { 0x04, 0x1f, 0x04, 0x04, 0x15, 0x15, 0x04 }, /* ce */
245 { 0x00, 0x1f, 0x01, 0x01, 0x0a, 0x04, 0x02 }, /* cf */
246 { 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x01 }, /* d0 */
247 { 0x00, 0x04, 0x08, 0x10, 0x11, 0x1f, 0x01 }, /* d1 */
248 { 0x00, 0x01, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* d2 */
249 { 0x00, 0x1f, 0x08, 0x1f, 0x08, 0x08, 0x07 }, /* d3 */
250 { 0x08, 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08 }, /* d4 */
251 { 0x00, 0x0e, 0x02, 0x02, 0x02, 0x02, 0x1f }, /* d5 */
252 { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x01, 0x1f }, /* d6 */
253 { 0x0e, 0x00, 0x1f, 0x01, 0x01, 0x02, 0x04 }, /* d7 */
254 { 0x12, 0x12, 0x12, 0x12, 0x12, 0x04, 0x08 }, /* d8 */
255 { 0x00, 0x04, 0x14, 0x14, 0x15, 0x15, 0x16 }, /* d9 */
256 { 0x00, 0x10, 0x10, 0x11, 0x12, 0x14, 0x18 }, /* da */
257 { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* db */
258 { 0x00, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* dc */
259 { 0x00, 0x18, 0x00, 0x01, 0x01, 0x02, 0x1c }, /* dd */
260 { 0x04, 0x12, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* de */
261 { 0x1c, 0x14, 0x1c, 0x00, 0x00, 0x00, 0x00 }, /* df */
262 { 0x00, 0x00, 0x09, 0x15, 0x12, 0x12, 0x0d }, /* e0 */
263 { 0x00, 0x0e, 0x11, 0x1e, 0x11, 0x1e, 0x10 }, /* e1 */
264 { 0x00, 0x11, 0x0a, 0x0a, 0x04, 0x04, 0x08 }, /* e2 */
265 { 0x00, 0x00, 0x1f, 0x0a, 0x0a, 0x0a, 0x13 }, /* e3 */
266 { 0x1f, 0x10, 0x08, 0x04, 0x08, 0x10, 0x1f }, /* e4 */
267 { 0x00, 0x00, 0x0f, 0x14, 0x12, 0x11, 0x0e }, /* e5 */
268 { 0x00, 0x09, 0x09, 0x09, 0x0f, 0x08, 0x10 }, /* e6 */
269 { 0x00, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x03 }, /* e7 */
270 { 0x1f, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x1f }, /* e8 */
271 { 0x00, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* e9 */
272 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x0a, 0x1b }, /* ea */
273 { 0x0f, 0x10, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* eb */
274 { 0x00, 0x00, 0x00, 0x00, 0x0b, 0x15, 0x1a }, /* ec */
275 { 0x02, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x08 }, /* ed */
276 { 0x00, 0x0e, 0x10, 0x0e, 0x10, 0x0e, 0x00 }, /* ee */
277 { 0x06, 0x09, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* ef */
278 { 0x00, 0x00, 0x08, 0x15, 0x02, 0x00, 0x00 }, /* f0 */
279 { 0x00, 0x08, 0x15, 0x0a, 0x15, 0x02, 0x00 }, /* f1 */
280 { 0x08, 0x0f, 0x12, 0x0f, 0x0a, 0x1f, 0x02 }, /* f2 */
281 { 0x0f, 0x09, 0x0f, 0x09, 0x0f, 0x09, 0x11 }, /* f3 */
282 { 0x04, 0x15, 0x15, 0x04, 0x04, 0x0a, 0x11 }, /* f4 */
283 { 0x04, 0x04, 0x1d, 0x06, 0x0e, 0x15, 0x04 }, /* f5 */
284 { 0x04, 0x04, 0x1f, 0x04, 0x0e, 0x15, 0x04 }, /* f6 */
285 { 0x04, 0x0a, 0x11, 0x0e, 0x04, 0x0e, 0x1f }, /* f7 */
286 { 0x04, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x1f }, /* f8 */
287 { 0x1f, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x1f }, /* f9 */
288 { 0x00, 0x01, 0x1e, 0x04, 0x1f, 0x04, 0x04 }, /* fa */
289 { 0x00, 0x00, 0x1f, 0x08, 0x0f, 0x09, 0x11 }, /* fb */
290 { 0x00, 0x00, 0x1f, 0x15, 0x1f, 0x11, 0x11 }, /* fc */
291 { 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a }, /* fd */
292 { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* fe */
293 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ff */
295 static unsigned char font_player_oldlcd[256][7] = {
296 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
297 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
298 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
299 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
300 { 0x0e, 0x11, 0x17, 0x15, 0x17, 0x10, 0x0e }, /* 04 */
301 { 0x06, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x1f }, /* 05 */
302 { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 06 */
303 { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 07 */
304 { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 08 */
305 { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 09 */
306 { 0x08, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 0a */
307 { 0x08, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* 0b */
308 { 0x08, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 0c */
309 { 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x02, 0x0e }, /* 0d */
310 { 0x10, 0x10, 0x17, 0x14, 0x1e, 0x04, 0x04 }, /* 0e */
311 { 0x01, 0x0e, 0x13, 0x15, 0x19, 0x0e, 0x10 }, /* 0f */
312 { 0x00, 0x02, 0x0e, 0x15, 0x15, 0x0e, 0x08 }, /* 10 */
313 { 0x1c, 0x10, 0x17, 0x1d, 0x07, 0x06, 0x05 }, /* 11 */
314 { 0x04, 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x11 }, /* 12 */
315 { 0x04, 0x0a, 0x04, 0x01, 0x0f, 0x11, 0x0f }, /* 13 */
316 { 0x00, 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x1f }, /* 14 */
317 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 15 */
318 { 0x0e, 0x04, 0x1f, 0x15, 0x1f, 0x04, 0x0e }, /* 16 */
319 { 0x1f, 0x11, 0x11, 0x10, 0x10, 0x10, 0x10 }, /* 17 */
320 { 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x11, 0x11 }, /* 18 */
321 { 0x0e, 0x11, 0x11, 0x11, 0x0a, 0x0a, 0x1b }, /* 19 */
322 { 0x1f, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a }, /* 1a */
323 { 0x15, 0x15, 0x15, 0x15, 0x0e, 0x04, 0x04 }, /* 1b */
324 { 0x1f, 0x08, 0x04, 0x02, 0x04, 0x08, 0x1f }, /* 1c */
325 { 0x0e, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* 1d */
326 { 0x1f, 0x11, 0x00, 0x0e, 0x00, 0x11, 0x1f }, /* 1e */
327 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 1f */
328 { 0x0f, 0x14, 0x14, 0x1f, 0x14, 0x14, 0x17 }, /* 20 */
329 { 0x00, 0x00, 0x1a, 0x05, 0x0f, 0x14, 0x0f }, /* 21 */
330 { 0x0c, 0x12, 0x16, 0x11, 0x11, 0x16, 0x10 }, /* 22 */
331 { 0x02, 0x04, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 23 */
332 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 24 */
333 { 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04 }, /* 25 */
334 { 0x1b, 0x09, 0x12, 0x00, 0x00, 0x00, 0x00 }, /* 26 */
335 { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 27 */
336 { 0x00, 0x11, 0x0e, 0x0a, 0x0e, 0x11, 0x00 }, /* 28 */
337 { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 29 */
338 { 0x08, 0x14, 0x14, 0x09, 0x15, 0x12, 0x0d }, /* 2a */
339 { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 2b */
340 { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 2c */
341 { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 2d */
342 { 0x04, 0x15, 0x0e, 0x04, 0x0e, 0x15, 0x04 }, /* 2e */
343 { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2f */
344 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 30 */
345 { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 31 */
346 { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 32 */
347 { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 33 */
348 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 34 */
349 { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 35 */
350 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 36 */
351 { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 37 */
352 { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 38 */
353 { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 39 */
354 { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 3a */
355 { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 3b */
356 { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 3c */
357 { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 3d */
358 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3e */
359 { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x04, 0x08 }, /* 3f */
360 { 0x03, 0x06, 0x0c, 0x18, 0x0c, 0x06, 0x03 }, /* 40 */
361 { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 41 */
362 { 0x18, 0x0c, 0x06, 0x03, 0x06, 0x0c, 0x18 }, /* 42 */
363 { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 43 */
364 { 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 44 */
365 { 0x04, 0x0a, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 45 */
366 { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 46 */
367 { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 47 */
368 { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 48 */
369 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 49 */
370 { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 4a */
371 { 0x0e, 0x10, 0x10, 0x17, 0x11, 0x11, 0x0e }, /* 4b */
372 { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 4c */
373 { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 4d */
374 { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4e */
375 { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4f */
376 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 50 */
377 { 0x11, 0x1b, 0x15, 0x11, 0x11, 0x11, 0x11 }, /* 51 */
378 { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 52 */
379 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 53 */
380 { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 54 */
381 { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 55 */
382 { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 56 */
383 { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 57 */
384 { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 58 */
385 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 59 */
386 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 5a */
387 { 0x11, 0x11, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 5b */
388 { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 5c */
389 { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 5d */
390 { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5e */
391 { 0x0a, 0x00, 0x04, 0x0a, 0x11, 0x1f, 0x11 }, /* 5f */
392 { 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 60 */
393 { 0x0d, 0x12, 0x00, 0x19, 0x15, 0x13, 0x11 }, /* 61 */
394 { 0x0a, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 62 */
395 { 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x01, 0x0e }, /* 63 */
396 { 0x04, 0x00, 0x04, 0x08, 0x10, 0x11, 0x0e }, /* 64 */
397 { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 65 */
398 { 0x10, 0x10, 0x1e, 0x11, 0x11, 0x11, 0x1e }, /* 66 */
399 { 0x00, 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* 67 */
400 { 0x01, 0x01, 0x0f, 0x11, 0x11, 0x11, 0x0f }, /* 68 */
401 { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0f }, /* 69 */
402 { 0x03, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x04 }, /* 6a */
403 { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* 6b */
404 { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6c */
405 { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 6d */
406 { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6e */
407 { 0x08, 0x08, 0x09, 0x0a, 0x0c, 0x0a, 0x09 }, /* 6f */
408 { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 70 */
409 { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x15, 0x15 }, /* 71 */
410 { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 72 */
411 { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 73 */
412 { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 74 */
413 { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x01 }, /* 75 */
414 { 0x00, 0x00, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* 76 */
415 { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 77 */
416 { 0x04, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03 }, /* 78 */
417 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 79 */
418 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 7a */
419 { 0x00, 0x00, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 7b */
420 { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 7c */
421 { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 7d */
422 { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7e */
423 { 0x0a, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 7f */
424 { 0x00, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 80 */
425 { 0x0d, 0x12, 0x00, 0x16, 0x19, 0x11, 0x11 }, /* 81 */
426 { 0x00, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 82 */
427 { 0x08, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 83 */
428 { 0x00, 0x0f, 0x10, 0x10, 0x0f, 0x02, 0x04 }, /* 84 */
429 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00 }, /* 85 */
430 { 0x00, 0x00, 0x04, 0x0e, 0x1f, 0x00, 0x00 }, /* 86 */
431 { 0x00, 0x00, 0x1f, 0x0e, 0x04, 0x00, 0x00 }, /* 87 */
432 { 0x02, 0x06, 0x0e, 0x1e, 0x0e, 0x06, 0x02 }, /* 88 */
433 { 0x08, 0x0c, 0x0e, 0x0f, 0x0e, 0x0c, 0x08 }, /* 89 */
434 { 0x1c, 0x1f, 0x13, 0x10, 0x10, 0x10, 0x10 }, /* 8a */
435 { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* 8b */
436 { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8c */
437 { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8d */
438 { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8e */
439 { 0x0d, 0x12, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8f */
440 { 0x08, 0x04, 0x1f, 0x10, 0x1e, 0x10, 0x1f }, /* 90 */
441 { 0x04, 0x0a, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 91 */
442 { 0x0a, 0x00, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 92 */
443 { 0x08, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 93 */
444 { 0x02, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 94 */
445 { 0x0c, 0x0a, 0x09, 0x1d, 0x09, 0x0a, 0x0c }, /* 95 */
446 { 0x08, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 96 */
447 { 0x02, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 97 */
448 { 0x04, 0x0a, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 98 */
449 { 0x0d, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 99 */
450 { 0x08, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9a */
451 { 0x02, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9b */
452 { 0x02, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9c */
453 { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9d */
454 { 0x0d, 0x12, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9e */
455 { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 9f */
456 { 0x0a, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* a0 */
457 { 0x02, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a1 */
458 { 0x04, 0x0a, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a2 */
459 { 0x0a, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a3 */
460 { 0x02, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a4 */
461 { 0x04, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a5 */
462 { 0x0d, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a6 */
463 { 0x02, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* a7 */
464 { 0x04, 0x04, 0x0f, 0x10, 0x10, 0x0f, 0x04 }, /* a8 */
465 { 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03 }, /* a9 */
466 { 0x0a, 0x04, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* aa */
467 { 0x0a, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* ab */
468 { 0x0a, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* ac */
469 { 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* ad */
470 { 0x04, 0x0a, 0x04, 0x11, 0x11, 0x13, 0x0d }, /* ae */
471 { 0x02, 0x04, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* af */
472 { 0x02, 0x0f, 0x02, 0x0e, 0x12, 0x12, 0x0e }, /* b0 */
473 { 0x02, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* b1 */
474 { 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x04, 0x06 }, /* b2 */
475 { 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x02, 0x03 }, /* b3 */
476 { 0x04, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b4 */
477 { 0x02, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b5 */
478 { 0x02, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* b6 */
479 { 0x02, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* b7 */
480 { 0x0c, 0x04, 0x06, 0x0c, 0x04, 0x04, 0x0e }, /* b8 */
481 { 0x04, 0x0e, 0x1f, 0x1f, 0x1b, 0x04, 0x0e }, /* b9 */
482 { 0x0a, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* ba */
483 { 0x09, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x06 }, /* bb */
484 { 0x05, 0x05, 0x0c, 0x14, 0x14, 0x14, 0x0c }, /* bc */
485 { 0x0a, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* bd */
486 { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* be */
487 { 0x0f, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01 }, /* bf */
488 { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c0 */
489 { 0x1f, 0x00, 0x0e, 0x10, 0x17, 0x11, 0x0e }, /* c1 */
490 { 0x1f, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* c2 */
491 { 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04, 0x0c }, /* c3 */
492 { 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04 }, /* c4 */
493 { 0x04, 0x00, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* c5 */
494 { 0x00, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* c6 */
495 { 0x05, 0x0a, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* c7 */
496 { 0x09, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* c8 */
497 { 0x09, 0x12, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* c9 */
498 { 0x09, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* ca */
499 { 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x0f }, /* cb */
500 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x01, 0x1e }, /* cc */
501 { 0x00, 0x1b, 0x1f, 0x1f, 0x0e, 0x04, 0x00 }, /* cd */
502 { 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18 }, /* ce */
503 { 0x0e, 0x11, 0x04, 0x0a, 0x1b, 0x1f, 0x00 }, /* cf */
504 { 0x0a, 0x15, 0x04, 0x07, 0x00, 0x11, 0x0a }, /* d0 */
505 { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* d1 */
506 { 0x01, 0x03, 0x1d, 0x11, 0x1d, 0x03, 0x01 }, /* d2 */
507 { 0x0e, 0x11, 0x11, 0x1f, 0x1b, 0x1b, 0x1f }, /* d3 */
508 { 0x00, 0x01, 0x02, 0x0a, 0x04, 0x04, 0x00 }, /* d4 */
509 { 0x04, 0x0e, 0x1f, 0x00, 0x1f, 0x0e, 0x04 }, /* d5 */
510 { 0x02, 0x02, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* d6 */
511 { 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b }, /* d7 */
512 { 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b }, /* d8 */
513 { 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03, 0x06 }, /* d9 */
514 { 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b }, /* da */
515 { 0x00, 0x04, 0x0e, 0x1f, 0x0e, 0x04, 0x00 }, /* db */
516 { 0x00, 0x00, 0x1f, 0x1b, 0x15, 0x11, 0x1f }, /* dc */
517 { 0x0e, 0x0e, 0x04, 0x1f, 0x0e, 0x0e, 0x0a }, /* dd */
518 { 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x0a }, /* de */
519 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* df */
520 { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* e0 */
521 { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* e1 */
522 { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e2 */
523 { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e3 */
524 { 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04 }, /* e4 */
525 { 0x04, 0x09, 0x0a, 0x0a, 0x0a, 0x09, 0x04 }, /* e5 */
526 { 0x00, 0x1f, 0x11, 0x11, 0x1f, 0x04, 0x1f }, /* e6 */
527 { 0x00, 0x07, 0x03, 0x05, 0x08, 0x10, 0x00 }, /* e7 */
528 { 0x00, 0x10, 0x08, 0x05, 0x03, 0x07, 0x00 }, /* e8 */
529 { 0x09, 0x06, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* e9 */
530 { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ea */
531 { 0x00, 0x00, 0x10, 0x08, 0x04, 0x04, 0x04 }, /* eb */
532 { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ec */
533 { 0x1f, 0x18, 0x14, 0x12, 0x15, 0x18, 0x1f }, /* ed */
534 { 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ee */
535 { 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ef */
536 { 0x00, 0x03, 0x07, 0x0c, 0x18, 0x1c, 0x1c }, /* f0 */
537 { 0x1c, 0x10, 0x1c, 0x07, 0x1c, 0x04, 0x07 }, /* f1 */
538 { 0x00, 0x1e, 0x03, 0x09, 0x19, 0x09, 0x1d }, /* f2 */
539 { 0x1e, 0x01, 0x19, 0x05, 0x09, 0x1d, 0x01 }, /* f3 */
540 { 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00 }, /* f4 */
541 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f }, /* f5 */
542 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e }, /* f6 */
543 { 0x04, 0x04, 0x04, 0x08, 0x10, 0x00, 0x00 }, /* f7 */
544 { 0x07, 0x03, 0x05, 0x08, 0x10, 0x10, 0x0f }, /* f8 */
545 { 0x04, 0x0e, 0x1f, 0x11, 0x11, 0x15, 0x1f }, /* f9 */
546 { 0x1f, 0x03, 0x1a, 0x02, 0x1a, 0x02, 0x1e }, /* fa */
547 { 0x00, 0x0e, 0x1f, 0x11, 0x1f, 0x0e, 0x00 }, /* fb */
548 { 0x03, 0x05, 0x09, 0x09, 0x0b, 0x1b, 0x18 }, /* fc */
549 { 0x1f, 0x03, 0x05, 0x09, 0x15, 0x03, 0x1f }, /* fd */
550 { 0x10, 0x10, 0x10, 0x10, 0x10, 0x1c, 0x1c }, /* fe */
551 { 0x1c, 0x1c, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ff */
554 static unsigned char (*font_player)[256][7];
556 static unsigned bitmap[BITMAP_WIDTH][CHAR_HEIGHT];
557 static bool show_subst, show_hardware;
558 static bool newlcd;
560 bool is_new_player(void)
562 return newlcd;
565 static void draw_pattern(int fg, int bg, int x, const unsigned char *pattern)
567 int x2, y2;
569 for (y2 = 0; y2 < 7; y2++)
571 unsigned data = pattern[y2];
573 for (x2 = 0; x2 < 5; x2++)
574 bitmap[x+x2][y2] = (data & (0x10 >> x2)) ? fg : bg;
578 static void draw_hexdigit(int x, int digit)
580 int x2, y2;
582 draw_pattern(CHAR_FG_STD, CHAR_BG_STD, x + 1,
583 font_player_newlcd[digit+(digit<10?'0':'A'-10)]);
585 for (y2 = 0; y2 < CHAR_HEIGHT; y2++)
586 for (x2 = 0; x2 < CHAR_WIDTH; x2++)
587 bitmap[x+x2][y2] ^= 0xffffff;
590 static void flush_bitmap(FILE *fp)
592 int x, y;
594 for (y = 0; y < CHAR_HEIGHT; y++)
596 int i, z;
598 for (i = 0; i < SIZE; i++)
600 for (x = 0; x < BITMAP_WIDTH; x++)
602 unsigned int col = bitmap[x][y];
604 for (z = 0; z < SIZE; z++)
606 fprintf(fp, "%d %d %d ", (col >> 16) & 255,
607 (col >> 8) & 255, (col) & 255);
610 fprintf(fp, "\n");
616 int main(int argc, char **argv)
618 int x, y;
619 int i, lines, block, oldblock;
620 int loop;
621 char *filename;
622 FILE *fp;
624 printf("This tool will generate gif-pictures that reflect the current "
625 "unicode charset of the Player.\n");
627 for (loop = 0; loop < 6; loop++)
629 switch (loop)
631 case 0:
632 font_player = &font_player_oldlcd;
633 newlcd = false;
634 lcd_charset_init();
635 filename = "lcd_old.gif";
636 show_subst = false;
637 show_hardware = false;
638 break;
639 case 1:
640 font_player = &font_player_newlcd;
641 newlcd = true;
642 lcd_charset_init();
643 filename = "lcd_new.gif";
644 show_subst = false;
645 show_hardware = false;
646 break;
647 case 2:
648 font_player = &font_player_oldlcd;
649 newlcd = false;
650 lcd_charset_init();
651 filename = "lcd_old_subst.gif";
652 show_subst = true;
653 show_hardware = false;
654 break;
655 case 3:
656 font_player = &font_player_newlcd;
657 newlcd = true;
658 lcd_charset_init();
659 filename = "lcd_new_subst.gif";
660 show_subst = true;
661 show_hardware = false;
662 break;
663 case 4:
664 font_player = &font_player_oldlcd;
665 xchar_info = NULL;
666 xchar_info_size = 256;
667 filename = "lcd_old_hw.gif";
668 show_subst = true;
669 show_hardware = true;
670 break;
671 case 5:
672 font_player = &font_player_newlcd;
673 xchar_info = NULL;
674 xchar_info_size = 256;
675 filename = "lcd_new_hw.gif";
676 show_subst = true;
677 show_hardware = true;
678 break;
679 default:
680 printf("Not in loop!\n");
681 exit(0);
683 fp = fopen("tmp.pnm", "wb");
684 if (!fp)
686 printf("Error opening %s!\n", filename);
687 exit(0);
689 if (show_hardware)
691 /* hardware mapping is always 16 lines */
692 lines = 16;
694 else
696 /* count lines */
697 for (lines = 0, oldblock = -1, i = 0; i < xchar_info_size; i++)
699 block = xchar_info[i].ucs >> 4;
700 if (block != oldblock)
702 lines++;
703 oldblock = block;
707 fprintf(fp, "P3\n#PNM showing a picture of the Player unicode charset\n");
708 fprintf(fp, "%d %d\n255\n", BITMAP_WIDTH*SIZE, CHAR_HEIGHT*SIZE*(lines+1));
710 memset(bitmap, 255, sizeof(bitmap));
711 for (x = 0; x < 16; x++)
713 draw_hexdigit(3*CHAR_WIDTH + x * CHAR_WIDTH, x);
716 for (oldblock = -1, i = 0; i < xchar_info_size; i++)
718 block = show_hardware ? (i >> 4) : (xchar_info[i].ucs >> 4);
719 if (block != oldblock)
721 flush_bitmap(fp);
722 memset(bitmap, 255, sizeof(bitmap));
723 draw_hexdigit(0, (block >> 8) & 0xf);
724 draw_hexdigit(CHAR_WIDTH, (block >> 4) & 0xf);
725 draw_hexdigit(2*CHAR_WIDTH, block & 0xf);
726 oldblock = block;
728 if (show_hardware)
730 draw_pattern(CHAR_FG_STD, CHAR_BG_STD,
731 3*CHAR_WIDTH+1 + (i & 0xf) * CHAR_WIDTH,
732 (*font_player)[i]);
734 else
736 if (xchar_info[i].priority == 0)
738 draw_pattern(CHAR_FG_STD, CHAR_BG_STD,
739 3*CHAR_WIDTH+1
740 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
741 (*font_player)[xchar_info[i].hw_char]);
743 else
745 if (show_subst)
747 draw_pattern(CHAR_FG_ALT, CHAR_BG_STD,
748 3*CHAR_WIDTH+1
749 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
750 (*font_player)[xchar_info[i].hw_char]);
752 else
754 if ((xchar_info[i].glyph & 0x8000) == 0)
755 draw_pattern(CHAR_FG_ALT, CHAR_BG_STD,
756 3*CHAR_WIDTH+1
757 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
758 xfont_fixed[xchar_info[i].glyph]);
759 else
760 draw_pattern(CHAR_FG_STD, CHAR_BG_ALT,
761 3*CHAR_WIDTH+1
762 + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
763 font_player_newlcd[' ']);
768 flush_bitmap(fp);
769 fclose(fp);
771 char buffer[200];
773 sprintf(buffer, "convert tmp.pnm %s", filename);
774 system(buffer);
775 system("rm tmp.pnm");