summaryrefslogtreecommitdiff
path: root/tools/player_unifont.c
blob: 2b5121d50133cfbd445262cea5222d9ee03daf4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
/***************************************************************************
 *             __________               __   ___.
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
 *                     \/            \/     \/    \/            \/
 * $Id$
 *
 * Copyright (C) 2007 by Jens Arnold
 * Based on the work of 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.
 *
 ****************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "lcd-charcell.h"

#define CHAR_WIDTH 8
#define CHAR_HEIGHT 8
#define BITMAP_WIDTH (CHAR_WIDTH*(16+3))
#define SIZE 2

#define CHAR_BG_STD 0xc0c0c0
#define CHAR_BG_ALT 0x808080
#define CHAR_FG_STD 0x000000
#define CHAR_FG_ALT 0xf00000

static unsigned char font_player_newlcd[256][7] = {
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 04 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 05 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 06 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 07 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 08 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 09 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0a */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0b */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0c */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0d */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0e */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 0f */
    { 0x00, 0x10, 0x1c, 0x1f, 0x1c, 0x10, 0x00 }, /* 10 */
    { 0x00, 0x01, 0x07, 0x1f, 0x07, 0x01, 0x00 }, /* 11 */
    { 0x00, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00 }, /* 12 */
    { 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x0a }, /* 13 */
    { 0x0f, 0x1d, 0x1d, 0x0d, 0x05, 0x05, 0x05 }, /* 14 */
    { 0x07, 0x08, 0x0e, 0x11, 0x0e, 0x02, 0x1c }, /* 15 */
    { 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00 }, /* 16 */
    { 0x01, 0x01, 0x05, 0x09, 0x1f, 0x08, 0x04 }, /* 17 */
    { 0x04, 0x0e, 0x15, 0x04, 0x04, 0x04, 0x04 }, /* 18 */
    { 0x04, 0x04, 0x04, 0x04, 0x15, 0x0e, 0x04 }, /* 19 */
    { 0x11, 0x19, 0x1d, 0x1f, 0x1d, 0x19, 0x11 }, /* 1a */
    { 0x11, 0x13, 0x17, 0x1f, 0x17, 0x13, 0x11 }, /* 1b */
    { 0x10, 0x14, 0x12, 0x1f, 0x12, 0x14, 0x10 }, /* 1c */
    { 0x01, 0x05, 0x09, 0x1f, 0x09, 0x05, 0x01 }, /* 1d */
    { 0x00, 0x1f, 0x0e, 0x0e, 0x04, 0x04, 0x00 }, /* 1e */
    { 0x00, 0x04, 0x04, 0x0e, 0x0e, 0x1f, 0x00 }, /* 1f */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 20 */
    { 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x04 }, /* 21 */
    { 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00 }, /* 22 */
    { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 23 */
    { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 24 */
    { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 25 */
    { 0x0c, 0x12, 0x14, 0x08, 0x15, 0x12, 0x0d }, /* 26 */
    { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 27 */
    { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 28 */
    { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 29 */
    { 0x00, 0x04, 0x15, 0x0e, 0x15, 0x04, 0x00 }, /* 2a */
    { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2b */
    { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 2c */
    { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 2d */
    { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 2e */
    { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 2f */
    { 0x0e, 0x11, 0x13, 0x15, 0x19, 0x11, 0x0e }, /* 30 */
    { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 31 */
    { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 32 */
    { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 33 */
    { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 34 */
    { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 35 */
    { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 36 */
    { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 37 */
    { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 38 */
    { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 39 */
    { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3a */
    { 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x04, 0x08 }, /* 3b */
    { 0x02, 0x04, 0x08, 0x10, 0x08, 0x04, 0x02 }, /* 3c */
    { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 3d */
    { 0x08, 0x04, 0x02, 0x01, 0x02, 0x04, 0x08 }, /* 3e */
    { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 3f */
    { 0x0e, 0x11, 0x01, 0x0d, 0x15, 0x15, 0x0e }, /* 40 */
    { 0x0e, 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 41 */
    { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 42 */
    { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 43 */
    { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 44 */
    { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 45 */
    { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 46 */
    { 0x0e, 0x11, 0x10, 0x17, 0x11, 0x11, 0x0f }, /* 47 */
    { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 48 */
    { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 49 */
    { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4a */
    { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4b */
    { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 4c */
    { 0x11, 0x1b, 0x15, 0x15, 0x11, 0x11, 0x11 }, /* 4d */
    { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 4e */
    { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 4f */
    { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 50 */
    { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 51 */
    { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 52 */
    { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 53 */
    { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 54 */
    { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 55 */
    { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 56 */
    { 0x11, 0x11, 0x11, 0x15, 0x15, 0x15, 0x0a }, /* 57 */
    { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 58 */
    { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 59 */
    { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5a */
    { 0x0e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0e }, /* 5b */
    { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 5c */
    { 0x0e, 0x02, 0x02, 0x02, 0x02, 0x02, 0x0e }, /* 5d */
    { 0x04, 0x0a, 0x11, 0x00, 0x00, 0x00, 0x00 }, /* 5e */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 5f */
    { 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00 }, /* 60 */
    { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 61 */
    { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x1e }, /* 62 */
    { 0x00, 0x00, 0x0e, 0x10, 0x10, 0x11, 0x0e }, /* 63 */
    { 0x01, 0x01, 0x0d, 0x13, 0x11, 0x11, 0x0f }, /* 64 */
    { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 65 */
    { 0x06, 0x09, 0x08, 0x1c, 0x08, 0x08, 0x08 }, /* 66 */
    { 0x00, 0x0f, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* 67 */
    { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 68 */
    { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 69 */
    { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6a */
    { 0x10, 0x10, 0x12, 0x14, 0x18, 0x14, 0x12 }, /* 6b */
    { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 6c */
    { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x11, 0x11 }, /* 6d */
    { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6e */
    { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 6f */
    { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 70 */
    { 0x00, 0x00, 0x0d, 0x13, 0x0f, 0x01, 0x01 }, /* 71 */
    { 0x00, 0x00, 0x16, 0x19, 0x10, 0x10, 0x10 }, /* 72 */
    { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 73 */
    { 0x08, 0x08, 0x1c, 0x08, 0x08, 0x09, 0x06 }, /* 74 */
    { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 75 */
    { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 76 */
    { 0x00, 0x00, 0x11, 0x11, 0x15, 0x15, 0x0a }, /* 77 */
    { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 78 */
    { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 79 */
    { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7a */
    { 0x02, 0x04, 0x04, 0x08, 0x04, 0x04, 0x02 }, /* 7b */
    { 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 7c */
    { 0x08, 0x04, 0x04, 0x02, 0x04, 0x04, 0x08 }, /* 7d */
    { 0x00, 0x04, 0x02, 0x1f, 0x02, 0x04, 0x00 }, /* 7e */
    { 0x00, 0x04, 0x08, 0x1f, 0x08, 0x04, 0x00 }, /* 7f */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 80 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* 81 */
    { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* 82 */
    { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* 83 */
    { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 84 */
    { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 85 */
    { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* 86 */
    { 0x00, 0x0a, 0x04, 0x1f, 0x04, 0x0a, 0x00 }, /* 87 */
    { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 }, /* 88 */
    { 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19 }, /* 89 */
    { 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d }, /* 8a */
    { 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08 }, /* 8b */
    { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c }, /* 8c */
    { 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* 8d */
    { 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f }, /* 8e */
    { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00 }, /* 8f */
    { 0x00, 0x0e, 0x1f, 0x1f, 0x1f, 0x0e, 0x00 }, /* 90 */
    { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* 91 */
    { 0x1f, 0x1b, 0x13, 0x1b, 0x1b, 0x11, 0x1f }, /* 92 */
    { 0x1f, 0x11, 0x1d, 0x1b, 0x17, 0x11, 0x1f }, /* 93 */
    { 0x00, 0x00, 0x07, 0x04, 0x04, 0x14, 0x08 }, /* 94 */
    { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00, 0x1f }, /* 95 */
    { 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x00 }, /* 96 */
    { 0x00, 0x04, 0x00, 0x1f, 0x00, 0x04, 0x00 }, /* 97 */
    { 0x1f, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 98 */
    { 0x1c, 0x04, 0x1c, 0x10, 0x1c, 0x00, 0x00 }, /* 99 */
    { 0x1c, 0x04, 0x1c, 0x04, 0x1c, 0x00, 0x00 }, /* 9a */
    { 0x11, 0x12, 0x17, 0x09, 0x17, 0x04, 0x07 }, /* 9b */
    { 0x11, 0x12, 0x14, 0x09, 0x13, 0x07, 0x01 }, /* 9c */
    { 0x18, 0x09, 0x1a, 0x0d, 0x1b, 0x17, 0x01 }, /* 9d */
    { 0x00, 0x05, 0x0a, 0x14, 0x0a, 0x05, 0x00 }, /* 9e */
    { 0x00, 0x14, 0x0a, 0x05, 0x0a, 0x14, 0x00 }, /* 9f */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* a0 */
    { 0x00, 0x00, 0x00, 0x00, 0x1c, 0x14, 0x1c }, /* a1 */
    { 0x07, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00 }, /* a2 */
    { 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x1c }, /* a3 */
    { 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x04 }, /* a4 */
    { 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00 }, /* a5 */
    { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x02, 0x04 }, /* a6 */
    { 0x00, 0x00, 0x1f, 0x01, 0x06, 0x04, 0x08 }, /* a7 */
    { 0x00, 0x00, 0x02, 0x04, 0x0c, 0x14, 0x04 }, /* a8 */
    { 0x00, 0x00, 0x04, 0x1f, 0x11, 0x01, 0x06 }, /* a9 */
    { 0x00, 0x00, 0x00, 0x1f, 0x04, 0x04, 0x1f }, /* aa */
    { 0x00, 0x00, 0x02, 0x1f, 0x06, 0x0a, 0x12 }, /* ab */
    { 0x00, 0x00, 0x08, 0x1f, 0x09, 0x0a, 0x08 }, /* ac */
    { 0x00, 0x00, 0x00, 0x0e, 0x02, 0x02, 0x1f }, /* ad */
    { 0x00, 0x00, 0x1e, 0x02, 0x1e, 0x02, 0x1e }, /* ae */
    { 0x00, 0x00, 0x00, 0x15, 0x15, 0x01, 0x06 }, /* af */
    { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* b0 */
    { 0x1f, 0x01, 0x05, 0x06, 0x04, 0x04, 0x08 }, /* b1 */
    { 0x01, 0x02, 0x04, 0x0c, 0x14, 0x04, 0x04 }, /* b2 */
    { 0x04, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* b3 */
    { 0x00, 0x1f, 0x04, 0x04, 0x04, 0x04, 0x1f }, /* b4 */
    { 0x02, 0x1f, 0x02, 0x06, 0x0a, 0x12, 0x02 }, /* b5 */
    { 0x08, 0x1f, 0x09, 0x09, 0x09, 0x09, 0x12 }, /* b6 */
    { 0x04, 0x1f, 0x04, 0x1f, 0x04, 0x04, 0x04 }, /* b7 */
    { 0x00, 0x0f, 0x09, 0x11, 0x01, 0x02, 0x0c }, /* b8 */
    { 0x08, 0x0f, 0x12, 0x02, 0x02, 0x02, 0x04 }, /* b9 */
    { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x01, 0x1f }, /* ba */
    { 0x0a, 0x1f, 0x0a, 0x02, 0x02, 0x02, 0x04 }, /* bb */
    { 0x00, 0x18, 0x00, 0x18, 0x01, 0x02, 0x1c }, /* bc */
    { 0x00, 0x1f, 0x01, 0x02, 0x04, 0x0a, 0x11 }, /* bd */
    { 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08, 0x07 }, /* be */
    { 0x00, 0x11, 0x11, 0x09, 0x01, 0x02, 0x0c }, /* bf */
    { 0x00, 0x0f, 0x09, 0x15, 0x03, 0x02, 0x0c }, /* c0 */
    { 0x02, 0x1c, 0x04, 0x1f, 0x04, 0x04, 0x08 }, /* c1 */
    { 0x00, 0x15, 0x15, 0x15, 0x01, 0x02, 0x04 }, /* c2 */
    { 0x0e, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x08 }, /* c3 */
    { 0x08, 0x08, 0x08, 0x0c, 0x0a, 0x08, 0x08 }, /* c4 */
    { 0x04, 0x04, 0x1f, 0x04, 0x04, 0x08, 0x10 }, /* c5 */
    { 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c6 */
    { 0x00, 0x1f, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* c7 */
    { 0x04, 0x1f, 0x02, 0x04, 0x0e, 0x15, 0x04 }, /* c8 */
    { 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* c9 */
    { 0x00, 0x04, 0x02, 0x11, 0x11, 0x11, 0x11 }, /* ca */
    { 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x0f }, /* cb */
    { 0x00, 0x1f, 0x01, 0x01, 0x01, 0x02, 0x0c }, /* cc */
    { 0x00, 0x08, 0x14, 0x02, 0x01, 0x01, 0x00 }, /* cd */
    { 0x04, 0x1f, 0x04, 0x04, 0x15, 0x15, 0x04 }, /* ce */
    { 0x00, 0x1f, 0x01, 0x01, 0x0a, 0x04, 0x02 }, /* cf */
    { 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x01 }, /* d0 */
    { 0x00, 0x04, 0x08, 0x10, 0x11, 0x1f, 0x01 }, /* d1 */
    { 0x00, 0x01, 0x01, 0x0a, 0x04, 0x0a, 0x10 }, /* d2 */
    { 0x00, 0x1f, 0x08, 0x1f, 0x08, 0x08, 0x07 }, /* d3 */
    { 0x08, 0x08, 0x1f, 0x09, 0x0a, 0x08, 0x08 }, /* d4 */
    { 0x00, 0x0e, 0x02, 0x02, 0x02, 0x02, 0x1f }, /* d5 */
    { 0x00, 0x1f, 0x01, 0x1f, 0x01, 0x01, 0x1f }, /* d6 */
    { 0x0e, 0x00, 0x1f, 0x01, 0x01, 0x02, 0x04 }, /* d7 */
    { 0x12, 0x12, 0x12, 0x12, 0x12, 0x04, 0x08 }, /* d8 */
    { 0x00, 0x04, 0x14, 0x14, 0x15, 0x15, 0x16 }, /* d9 */
    { 0x00, 0x10, 0x10, 0x11, 0x12, 0x14, 0x18 }, /* da */
    { 0x1f, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1f }, /* db */
    { 0x00, 0x1f, 0x11, 0x11, 0x01, 0x02, 0x04 }, /* dc */
    { 0x00, 0x18, 0x00, 0x01, 0x01, 0x02, 0x1c }, /* dd */
    { 0x04, 0x12, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* de */
    { 0x1c, 0x14, 0x1c, 0x00, 0x00, 0x00, 0x00 }, /* df */
    { 0x00, 0x00, 0x09, 0x15, 0x12, 0x12, 0x0d }, /* e0 */
    { 0x00, 0x0e, 0x11, 0x1e, 0x11, 0x1e, 0x10 }, /* e1 */
    { 0x00, 0x11, 0x0a, 0x0a, 0x04, 0x04, 0x08 }, /* e2 */
    { 0x00, 0x00, 0x1f, 0x0a, 0x0a, 0x0a, 0x13 }, /* e3 */
    { 0x1f, 0x10, 0x08, 0x04, 0x08, 0x10, 0x1f }, /* e4 */
    { 0x00, 0x00, 0x0f, 0x14, 0x12, 0x11, 0x0e }, /* e5 */
    { 0x00, 0x09, 0x09, 0x09, 0x0f, 0x08, 0x10 }, /* e6 */
    { 0x00, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x03 }, /* e7 */
    { 0x1f, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x1f }, /* e8 */
    { 0x00, 0x0e, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* e9 */
    { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x0a, 0x1b }, /* ea */
    { 0x0f, 0x10, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* eb */
    { 0x00, 0x00, 0x00, 0x00, 0x0b, 0x15, 0x1a }, /* ec */
    { 0x02, 0x04, 0x0e, 0x15, 0x0e, 0x04, 0x08 }, /* ed */
    { 0x00, 0x0e, 0x10, 0x0e, 0x10, 0x0e, 0x00 }, /* ee */
    { 0x06, 0x09, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* ef */
    { 0x00, 0x00, 0x08, 0x15, 0x02, 0x00, 0x00 }, /* f0 */
    { 0x00, 0x08, 0x15, 0x0a, 0x15, 0x02, 0x00 }, /* f1 */
    { 0x08, 0x0f, 0x12, 0x0f, 0x0a, 0x1f, 0x02 }, /* f2 */
    { 0x0f, 0x09, 0x0f, 0x09, 0x0f, 0x09, 0x11 }, /* f3 */
    { 0x04, 0x15, 0x15, 0x04, 0x04, 0x0a, 0x11 }, /* f4 */
    { 0x04, 0x04, 0x1d, 0x06, 0x0e, 0x15, 0x04 }, /* f5 */
    { 0x04, 0x04, 0x1f, 0x04, 0x0e, 0x15, 0x04 }, /* f6 */
    { 0x04, 0x0a, 0x11, 0x0e, 0x04, 0x0e, 0x1f }, /* f7 */
    { 0x04, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x1f }, /* f8 */
    { 0x1f, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x1f }, /* f9 */
    { 0x00, 0x01, 0x1e, 0x04, 0x1f, 0x04, 0x04 }, /* fa */
    { 0x00, 0x00, 0x1f, 0x08, 0x0f, 0x09, 0x11 }, /* fb */
    { 0x00, 0x00, 0x1f, 0x15, 0x1f, 0x11, 0x11 }, /* fc */
    { 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a }, /* fd */
    { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* fe */
    { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ff */
};
static unsigned char font_player_oldlcd[256][7] = {
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 00 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 01 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 02 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 03 */
    { 0x0e, 0x11, 0x17, 0x15, 0x17, 0x10, 0x0e }, /* 04 */
    { 0x06, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x1f }, /* 05 */
    { 0x04, 0x0f, 0x14, 0x0e, 0x05, 0x1e, 0x04 }, /* 06 */
    { 0x11, 0x0a, 0x1f, 0x04, 0x1f, 0x04, 0x04 }, /* 07 */
    { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 08 */
    { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 09 */
    { 0x08, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 0a */
    { 0x08, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* 0b */
    { 0x08, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 0c */
    { 0x0f, 0x10, 0x10, 0x10, 0x0f, 0x02, 0x0e }, /* 0d */
    { 0x10, 0x10, 0x17, 0x14, 0x1e, 0x04, 0x04 }, /* 0e */
    { 0x01, 0x0e, 0x13, 0x15, 0x19, 0x0e, 0x10 }, /* 0f */
    { 0x00, 0x02, 0x0e, 0x15, 0x15, 0x0e, 0x08 }, /* 10 */
    { 0x1c, 0x10, 0x17, 0x1d, 0x07, 0x06, 0x05 }, /* 11 */
    { 0x04, 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x11 }, /* 12 */
    { 0x04, 0x0a, 0x04, 0x01, 0x0f, 0x11, 0x0f }, /* 13 */
    { 0x00, 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x1f }, /* 14 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* 15 */
    { 0x0e, 0x04, 0x1f, 0x15, 0x1f, 0x04, 0x0e }, /* 16 */
    { 0x1f, 0x11, 0x11, 0x10, 0x10, 0x10, 0x10 }, /* 17 */
    { 0x04, 0x04, 0x0a, 0x0a, 0x11, 0x11, 0x11 }, /* 18 */
    { 0x0e, 0x11, 0x11, 0x11, 0x0a, 0x0a, 0x1b }, /* 19 */
    { 0x1f, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a }, /* 1a */
    { 0x15, 0x15, 0x15, 0x15, 0x0e, 0x04, 0x04 }, /* 1b */
    { 0x1f, 0x08, 0x04, 0x02, 0x04, 0x08, 0x1f }, /* 1c */
    { 0x0e, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x0e }, /* 1d */
    { 0x1f, 0x11, 0x00, 0x0e, 0x00, 0x11, 0x1f }, /* 1e */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 1f */
    { 0x0f, 0x14, 0x14, 0x1f, 0x14, 0x14, 0x17 }, /* 20 */
    { 0x00, 0x00, 0x1a, 0x05, 0x0f, 0x14, 0x0f }, /* 21 */
    { 0x0c, 0x12, 0x16, 0x11, 0x11, 0x16, 0x10 }, /* 22 */
    { 0x02, 0x04, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 23 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* 24 */
    { 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x04 }, /* 25 */
    { 0x1b, 0x09, 0x12, 0x00, 0x00, 0x00, 0x00 }, /* 26 */
    { 0x0a, 0x0a, 0x1f, 0x0a, 0x1f, 0x0a, 0x0a }, /* 27 */
    { 0x00, 0x11, 0x0e, 0x0a, 0x0e, 0x11, 0x00 }, /* 28 */
    { 0x18, 0x19, 0x02, 0x04, 0x08, 0x13, 0x03 }, /* 29 */
    { 0x08, 0x14, 0x14, 0x09, 0x15, 0x12, 0x0d }, /* 2a */
    { 0x0c, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00 }, /* 2b */
    { 0x02, 0x04, 0x08, 0x08, 0x08, 0x04, 0x02 }, /* 2c */
    { 0x08, 0x04, 0x02, 0x02, 0x02, 0x04, 0x08 }, /* 2d */
    { 0x04, 0x15, 0x0e, 0x04, 0x0e, 0x15, 0x04 }, /* 2e */
    { 0x00, 0x04, 0x04, 0x1f, 0x04, 0x04, 0x00 }, /* 2f */
    { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x04, 0x08 }, /* 30 */
    { 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00 }, /* 31 */
    { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00 }, /* 32 */
    { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x00 }, /* 33 */
    { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 34 */
    { 0x04, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 35 */
    { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x08, 0x1f }, /* 36 */
    { 0x1f, 0x02, 0x04, 0x02, 0x01, 0x11, 0x0e }, /* 37 */
    { 0x02, 0x06, 0x0a, 0x12, 0x1f, 0x02, 0x02 }, /* 38 */
    { 0x1f, 0x10, 0x1e, 0x01, 0x01, 0x11, 0x0e }, /* 39 */
    { 0x06, 0x08, 0x10, 0x1e, 0x11, 0x11, 0x0e }, /* 3a */
    { 0x1f, 0x01, 0x02, 0x02, 0x04, 0x04, 0x04 }, /* 3b */
    { 0x0e, 0x11, 0x11, 0x0e, 0x11, 0x11, 0x0e }, /* 3c */
    { 0x0e, 0x11, 0x11, 0x0f, 0x01, 0x02, 0x0c }, /* 3d */
    { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x0c, 0x00 }, /* 3e */
    { 0x00, 0x0c, 0x0c, 0x00, 0x0c, 0x04, 0x08 }, /* 3f */
    { 0x03, 0x06, 0x0c, 0x18, 0x0c, 0x06, 0x03 }, /* 40 */
    { 0x00, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x00 }, /* 41 */
    { 0x18, 0x0c, 0x06, 0x03, 0x06, 0x0c, 0x18 }, /* 42 */
    { 0x0e, 0x11, 0x01, 0x02, 0x04, 0x00, 0x04 }, /* 43 */
    { 0x04, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 44 */
    { 0x04, 0x0a, 0x11, 0x11, 0x1f, 0x11, 0x11 }, /* 45 */
    { 0x1e, 0x11, 0x11, 0x1e, 0x11, 0x11, 0x1e }, /* 46 */
    { 0x0e, 0x11, 0x10, 0x10, 0x10, 0x11, 0x0e }, /* 47 */
    { 0x1c, 0x12, 0x11, 0x11, 0x11, 0x12, 0x1c }, /* 48 */
    { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x1f }, /* 49 */
    { 0x1f, 0x10, 0x10, 0x1e, 0x10, 0x10, 0x10 }, /* 4a */
    { 0x0e, 0x10, 0x10, 0x17, 0x11, 0x11, 0x0e }, /* 4b */
    { 0x11, 0x11, 0x11, 0x1f, 0x11, 0x11, 0x11 }, /* 4c */
    { 0x0e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 4d */
    { 0x0f, 0x02, 0x02, 0x02, 0x02, 0x12, 0x0c }, /* 4e */
    { 0x11, 0x12, 0x14, 0x18, 0x14, 0x12, 0x11 }, /* 4f */
    { 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f }, /* 50 */
    { 0x11, 0x1b, 0x15, 0x11, 0x11, 0x11, 0x11 }, /* 51 */
    { 0x11, 0x11, 0x19, 0x15, 0x13, 0x11, 0x11 }, /* 52 */
    { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 53 */
    { 0x1e, 0x11, 0x11, 0x1e, 0x10, 0x10, 0x10 }, /* 54 */
    { 0x0e, 0x11, 0x11, 0x11, 0x11, 0x12, 0x0d }, /* 55 */
    { 0x1e, 0x11, 0x11, 0x1e, 0x14, 0x12, 0x11 }, /* 56 */
    { 0x0e, 0x11, 0x10, 0x0e, 0x01, 0x11, 0x0e }, /* 57 */
    { 0x1f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04 }, /* 58 */
    { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 59 */
    { 0x11, 0x11, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 5a */
    { 0x11, 0x11, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 5b */
    { 0x11, 0x11, 0x0a, 0x04, 0x0a, 0x11, 0x11 }, /* 5c */
    { 0x11, 0x11, 0x0a, 0x04, 0x04, 0x04, 0x04 }, /* 5d */
    { 0x1f, 0x01, 0x02, 0x04, 0x08, 0x10, 0x1f }, /* 5e */
    { 0x0a, 0x00, 0x04, 0x0a, 0x11, 0x1f, 0x11 }, /* 5f */
    { 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 60 */
    { 0x0d, 0x12, 0x00, 0x19, 0x15, 0x13, 0x11 }, /* 61 */
    { 0x0a, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 62 */
    { 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x01, 0x0e }, /* 63 */
    { 0x04, 0x00, 0x04, 0x08, 0x10, 0x11, 0x0e }, /* 64 */
    { 0x00, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 65 */
    { 0x10, 0x10, 0x1e, 0x11, 0x11, 0x11, 0x1e }, /* 66 */
    { 0x00, 0x00, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* 67 */
    { 0x01, 0x01, 0x0f, 0x11, 0x11, 0x11, 0x0f }, /* 68 */
    { 0x00, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0f }, /* 69 */
    { 0x03, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x04 }, /* 6a */
    { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* 6b */
    { 0x10, 0x10, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 6c */
    { 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* 6d */
    { 0x02, 0x00, 0x06, 0x02, 0x02, 0x12, 0x0c }, /* 6e */
    { 0x08, 0x08, 0x09, 0x0a, 0x0c, 0x0a, 0x09 }, /* 6f */
    { 0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x0e }, /* 70 */
    { 0x00, 0x00, 0x1a, 0x15, 0x15, 0x15, 0x15 }, /* 71 */
    { 0x00, 0x00, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* 72 */
    { 0x00, 0x00, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 73 */
    { 0x00, 0x00, 0x1e, 0x11, 0x1e, 0x10, 0x10 }, /* 74 */
    { 0x00, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x01 }, /* 75 */
    { 0x00, 0x00, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* 76 */
    { 0x00, 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* 77 */
    { 0x04, 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03 }, /* 78 */
    { 0x00, 0x00, 0x11, 0x11, 0x11, 0x13, 0x0d }, /* 79 */
    { 0x00, 0x00, 0x11, 0x11, 0x11, 0x0a, 0x04 }, /* 7a */
    { 0x00, 0x00, 0x11, 0x11, 0x11, 0x15, 0x0a }, /* 7b */
    { 0x00, 0x00, 0x11, 0x0a, 0x04, 0x0a, 0x11 }, /* 7c */
    { 0x00, 0x00, 0x11, 0x11, 0x0f, 0x01, 0x1e }, /* 7d */
    { 0x00, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* 7e */
    { 0x0a, 0x00, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 7f */
    { 0x00, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* 80 */
    { 0x0d, 0x12, 0x00, 0x16, 0x19, 0x11, 0x11 }, /* 81 */
    { 0x00, 0x0a, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* 82 */
    { 0x08, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 83 */
    { 0x00, 0x0f, 0x10, 0x10, 0x0f, 0x02, 0x04 }, /* 84 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00 }, /* 85 */
    { 0x00, 0x00, 0x04, 0x0e, 0x1f, 0x00, 0x00 }, /* 86 */
    { 0x00, 0x00, 0x1f, 0x0e, 0x04, 0x00, 0x00 }, /* 87 */
    { 0x02, 0x06, 0x0e, 0x1e, 0x0e, 0x06, 0x02 }, /* 88 */
    { 0x08, 0x0c, 0x0e, 0x0f, 0x0e, 0x0c, 0x08 }, /* 89 */
    { 0x1c, 0x1f, 0x13, 0x10, 0x10, 0x10, 0x10 }, /* 8a */
    { 0x15, 0x0a, 0x15, 0x0a, 0x15, 0x0a, 0x15 }, /* 8b */
    { 0x08, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8c */
    { 0x02, 0x04, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8d */
    { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8e */
    { 0x0d, 0x12, 0x0e, 0x11, 0x1f, 0x11, 0x11 }, /* 8f */
    { 0x08, 0x04, 0x1f, 0x10, 0x1e, 0x10, 0x1f }, /* 90 */
    { 0x04, 0x0a, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 91 */
    { 0x0a, 0x00, 0x1f, 0x10, 0x1c, 0x10, 0x1f }, /* 92 */
    { 0x08, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 93 */
    { 0x02, 0x04, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* 94 */
    { 0x0c, 0x0a, 0x09, 0x1d, 0x09, 0x0a, 0x0c }, /* 95 */
    { 0x08, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 96 */
    { 0x02, 0x04, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 97 */
    { 0x04, 0x0a, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 98 */
    { 0x0d, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* 99 */
    { 0x08, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9a */
    { 0x02, 0x04, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* 9b */
    { 0x02, 0x04, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9c */
    { 0x04, 0x0a, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9d */
    { 0x0d, 0x12, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* 9e */
    { 0x04, 0x0a, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* 9f */
    { 0x0a, 0x00, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* a0 */
    { 0x02, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a1 */
    { 0x04, 0x0a, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a2 */
    { 0x0a, 0x00, 0x00, 0x0c, 0x04, 0x04, 0x0e }, /* a3 */
    { 0x02, 0x04, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a4 */
    { 0x04, 0x0a, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a5 */
    { 0x0d, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* a6 */
    { 0x02, 0x04, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* a7 */
    { 0x04, 0x04, 0x0f, 0x10, 0x10, 0x0f, 0x04 }, /* a8 */
    { 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03 }, /* a9 */
    { 0x0a, 0x04, 0x0b, 0x0c, 0x08, 0x08, 0x08 }, /* aa */
    { 0x0a, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* ab */
    { 0x0a, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* ac */
    { 0x0a, 0x04, 0x0e, 0x11, 0x1f, 0x10, 0x0e }, /* ad */
    { 0x04, 0x0a, 0x04, 0x11, 0x11, 0x13, 0x0d }, /* ae */
    { 0x02, 0x04, 0x11, 0x11, 0x0f, 0x01, 0x0e }, /* af */
    { 0x02, 0x0f, 0x02, 0x0e, 0x12, 0x12, 0x0e }, /* b0 */
    { 0x02, 0x04, 0x0f, 0x10, 0x10, 0x10, 0x0f }, /* b1 */
    { 0x0e, 0x11, 0x1f, 0x10, 0x0e, 0x04, 0x06 }, /* b2 */
    { 0x0e, 0x01, 0x0f, 0x11, 0x0f, 0x02, 0x03 }, /* b3 */
    { 0x04, 0x00, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b4 */
    { 0x02, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* b5 */
    { 0x02, 0x04, 0x0e, 0x10, 0x0e, 0x01, 0x1e }, /* b6 */
    { 0x02, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* b7 */
    { 0x0c, 0x04, 0x06, 0x0c, 0x04, 0x04, 0x0e }, /* b8 */
    { 0x04, 0x0e, 0x1f, 0x1f, 0x1b, 0x04, 0x0e }, /* b9 */
    { 0x0a, 0x04, 0x16, 0x19, 0x11, 0x11, 0x11 }, /* ba */
    { 0x09, 0x09, 0x08, 0x1e, 0x08, 0x08, 0x06 }, /* bb */
    { 0x05, 0x05, 0x0c, 0x14, 0x14, 0x14, 0x0c }, /* bc */
    { 0x0a, 0x04, 0x1f, 0x02, 0x04, 0x08, 0x1f }, /* bd */
    { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* be */
    { 0x0f, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01 }, /* bf */
    { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* c0 */
    { 0x1f, 0x00, 0x0e, 0x10, 0x17, 0x11, 0x0e }, /* c1 */
    { 0x1f, 0x00, 0x0f, 0x11, 0x0f, 0x01, 0x0e }, /* c2 */
    { 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04, 0x0c }, /* c3 */
    { 0x00, 0x0e, 0x10, 0x0e, 0x01, 0x0e, 0x04 }, /* c4 */
    { 0x04, 0x00, 0x0e, 0x04, 0x04, 0x04, 0x0e }, /* c5 */
    { 0x00, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x0e }, /* c6 */
    { 0x05, 0x0a, 0x11, 0x11, 0x11, 0x11, 0x0e }, /* c7 */
    { 0x09, 0x12, 0x0e, 0x11, 0x11, 0x11, 0x0e }, /* c8 */
    { 0x09, 0x12, 0x00, 0x11, 0x11, 0x13, 0x0d }, /* c9 */
    { 0x09, 0x12, 0x00, 0x0e, 0x11, 0x11, 0x0e }, /* ca */
    { 0x01, 0x01, 0x01, 0x01, 0x01, 0x10, 0x0f }, /* cb */
    { 0x10, 0x10, 0x10, 0x10, 0x10, 0x01, 0x1e }, /* cc */
    { 0x00, 0x1b, 0x1f, 0x1f, 0x0e, 0x04, 0x00 }, /* cd */
    { 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x18 }, /* ce */
    { 0x0e, 0x11, 0x04, 0x0a, 0x1b, 0x1f, 0x00 }, /* cf */
    { 0x0a, 0x15, 0x04, 0x07, 0x00, 0x11, 0x0a }, /* d0 */
    { 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f }, /* d1 */
    { 0x01, 0x03, 0x1d, 0x11, 0x1d, 0x03, 0x01 }, /* d2 */
    { 0x0e, 0x11, 0x11, 0x1f, 0x1b, 0x1b, 0x1f }, /* d3 */
    { 0x00, 0x01, 0x02, 0x0a, 0x04, 0x04, 0x00 }, /* d4 */
    { 0x04, 0x0e, 0x1f, 0x00, 0x1f, 0x0e, 0x04 }, /* d5 */
    { 0x02, 0x02, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e }, /* d6 */
    { 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1b }, /* d7 */
    { 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b }, /* d8 */
    { 0x04, 0x0f, 0x04, 0x04, 0x04, 0x03, 0x06 }, /* d9 */
    { 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b }, /* da */
    { 0x00, 0x04, 0x0e, 0x1f, 0x0e, 0x04, 0x00 }, /* db */
    { 0x00, 0x00, 0x1f, 0x1b, 0x15, 0x11, 0x1f }, /* dc */
    { 0x0e, 0x0e, 0x04, 0x1f, 0x0e, 0x0e, 0x0a }, /* dd */
    { 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x0a }, /* de */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f }, /* df */
    { 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f }, /* e0 */
    { 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f }, /* e1 */
    { 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e2 */
    { 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* e3 */
    { 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04 }, /* e4 */
    { 0x04, 0x09, 0x0a, 0x0a, 0x0a, 0x09, 0x04 }, /* e5 */
    { 0x00, 0x1f, 0x11, 0x11, 0x1f, 0x04, 0x1f }, /* e6 */
    { 0x00, 0x07, 0x03, 0x05, 0x08, 0x10, 0x00 }, /* e7 */
    { 0x00, 0x10, 0x08, 0x05, 0x03, 0x07, 0x00 }, /* e8 */
    { 0x09, 0x06, 0x0e, 0x01, 0x0f, 0x11, 0x0f }, /* e9 */
    { 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ea */
    { 0x00, 0x00, 0x10, 0x08, 0x04, 0x04, 0x04 }, /* eb */
    { 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f }, /* ec */
    { 0x1f, 0x18, 0x14, 0x12, 0x15, 0x18, 0x1f }, /* ed */
    { 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ee */
    { 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ef */
    { 0x00, 0x03, 0x07, 0x0c, 0x18, 0x1c, 0x1c }, /* f0 */
    { 0x1c, 0x10, 0x1c, 0x07, 0x1c, 0x04, 0x07 }, /* f1 */
    { 0x00, 0x1e, 0x03, 0x09, 0x19, 0x09, 0x1d }, /* f2 */
    { 0x1e, 0x01, 0x19, 0x05, 0x09, 0x1d, 0x01 }, /* f3 */
    { 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00 }, /* f4 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f }, /* f5 */
    { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e }, /* f6 */
    { 0x04, 0x04, 0x04, 0x08, 0x10, 0x00, 0x00 }, /* f7 */
    { 0x07, 0x03, 0x05, 0x08, 0x10, 0x10, 0x0f }, /* f8 */
    { 0x04, 0x0e, 0x1f, 0x11, 0x11, 0x15, 0x1f }, /* f9 */
    { 0x1f, 0x03, 0x1a, 0x02, 0x1a, 0x02, 0x1e }, /* fa */
    { 0x00, 0x0e, 0x1f, 0x11, 0x1f, 0x0e, 0x00 }, /* fb */
    { 0x03, 0x05, 0x09, 0x09, 0x0b, 0x1b, 0x18 }, /* fc */
    { 0x1f, 0x03, 0x05, 0x09, 0x15, 0x03, 0x1f }, /* fd */
    { 0x10, 0x10, 0x10, 0x10, 0x10, 0x1c, 0x1c }, /* fe */
    { 0x1c, 0x1c, 0x10, 0x10, 0x10, 0x10, 0x10 }, /* ff */
};

static unsigned char (*font_player)[256][7];

static unsigned bitmap[BITMAP_WIDTH][CHAR_HEIGHT];
static bool show_subst, show_hardware;
static bool newlcd;

bool is_new_player(void)
{
    return newlcd;
}

static void draw_pattern(int fg, int bg, int x, const unsigned char *pattern)
{
    int x2, y2;
    
    for (y2 = 0; y2 < 7; y2++)
    {
        unsigned data = pattern[y2];

        for (x2 = 0; x2 < 5; x2++)
            bitmap[x+x2][y2] = (data & (0x10 >> x2)) ? fg : bg;
    }
}

static void draw_hexdigit(int x, int digit)
{
    int x2, y2;

    draw_pattern(CHAR_FG_STD, CHAR_BG_STD, x + 1,
                 font_player_newlcd[digit+(digit<10?'0':'A'-10)]);

    for (y2 = 0; y2 < CHAR_HEIGHT; y2++)
        for (x2 = 0; x2 < CHAR_WIDTH; x2++)
            bitmap[x+x2][y2] ^= 0xffffff;
}

static void flush_bitmap(FILE *fp)
{
    int x, y;

    for (y = 0; y < CHAR_HEIGHT; y++) 
    {
        int i, z;

        for (i = 0; i < SIZE; i++)
        {
            for (x = 0; x < BITMAP_WIDTH; x++)
            {
                unsigned int col = bitmap[x][y];
 
                for (z = 0; z < SIZE; z++)
                {
                    fprintf(fp, "%d %d %d  ", (col >> 16) & 255,
                            (col >> 8)  & 255, (col) & 255);
                }
            }
            fprintf(fp, "\n");
        }
    }
}


int main(int argc, char **argv)
{
    int x, y;
    int i, lines, block, oldblock;
    int loop;
    char *filename;
    FILE *fp;

    printf("This tool will generate gif-pictures that reflect the current "
           "unicode charset of the Player.\n");
  
    for (loop = 0; loop < 6; loop++)
    {
        switch (loop) 
        {
          case 0:
            font_player = &font_player_oldlcd;
            newlcd = false;
            lcd_charset_init();
            filename = "lcd_old.gif";
            show_subst = false;
            show_hardware = false;
            break;
          case 1:
            font_player = &font_player_newlcd;
            newlcd = true;
            lcd_charset_init();
            filename = "lcd_new.gif";
            show_subst = false;
            show_hardware = false;
            break;
          case 2:
            font_player = &font_player_oldlcd;
            newlcd = false;
            lcd_charset_init();
            filename = "lcd_old_subst.gif";
            show_subst = true;
            show_hardware = false;
            break;
          case 3:
            font_player = &font_player_newlcd;
            newlcd = true;
            lcd_charset_init();
            filename = "lcd_new_subst.gif";
            show_subst = true;
            show_hardware = false;
            break;
          case 4:
            font_player = &font_player_oldlcd;
            xchar_info = NULL;
            xchar_info_size = 256;
            filename = "lcd_old_hw.gif";
            show_subst = true;
            show_hardware = true;
            break;
          case 5:
            font_player = &font_player_newlcd;
            xchar_info = NULL;
            xchar_info_size = 256;
            filename = "lcd_new_hw.gif";
            show_subst = true;
            show_hardware = true;
            break;
          default:
            printf("Not in loop!\n");
            exit(0);
        }
        fp = fopen("tmp.pnm", "wb");
        if (!fp)
        {
            printf("Error opening %s!\n", filename);
            exit(0);
        }
        if (show_hardware)
        {
            /* hardware mapping is always 16 lines */
            lines = 16;
        }
        else
        {
            /* count lines */
            for (lines = 0, oldblock = -1, i = 0; i < xchar_info_size; i++)
            {
                block = xchar_info[i].ucs >> 4;
                if (block != oldblock)
                {
                    lines++;
                    oldblock = block;
                }
            }
        }
        fprintf(fp, "P3\n#PNM showing a picture of the Player unicode charset\n");
        fprintf(fp, "%d %d\n255\n", BITMAP_WIDTH*SIZE, CHAR_HEIGHT*SIZE*(lines+1));

        memset(bitmap, 255, sizeof(bitmap));
        for (x = 0; x < 16; x++)
        {
            draw_hexdigit(3*CHAR_WIDTH + x * CHAR_WIDTH, x);
        }

        for (oldblock = -1, i = 0; i < xchar_info_size; i++)
        {
            block = show_hardware ? (i >> 4) : (xchar_info[i].ucs >> 4);
            if (block != oldblock)
            {
                flush_bitmap(fp);
                memset(bitmap, 255, sizeof(bitmap));
                draw_hexdigit(0, (block >> 8) & 0xf);
                draw_hexdigit(CHAR_WIDTH, (block >> 4) & 0xf);
                draw_hexdigit(2*CHAR_WIDTH, block & 0xf);
                oldblock = block;
            }
            if (show_hardware)
            {
                draw_pattern(CHAR_FG_STD, CHAR_BG_STD,
                            3*CHAR_WIDTH+1 + (i & 0xf) * CHAR_WIDTH,
                            (*font_player)[i]);
            }
            else
            {
                if (xchar_info[i].priority == 0)
                {
                    draw_pattern(CHAR_FG_STD, CHAR_BG_STD,
                                3*CHAR_WIDTH+1 
                                + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
                                (*font_player)[xchar_info[i].hw_char]);
                }
                else
                {
                    if (show_subst)
                    {
                        draw_pattern(CHAR_FG_ALT, CHAR_BG_STD,
                                    3*CHAR_WIDTH+1 
                                    + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
                                    (*font_player)[xchar_info[i].hw_char]);
                    }
                    else
                    {
                        if ((xchar_info[i].glyph & 0x8000) == 0)
                            draw_pattern(CHAR_FG_ALT, CHAR_BG_STD,
                                        3*CHAR_WIDTH+1
                                        + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
                                        xfont_fixed[xchar_info[i].glyph]);
                        else
                             draw_pattern(CHAR_FG_STD, CHAR_BG_ALT,
                                        3*CHAR_WIDTH+1
                                        + (xchar_info[i].ucs & 0xf) * CHAR_WIDTH,
                                        font_player_newlcd[' ']);
                   }
                }
            }
        }
        flush_bitmap(fp);
        fclose(fp);
        {
            char buffer[200];

            sprintf(buffer, "convert tmp.pnm %s", filename);
            system(buffer);
            system("rm tmp.pnm");
        }
    }
}