8
static u8 lang_char[256];
10
static u8 lang_chars[1+8+8][16] =
12
{ 0, 0x23,0x24,0x40,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x7b,0x7c,0x7d,0x7e },
16
{ 0, '�', '$', '@', '�', '�', '�', '�', '#', '�', '�', '�', '�', '�' },
18
{ 0, '#', '$', '�', '�', '�', '�', '^', '_', '�', '�', '�', '�', '�' },
19
// Swedish/Finnish/Hungarian (100%)
20
{ 0, '#', '�', '�', '�', '�', '�', '�', '_', '�', '�', '�', '�', '�' },
22
{ 0, '�', '$', '�', '�', '�', '�', '�', '#', '�', '�', '�', '�', '�' },
24
{ 0, '�', '�', '�', '�', '�', '�', '�', '#', '�', '�', '�', '�', '�' },
25
// Portuguese/Spanish (100%)
26
{ 0, '�', '$', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�' },
28
{ 0, '#', 'u', 'c', 't', 'z', '�', '�', 'r', '�', '�', 'e', '�', 's' },
29
// reserved (English mapping)
30
{ 0, '�', '$', '@', '�', '�', '�', '�', '#', '�', '�', '�', '�', '�' },
34
{ 0, '#', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�' },
36
{ 0, '#', '$', '�', '�', '�', '�', '^', '_', '�', '�', '�', '�', '�' },
38
{ 0, '#', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�' },
39
// Lettish/Lithuanian (90%)
40
{ 0, '#', '$', '�', '�', '�', '�', '�', '�', '�', '�', 'u', '�', 'i' },
42
{ 0, '�', 'i', 'a', '�', '�', 'u', '�', '#', 'e', '�', '�', 'u', '�' },
43
// Serbian/Croation/Slovenian (100%)
44
{ 0, '#', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�' },
45
// Czech/Slovak (100%)
46
{ 0, '#', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�', '�' },
48
{ 0, '#', '�', '�', '�', '�', '�', '�', 'i', '�', '�', '�', '�', '�' },
51
/* Yankable latin charset :-)
52
!"#$%&'()*+,-./0123456789:;<=>?
53
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
54
`abcdefghijklmnopqrstuvwxyz{|}~
55
�������������������������������
56
��������������������������������
57
��������������������������������
62
static struct mark { u8 *g0, *latin1, *latin2; } marks[16] =
67
/* grave - ` */ { " aeiouAEIOU",
70
/* acute - ' */ { " aceilnorsuyzACEILNORSUYZ",
71
"'�c��ln�rs��z�C��LN�RS��Z",
72
"'���������������������ݬ" },
73
/* cirumflex - ^ */ { " aeiouAEIOU",
76
/* tilde - ~ */ { " anoANO",
82
/* breve - u */ { "aA",
85
/* abovedot - � */ { "zZ",
88
/* diaeresis � */ { "aeiouAEIOU",
94
/* ringabove - � */ { " auAU",
97
/* cedilla - � */ { "cstCST",
103
/* dbl acute - " */ { " ouOU",
106
/* ogonek - \, */ { "aeAE",
109
/* caron - v */ { "cdelnrstzCDELNRSTZ",
110
"cdelnrstzCDELNRSTZ",
114
static u8 g2map_latin1[] =
121
"K�d�hiill� ��tn\x7f";
123
static u8 g2map_latin2[] =
130
"K �dhiil�o �ptn\x7f";
139
memset(lang_char, 0, sizeof(lang_char));
140
for (i = 1; i <= 13; i++)
141
lang_char[lang_chars[0][i]] = i;
146
conv2latin(u8 *p, int n, int lang)
152
if (lang_char[c = *p])
154
if (not gfx || (c & 0xa0) != 0x20)
155
*p = lang_chars[lang + 1][lang_char[c]];
157
else if ((c & 0xe8) == 0)
166
init_enhance(struct enhance *eh)
172
add_enhance(struct enhance *eh, int dcode, u32 *t)
174
if (dcode == eh->next_des)
176
memcpy(eh->trip + dcode * 13, t, 13 * sizeof(*t));
184
enhance(struct enhance *eh, struct vt_page *vtp)
189
if (eh->next_des < 1)
192
for (p = eh->trip, e = p + eh->next_des * 13; p < e; p++)
193
if (*p % 2048 != 2047)
196
int mode = *p / 64 % 32;
197
int data = *p / 2048 % 128;
199
//printf("%2x,%d,%d ", mode, adr, data);
205
case 15: // char from G2 set
206
if (adr < W && row < H)
208
vtp->data[row][adr] = g2map_latin1[data-32];
210
vtp->data[row][adr] = g2map_latin2[data-32];
212
case 16 ... 31: // char from G0 set with diacritical mark
213
if (adr < W && row < H)
215
struct mark *mark = marks + (mode - 16);
218
if (x = strchr(mark->g0, data))
220
data = mark->latin1[x - mark->g0];
222
data = mark->latin2[x - mark->g0];
223
vtp->data[row][adr] = data;
231
if ((adr -= 40) == 0)
236
case 1: // full row color
239
case 4: // set active position
242
case 7: // address row 0 (+ full row color)