summaryrefslogtreecommitdiff
path: root/www/docs/rocklatin.t
diff options
context:
space:
mode:
Diffstat (limited to 'www/docs/rocklatin.t')
-rw-r--r--www/docs/rocklatin.t95
1 files changed, 0 insertions, 95 deletions
diff --git a/www/docs/rocklatin.t b/www/docs/rocklatin.t
deleted file mode 100644
index 819a845051..0000000000
--- a/www/docs/rocklatin.t
+++ /dev/null
@@ -1,95 +0,0 @@
1#define _PAGE_ Rocklatin1
2#include "head.t"
3
4<p>Only for developers...
5
6<h2>Background</h2>
7The Archos player comes in two models. One with old LCD and one with new LCD.
8(Differences can be seen below). You can't find any difference more than the
9LCD, therefor we run the same code on both models. The original software
10contains two different mappings from ASCII-character to hardware-LCD. Because
11some characters doesn't exist in both hardwares all national characters
12are left out in both hardware.
13<p>The old LCD can have 4 software defined characters, and the new LCD can
14have 8 software defined characters.
15<table border=1><tr>
16<td>HW layout of old LCD:<br><img width=272 height=272 src="lcd_old_hw.gif"></td>
17<td>HW layout of new LCD:<br><img width=272 height=272 src="lcd_new_hw.gif"></td>
18</tr></table>
19
20<h2>What is Rocklatin1</h2>
21Rocklatin1 is based on Winlatin1 (which is identical to Latin1 but some
22extra characters). All characters presented in any HW-LCD (i.e. old LCD)
23is mapped in Rocklatin1 and some extra characters we find good to use.
24
25<table border=1><tr>
26<td>Rocklatin1 of old LCD:<br><img width=272 height=272 src="lcd_old.gif"></td>
27<td>Rocklatin1 of new LCD:<br><img width=272 height=272 src="lcd_new.gif"></td>
28</tr></table>
29The red characters are characters not defined in the HW-LCD. These characters
30are mapped by the software to a software defined character (0-4/8) whenever
31they are used.
32
33<h2>But what if...</h2>
34...all software defined characters are taken?<br>
35Well, then a substitute character will be used for that character.
36
37<table border=1><tr>
38<td>Substitute of old LCD:<br><img width=272 height=272 src="lcd_old_subst.gif"></td>
39<td>Substitute of new LCD:<br><img width=272 height=272 src="lcd_new_subst.gif"></td>
40</tr></table>
41The red characters shows where a substitution is made.
42
43<p>
44All Rocklatin1 characters between 0x00 and 0x1f are hardcoded to be prioritized.
45That means that if a national character is displayed at LCD and an icon
46(0x18-0x1f) is to be shown, the character with highest Rocklatin1 value will
47be switched to a substitute character.
48
49<h2>Accessing hardware</h2>
50The Rockbox software can access a HW-LCD-character by doing a lcd_putc(0x100-0x1ff). That would of course make it 100% hardware depended (=not good).
51<p>
52The Rockbox software can also define 22 own patterns, even though hardware only
53allows 4 or 8. The software should of course not try to display more than 4
54or 8 of such characters. This code example shows how to define a pattern:
55<pre>
56{
57 unsigned char pattern[]={ 0x0a, 0x00, 0x00, 0x0c,
58 0x04, 0x04, 0x0e};
59 unsigned char handle;
60
61 handle=lcd_get_locked_pattern();
62 lcd_define_pattern(handle, pattern);
63
64 lcd_putc(x, y, handle);
65
66 ...
67
68 lcd_unlock_pattern(handle);
69}
70</pre>
71The handle is very likely to be between 0x01 to 0x15, which in software will
72be handled as a prioritized character (even higher than the icons).
73
74<h2>Some notes</h2>
75<ul>
76<li>Displaying the same rocklatin-mapped-character many times at the LCD
77only occupies one HW-LCD-mapped character.
78<li>If a substitute character is used, the "should-be" character will never
79be shown (no flickering screen) until the character is moved or scrolled.
80<li>Characters already displayed are only substituted if a prioritized
81character is to be displayed.
82<li>The software maps the characters circular in order to minimize the
83likelyhood to remap the same character very often.
84<li>The gifs above is generated with the tool "generate_rocklatin".
85<li>Rocklatin character 0x92 is defined as the "cursor" character.
86<li>Rocklatin character 0x93-0x95 is only used for substitution (a substitute
87character must be a Rocklatin character).
88<li>Implementation and design by Kjell Ericson and Mats Lidell (for questions).
89<li>Rocklatin1 is based on Winlatin1 because the old LCD happened to have 7
90of the Winlatin1-extra characters (no need to remap/remove those).
91<li>If you find any characters identical in old and new HW-LCD that aren't
92mapped (and really are useful) you can tell us.
93</ul>
94
95#include "foot.t"