Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 240702
Collapse All | Expand All

(-)osdteletext-0.5.1.orig/displaybase.c (-3 / +11 lines)
Lines 17-22 Link Here
17
#include <time.h>
17
#include <time.h>
18
#include "displaybase.h"
18
#include "displaybase.h"
19
#include "txtfont.h"
19
#include "txtfont.h"
20
#include <vdr/tools.h>
21
#include <exception>
22
#include "txtrecv.h"
20
23
21
24
22
cDisplay::cDisplay(int width, int height) {
25
cDisplay::cDisplay(int width, int height) {
Lines 227-233 Link Here
227
    }
230
    }
228
231
229
    cRenderPage::RenderTeletextCode(PageCode+12);
232
    cRenderPage::RenderTeletextCode(PageCode+12);
230
        
233
231
    #ifdef timingdebug
234
    #ifdef timingdebug
232
        t.Stop("Render Teletext");
235
        t.Stop("Render Teletext");
233
    #endif
236
    #endif
Lines 298-304 Link Here
298
    unsigned int buffer[10];
301
    unsigned int buffer[10];
299
    unsigned int *charmap;
302
    unsigned int *charmap;
300
    cBitmap *bm;
303
    cBitmap *bm;
301
    
304
302
    // Get character face:
305
    // Get character face:
303
    charmap=GetFontChar(c,buffer);
306
    charmap=GetFontChar(c,buffer);
304
    if (!charmap) {
307
    if (!charmap) {
Lines 319-324 Link Here
319
    // Virtual box area of the character
322
    // Virtual box area of the character
320
    cBox box;
323
    cBox box;
321
    box.SetToCharacter(x,y);
324
    box.SetToCharacter(x,y);
325
322
    
326
    
323
    // OSD top left pixel of char
327
    // OSD top left pixel of char
324
    cVirtualCoordinate TopLeft;
328
    cVirtualCoordinate TopLeft;
Lines 349-355 Link Here
349
        // Now draw the character. Start at the top left corner, and walk
353
        // Now draw the character. Start at the top left corner, and walk
350
        // through all pixels on OSD. To speed up, keep one pointer to OSD pixel
354
        // through all pixels on OSD. To speed up, keep one pointer to OSD pixel
351
        // and one to virtual box coordinates, and move them together.
355
        // and one to virtual box coordinates, and move them together.
352
        
356
353
        cVirtualCoordinate p=BMTopLeft;
357
        cVirtualCoordinate p=BMTopLeft;
354
        while (p.VirtY<=box.YMax) {
358
        while (p.VirtY<=box.YMax) {
355
            // run through OSD lines
359
            // run through OSD lines
Lines 411-416 Link Here
411
    }
415
    }
412
    // .. and display
416
    // .. and display
413
    Flush();
417
    Flush();
418
414
}
419
}
415
420
416
void cDisplay::DrawClock() {
421
void cDisplay::DrawClock() {
Lines 430-435 Link Here
430
    
435
    
431
    if (!osd) return;
436
    if (!osd) return;
432
    
437
    
438
433
    HoldFlush();
439
    HoldFlush();
434
    // Hold flush until done
440
    // Hold flush until done
435
    
441
    
Lines 474-479 Link Here
474
480
475
    // And flush all changes
481
    // And flush all changes
476
    ReleaseFlush();
482
    ReleaseFlush();
483
    
484
477
}
485
}
478
486
479
void cDisplay::ClearMessage() {
487
void cDisplay::ClearMessage() {
(-)osdteletext-0.5.1.orig/display.h (-2 / +2 lines)
Lines 46-56 Link Here
46
    inline bool GetBlink() 
46
    inline bool GetBlink() 
47
        { if (display) return display->GetBlink(); else return false; }
47
        { if (display) return display->GetBlink(); else return false; }
48
    inline bool SetBlink(bool blink) 
48
    inline bool SetBlink(bool blink) 
49
        { if (display) display->SetBlink(blink); else return false; }
49
        { if (display) return display->SetBlink(blink); else return false; }
50
    inline bool GetConceal() 
50
    inline bool GetConceal() 
51
        { if (display) return display->GetConceal(); else return false; }
51
        { if (display) return display->GetConceal(); else return false; }
52
    inline bool SetConceal(bool conceal) 
52
    inline bool SetConceal(bool conceal) 
53
        { if (display) display->SetConceal(conceal); else return false; }
53
        { if (display) return display->SetConceal(conceal); else return false; }
54
    inline cDisplay::enumZoom GetZoom() 
54
    inline cDisplay::enumZoom GetZoom() 
55
        { if (display) return display->GetZoom(); else return cDisplay::Zoom_Off; }
55
        { if (display) return display->GetZoom(); else return cDisplay::Zoom_Off; }
56
    inline void SetZoom(cDisplay::enumZoom zoom)
56
    inline void SetZoom(cDisplay::enumZoom zoom)
(-)osdteletext-0.5.1.orig/hamm.c (+256 lines)
Line 0 Link Here
1
#include "hamm.h"
2
3
4
5
6
unsigned char invtab[256] = {
7
  0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 
8
  0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 
9
  0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 
10
  0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 
11
  0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 
12
  0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 
13
  0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 
14
  0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 
15
  0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 
16
  0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 
17
  0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 
18
  0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 
19
  0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 
20
  0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 
21
  0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 
22
  0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 
23
  0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 
24
  0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 
25
  0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 
26
  0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 
27
  0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 
28
  0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 
29
  0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 
30
  0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 
31
  0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 
32
  0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 
33
  0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 
34
  0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 
35
  0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 
36
  0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 
37
  0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 
38
  0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, 
39
};
40
41
42
// table to decode hamm8/4 encoded bytes.
43
// the low 4 bits are the (corrected) data bits
44
// bit 8 is set if there was a single bit error
45
// bit 12 is set if there was an uncorrectable error
46
47
// the idea: you may add up to 15 words and get the
48
// number of single bit errors in b8-b11 and the number
49
// of double errors in b12-b15
50
51
unsigned short hammtab[256] =
52
{
53
    0x0101, 0x100f, 0x0001, 0x0101, 0x100f, 0x0100, 0x0101, 0x100f,
54
    0x100f, 0x0102, 0x0101, 0x100f, 0x010a, 0x100f, 0x100f, 0x0107,
55
    0x100f, 0x0100, 0x0101, 0x100f, 0x0100, 0x0000, 0x100f, 0x0100,
56
    0x0106, 0x100f, 0x100f, 0x010b, 0x100f, 0x0100, 0x0103, 0x100f,
57
    0x100f, 0x010c, 0x0101, 0x100f, 0x0104, 0x100f, 0x100f, 0x0107,
58
    0x0106, 0x100f, 0x100f, 0x0107, 0x100f, 0x0107, 0x0107, 0x0007,
59
    0x0106, 0x100f, 0x100f, 0x0105, 0x100f, 0x0100, 0x010d, 0x100f,
60
    0x0006, 0x0106, 0x0106, 0x100f, 0x0106, 0x100f, 0x100f, 0x0107,
61
    0x100f, 0x0102, 0x0101, 0x100f, 0x0104, 0x100f, 0x100f, 0x0109,
62
    0x0102, 0x0002, 0x100f, 0x0102, 0x100f, 0x0102, 0x0103, 0x100f,
63
    0x0108, 0x100f, 0x100f, 0x0105, 0x100f, 0x0100, 0x0103, 0x100f,
64
    0x100f, 0x0102, 0x0103, 0x100f, 0x0103, 0x100f, 0x0003, 0x0103,
65
    0x0104, 0x100f, 0x100f, 0x0105, 0x0004, 0x0104, 0x0104, 0x100f,
66
    0x100f, 0x0102, 0x010f, 0x100f, 0x0104, 0x100f, 0x100f, 0x0107,
67
    0x100f, 0x0105, 0x0105, 0x0005, 0x0104, 0x100f, 0x100f, 0x0105,
68
    0x0106, 0x100f, 0x100f, 0x0105, 0x100f, 0x010e, 0x0103, 0x100f,
69
    0x100f, 0x010c, 0x0101, 0x100f, 0x010a, 0x100f, 0x100f, 0x0109,
70
    0x010a, 0x100f, 0x100f, 0x010b, 0x000a, 0x010a, 0x010a, 0x100f,
71
    0x0108, 0x100f, 0x100f, 0x010b, 0x100f, 0x0100, 0x010d, 0x100f,
72
    0x100f, 0x010b, 0x010b, 0x000b, 0x010a, 0x100f, 0x100f, 0x010b,
73
    0x010c, 0x000c, 0x100f, 0x010c, 0x100f, 0x010c, 0x010d, 0x100f,
74
    0x100f, 0x010c, 0x010f, 0x100f, 0x010a, 0x100f, 0x100f, 0x0107,
75
    0x100f, 0x010c, 0x010d, 0x100f, 0x010d, 0x100f, 0x000d, 0x010d,
76
    0x0106, 0x100f, 0x100f, 0x010b, 0x100f, 0x010e, 0x010d, 0x100f,
77
    0x0108, 0x100f, 0x100f, 0x0109, 0x100f, 0x0109, 0x0109, 0x0009,
78
    0x100f, 0x0102, 0x010f, 0x100f, 0x010a, 0x100f, 0x100f, 0x0109,
79
    0x0008, 0x0108, 0x0108, 0x100f, 0x0108, 0x100f, 0x100f, 0x0109,
80
    0x0108, 0x100f, 0x100f, 0x010b, 0x100f, 0x010e, 0x0103, 0x100f,
81
    0x100f, 0x010c, 0x010f, 0x100f, 0x0104, 0x100f, 0x100f, 0x0109,
82
    0x010f, 0x100f, 0x000f, 0x010f, 0x100f, 0x010e, 0x010f, 0x100f,
83
    0x0108, 0x100f, 0x100f, 0x0105, 0x100f, 0x010e, 0x010d, 0x100f,
84
    0x100f, 0x010e, 0x010f, 0x100f, 0x010e, 0x000e, 0x100f, 0x010e,
85
};
86
87
88
89
90
// this table generates the parity checks for hamm24/18 decoding.
91
// bit 0 is for test A, 1 for B, ...
92
// thanks to R. Gancarz for this fine table *g*
93
94
char hamm24par[3][256] =
95
{
96
    { // parities of first byte
97
	 0, 33, 34,  3, 35,  2,  1, 32, 36,  5,  6, 39,  7, 38, 37,  4,
98
	37,  4,  7, 38,  6, 39, 36,  5,  1, 32, 35,  2, 34,  3,  0, 33,
99
	38,  7,  4, 37,  5, 36, 39,  6,  2, 35, 32,  1, 33,  0,  3, 34,
100
	 3, 34, 33,  0, 32,  1,  2, 35, 39,  6,  5, 36,  4, 37, 38,  7,
101
	39,  6,  5, 36,  4, 37, 38,  7,  3, 34, 33,  0, 32,  1,  2, 35,
102
	 2, 35, 32,  1, 33,  0,  3, 34, 38,  7,  4, 37,  5, 36, 39,  6,
103
	 1, 32, 35,  2, 34,  3,  0, 33, 37,  4,  7, 38,  6, 39, 36,  5,
104
	36,  5,  6, 39,  7, 38, 37,  4,  0, 33, 34,  3, 35,  2,  1, 32,
105
	40,  9, 10, 43, 11, 42, 41,  8, 12, 45, 46, 15, 47, 14, 13, 44,
106
	13, 44, 47, 14, 46, 15, 12, 45, 41,  8, 11, 42, 10, 43, 40,  9,
107
	14, 47, 44, 13, 45, 12, 15, 46, 42, 11,  8, 41,  9, 40, 43, 10,
108
	43, 10,  9, 40,  8, 41, 42, 11, 15, 46, 45, 12, 44, 13, 14, 47,
109
	15, 46, 45, 12, 44, 13, 14, 47, 43, 10,  9, 40,  8, 41, 42, 11,
110
	42, 11,  8, 41,  9, 40, 43, 10, 14, 47, 44, 13, 45, 12, 15, 46,
111
	41,  8, 11, 42, 10, 43, 40,  9, 13, 44, 47, 14, 46, 15, 12, 45,
112
	12, 45, 46, 15, 47, 14, 13, 44, 40,  9, 10, 43, 11, 42, 41,  8
113
    }, { // parities of second byte
114
	 0, 41, 42,  3, 43,  2,  1, 40, 44,  5,  6, 47,  7, 46, 45,  4,
115
	45,  4,  7, 46,  6, 47, 44,  5,  1, 40, 43,  2, 42,  3,  0, 41,
116
	46,  7,  4, 45,  5, 44, 47,  6,  2, 43, 40,  1, 41,  0,  3, 42,
117
	 3, 42, 41,  0, 40,  1,  2, 43, 47,  6,  5, 44,  4, 45, 46,  7,
118
	47,  6,  5, 44,  4, 45, 46,  7,  3, 42, 41,  0, 40,  1,  2, 43,
119
	 2, 43, 40,  1, 41,  0,  3, 42, 46,  7,  4, 45,  5, 44, 47,  6,
120
	 1, 40, 43,  2, 42,  3,  0, 41, 45,  4,  7, 46,  6, 47, 44,  5,
121
	44,  5,  6, 47,  7, 46, 45,  4,  0, 41, 42,  3, 43,  2,  1, 40,
122
	48, 25, 26, 51, 27, 50, 49, 24, 28, 53, 54, 31, 55, 30, 29, 52,
123
	29, 52, 55, 30, 54, 31, 28, 53, 49, 24, 27, 50, 26, 51, 48, 25,
124
	30, 55, 52, 29, 53, 28, 31, 54, 50, 27, 24, 49, 25, 48, 51, 26,
125
	51, 26, 25, 48, 24, 49, 50, 27, 31, 54, 53, 28, 52, 29, 30, 55,
126
	31, 54, 53, 28, 52, 29, 30, 55, 51, 26, 25, 48, 24, 49, 50, 27,
127
	50, 27, 24, 49, 25, 48, 51, 26, 30, 55, 52, 29, 53, 28, 31, 54,
128
	49, 24, 27, 50, 26, 51, 48, 25, 29, 52, 55, 30, 54, 31, 28, 53,
129
	28, 53, 54, 31, 55, 30, 29, 52, 48, 25, 26, 51, 27, 50, 49, 24
130
    }, { // parities of third byte
131
	63, 14, 13, 60, 12, 61, 62, 15, 11, 58, 57,  8, 56,  9, 10, 59,
132
	10, 59, 56,  9, 57,  8, 11, 58, 62, 15, 12, 61, 13, 60, 63, 14,
133
	 9, 56, 59, 10, 58, 11,  8, 57, 61, 12, 15, 62, 14, 63, 60, 13,
134
	60, 13, 14, 63, 15, 62, 61, 12,  8, 57, 58, 11, 59, 10,  9, 56,
135
	 8, 57, 58, 11, 59, 10,  9, 56, 60, 13, 14, 63, 15, 62, 61, 12,
136
	61, 12, 15, 62, 14, 63, 60, 13,  9, 56, 59, 10, 58, 11,  8, 57,
137
	62, 15, 12, 61, 13, 60, 63, 14, 10, 59, 56,  9, 57,  8, 11, 58,
138
	11, 58, 57,  8, 56,  9, 10, 59, 63, 14, 13, 60, 12, 61, 62, 15,
139
	31, 46, 45, 28, 44, 29, 30, 47, 43, 26, 25, 40, 24, 41, 42, 27,
140
	42, 27, 24, 41, 25, 40, 43, 26, 30, 47, 44, 29, 45, 28, 31, 46,
141
	41, 24, 27, 42, 26, 43, 40, 25, 29, 44, 47, 30, 46, 31, 28, 45,
142
	28, 45, 46, 31, 47, 30, 29, 44, 40, 25, 26, 43, 27, 42, 41, 24,
143
	40, 25, 26, 43, 27, 42, 41, 24, 28, 45, 46, 31, 47, 30, 29, 44,
144
	29, 44, 47, 30, 46, 31, 28, 45, 41, 24, 27, 42, 26, 43, 40, 25,
145
	30, 47, 44, 29, 45, 28, 31, 46, 42, 27, 24, 41, 25, 40, 43, 26,
146
	43, 26, 25, 40, 24, 41, 42, 27, 31, 46, 45, 28, 44, 29, 30, 47
147
    }
148
};
149
150
151
152
// table to extract the lower 4 bit from hamm24/18 encoded bytes
153
154
char hamm24val[256] =
155
{
156
      0,  0,  0,  0,  1,  1,  1,  1,  0,  0,  0,  0,  1,  1,  1,  1,
157
      2,  2,  2,  2,  3,  3,  3,  3,  2,  2,  2,  2,  3,  3,  3,  3,
158
      4,  4,  4,  4,  5,  5,  5,  5,  4,  4,  4,  4,  5,  5,  5,  5,
159
      6,  6,  6,  6,  7,  7,  7,  7,  6,  6,  6,  6,  7,  7,  7,  7,
160
      8,  8,  8,  8,  9,  9,  9,  9,  8,  8,  8,  8,  9,  9,  9,  9,
161
     10, 10, 10, 10, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11,
162
     12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13,
163
     14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15,
164
      0,  0,  0,  0,  1,  1,  1,  1,  0,  0,  0,  0,  1,  1,  1,  1,
165
      2,  2,  2,  2,  3,  3,  3,  3,  2,  2,  2,  2,  3,  3,  3,  3,
166
      4,  4,  4,  4,  5,  5,  5,  5,  4,  4,  4,  4,  5,  5,  5,  5,
167
      6,  6,  6,  6,  7,  7,  7,  7,  6,  6,  6,  6,  7,  7,  7,  7,
168
      8,  8,  8,  8,  9,  9,  9,  9,  8,  8,  8,  8,  9,  9,  9,  9,
169
     10, 10, 10, 10, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11,
170
     12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13,
171
     14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15
172
};
173
174
175
176
// mapping from parity checks made by table hamm24par to error
177
// results return by hamm24.
178
// (0 = no error, 0x0100 = single bit error, 0x1000 = double error)
179
180
short hamm24err[64] =
181
{
182
    0x0000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
183
    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
184
    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
185
    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
186
    0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
187
    0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
188
    0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100,
189
    0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000,
190
};
191
192
193
194
// mapping from parity checks made by table hamm24par to faulty bit
195
// in the decoded 18 bit word.
196
197
int hamm24cor[64] =
198
{
199
    0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
200
    0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
201
    0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
202
    0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
203
    0x00000, 0x00000, 0x00000, 0x00001, 0x00000, 0x00002, 0x00004, 0x00008,
204
    0x00000, 0x00010, 0x00020, 0x00040, 0x00080, 0x00100, 0x00200, 0x00400,
205
    0x00000, 0x00800, 0x01000, 0x02000, 0x04000, 0x08000, 0x10000, 0x20000,
206
    0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000,
207
};
208
209
int
210
hamm8(unsigned char *p, int *err)
211
{
212
    int a = hammtab[p[0]];
213
    *err += a;
214
    return a & 15;
215
}
216
217
int
218
hamm16(unsigned char *p, int *err)
219
{
220
    int a = hammtab[p[0]];
221
    int b = hammtab[p[1]];
222
    *err += a;
223
    *err += b;
224
    return (a & 15) | (b & 15) * 16;
225
}
226
227
int
228
hamm24(unsigned char *p, int *err)
229
{
230
    int e = hamm24par[0][p[0]] ^ hamm24par[1][p[1]] ^ hamm24par[2][p[2]];
231
    int x = hamm24val[p[0]] + p[1] % 128 * 16 + p[2] % 128 * 2048;
232
233
    *err += hamm24err[e];
234
    return x ^ hamm24cor[e];
235
}
236
237
int
238
chk_parity(unsigned char *p, int n)
239
{
240
    int err;
241
242
    for (err = 0; n--; p++)
243
	if (hamm24par[0][*p] & 32)
244
	    *p &= 0x7f;
245
	else
246
	    *p = 0xb8, err++;
247
    return err;
248
}
249
250
unsigned char
251
doinvert(unsigned char p)
252
{
253
    return invtab[p];
254
}
255
256
(-)osdteletext-0.5.1.orig/hamm.h (+12 lines)
Line 0 Link Here
1
#ifndef HAMM_H
2
#define HAMM_H
3
4
5
int hamm8(unsigned char *p, int *err);
6
int hamm16(unsigned char *p, int *err);
7
int hamm24(unsigned char *p, int *err);
8
int chk_parity(unsigned char *p, int n);
9
unsigned char doinvert(unsigned char p);
10
11
12
#endif
(-)osdteletext-0.5.1.orig/i18n.c (-54 / +96 lines)
Lines 26-31 Link Here
26
    "",           //Hugarian
26
    "",           //Hugarian
27
    "Pàgina",     //Catalan
27
    "Pàgina",     //Catalan
28
    "ÁâàÐÝØæÐ",   //Russian
28
    "ÁâàÐÝØæÐ",   //Russian
29
    "",           //Croatian
30
    "",           //Estonian
31
    "",           //Danish
32
    "Strana",
29
  },              
33
  },              
30
  { "not found",      //English
34
  { "not found",      //English
31
    "nicht gefunden", //German
35
    "nicht gefunden", //German
Lines 44-49 Link Here
44
    "",               //Hugarian
48
    "",               //Hugarian
45
    "no trobada",     //Catalan
49
    "no trobada",     //Catalan
46
    "ÝÕ ÝÐÙÔÕÝÐ",     //Russian
50
    "ÝÕ ÝÐÙÔÕÝÐ",     //Russian
51
    "",           //Croatian
52
    "",           //Estonian
53
    "",           //Danish
54
    "nebyla nalezena",
47
  },
55
  },
48
  { "Teletext (OSD)", //English
56
  { "Teletext (OSD)", //English
49
    "Videotext (OSD)", //German
57
    "Videotext (OSD)", //German
Lines 62-67 Link Here
62
    "",               //Hugarian
70
    "",               //Hugarian
63
    "Teletext (OSD)", //Catalan
71
    "Teletext (OSD)", //Catalan
64
    "ÂÕÛÕâÕÚáâ",      //Russian
72
    "ÂÕÛÕâÕÚáâ",      //Russian
73
    "",           //Croatian
74
    "",           //Estonian
75
    "",           //Danish
76
    "Teletext (OSD)",
65
  },
77
  },
66
  { "Zoom",           //English
78
  { "Zoom",           //English
67
    "Vergrößern",     //German
79
    "Vergrößern",     //German
Lines 80-85 Link Here
80
    "",               //Hugarian
92
    "",               //Hugarian
81
    "Zoom",           //Catalan
93
    "Zoom",           //Catalan
82
    "ãÒÕÛØçØâì",      //Russian
94
    "ãÒÕÛØçØâì",      //Russian
95
    "",           //Croatian
96
    "",           //Estonian
97
    "",           //Danish
98
    "Zvìt¹it",
83
  },
99
  },
84
  { "Half page",      //English
100
  { "Half page",      //English
85
    "Halbe Seite",    //German
101
    "Halbe Seite",    //German
Lines 98-103 Link Here
98
    "",               //Hugarian
114
    "",               //Hugarian
99
    "Mitja pàgina",   //Catalan
115
    "Mitja pàgina",   //Catalan
100
    "ßÞÛ-áâàÐÝØæë",   //Russian   
116
    "ßÞÛ-áâàÐÝØæë",   //Russian   
117
    "",           //Croatian
118
    "",           //Estonian
119
    "",           //Danish
120
    "Pùl stránky",
101
  },
121
  },
102
  { "Change channel",    //English
122
  { "Change channel",    //English
103
    "Kanal wechseln",    //German
123
    "Kanal wechseln",    //German
Lines 116-121 Link Here
116
    "",                  //Hugarian
136
    "",                  //Hugarian
117
    "Canvi cadena",      //Catalan
137
    "Canvi cadena",      //Catalan
118
    "ßÕàÕÚÛîçØâì ÚÐÝÐÛ", //Russian
138
    "ßÕàÕÚÛîçØâì ÚÐÝÐÛ", //Russian
139
    "",           //Croatian
140
    "",           //Estonian
141
    "",           //Danish
142
    "Zmìnit kanál",
119
  },
143
  },
120
  { "Jump to...",        //English
144
  { "Jump to...",        //English
121
    "Springe zu...",     //German
145
    "Springe zu...",     //German
Lines 134-139 Link Here
134
    "",                  //Hugarian
158
    "",                  //Hugarian
135
    "Salta a...",        //Catalan
159
    "Salta a...",        //Catalan
136
    "ßÕàÕÙâØ Ú...",      //Russian
160
    "ßÕàÕÙâØ Ú...",      //Russian
161
    "",           //Croatian
162
    "",           //Estonian
163
    "",           //Danish
164
    "Skoèit na...",
137
  },
165
  },
138
  { "Background transparency",   //English
166
  { "Background transparency",   //English
139
    "Hintergrund-Transparenz",   //German
167
    "Hintergrund-Transparenz",   //German
Lines 152-157 Link Here
152
    "",                          //Hugarian
180
    "",                          //Hugarian
153
    "Transparència del fons",    //Catalan
181
    "Transparència del fons",    //Catalan
154
    "ÁâÕßÕÝì ßàÞ×àÐçÝÞáâØ äÞÝÐ", //Russian
182
    "ÁâÕßÕÝì ßàÞ×àÐçÝÞáâØ äÞÝÐ", //Russian
183
    "",           //Croatian
184
    "",           //Estonian
185
    "",           //Danish
186
    "Prùhlednost pozadí",
155
  },
187
  },
156
  { "Red key",            //English
188
  { "Red key",            //English
157
    "Rote Taste",         //German
189
    "Rote Taste",         //German
Lines 170-175 Link Here
170
    "",                   //Hugarian
202
    "",                   //Hugarian
171
    "Tecla vermella",     //Catalan
203
    "Tecla vermella",     //Catalan
172
    "ºàÐáÝÐï ÚÝÞßÚÐ",     //Russian
204
    "ºàÐáÝÐï ÚÝÞßÚÐ",     //Russian
205
    "",           //Croatian
206
    "",           //Estonian
207
    "",           //Danish
208
    "Èervená klávesa",
173
  },
209
  },
174
  { "  Page number",      //English
210
  { "  Page number",      //English
175
    "  Seitenzahl",       //German
211
    "  Seitenzahl",       //German
Lines 188-193 Link Here
188
    "",                   //Hugarian
224
    "",                   //Hugarian
189
    "  Nombre de pàgina", //Catalan
225
    "  Nombre de pàgina", //Catalan
190
    "  ½ÞÜÕà áâàÐÝØæë",   //Russian
226
    "  ½ÞÜÕà áâàÐÝØæë",   //Russian
227
    "",           //Croatian
228
    "",           //Estonian
229
    "",           //Danish
230
    "  Èíslo stránky",
191
  },
231
  },
192
  { "Green key",          //English
232
  { "Green key",          //English
193
    "Grüne Taste",        //German
233
    "Grüne Taste",        //German
Lines 206-211 Link Here
206
    "",                   //Hugarian
246
    "",                   //Hugarian
207
    "Tecla verda",        //Catalan
247
    "Tecla verda",        //Catalan
208
    "·ÕÛñÝÐï ÚÝÞßÚÐ",     //Russian
248
    "·ÕÛñÝÐï ÚÝÞßÚÐ",     //Russian
249
    "",           //Croatian
250
    "",           //Estonian
251
    "",           //Danish
252
    "Zelená klávesa",
209
  },
253
  },
210
  { "Yellow key",         //English
254
  { "Yellow key",         //English
211
    "Gelbe Taste",        //German
255
    "Gelbe Taste",        //German
Lines 224-229 Link Here
224
    "",                   //Hugarian
268
    "",                   //Hugarian
225
    "Tecla groga",        //Catalan
269
    "Tecla groga",        //Catalan
226
    "¶ñÛâÐï ÚÝÞßÚÐ",      //Russian
270
    "¶ñÛâÐï ÚÝÞßÚÐ",      //Russian
271
    "",           //Croatian
272
    "",           //Estonian
273
    "",           //Danish
274
    "®lutá klávesa",
227
  },
275
  },
228
  { "Blue key",           //English
276
  { "Blue key",           //English
229
    "Blaue Taste",        //German
277
    "Blaue Taste",        //German
Lines 242-247 Link Here
242
    "",                   //Hugarian
290
    "",                   //Hugarian
243
    "Tecla blava",        //Catalan
291
    "Tecla blava",        //Catalan
244
    "ÁØÝïï ÚÝÞßÚÐ",       //Russian
292
    "ÁØÝïï ÚÝÞßÚÐ",       //Russian
293
    "",           //Croatian
294
    "",           //Estonian
295
    "",           //Danish
296
    "Modrá klávesa",
245
  },
297
  },
246
  { "Channel (press OK): ",        //English
298
  { "Channel (press OK): ",        //English
247
    "Sender (OK drücken): ",       //German
299
    "Sender (OK drücken): ",       //German
Lines 260-265 Link Here
260
    "",                            //Hugarian
312
    "",                            //Hugarian
261
    "Canal (premi OK):",           //Catalan
313
    "Canal (premi OK):",           //Catalan
262
    "ºÐÝÐÛ (½ÐÖÜØâÕ ¾º)",          //Russian
314
    "ºÐÝÐÛ (½ÐÖÜØâÕ ¾º)",          //Russian
315
    "",           //Croatian
316
    "",           //Estonian
317
    "",           //Danish
318
    "Kanál (stisknout OK)",
263
  },
319
  },
264
  { "Show clock",            //English
320
  { "Show clock",            //English
265
    "Uhr anzeigen",          //German
321
    "Uhr anzeigen",          //German
Lines 278-283 Link Here
278
    "",                      //Hugarian
334
    "",                      //Hugarian
279
    "Visualitza l'hora", //Catalan
335
    "Visualitza l'hora", //Catalan
280
    "¿ÞÚÐ×ëÒÐâì çÐáë",       //Russian
336
    "¿ÞÚÐ×ëÒÐâì çÐáë",       //Russian
337
    "",           //Croatian
338
    "",           //Estonian
339
    "",           //Danish
340
    "Zobrazit èas",
281
  },
341
  },
282
  { "Setup$Suspend receiving",    //English
342
  { "Setup$Suspend receiving",    //English
283
    "Empfang unterbrechen",       //German
343
    "Empfang unterbrechen",       //German
Lines 296-301 Link Here
296
    "",                           //Hugarian
356
    "",                           //Hugarian
297
    "Suspèn la recepció",         //Catalan
357
    "Suspèn la recepció",         //Catalan
298
    "¿àØÞáâÐÝÞÒØâì ßàØñÜ",        //Russian
358
    "¿àØÞáâÐÝÞÒØâì ßàØñÜ",        //Russian
359
    "",           //Croatian
360
    "",           //Estonian
361
    "",           //Danish
362
    "Pøeru¹it pøíjem",
299
  },
363
  },
300
  { "Suspend receiving",          //English
364
  { "Suspend receiving",          //English
301
    "Empfang unterbrechen",       //German
365
    "Empfang unterbrechen",       //German
Lines 314-319 Link Here
314
    "",                           //Hugarian
378
    "",                           //Hugarian
315
    "Suspèn la recepció",         //Catalan
379
    "Suspèn la recepció",         //Catalan
316
    "ßàØÞáâÐÝÞÒØâì ßàØñÜ",        //Russian
380
    "ßàØÞáâÐÝÞÒØâì ßàØñÜ",        //Russian
381
    "",           //Croatian
382
    "",           //Estonian
383
    "",           //Danish
384
    "Pøeru¹it pøíjem",
317
  },
385
  },
318
  { "Switch background",        //English
386
  { "Switch background",        //English
319
    "Hintergrund ändern",       //German
387
    "Hintergrund ändern",       //German
Lines 332-337 Link Here
332
    "",                         //Hugarian
400
    "",                         //Hugarian
333
    "Canvia el fons",           //Catalan
401
    "Canvia el fons",           //Catalan
334
    "ÝÕßàÞ×àÐçÝëÙ äÞÝ",         //Russian
402
    "ÝÕßàÞ×àÐçÝëÙ äÞÝ",         //Russian
403
    "",           //Croatian
404
    "",           //Estonian
405
    "",           //Danish
406
    "Pøepnout pozadí",
335
  },
407
  },
336
  { "Auto-update pages",                  //English
408
  { "Auto-update pages",                  //English
337
    "Seiten aktualisieren",               //German
409
    "Seiten aktualisieren",               //German
Lines 350-355 Link Here
350
    "",                                   //Hugarian
422
    "",                                   //Hugarian
351
    "Actualització pàgines automàtica",   //Catalan
423
    "Actualització pàgines automàtica",   //Catalan
352
    "°ÒâÞÞÑÝÞÒÛÕÝØÕ áâàÐÝØæ",             //Russian
424
    "°ÒâÞÞÑÝÞÒÛÕÝØÕ áâàÐÝØæ",             //Russian
425
    "",           //Croatian
426
    "",           //Estonian
427
    "",           //Danish
428
    "Auto-aktualizace stránek",
353
  },
429
  },
354
  { "OSD height",       //English
430
  { "OSD height",       //English
355
    "OSD-Höhe",         //German
431
    "OSD-Höhe",         //German
Lines 368-373 Link Here
368
    "",                 //Hugarian
444
    "",                 //Hugarian
369
    "Altura OSD",       //Catalan
445
    "Altura OSD",       //Catalan
370
    "²ëáÞâÐ ÜÕÝî",      //Russian
446
    "²ëáÞâÐ ÜÕÝî",      //Russian
447
    "",           //Croatian
448
    "",           //Estonian
449
    "",           //Danish
450
    "Vý¹ka",
371
  },
451
  },
372
  { "OSD width",        //English
452
  { "OSD width",        //English
373
    "OSD-Breite",       //German
453
    "OSD-Breite",       //German
Lines 386-391 Link Here
386
    "",                 //Hugarian
466
    "",                 //Hugarian
387
    "Amplària OSD",     //Catalan
467
    "Amplària OSD",     //Catalan
388
    "ÈØàØÝÐ ÜÕÝî",      //Russian
468
    "ÈØàØÝÐ ÜÕÝî",      //Russian
469
    "",           //Croatian
470
    "",           //Estonian
471
    "",           //Danish
472
    "©íøka",
389
  },
473
  },
390
  { "OSD horizontal align",      //English
474
  { "OSD horizontal align",      //English
391
    "OSD horizontale Anordnung", //German
475
    "OSD horizontale Anordnung", //German
Lines 404-409 Link Here
404
    "",                          //Hugarian
488
    "",                          //Hugarian
405
    "",                          //Catalan
489
    "",                          //Catalan
406
    "",                          //Russian
490
    "",                          //Russian
491
    "",           //Croatian
492
    "",           //Estonian
493
    "",           //Danish
494
    "Horizontální zarovnání",
407
  },
495
  },
408
  { "OSD vertical align",        //English
496
  { "OSD vertical align",        //English
409
    "OSD vertikale Anordnung",   //German
497
    "OSD vertikale Anordnung",   //German
Lines 422-427 Link Here
422
    "",                          //Hugarian
510
    "",                          //Hugarian
423
    "",                          //Catalan
511
    "",                          //Catalan
424
    "",                          //Russian
512
    "",                          //Russian
513
    "",           //Croatian
514
    "",           //Estonian
515
    "",           //Danish
516
    "Vertikální zarovnání",
425
  },
517
  },
426
  { "Displays teletext on the OSD",           //English
518
  { "Displays teletext on the OSD",           //English
427
    "Zeigt den Videotext auf dem OSD an",     //German
519
    "Zeigt den Videotext auf dem OSD an",     //German
Lines 440-499 Link Here
440
    "",                                       //Hugarian
532
    "",                                       //Hugarian
441
    "Visualitza el teletext en l'OSD",        //Catalan
533
    "Visualitza el teletext en l'OSD",        //Catalan
442
    "¿ÞÚÐ× âÕÛÕâÕÚáâÐ Ò ÜÕÝî",                //Russian
534
    "¿ÞÚÐ× âÕÛÕâÕÚáâÐ Ò ÜÕÝî",                //Russian
443
  },
535
    "",           //Croatian
444
  { "Play",       //English
536
    "",           //Estonian
445
    "Abspielen",  //German
537
    "",           //Danish
446
    "",           //Slovenian
538
    "Zobrazí teletext v OSD",
447
    "",           //Italian
448
    "",           //Dutch
449
    "",           //Portuguese
450
    "",           //French
451
    "",           //Norwegian
452
    "",           //Finnish
453
    "",           //Polish
454
    "",           //Spanish
455
    "",           //Greek
456
    "",           //Swedish
457
    "",           //Romanian
458
    "",           //Hugarian
459
    "",           //Catalan
460
    "",           //Russian
461
  },
462
  { "FastFwd",    //English
463
    "Schneller Vorlauf",      //German
464
    "",           //Slovenian
465
    "",           //Italian
466
    "",           //Dutch
467
    "",           //Portuguese
468
    "",           //French
469
    "",           //Norwegian
470
    "",           //Finnish
471
    "",           //Polish
472
    "",           //Spanish
473
    "",           //Greek
474
    "",           //Swedish
475
    "",           //Romanian
476
    "",           //Hugarian
477
    "",           //Catalan
478
    "",           //Russian
479
  },
480
  { "FastRew",    //English
481
    "Schneller Rücklauf",      //German
482
    "",           //Slovenian
483
    "",           //Italian
484
    "",           //Dutch
485
    "",           //Portuguese
486
    "",           //French
487
    "",           //Norwegian
488
    "",           //Finnish
489
    "",           //Polish
490
    "",           //Spanish
491
    "",           //Greek
492
    "",           //Swedish
493
    "",           //Romanian
494
    "",           //Hugarian
495
    "",           //Catalan
496
    "",           //Russian
497
  },
539
  },
498
  { NULL }
540
  { NULL }
499
  };
541
  };
(-)osdteletext-0.5.1.orig/Makefile (-1 / +1 lines)
Lines 50-56 Link Here
50
50
51
### The object files (add further files here):
51
### The object files (add further files here):
52
52
53
OBJS = $(PLUGIN).o menu.o txtfont.o i18n.o txtrecv.o txtrender.o displaybase.o display.o
53
OBJS = $(PLUGIN).o menu.o txtfont.o i18n.o txtrecv.o txtrender.o displaybase.o display.o hamm.o
54
54
55
### Implicit rules:
55
### Implicit rules:
56
56
(-)osdteletext-0.5.1.orig/menu.c (-1 / +1 lines)
Lines 568-574 Link Here
568
   t.Start();
568
   t.Start();
569
   #endif
569
   #endif
570
570
571
   unsigned char cache[40*24+12];
571
   unsigned char cache[TELEPAGE_SIZE+12+4+TRIPPLETS_SIZE*sizeof(int)];
572
   StorageHandle fd;
572
   StorageHandle fd;
573
   // Take a look if there is a xxx-00 page
573
   // Take a look if there is a xxx-00 page
574
   Storage *s=Storage::instance();
574
   Storage *s=Storage::instance();
(-)osdteletext-0.5.1.orig/osdteletext.c (+1 lines)
Lines 113-118 Link Here
113
      delete txtStatus;
113
      delete txtStatus;
114
   if (channelStatus)
114
   if (channelStatus)
115
      delete channelStatus;
115
      delete channelStatus;
116
   Storage::instance()->cleanUp();
116
}
117
}
117
118
118
const char *cPluginTeletextosd::CommandLineHelp(void)
119
const char *cPluginTeletextosd::CommandLineHelp(void)
(-)osdteletext-0.5.1.orig/txtfont.c (-242 / +368 lines)
Lines 1-4 Link Here
1
#include "txtfont.h"
1
#include "txtfont.h"
2
#include <vdr/tools.h>
2
3
3
unsigned int TXT_Mask[11]= {
4
unsigned int TXT_Mask[11]= {
4
   0x0000,  // ************ ****
5
   0x0000,  // ************ ****
Lines 86-92 Link Here
86
   0x0000,  // ************ ****
87
   0x0000,  // ************ ****
87
   0x0000   // ************ ****
88
   0x0000   // ************ ****
88
  },
89
  },
89
  { // 0x26 = & 
90
  { // 0x26 = &
90
   0x0000,  // ************ ****
91
   0x0000,  // ************ ****
91
   0x1E00,  // ***####***** ****
92
   0x1E00,  // ***####***** ****
92
   0x3300,  // **##**##**** ****
93
   0x3300,  // **##**##**** ****
Lines 1196-1202 Link Here
1196
   0x0000,  // ************ ****
1197
   0x0000,  // ************ ****
1197
   0x0000   // ************ ****
1198
   0x0000   // ************ ****
1198
  },
1199
  },
1199
  { // 0x82 = 
1200
  { // 0x82 =
1200
   0x0000,  // ************ ****
1201
   0x0000,  // ************ ****
1201
   0x3000,  // **##******** ****
1202
   0x3000,  // **##******** ****
1202
   0x7000,  // *###******** ****
1203
   0x7000,  // *###******** ****
Lines 1208-1214 Link Here
1208
   0x07E0,  // *****######* ****
1209
   0x07E0,  // *****######* ****
1209
   0x0060   // *********##* ****
1210
   0x0060   // *********##* ****
1210
  },
1211
  },
1211
  { // 0x83 = 
1212
  { // 0x83 =
1212
   0x0000,  // ************ ****
1213
   0x0000,  // ************ ****
1213
   0x0FC0,  // ****######** ****
1214
   0x0FC0,  // ****######** ****
1214
   0x1860,  // ***##****##* ****
1215
   0x1860,  // ***##****##* ****
Lines 1220-1274 Link Here
1220
   0x0000,  // ************ ****
1221
   0x0000,  // ************ ****
1221
   0x0000   // ************ ****
1222
   0x0000   // ************ ****
1222
  },
1223
  },
1223
  { // 0x84 = 
1224
  { // 0x84 =
1224
   0x0600,  // *****##***** ****
1225
   0x0700,  // *****###**** ****
1225
   0x3FC0,  // **########** ****
1226
   0x0D80,  // ****##*##*** ****
1226
   0x6660,  // *##**##**##* ****
1227
   0x0700,  // *****###**** ****
1227
   0x6600,  // *##**##***** ****
1228
   0x3060,  // **##*****##* ****
1228
   0x3FC0,  // **########** ****
1229
   0x3060,  // **##*****##* ****
1229
   0x0660,  // *****##**##* ****
1230
   0x3060,  // **##*****##* ****
1230
   0x6660,  // *##**##**##* ****
1231
   0x30E0,  // **##****###* ****
1231
   0x3FC0,  // **########** ****
1232
   0x1F60,  // ***#####*##* ****
1232
   0x0600,  // *****##***** ****
1233
   0x0000,  // ************ ****
1233
   0x0000   // ************ ****
1234
   0x0000   // ************ ****
1234
  },
1235
  },
1235
  { // 0x85 = 
1236
  { // 0x85 =
1236
   0x07F0,  // *****####### ****
1237
   0x06C0,  // *****##*##** ****
1237
   0x0C00,  // ****##****** ****
1238
   0x0380,  // ******###*** ****
1238
   0x19F0,  // ***##**##### ****
1239
   0x0000,  // ************ ****
1240
   0x0FE0,  // ****#######* ****
1239
   0x1800,  // ***##******* ****
1241
   0x1800,  // ***##******* ****
1240
   0x19F0,  // ***##**##### ****
1242
   0x3000,  // **##******** ****
1241
   0x1800,  // ***##******* ****
1243
   0x1800,  // ***##******* ****
1242
   0x19F0,  // ***##**##### ****
1244
   0x0FE0,  // ****#######* ****
1243
   0x0C00,  // ****##****** ****
1245
   0x0000,  // ************ ****
1244
   0x07F0,  // *****####### ****
1245
   0x0000   // ************ ****
1246
   0x0000   // ************ ****
1246
  },
1247
  },
1247
  { // 0x86 = 
1248
  { // 0x86 =
1248
   0xFFC0,  // ##########** ****
1249
   0x0D80,  // ****##*##*** ****
1249
   0x1C60,  // ***###***##* ****
1250
   0x0700,  // *****###**** ****
1250
   0x0830,  // ****#*****## ****
1251
   0x0000,  // ************ ****
1251
   0x7F30,  // *#######**## ****
1252
   0x1FC0,  // ***#######** ****
1252
   0x4130,  // *#*****#**## ****
1253
   0x3000,  // **##******** ****
1253
   0x7F30,  // *#######**## ****
1254
   0x1FC0,  // ***#######** ****
1254
   0x0830,  // ****#*****## ****
1255
   0x0060,  // *********##* ****
1255
   0x1C60,  // ***###***##* ****
1256
   0x1FC0,  // ***#######** ****
1256
   0xFFC0,  // ##########** ****
1257
   0x0000,  // ************ ****
1257
   0x0000   // ************ ****
1258
   0x0000   // ************ ****
1258
  },
1259
  },
1259
  { // 0x87 = 
1260
  { // 0x87 =
1260
   0xFFC0,  // ##########** ****
1261
   0x0D80,  // ****##*##*** ****
1261
   0x0060,  // *********##* ****
1262
   0x0700,  // *****###**** ****
1262
   0x3E30,  // **#####***## ****
1263
   0x0000,  // ************ ****
1263
   0x6330,  // *##***##**## ****
1264
   0x33E0,  // **##**#####* ****
1264
   0x0E30,  // ****###***## ****
1265
   0x3C00,  // **####****** ****
1265
   0x1830,  // ***##*****## ****
1266
   0x3000,  // **##******** ****
1266
   0x1830,  // ***##*****## ****
1267
   0x3000,  // **##******** ****
1267
   0x0060,  // *********##* ****
1268
   0x3000,  // **##******** ****
1268
   0xFFC0,  // ##########** ****
1269
   0x0000,  // ************ ****
1269
   0x0000   // ************ ****
1270
   0x0000   // ************ ****
1270
  },
1271
  },
1271
  { // 0x88 = 
1272
  { // 0x88 =
1272
   0x0000,  // ************ ****
1273
   0x0000,  // ************ ****
1273
   0x3980,  // ***##**##*** ****
1274
   0x3980,  // ***##**##*** ****
1274
   0x3980,  // ***##**##*** ****
1275
   0x3980,  // ***##**##*** ****
Lines 1340-1346 Link Here
1340
   0x0000,  // ************ ****
1341
   0x0000,  // ************ ****
1341
   0x0000   // ************ ****
1342
   0x0000   // ************ ****
1342
  },
1343
  },
1343
  { // 0x8E = 
1344
  { // 0x8E =
1344
   0x0000,  // ************ ****
1345
   0x0000,  // ************ ****
1345
   0x0600,  // *****##***** ****
1346
   0x0600,  // *****##***** ****
1346
   0x0F00,  // ****####**** ****
1347
   0x0F00,  // ****####**** ****
Lines 1352-1371 Link Here
1352
   0x0600,  // *****##***** ****
1353
   0x0600,  // *****##***** ****
1353
   0x0600   // *****##***** ****
1354
   0x0600   // *****##***** ****
1354
  },
1355
  },
1355
  { // 0x8F = 
1356
  { // 0x8F =
1357
   0x0D80,  // ****##*##*** ****
1358
   0x0700,  // *****###**** ****
1359
   0x0000,  // ************ ****
1360
   0x1FC0,  // ***#######** ****
1361
   0x3060,  // **##*****##* ****
1362
   0x3FE0,  // **#########* ****
1363
   0x3000,  // **##******** ****
1364
   0x1FC0,  // ***#######** ****
1356
   0x0000,  // ************ ****
1365
   0x0000,  // ************ ****
1357
   0x1980,  // ***##**##*** ****
1358
   0x1980,  // ***##**##*** ****
1359
   0x7FE0,  // *##########* ****
1360
   0x1980,  // ***##**##*** ****
1361
   0x1980,  // ***##**##*** ****
1362
   0x7FE0,  // *##########* ****
1363
   0x1980,  // ***##**##*** ****
1364
   0x1980,  // ***##**##*** ****
1365
   0x0000   // ************ ****
1366
   0x0000   // ************ ****
1366
  },
1367
  },
1367
1368
  { // 0x90 =
1368
  { // 0x90 = 
1369
   0x0300,  // ******##**** ****
1369
   0x0300,  // ******##**** ****
1370
   0x0600,  // *****##***** ****
1370
   0x0600,  // *****##***** ****
1371
   0x3FC0,  // **########** ****
1371
   0x3FC0,  // **########** ****
Lines 1377-1383 Link Here
1377
   0x0000,  // ************ ****
1377
   0x0000,  // ************ ****
1378
   0x0000   // ************ ****
1378
   0x0000   // ************ ****
1379
  },
1379
  },
1380
  { // 0x91 = 
1380
  { // 0x91 =
1381
   0x0300,  // ******##**** ****
1381
   0x0300,  // ******##**** ****
1382
   0x0600,  // *****##***** ****
1382
   0x0600,  // *****##***** ****
1383
   0x0000,  // ************ ****
1383
   0x0000,  // ************ ****
Lines 1389-1419 Link Here
1389
   0x0000,  // ************ ****
1389
   0x0000,  // ************ ****
1390
   0x0000   // ************ ****
1390
   0x0000   // ************ ****
1391
  },
1391
  },
1392
  { // 0x92 = 
1392
  { // 0x92 =
1393
   0x0300,  // ******##**** ****
1394
   0x0600,  // *****##***** ****
1393
   0x0000,  // ************ ****
1395
   0x0000,  // ************ ****
1394
   0x3180,  // **##***##*** ****
1396
   0x3060,  // **##*****##* ****
1397
   0x18C0,  // ***##***##** ****
1398
   0x0D80,  // ****##*##*** ****
1399
   0x0700,  // *****###**** ****
1400
   0x0600,  // *****##***** ****
1401
   0x0C00,  // ****##****** ****
1402
   0x3800   // **###******* ****
1403
  },
1404
  { // 0x93 =
1405
   0x0D80,  // ****##*##*** ****
1406
   0x0700,  // *****###**** ****
1395
   0x0000,  // ************ ****
1407
   0x0000,  // ************ ****
1396
   0x7F80,  // *########*** ****
1408
   0x3FE0,  // **#########* ****
1397
   0x00C0,  // ********##** ****
1409
   0x0180,  // *******##*** ****
1398
   0x3FC0,  // **########** ****
1410
   0x0700,  // *****###**** ****
1399
   0x60C0,  // *##*****##** ****
1411
   0x0C00,  // ****##****** ****
1400
   0x3FE0,  // **#########* ****
1412
   0x3FE0,  // **#########* ****
1401
   0x0000,  // ************ ****
1413
   0x0000,  // ************ ****
1402
   0x0000   // ************ ****
1414
   0x0000   // ************ ****
1403
  },
1415
  },
1404
  { // 0x93 = 
1416
  { // 0x94 =
1405
   0x0000,  // ************ ****
1406
   0x1980,  // ***##**##*** ****
1407
   0x1980,  // ***##**##*** ****
1408
   0x7FE0,  // *##########* ****
1409
   0x1980,  // ***##**##*** ****
1410
   0x1980,  // ***##**##*** ****
1411
   0x7FE0,  // *##########* ****
1412
   0x1980,  // ***##**##*** ****
1413
   0x1980,  // ***##**##*** ****
1414
   0x0000   // ************ ****
1415
  },
1416
  { // 0x94 = 
1417
   0x0000,  // ************ ****
1417
   0x0000,  // ************ ****
1418
   0x6060,  // *##******##* ****
1418
   0x6060,  // *##******##* ****
1419
   0x30C0,  // **##****##** ****
1419
   0x30C0,  // **##****##** ****
Lines 1425-1479 Link Here
1425
   0x6060,  // *##******##* ****
1425
   0x6060,  // *##******##* ****
1426
   0x0000   // ************ ****
1426
   0x0000   // ************ ****
1427
  },
1427
  },
1428
  { // 0x95 = 
1428
  { // 0x95 =
1429
   0xFFC0,  // ##########** ****
1429
   0x001B,  // *******##*## ****
1430
   0x0060,  // *********##* ****
1430
   0x0C0E,  // ****##**###* ****
1431
   0xFF30,  // ########**## ****
1431
   0x0C00,  // ****##****** ****
1432
   0x0030,  // **********## ****
1432
   0x3F80,  // **#######*** ****
1433
   0xFF30,  // ########**## ****
1433
   0x0C00,  // ****##****** ****
1434
   0x0030,  // **********## ****
1434
   0x0C00,  // ****##****** ****
1435
   0xFF30,  // ########**## ****
1435
   0x0C00,  // ****##****** ****
1436
   0x0060,  // *********##* ****
1436
   0x07E0,  // *****######* ****
1437
   0xFFC0,  // ##########** ****
1437
   0x0000,  // ************ ****
1438
   0x0000   // ************ ****
1438
   0x0000   // ************ ****
1439
  },
1439
  },
1440
  { // 0x96 = 
1440
  { // 0x96 =
1441
   0xFFC0,  // ##########** ****
1441
   0x0D80,  // ****##*##*** ****
1442
   0x0700,  // *****###**** ****
1443
   0x1FC0,  // ***#######** ****
1444
   0x3000,  // **##******** ****
1445
   0x1FC0,  // ***#######** ****
1442
   0x0060,  // *********##* ****
1446
   0x0060,  // *********##* ****
1443
   0x3E30,  // **#####***## ****
1444
   0x4730,  // *#***###**## ****
1445
   0x4730,  // *#***###**## ****
1446
   0x7F30,  // *#######**## ****
1447
   0x3E30,  // **#####***## ****
1448
   0x0060,  // *********##* ****
1447
   0x0060,  // *********##* ****
1449
   0xFFC0,  // ##########** ****
1448
   0x1FC0,  // ***#######** ****
1449
   0x0000,  // ************ ****
1450
   0x0000   // ************ ****
1450
   0x0000   // ************ ****
1451
  },
1451
  },
1452
  { // 0x97 = 
1452
  { // 0x97 =
1453
   0xFFC0,  // ##########** ****
1453
   0x0D80,  // ****##*##*** ****
1454
   0x0860,  // ****#****##* ****
1454
   0x0700,  // *****###**** ****
1455
   0x1C30,  // ***###****## ****
1455
   0x3FC0,  // **########** ****
1456
   0x0030,  // **********## ****
1456
   0x0300,  // ******##**** ****
1457
   0x7F30,  // *#######**## ****
1457
   0x0600,  // *****##***** ****
1458
   0x0030,  // **********## ****
1458
   0x0C00,  // ****##****** ****
1459
   0x1C30,  // ***###****## ****
1459
   0x1800,  // ***##******* ****
1460
   0x0860,  // ****#****##* ****
1460
   0x3FC0,  // **########** ****
1461
   0xFFC0,  // ##########** ****
1461
   0x0000,  // ************ ****
1462
   0x0000   // ************ ****
1462
   0x0000   // ************ ****
1463
  },
1463
  },
1464
  { // 0x98 = 
1464
  { // 0x98 =
1465
   0x0000,  // ************ ****
1465
   0x0D80,  // ****##*##*** ****
1466
   0x18C0,  // ***##***##** ****
1466
   0x0700,  // *****###**** ****
1467
   0x0000,  // ************ ****
1467
   0x3FC0,  // **########** ****
1468
   0x1FC0,  // ***#######** ****
1468
   0x3000,  // **##******** ****
1469
   0x3060,  // **##*****##* ****
1469
   0x3F80,  // **#######*** ****
1470
   0x3060,  // **##*****##* ****
1470
   0x3000,  // **##******** ****
1471
   0x3060,  // **##*****##* ****
1471
   0x3000,  // **##******** ****
1472
   0x1FC0,  // ***#######** ****
1472
   0x3FC0,  // **########** ****
1473
   0x0000,  // ************ ****
1473
   0x0000,  // ************ ****
1474
   0x0000   // ************ ****
1474
   0x0000   // ************ ****
1475
  },
1475
  },
1476
  { // 0x99 = 
1476
  { // 0x99 =
1477
   0x0E00,  // ****###***** ****
1477
   0x0E00,  // ****###***** ****
1478
   0x1B00,  // ***##*##**** ****
1478
   0x1B00,  // ***##*##**** ****
1479
   0x0E00,  // ****###***** ****
1479
   0x0E00,  // ****###***** ****
Lines 1486-1527 Link Here
1486
   0x0000   // ************ ****
1486
   0x0000   // ************ ****
1487
  },
1487
  },
1488
  { // 0x9A = 
1488
  { // 0x9A = 
1489
   0x0000,  // ************ ****
1489
   0x0700,  // *****###**** ****
1490
   0x18C0,  // ***##***##** ****
1490
   0x0D80,  // ****##*##*** ****
1491
   0x0000,  // ************ ****
1491
   0x3760,  // **##*###*##* ****
1492
   0x3060,  // **##*****##* ****
1492
   0x3060,  // **##*****##* ****
1493
   0x3060,  // **##*****##* ****
1493
   0x3060,  // **##*****##* ****
1494
   0x3060,  // **##*****##* ****
1494
   0x3060,  // **##*****##* ****
1495
   0x30E0,  // **##****###* ****
1495
   0x3060,  // **##*****##* ****
1496
   0x1F60,  // ***#####*##* ****
1496
   0x1FC0,  // ***#######** ****
1497
   0x0000,  // ************ ****
1497
   0x0000,  // ************ ****
1498
   0x0000   // ************ ****
1498
   0x0000   // ************ ****
1499
  },
1499
  },
1500
  { // 0x9B = 
1500
  { // 0x9B = 
1501
   0x18C0,  // ***##***##** ****
1501
   0x0D80,  // ****##*##*** ****
1502
   0x0000,  // ************ ****
1502
   0x0700,  // *****###**** ****
1503
   0x1FC0,  // ***#######** ****
1503
   0x1860,  // ****######** ****
1504
   0x3060,  // **##*****##* ****
1504
   0x3000,  // ***##****##* ****
1505
   0x3060,  // **##*****##* ****
1505
   0x3000,  // **##******** ****
1506
   0x3FE0,  // **#########* ****
1506
   0x3000,  // **##******** ****
1507
   0x3060,  // **##*****##* ****
1507
   0x1860,  // ***##****##* ****
1508
   0x3060,  // **##*****##* ****
1508
   0x0FC0,  // ****######** ****
1509
   0x0000,  // ************ ****
1509
   0x0000,  // ************ ****
1510
   0x0000   // ************ ****
1510
   0x0000   // ************ ****
1511
  },
1511
  },
1512
  { // 0x9C = 
1512
  { // 0x9C = 
1513
   0x18C0,  // ***##***##** ****
1513
   0x1B00,  // ***##*##**** ****
1514
   0x0000,  // ************ ****
1514
   0x0E00,  // ****###***** ****
1515
   0x1FC0,  // ***#######** ****
1515
   0x30C0,  // **#######*** ****
1516
   0x3060,  // **##*****##* ****
1516
   0x3060,  // **##****##** ****
1517
   0x3060,  // **##*****##* ****
1518
   0x3060,  // **##*****##* ****
1517
   0x3060,  // **##*****##* ****
1519
   0x3060,  // **##*****##* ****
1518
   0x3060,  // **##*****##* ****
1520
   0x1FC0,  // ***#######** ****
1519
   0x30C0,  // **##****##** ****
1520
   0x3F80,  // **#######*** ****
1521
   0x0000,  // ************ ****
1521
   0x0000,  // ************ ****
1522
   0x0000   // ************ ****
1522
   0x0000   // ************ ****
1523
  },
1523
  },
1524
  { // 0x9D = 
1524
  { // 0x9D =
1525
   0x0700,  // *****###**** ****
1525
   0x0700,  // *****###**** ****
1526
   0x0700,  // *****###**** ****
1526
   0x0700,  // *****###**** ****
1527
   0x1FC0,  // ***#######** ****
1527
   0x1FC0,  // ***#######** ****
Lines 1533-1561 Link Here
1533
   0x0000,  // ************ ****
1533
   0x0000,  // ************ ****
1534
   0x0000   // ************ ****
1534
   0x0000   // ************ ****
1535
  },
1535
  },
1536
  { // 0x9E = 
1536
  { // 0x9E =
1537
   0x18C0,  // ***##***##** ****
1537
   0x0D80,  // ****##*##*** ****
1538
   0x0000,  // ************ ****
1538
   0x0760,  // *****###*##* ****
1539
   0x3060,  // **##*****##* ****
1539
   0x0060,  // *********##* ****
1540
   0x3060,  // **##*****##* ****
1540
   0x1F60,  // ***#####*##* ****
1541
   0x3060,  // **##*****##* ****
1541
   0x30E0,  // **##****###* ****
1542
   0x3060,  // **##*****##* ****
1542
   0x3060,  // **##*****##* ****
1543
   0x3060,  // **##*****##* ****
1543
   0x3060,  // **##*****##* ****
1544
   0x1FC0,  // ***#######** ****
1544
   0x1FE0,  // ***########* ****
1545
   0x0000,  // ************ ****
1545
   0x0000,  // ************ ****
1546
   0x0000   // ************ ****
1546
   0x0000   // ************ ****
1547
  },
1547
  },
1548
  { // 0x9F = _
1548
  { // 0x9F = 
1549
   0x0000,  // ************ ****
1549
   0x0D80,  // ****##*##*** ****
1550
   0x0000,  // ************ ****
1550
   0x0700,  // *****###**** ****
1551
   0x0000,  // ************ ****
1551
   0x7860,  // *####****##* ****
1552
   0x0000,  // ************ ****
1552
   0x6C60,  // *##*##***##* ****
1553
   0x0000,  // ************ ****
1553
   0x6660,  // *##**##**##* ****
1554
   0x0000,  // ************ ****
1554
   0x6360,  // *##***##*##* ****
1555
   0x0000,  // ************ ****
1555
   0x61E0,  // *##****####* ****
1556
   0x0000,  // ************ ****
1556
   0x60E0,  // *##*****###* ****
1557
   0x0000,  // ************ ****
1557
   0x0000,  // ************ ****
1558
   0x7FE0   // *##########* ****
1558
   0x0000   // ************ ****
1559
  },
1559
  },
1560
1560
1561
1561
Lines 1571-1577 Link Here
1571
   0x0000,  // ************ ****
1571
   0x0000,  // ************ ****
1572
   0x0000   // ************ ****
1572
   0x0000   // ************ ****
1573
  },
1573
  },
1574
  { // 0xA1 = 0x21a 
1574
  { // 0xA1 = 0x21a
1575
   0xFC00,  // ######****** ****
1575
   0xFC00,  // ######****** ****
1576
   0xFC00,  // ######****** ****
1576
   0xFC00,  // ######****** ****
1577
   0xFC00,  // ######****** ****
1577
   0xFC00,  // ######****** ****
Lines 1946-1963 Link Here
1946
  },
1946
  },
1947
1947
1948
  { // 0xC0 = 
1948
  { // 0xC0 = 
1949
   0x0600,  // *****##***** ****
1949
   0x0D80,  // ****##*##*** ****
1950
   0x0C00,  // ****##****** ****
1950
   0x0700,  // *****###**** ****
1951
   0x0000,  // ************ ****
1951
   0x0000,  // ************ ****
1952
   0x3FC0,  // **########** ****
1952
   0x37C0,  // **##*#####** ****
1953
   0x6060,  // *##******##* ****
1953
   0x3860,  // **###****##* ****
1954
   0x7FE0,  // *##########* ****
1954
   0x3060,  // **##*****##* ****
1955
   0x6000,  // *##********* ****
1955
   0x3060,  // **##*****##* ****
1956
   0x3FC0,  // **########** ****
1956
   0x3060,  // **##*****##* ****
1957
   0x0000,  // ************ ****
1957
   0x0000,  // ************ ****
1958
   0x0000   // ************ ****
1958
   0x0000   // ************ ****
1959
  },
1959
  },
1960
  { // 0xC1 = 
1960
  { // 0xC1 =
1961
   0x0600,  // *****##***** ****
1961
   0x0600,  // *****##***** ****
1962
   0x0300,  // ******##**** ****
1962
   0x0300,  // ******##**** ****
1963
   0x0000,  // ************ ****
1963
   0x0000,  // ************ ****
Lines 1969-1975 Link Here
1969
   0x1F60,  // ***#####*##* ****
1969
   0x1F60,  // ***#####*##* ****
1970
   0x0000   // ************ ****
1970
   0x0000   // ************ ****
1971
  },
1971
  },
1972
  { // 0xC2 = 
1972
  { // 0xC2 =
1973
   0x0C00,  // ****##****** ****
1973
   0x0C00,  // ****##****** ****
1974
   0x0600,  // *****##***** ****
1974
   0x0600,  // *****##***** ****
1975
   0x0000,  // ************ ****
1975
   0x0000,  // ************ ****
Lines 1982-2019 Link Here
1982
   0x0000   // ************ ****
1982
   0x0000   // ************ ****
1983
  },
1983
  },
1984
  { // 0xC3 = 
1984
  { // 0xC3 = 
1985
   0x0000,  // ************ ****
1985
   0x0D80,  // ****##*##*** ****
1986
   0x0FC0,  // ****######** ****
1986
   0x0700,  // *****###**** ****
1987
   0x1860,  // ***##****##* ****
1987
   0x3FC0,  // **########** ****
1988
   0x0C00,  // ****##****** ****
1988
   0x3060,  // **##*****##* ****
1989
   0x3F00,  // **######**** ****
1989
   0x3FC0,  // **########** ****
1990
   0x0C00,  // ****##****** ****
1990
   0x3300,  // **##**##**** ****
1991
   0x3E60,  // **#####**##* ****
1991
   0x31C0,  // **##***###** ****
1992
   0x33C0,  // **##**####** ****
1992
   0x30E0,  // **##****###* ****
1993
   0x0000,  // ************ ****
1993
   0x0000,  // ************ ****
1994
   0x0000   // ************ ****
1994
   0x0000   // ************ ****
1995
  },
1995
  },
1996
  { // 0xC4 = 
1996
  { // 0xC4 =
1997
   0x0D80,  // ****##*##*** ****
1998
   0x0700,  // *****###**** ****
1999
   0x7FE0,  // *##########* ****
1997
   0x0600,  // *****##***** ****
2000
   0x0600,  // *****##***** ****
1998
   0x3FC0,  // **########** ****
2001
   0x0600,  // *****##***** ****
1999
   0x6660,  // *##**##**##* ****
2002
   0x0600,  // *****##***** ****
2000
   0x6600,  // *##**##***** ****
2003
   0x0600,  // *****##***** ****
2001
   0x3FC0,  // **########** ****
2004
   0x0600,  // *****##***** ****
2002
   0x0660,  // *****##**##* ****
2005
   0x0000,  // ************ ****
2003
   0x6660,  // *##**##**##* ****
2004
   0x3F60,  // **########** ****
2005
   0x06C0,  // *****##***** ****
2006
   0x0000   // ************ ****
2006
   0x0000   // ************ ****
2007
  },
2007
  },
2008
  { // 0xC5 = 
2008
  { // 0xC5 = 
2009
   0x3CC0,  // **####**##** ****
2009
   0x0300,  // ******##**** ****
2010
   0x6780,  // *##**####*** ****
2010
   0x6660,  // *##**##**##* ****
2011
   0x0000,  // ************ ****
2011
   0x30C0,  // **##****##** ****
2012
   0x7F80,  // *########*** ****
2012
   0x1980,  // ***##**##*** ****
2013
   0x00C0,  // ********##** ****
2013
   0x0F00,  // ****####**** ****
2014
   0x3FC0,  // **########** ****
2014
   0x0600,  // *****##***** ****
2015
   0x60C0,  // *##*****##** ****
2015
   0x0600,  // *****##***** ****
2016
   0x3FE0,  // **#########* ****
2016
   0x0600,  // *****##***** ****
2017
   0x0000,  // ************ ****
2017
   0x0000,  // ************ ****
2018
   0x0000   // ************ ****
2018
   0x0000   // ************ ****
2019
  },
2019
  },
Lines 2029-2035 Link Here
2029
   0x0000,  // ************ ****
2029
   0x0000,  // ************ ****
2030
   0x0000   // ************ ****
2030
   0x0000   // ************ ****
2031
  },
2031
  },
2032
  { // 0xC7 = 
2032
  { // 0xC7 =
2033
   0x0000,  // ************ ****
2033
   0x0000,  // ************ ****
2034
   0x0000,  // ************ ****
2034
   0x0000,  // ************ ****
2035
   0x0000,  // ************ ****
2035
   0x0000,  // ************ ****
Lines 2053-2059 Link Here
2053
   0x0000,  // ************ ****
2053
   0x0000,  // ************ ****
2054
   0x0000   // ************ ****
2054
   0x0000   // ************ ****
2055
  },
2055
  },
2056
  { // 0xC9 = 
2056
  { // 0xC9 =
2057
   0x0600,  // *****##***** ****
2057
   0x0600,  // *****##***** ****
2058
   0x0300,  // ******##**** ****
2058
   0x0300,  // ******##**** ****
2059
   0x0000,  // ************ ****
2059
   0x0000,  // ************ ****
Lines 2065-2071 Link Here
2065
   0x0000,  // ************ ****
2065
   0x0000,  // ************ ****
2066
   0x0000   // ************ ****
2066
   0x0000   // ************ ****
2067
  },
2067
  },
2068
  { // 0xCA = 
2068
  { // 0xCA =
2069
   0x0C00,  // ****##****** ****
2069
   0x0C00,  // ****##****** ****
2070
   0x0600,  // *****##***** ****
2070
   0x0600,  // *****##***** ****
2071
   0x0000,  // ************ ****
2071
   0x0000,  // ************ ****
Lines 2101-2107 Link Here
2101
   0x0300,  // ******##**** ****
2101
   0x0300,  // ******##**** ****
2102
   0x0E00   // ****###***** ****
2102
   0x0E00   // ****###***** ****
2103
  },
2103
  },
2104
  { // 0xCD = 
2104
  { // 0xCD =
2105
   0x0000,  // ************ ****
2105
   0x0000,  // ************ ****
2106
   0x0000,  // ************ ****
2106
   0x0000,  // ************ ****
2107
   0x0600,  // *****##***** ****
2107
   0x0600,  // *****##***** ****
Lines 2125-2131 Link Here
2125
   0x0600,  // *****##***** ****
2125
   0x0600,  // *****##***** ****
2126
   0x0600   // *****##***** ****
2126
   0x0600   // *****##***** ****
2127
  },
2127
  },
2128
  { // 0xCF = 
2128
  { // 0xCF =
2129
   0x0000,  // ************ ****
2129
   0x0000,  // ************ ****
2130
   0x1980,  // ***##**##*** ****
2130
   0x1980,  // ***##**##*** ****
2131
   0x1980,  // ***##**##*** ****
2131
   0x1980,  // ***##**##*** ****
Lines 2162-2168 Link Here
2162
   0x0000,  // ************ ****
2162
   0x0000,  // ************ ****
2163
   0x0000   // ************ ****
2163
   0x0000   // ************ ****
2164
  },
2164
  },
2165
  { // 0xD2 = 
2165
  { // 0xD2 =
2166
   0x0E00,  // ****###***** ****
2166
   0x0E00,  // ****###***** ****
2167
   0x1B00,  // ***##*##**** ****
2167
   0x1B00,  // ***##*##**** ****
2168
   0x0000,  // ************ ****
2168
   0x0000,  // ************ ****
Lines 2174-2192 Link Here
2174
   0x0000,  // ************ ****
2174
   0x0000,  // ************ ****
2175
   0x0000   // ************ ****
2175
   0x0000   // ************ ****
2176
  },
2176
  },
2177
  { // 0xD3 = 
2177
          { // 0xD3 =
2178
   0x0300,  // ******##**** ****
2178
           0x0300,  // ******##**** ****
2179
   0x0600,  // *****##***** ****
2179
           0x0600,  // *****##***** ****
2180
   0x0000,  // ************ ****
2180
           0x0000,  // ************ ****
2181
   0x1FC0,  // ***#######** ****
2181
           0x1FC0,  // ***#######** ****
2182
   0x3060,  // **##*****##* ****
2182
           0x3060,  // **##*****##* ****
2183
   0x3FE0,  // **#########* ****
2183
           0x3FE0,  // **#########* ****
2184
   0x3000,  // **##******** ****
2184
           0x3000,  // **##******** ****
2185
   0x1FC0,  // ***#######** ****
2185
           0x1FC0,  // ***#######** ****
2186
   0x0000,  // ************ ****
2186
           0x0000,  // ************ ****
2187
   0x0000   // ************ ****
2187
           0x0000   // ************ ****
2188
  },
2188
          },
2189
  { // 0xD4 = 
2189
  { // 0xD4 =
2190
   0x0000,  // ************ ****
2190
   0x0000,  // ************ ****
2191
   0x1980,  // ***##**##*** ****
2191
   0x1980,  // ***##**##*** ****
2192
   0x0000,  // ************ ****
2192
   0x0000,  // ************ ****
Lines 2198-2204 Link Here
2198
   0x0000,  // ************ ****
2198
   0x0000,  // ************ ****
2199
   0x0000   // ************ ****
2199
   0x0000   // ************ ****
2200
  },
2200
  },
2201
  { // 0xD5 = 
2201
  { // 0xD5 =
2202
   0x1E60,  // ***####**##* ****
2202
   0x1E60,  // ***####**##* ****
2203
   0x33C0,  // **##**####** ****
2203
   0x33C0,  // **##**####** ****
2204
   0x1F80,  // ***######*** ****
2204
   0x1F80,  // ***######*** ****
Lines 2294-2300 Link Here
2294
   0x0000,  // ************ ****
2294
   0x0000,  // ************ ****
2295
   0x0000   // ************ ****
2295
   0x0000   // ************ ****
2296
  },
2296
  },
2297
  { // 0xDD = 
2297
  { // 0xDD =
2298
   0x0600,  // *****##***** ****
2298
   0x0600,  // *****##***** ****
2299
   0x0300,  // ******##**** ****
2299
   0x0300,  // ******##**** ****
2300
   0x0000,  // ************ ****
2300
   0x0000,  // ************ ****
Lines 2306-2312 Link Here
2306
   0x0000,  // ************ ****
2306
   0x0000,  // ************ ****
2307
   0x0000   // ************ ****
2307
   0x0000   // ************ ****
2308
  },
2308
  },
2309
  { // 0xDE = 
2309
  { // 0xDE =
2310
   0x0F00,  // ****####**** ****
2310
   0x0F00,  // ****####**** ****
2311
   0x1980,  // ***##**##*** ****
2311
   0x1980,  // ***##**##*** ****
2312
   0x0000,  // ************ ****
2312
   0x0000,  // ************ ****
Lines 2318-2324 Link Here
2318
   0x0000,  // ************ ****
2318
   0x0000,  // ************ ****
2319
   0x0000   // ************ ****
2319
   0x0000   // ************ ****
2320
  },
2320
  },
2321
  { // 0xDF = 
2321
  { // 0xDF =
2322
   0x0000,  // ************ ****
2322
   0x0000,  // ************ ****
2323
   0x1980,  // ***##**##*** ****
2323
   0x1980,  // ***##**##*** ****
2324
   0x1980,  // ***##**##*** ****
2324
   0x1980,  // ***##**##*** ****
Lines 2355-2361 Link Here
2355
   0x0000,  // ************ ****
2355
   0x0000,  // ************ ****
2356
   0x0000   // ************ ****
2356
   0x0000   // ************ ****
2357
  },
2357
  },
2358
  { // 0xE2 = 
2358
  { // 0xE2 =
2359
   0x0000,  // ************ ****
2359
   0x0000,  // ************ ****
2360
   0x18C0,  // ***##***##** ****
2360
   0x18C0,  // ***##***##** ****
2361
   0x0000,  // ************ ****
2361
   0x0000,  // ************ ****
Lines 2367-2373 Link Here
2367
   0x0000,  // ************ ****
2367
   0x0000,  // ************ ****
2368
   0x0000   // ************ ****
2368
   0x0000   // ************ ****
2369
  },
2369
  },
2370
  { // 0xE3 = 
2370
  { // 0xE3 =
2371
   0x0000,  // ************ ****
2371
   0x0000,  // ************ ****
2372
   0x0000,  // ************ ****
2372
   0x0000,  // ************ ****
2373
   0x0000,  // ************ ****
2373
   0x0000,  // ************ ****
Lines 2379-2385 Link Here
2379
   0x0300,  // ******##**** ****
2379
   0x0300,  // ******##**** ****
2380
   0x0E00   // ****###***** ****
2380
   0x0E00   // ****###***** ****
2381
  },
2381
  },
2382
  { // 0xE4 = 
2382
  { // 0xE4 =
2383
   0x0600,  // *****##***** ****
2383
   0x0600,  // *****##***** ****
2384
   0x3FC0,  // **########** ****
2384
   0x3FC0,  // **########** ****
2385
   0x6660,  // *##**##**##* ****
2385
   0x6660,  // *##**##**##* ****
Lines 2427-2433 Link Here
2427
   0x0000,  // ************ ****
2427
   0x0000,  // ************ ****
2428
   0x0000   // ************ ****
2428
   0x0000   // ************ ****
2429
  },
2429
  },
2430
  { // 0xE8 = 
2430
  { // 0xE8 =
2431
   0x1E60,  // ***####**##* ****
2431
   0x1E60,  // ***####**##* ****
2432
   0x33C0,  // **##**####** ****
2432
   0x33C0,  // **##**####** ****
2433
   0x0000,  // ************ ****
2433
   0x0000,  // ************ ****
Lines 2451-2457 Link Here
2451
   0x0000,  // ************ ****
2451
   0x0000,  // ************ ****
2452
   0x0000   // ************ ****
2452
   0x0000   // ************ ****
2453
  },
2453
  },
2454
  { // 0xEA = 
2454
  { // 0xEA =
2455
   0x0C00,  // ****##****** ****
2455
   0x0C00,  // ****##****** ****
2456
   0x0600,  // *****##***** ****
2456
   0x0600,  // *****##***** ****
2457
   0x0000,  // ************ ****
2457
   0x0000,  // ************ ****
Lines 2717-2723 Link Here
2717
   0x0000   // ************ ****
2717
   0x0000   // ************ ****
2718
  },
2718
  },
2719
2719
2720
  { // 0x60a = 
2720
  { // 0x60a =
2721
   0x0000,  // ************ ****
2721
   0x0000,  // ************ ****
2722
   0x0000,  // ************ ****
2722
   0x0000,  // ************ ****
2723
   0x0000,  // ************ ****
2723
   0x0000,  // ************ ****
Lines 2801-2807 Link Here
2801
   0x03F0,  // ******###### ****
2801
   0x03F0,  // ******###### ****
2802
   0x03F0   // ******###### ****
2802
   0x03F0   // ******###### ****
2803
  },
2803
  },
2804
  { // 0x67a = 
2804
  { // 0x67a =
2805
   0xFFF0,  // ############ ****
2805
   0xFFF0,  // ############ ****
2806
   0xFFF0,  // ############ ****
2806
   0xFFF0,  // ############ ****
2807
   0xFFF0,  // ############ ****
2807
   0xFFF0,  // ############ ****
Lines 2813-2819 Link Here
2813
   0x03F0,  // ******###### ****
2813
   0x03F0,  // ******###### ****
2814
   0x03F0   // ******###### ****
2814
   0x03F0   // ******###### ****
2815
  },
2815
  },
2816
  { // 0x68a = 
2816
  { // 0x68a =
2817
   0x0000,  // ************ ****
2817
   0x0000,  // ************ ****
2818
   0x0000,  // ************ ****
2818
   0x0000,  // ************ ****
2819
   0x0000,  // ************ ****
2819
   0x0000,  // ************ ****
Lines 2849-2855 Link Here
2849
   0x03F0,  // ******###### ****
2849
   0x03F0,  // ******###### ****
2850
   0x03F0   // ******###### ****
2850
   0x03F0   // ******###### ****
2851
  },
2851
  },
2852
  { // 0x6Ba = 
2852
  { // 0x6Ba =
2853
   0xFFF0,  // ############ ****
2853
   0xFFF0,  // ############ ****
2854
   0xFFF0,  // ############ ****
2854
   0xFFF0,  // ############ ****
2855
   0xFFF0,  // ############ ****
2855
   0xFFF0,  // ############ ****
Lines 3104-3143 Link Here
3104
  }
3104
  }
3105
};
3105
};
3106
   
3106
   
3107
3108
3109
int NationalOptionSubsetG0Default[13]=
3110
    {0x23,0x94,0x80,0   ,0   ,0   ,0x5e,0x5f,0   ,0   ,0   ,0   ,0   };
3111
3112
int NationalOptionSubsetCZ_SK[13]=
3113
    {0x23,0   ,0   ,0   ,0   ,0   ,0xed,0   ,0xec,0xeb,0   ,0xef,0   };
3114
int NationalOptionSubsetEN[13]=
3107
int NationalOptionSubsetEN[13]=
3115
    {0x83,0x24,0x80,0x8b,0x8c,0x8d,0x8e,0x23,0x81,0x82,0x88,0x89,0x8a};
3108
    {0x83,0x24,0x80,0x8b,0x8c,0x8d,0x8e,0x23,0x81,0x82,0x88,0x89,0x8a};
3116
int NationalOptionSubsetEE[13]=
3117
    {0x23,0xc6,0   ,0x5b,0x5c,0   ,0x5d,0xd6,0   ,0x7b,0x7c,0   ,0x7d};
3118
int NationalOptionSubsetFR[13]=
3119
    {0xd3,0xd4,0xd0,0xdb,0xdc,0xc1,0xde,0x23,0xd1,0xd2,0xd8,0xd9,0xcc};
3120
int NationalOptionSubsetDE[13]=
3109
int NationalOptionSubsetDE[13]=
3121
    {0x23,0x24,0x40,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x7b,0x7c,0x7d,0x7e};
3110
    {0x23,0x24,0x40,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x7b,0x7c,0x7d,0x7e};
3111
int NationalOptionSubsetSV_FI[13]=
3112
    {0x23,0x94,0x90,0x5b,0x5c,0x9d,0x5d,0x5f,0x91,0x7b,0x7c,0x99,0x7d};
3122
int NationalOptionSubsetIT[13]=
3113
int NationalOptionSubsetIT[13]=
3123
    {0x83,0x24,0xd3,0x60,0xcc,0x8d,0x8e,0x23,0xdd,0xc1,0xc8,0xc9,0xca};
3114
    {0x83,0x24,0x91,0x60,0xcc,0x8d,0x8e,0x23,0xdd,0xc2,0xc8,0xc9,0xca};
3115
int NationalOptionSubsetPT_ES[13]=
3116
    {0xcc,0x24,0xe0,0xeb,0x91,0xed,0xee,0xef,0xe1,0x7d,0xe8,0xc9,0xc2};
3117
int NationalOptionSubsetFR[13]=
3118
    {0x91,0xd4,0xc2,0xdb,0xdc,0xc1,0xde,0x23,0xc9,0xd2,0xd8,0xd9,0xcc};
3119
int NationalOptionSubsetCZ_SK[13]=
3120
    {0x23,0x84,0x85,0x95,0x93,0x92,0xed,0x87,0x91,0xeb,0x8f,0xef,0x86};
3121
int NationalOptionSubsetEE[13]=
3122
    {0x23,0xc6,0x96,0x5b,0x5c,0x97,0x5d,0xd6,0x86,0x7b,0x7c,0x93,0x7d};
3123
3124
3125
    
3126
int NationalOptionSubsetG0Default[13]=
3127
    {0x23,0x94,0x80,0   ,0   ,0   ,0x5e,0x5f,0   ,0   ,0   ,0   ,0   };
3128
int NationalOptionSubsetSR_HR_SL[13]=
3129
    {0x23,0   ,0   ,0   ,0x97,0xfb,0x96,0xdb,0x85,0   ,0x93,0   ,0x86};
3124
int NationalOptionSubsetLV_LT[13]=
3130
int NationalOptionSubsetLV_LT[13]=
3125
    {0x23,0x24,0   ,0   ,0   ,0   ,0   ,0   ,0   ,0   ,0   ,0   ,0   };
3131
    {0x23,0x24,0x96,0   ,0   ,0x97,0x85,0   ,0x86,0   ,0   ,0x93,0   };
3132
    
3126
int NationalOptionSubsetPL[13]=
3133
int NationalOptionSubsetPL[13]=
3127
    {0x23,0   ,0   ,0   ,0   ,0   ,0   ,0xee,0   ,0   ,0   ,0   ,0   };
3134
    {0x23,0   ,0   ,0   ,0   ,0   ,0   ,0xee,0   ,0   ,0   ,0   ,0   };
3128
int NationalOptionSubsetPT_ES[13]=
3129
    {0xcc,0x24,0xe0,0xeb,0xec,0xed,0xee,0xef,0xe1,0x7d,0xe8,0xc9,0xc2};
3130
int NationalOptionSubsetRO[13]=
3135
int NationalOptionSubsetRO[13]=
3131
    {0x23,0x94,0   ,0   ,0   ,0   ,0   ,0   ,0   ,0xd2,0   ,0   ,0xde};
3136
    {0x23,0x94,0   ,0   ,0   ,0   ,0   ,0   ,0   ,0xd2,0   ,0   ,0xde};
3132
int NationalOptionSubsetSR_HR_SL[13]=
3133
    {0x23,0   ,0   ,0   ,0   ,0xfb,0   ,0xdb,0   ,0   ,0   ,0   ,0   };
3134
int NationalOptionSubsetSV_FI[13]=
3135
    {0x23,0x94,0x90,0x5b,0x5c,0x9d,0x5d,0x5f,0x91,0x7b,0x7c,0x99,0x7d};
3136
int NationalOptionSubsetTR[13]=
3137
int NationalOptionSubsetTR[13]=
3137
    {0   ,0   ,0   ,0   ,0x5c,0xd7,0x5d,0   ,0   ,0   ,0x7c,0xcc,0x7d};
3138
    {0   ,0   ,0   ,0   ,0x5c,0xd7,0x5d,0   ,0   ,0   ,0x7c,0xcc,0x7d};
3138
3139
3139
3140
3140
3141
inline int NationalOptionSubset(int chr) {
3141
inline int NationalOptionSubset(int chr) {
3142
    switch (chr) {
3142
    switch (chr) {
3143
        case 0x23: return 0;
3143
        case 0x23: return 0;
Lines 3157-3162 Link Here
3157
    return -1;      
3157
    return -1;      
3158
}   
3158
}   
3159
3159
3160
3160
inline unsigned int LeftBits(unsigned int bits) {
3161
inline unsigned int LeftBits(unsigned int bits) {
3161
    // Scale bit positions 0xfc00 to 0xfff0 positions
3162
    // Scale bit positions 0xfc00 to 0xfff0 positions
3162
    unsigned int res=0;
3163
    unsigned int res=0;
Lines 3187-3192 Link Here
3187
3188
3188
    enumCharsets font=c.GetCharset();
3189
    enumCharsets font=c.GetCharset();
3189
    int chr=c.GetChar();
3190
    int chr=c.GetChar();
3191
    unsigned char enh=c.GetEnhance();
3190
    unsigned int *bitmap=NULL;
3192
    unsigned int *bitmap=NULL;
3191
    int i;
3193
    int i;
3192
    int NationalOption=NationalOptionSubset(chr);
3194
    int NationalOption=NationalOptionSubset(chr);
Lines 3258-3276 Link Here
3258
        }
3260
        }
3259
        break;
3261
        break;
3260
    case CHARSET_LATIN_G0_CZ_SK:
3262
    case CHARSET_LATIN_G0_CZ_SK:
3263
        if (NationalOption>=0) {
3264
            if (NationalOptionSubsetCZ_SK[NationalOption]>0)
3265
                bitmap=TXT_Font[NationalOptionSubsetCZ_SK[NationalOption]-0x20];
3266
        } else {
3267
            if (chr>=0x20 && chr<0x80) {
3268
                bitmap=TXT_Font[chr-0x20];
3269
	    }
3270
        }
3271
        break;
3261
    case CHARSET_LATIN_G0_EE:
3272
    case CHARSET_LATIN_G0_EE:
3273
        if (NationalOption>=0) {
3274
            if (NationalOptionSubsetEE[NationalOption]>0)
3275
                bitmap=TXT_Font[NationalOptionSubsetEE[NationalOption]-0x20];
3276
        } else {
3277
            if (chr>=0x20 && chr<0x80) {
3278
                bitmap=TXT_Font[chr-0x20];
3279
            }
3280
        }
3281
        break;
3262
    case CHARSET_LATIN_G0_LV_LT:
3282
    case CHARSET_LATIN_G0_LV_LT:
3283
        if (NationalOption>=0) {
3284
            if (NationalOptionSubsetLV_LT[NationalOption]>0)
3285
                bitmap=TXT_Font[NationalOptionSubsetLV_LT[NationalOption]-0x20];
3286
        } else {
3287
            if (chr>=0x20 && chr<0x80) {
3288
                bitmap=TXT_Font[chr-0x20];
3289
            }
3290
        }
3291
        break;
3263
    case CHARSET_LATIN_G0_PL:
3292
    case CHARSET_LATIN_G0_PL:
3293
        if (NationalOption>=0) {
3294
            if (NationalOptionSubsetPL[NationalOption]>0)
3295
                bitmap=TXT_Font[NationalOptionSubsetPL[NationalOption]-0x20];
3296
        } else {
3297
            if (chr>=0x20 && chr<0x80) {
3298
                bitmap=TXT_Font[chr-0x20];
3299
            }
3300
        }
3301
        break;
3264
    case CHARSET_LATIN_G0_RO:
3302
    case CHARSET_LATIN_G0_RO:
3303
        if (NationalOption>=0) {
3304
            if (NationalOptionSubsetRO[NationalOption]>0)
3305
                bitmap=TXT_Font[NationalOptionSubsetRO[NationalOption]-0x20];
3306
        } else {
3307
            if (chr>=0x20 && chr<0x80) {
3308
                bitmap=TXT_Font[chr-0x20];
3309
            }
3310
        }
3311
        break;
3265
    case CHARSET_LATIN_G0_SR_HR_SL:
3312
    case CHARSET_LATIN_G0_SR_HR_SL:
3313
        if (NationalOption>=0) {
3314
            if (NationalOptionSubsetSR_HR_SL[NationalOption]>0)
3315
                bitmap=TXT_Font[NationalOptionSubsetSR_HR_SL[NationalOption]-0x20];
3316
        } else {
3317
            if (chr>=0x20 && chr<0x80) {
3318
                bitmap=TXT_Font[chr-0x20];
3319
            }
3320
        }
3321
        break;
3266
    case CHARSET_LATIN_G0_TR:
3322
    case CHARSET_LATIN_G0_TR:
3267
        // Partially supported latin charsets
3323
        if (NationalOption>=0) {
3268
        if (chr>=0x20 && chr<0x80 && NationalOption<0) {
3324
            if (NationalOptionSubsetTR[NationalOption]>0)
3269
            bitmap=TXT_Font[chr-0x20];
3325
                bitmap=TXT_Font[NationalOptionSubsetTR[NationalOption]-0x20];
3326
        } else {
3327
            if (chr>=0x20 && chr<0x80) {
3328
                bitmap=TXT_Font[chr-0x20];
3329
            }
3270
        }
3330
        }
3271
        break;
3331
        break;
3272
        
3332
3333
3273
    case CHARSET_LATIN_G2:
3334
    case CHARSET_LATIN_G2:
3335
	if (enh == 0x42) {
3336
	    if (chr==0x41){ //A
3337
	      bitmap=TXT_Font[0xf0-0x20];
3338
	    } else if (chr==0x45){//E
3339
	      bitmap=TXT_Font[0x90-0x20];
3340
	    } else if (chr==0x49){//I
3341
	      bitmap=TXT_Font[0xf3-0x20];
3342
	    } else if (chr==0x4f){//O
3343
	      bitmap=TXT_Font[0xf5-0x20];
3344
	    } else if (chr==0x55){//U
3345
	      bitmap=TXT_Font[0xf7-0x20];
3346
	    } else if (chr==0x59){//Y
3347
	      bitmap=TXT_Font[0xc5-0x20];
3348
	    } else if (chr==0x6f){//o
3349
	      bitmap=TXT_Font[0xee -0x20];
3350
	    } 
3351
	}
3352
	else if (enh == 0x48) {
3353
	    if (chr==0x41){//A
3354
	      bitmap=TXT_Font[0x5b-0x20];
3355
	    } else if (chr==0x4f){//O
3356
	      bitmap=TXT_Font[0x5c-0x20];
3357
	    } else if (chr==0x55){//U
3358
	      bitmap=TXT_Font[0x5d-0x20];
3359
	    } else if (chr==0x61){//a
3360
	      bitmap=TXT_Font[0x7b-0x20];
3361
	    } else if (chr==0x6f){//o
3362
	      bitmap=TXT_Font[0x7c-0x20];
3363
	    } else if (chr==0x75){//u
3364
	      bitmap=TXT_Font[0x7d-0x20];
3365
	    }
3366
	}
3367
	else if (enh == 0x4a) {
3368
	    if (chr==0x55){//U
3369
	      bitmap=TXT_Font[0x9a-0x20];
3370
	    }
3371
	}
3372
	else if (enh == 0x4f) {
3373
	    if (chr==0x43){//C
3374
	      bitmap=TXT_Font[0x9b-0x20];
3375
	    } else if (chr==0x44){//D
3376
	      bitmap=TXT_Font[0x9c-0x20];
3377
	    } else if (chr==0x45){//E
3378
	      bitmap=TXT_Font[0x98-0x20];
3379
	    } else if (chr==0x4e){//N
3380
	      bitmap=TXT_Font[0x9f-0x20];
3381
	    } else if (chr==0x52){//R
3382
	      bitmap=TXT_Font[0xc3-0x20];
3383
	    } else if (chr==0x53){//S
3384
	      bitmap=TXT_Font[0x96-0x20];
3385
	    } else if (chr==0x54){//T
3386
	      bitmap=TXT_Font[0xc4-0x20];
3387
	    } else if (chr==0x5a){//Z
3388
	      bitmap=TXT_Font[0x97-0x20];
3389
	    } else if (chr==0x64){//d
3390
	      bitmap=TXT_Font[0x9e -0x20];
3391
	    } else if (chr==0x6e){//n
3392
	      bitmap=TXT_Font[0xc0-0x20];
3393
	    } 
3394
	}
3395
        dsyslog("Warning: CHARSET_LATIN_G2: %x %x %x \n",font,chr,enh);
3396
	break;
3274
    case CHARSET_CYRILLIC_G0_SR_HR:
3397
    case CHARSET_CYRILLIC_G0_SR_HR:
3275
    case CHARSET_CYRILLIC_G0_RU_BG:
3398
    case CHARSET_CYRILLIC_G0_RU_BG:
3276
    case CHARSET_CYRILLIC_G0_UK:
3399
    case CHARSET_CYRILLIC_G0_UK:
Lines 3280-3285 Link Here
3280
    case CHARSET_ARABIC_G0:
3403
    case CHARSET_ARABIC_G0:
3281
    case CHARSET_ARABIC_G2:
3404
    case CHARSET_ARABIC_G2:
3282
    case CHARSET_HEBREW_G0:
3405
    case CHARSET_HEBREW_G0:
3406
        dsyslog("Warning: totally unsupported: %x %x %x \n",font,chr,enh);
3283
        // totally unsupported
3407
        // totally unsupported
3284
        break;
3408
        break;
3285
        
3409
        
Lines 3303-3317 Link Here
3303
        break;
3427
        break;
3304
        
3428
        
3305
    case CHARSET_GRAPHICS_G3:
3429
    case CHARSET_GRAPHICS_G3:
3430
        dsyslog("Warning: CHARSET_LATIN_G3: %x %x\n",font,chr);
3431
	break;
3306
    case CHARSET_INVALID:
3432
    case CHARSET_INVALID:
3433
        dsyslog("Warning: CHARSET_INVALID: %x %x\n",font,chr);
3307
        // Totally unsupported
3434
        // Totally unsupported
3308
        break;
3435
        break;
3309
    }
3436
    }
3310
    
3437
    
3311
    
3438
    
3312
    
3439
    
3313
    if (!buffer) {
3440
    if (!buffer || !bitmap) {
3314
        printf("Warning: Undefined char: %x %x\n",font,chr);
3315
        return NULL;
3441
        return NULL;
3316
    }
3442
    }
3317
    
3443
    
(-)osdteletext-0.5.1.orig/txtrecv.c (-40 / +115 lines)
Lines 11-17 Link Here
11
#include <dirent.h>
11
#include <dirent.h>
12
12
13
#include "txtrecv.h"
13
#include "txtrecv.h"
14
#include "tables.h"
14
#include "hamm.h"
15
#include "setup.h"
15
#include "setup.h"
16
16
17
#include <vdr/channels.h>
17
#include <vdr/channels.h>
Lines 208-214 Link Here
208
   failedFreeSpace=false;
208
   failedFreeSpace=false;
209
}
209
}
210
210
211
#define TELETEXT_PAGESIZE 972
211
#define TELETEXT_PAGESIZE (TELEPAGE_SIZE + TRIPPLETS_SIZE*sizeof(int) + 4 + 12)
212
212
213
LegacyStorage::LegacyStorage() {
213
LegacyStorage::LegacyStorage() {
214
   maxBytes=0;
214
   maxBytes=0;
Lines 474-480 Link Here
474
cTelePage::cTelePage(PageID t_page, uchar t_flags, uchar t_lang,int t_mag)
474
cTelePage::cTelePage(PageID t_page, uchar t_flags, uchar t_lang,int t_mag)
475
  : mag(t_mag), flags(t_flags), lang(t_lang), page(t_page)
475
  : mag(t_mag), flags(t_flags), lang(t_lang), page(t_page)
476
{
476
{
477
   memset(pagebuf,' ',26*40);
477
   memset(pagebuf,' ',TELEPAGE_SIZE);
478
   memset(tripplets,0,TRIPPLETS_SIZE*sizeof(int));
479
   next_des = 0;
478
}
480
}
479
481
480
cTelePage::~cTelePage() {
482
cTelePage::~cTelePage() {
Lines 485-492 Link Here
485
   memcpy(pagebuf+40*line,myptr,40);
487
   memcpy(pagebuf+40*line,myptr,40);
486
}
488
}
487
489
490
void cTelePage::SetTripplets(int dcode, int *t)
491
{
492
    if (dcode == next_des)
493
    {
494
		memcpy(tripplets + dcode * 13, t, 13 * sizeof(*t));
495
		next_des++;
496
    }
497
    else
498
		next_des = -1;
499
}
500
488
void cTelePage::save()
501
void cTelePage::save()
489
{
502
{
503
490
   Storage *s=Storage::instance();
504
   Storage *s=Storage::instance();
491
   unsigned char buf;
505
   unsigned char buf;
492
   StorageHandle fd;
506
   StorageHandle fd;
Lines 499-505 Link Here
499
      buf=lang; s->write(&buf,1,fd);
513
      buf=lang; s->write(&buf,1,fd);
500
      buf=0x00; s->write(&buf,1,fd);
514
      buf=0x00; s->write(&buf,1,fd);
501
      buf=0x00; s->write(&buf,1,fd);
515
      buf=0x00; s->write(&buf,1,fd);
502
      s->write(pagebuf,24*40,fd);
516
      s->write(pagebuf,TELEPAGE_SIZE,fd);
517
      s->write(&next_des,4,fd);
518
      s->write(tripplets,TRIPPLETS_SIZE*sizeof(int),fd);
503
      s->close(fd);
519
      s->close(fd);
504
   }         
520
   }         
505
}
521
}
Lines 526-532 Link Here
526
542
527
void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber)
543
void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber)
528
{
544
{
529
   if (Device->IsPrimaryDevice() || Device == cDevice::ActualDevice()) {
545
   if (Device->IsPrimaryDevice()) {
530
546
531
/*#ifdef OSDTELETEXT_REINSERTION_PATCH
547
/*#ifdef OSDTELETEXT_REINSERTION_PATCH
532
      if (ttSetup.suspendReceiving) {
548
      if (ttSetup.suspendReceiving) {
Lines 563-571 Link Here
563
      if (!channel)
579
      if (!channel)
564
         return;
580
         return;
565
      //primary device a full-featured card
581
      //primary device a full-featured card
566
      if (cDevice::ActualDevice()->ProvidesChannel(channel, Setup.PrimaryLimit)) {
582
      if (cDevice::PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit)) {
567
          receiver = new cTxtReceiver(TPid, chan);
583
          receiver = new cTxtReceiver(TPid, chan);
568
          cDevice::ActualDevice()->AttachReceiver(receiver);
584
          cDevice::PrimaryDevice()->AttachReceiver(receiver);
569
          //dsyslog("OSDTeletext: Created teletext receiver for channel %d, PID %d on primary device", ChNum, TPid);
585
          //dsyslog("OSDTeletext: Created teletext receiver for channel %d, PID %d on primary device", ChNum, TPid);
570
      //primary device a DXR3 or similar
586
      //primary device a DXR3 or similar
571
      } else {
587
      } else {
Lines 699-705 Link Here
699
#else
715
#else
700
 : cReceiver(0, -1, 1, TPid), 
716
 : cReceiver(0, -1, 1, TPid), 
701
#endif
717
#endif
702
cThread("osdteletext-receiver"),
703
   chan(chan), TxtPage(0), buffer((188+60)*75), running(false)
718
   chan(chan), TxtPage(0), buffer((188+60)*75), running(false)
704
{
719
{
705
   Storage::instance()->prepareDirectory(chan);
720
   Storage::instance()->prepareDirectory(chan);
Lines 710-716 Link Here
710
725
711
cTxtReceiver::~cTxtReceiver()
726
cTxtReceiver::~cTxtReceiver()
712
{
727
{
713
   cReceiver::Detach();
728
   Detach();
714
   if (running) {
729
   if (running) {
715
      running=false;
730
      running=false;
716
      buffer.Signal();
731
      buffer.Signal();
Lines 720-731 Link Here
720
   delete TxtPage;
735
   delete TxtPage;
721
}
736
}
722
737
723
void cTxtReceiver::Stop()
724
{
725
   Activate(false);
726
}
727
728
729
void cTxtReceiver::Activate(bool On)
738
void cTxtReceiver::Activate(bool On)
730
{
739
{
731
  if (On) {
740
  if (On) {
Lines 760-774 Link Here
760
769
761
void cTxtReceiver::Action() {
770
void cTxtReceiver::Action() {
762
771
772
//   int fh;
773
//   fh=open("/tmp/vbi.vbi", O_WRONLY | O_CREAT);
763
   while (running) {
774
   while (running) {
764
      cFrame *frame=buffer.Get();
775
      cFrame *frame=buffer.Get();
765
      if (frame) {
776
      if (frame) {
766
         uchar *Datai=frame->Data();
777
         uchar *Datai=frame->Data();
767
         
778
         
779
//	 write(fh,Datai,50+3*46);
780
	 
768
         for (int i=0; i < 4; i++) {
781
         for (int i=0; i < 4; i++) {
769
            if (Datai[4+i*46]==2 || Datai[4+i*46]==3) {
782
            if (Datai[4+i*46]==2 || Datai[4+i*46]==3) {
770
               for (int j=(8+i*46);j<(50+i*46);j++)
783
               for (int j=(8+i*46);j<(50+i*46);j++)
771
                  Datai[j]=invtab[Datai[j]];
784
                  Datai[j]=doinvert(Datai[j]);
772
               DecodeTXT(&Datai[i*46]);
785
               DecodeTXT(&Datai[i*46]);
773
            }
786
            }
774
         }
787
         }
Lines 778-793 Link Here
778
         buffer.Wait();
791
         buffer.Wait();
779
   }
792
   }
780
   
793
   
794
//   close(fh);
781
   buffer.Clear();
795
   buffer.Clear();
782
   running=false;
796
   running=false;
783
}
784
797
785
uchar cTxtReceiver::unham16 (uchar *p)
786
{
787
  unsigned short c1,c2;
788
  c1=unhamtab[p[0]];
789
  c2=unhamtab[p[1]];
790
  return (c1 & 0x0F) | (c2 & 0x0F) *16;
791
}
798
}
792
799
793
void cTxtReceiver::DecodeTXT(uchar* TXT_buf)
800
void cTxtReceiver::DecodeTXT(uchar* TXT_buf)
Lines 822-844 Link Here
822
829
823
    
830
    
824
   int hdr,mag,mag8,line;
831
   int hdr,mag,mag8,line;
832
   int err = 0;
825
   uchar *ptr;
833
   uchar *ptr;
826
   uchar flags,lang;
834
   uchar flags,lang;
827
   
835
828
   hdr = unham16 (&TXT_buf[0x8]);
836
   hdr = hamm16(&TXT_buf[0x8], &err);
837
//   if (err & 0xf000) {
838
//     esyslog("OSDTeletext: hdr=hamm16");
839
//      return;
840
//   }
841
829
   mag = hdr & 0x07;
842
   mag = hdr & 0x07;
830
   mag8 = mag ?: 8;
843
   mag8 = mag ?: 8;
831
   line = (hdr>>3) & 0x1f;
844
   line = (hdr>>3) & 0x1f;
832
   ptr = &TXT_buf[10];
845
   ptr = &TXT_buf[10];
833
   
846
834
   switch (line) {
847
   switch (line) {
835
   case 0: 
848
   case 0:
836
      {
849
      {
837
      unsigned char b1, b2, b3, b4;
850
      unsigned char b1, b2, b3, b4;
838
      int pgno, subno;
851
      int pgno, subno;
839
      b1 = unham16 (ptr);    
852
      b1 = hamm16(ptr, &err);
840
      // Page no, 10- and 1-digit
853
      // Page no, 10- and 1-digit
841
      
854
842
      if (b1 == 0xff) break;
855
      if (b1 == 0xff) break;
843
      if (TxtPage) {
856
      if (TxtPage) {
844
         TxtPage->save();
857
         TxtPage->save();
Lines 846-854 Link Here
846
         TxtPage=NULL;
859
         TxtPage=NULL;
847
      }
860
      }
848
861
849
      b2 = unham16 (ptr+2); // Sub-code 0..6 + C4
862
      b2 = hamm16(ptr+2, &err); // Sub-code 0..6 + C4
850
      b3 = unham16 (ptr+4); // Sub-code 8..13 + C5,C6
863
      b3 = hamm16(ptr+4, &err); // Sub-code 8..13 + C5,C6
851
      b4 = unham16 (ptr+6); // C7..C14
864
      b4 = hamm16(ptr+6, &err); // C7..C14
865
//      if (err & 0xf000){
866
//         esyslog("OSDTeletext: b1,b2,b3,b4=hamm16");
867
//      	 return;
868
//      }
852
869
853
      // flags:
870
      // flags:
854
      //   0x80  C4 - Erase page
871
      //   0x80  C4 - Erase page
Lines 871-890 Link Here
871
      TxtPage->SetLine((int)line,(uchar *)ptr);
888
      TxtPage->SetLine((int)line,(uchar *)ptr);
872
      break;
889
      break;
873
      }
890
      }
874
   case 1 ... 25: 
891
   case 1 ... 24:
875
      {
892
      {
876
      if (TxtPage) TxtPage->SetLine((int)line,(uchar *)ptr); 
893
      if (TxtPage) TxtPage->SetLine((int)line,(uchar *)ptr); 
877
      break;
894
      break;
878
      }
895
      }
879
   /*case 23: 
896
   case 26: 
880
      {
897
      {
881
      if (TxtPage) {
898
      int d, t[13];
882
         TxtPage->save();
899
      d = hamm8(ptr, &err);
883
         delete TxtPage;
900
//      if (err & 0xf000){
884
         TxtPage=NULL;
901
//        esyslog("OSDTeletext: d=hamm8");
885
      }
902
//	return;
903
//      }	
904
905
      for (int i = 0; i < 13; ++i)
906
	t[i] = hamm24(ptr + 1 + 3*i, &err);
907
//      if (err & 0xf000){
908
//      esyslog("OSDTeletext: hamm24");
909
//	return;
910
//      }	
911
        
912
      if (TxtPage) TxtPage->SetTripplets(d, t); 
886
      break;
913
      break;
887
      }*/
914
      }
915
/*	case 27:
916
	{
917
	    // FLOF data (FastText)
918
	    int b1,b2,b3,x;
919
920
	    if (~cvtp->flags & PG_ACTIVE)
921
		return 0; // -1 flushes all pages.  we may never resync again :(
922
923
	    b1 = hamm8(p, &err);
924
	    b2 = hamm8(p + 37, &err);
925
	    if (err & 0xf000)
926
		return 4;
927
	    if (b1 != 0 || not(b2 & 8))
928
		return 0;
929
930
	    for (i = 0; i < 6; ++i)
931
	    {
932
		err = 0;
933
		b1 = hamm16(p+1+6*i, &err);
934
		b2 = hamm16(p+3+6*i, &err);
935
		b3 = hamm16(p+5+6*i, &err);
936
		if (err & 0xf000)
937
		    return 1;
938
		x = (b2 >> 7) | ((b3 >> 5) & 0x06);
939
		cvtp->link[i].pgno = ((mag ^ x) ?: 8) * 256 + b1;
940
		cvtp->link[i].subno = (b2 + b3 * 256) & 0x3f7f;
941
	    }
942
	    cvtp->flof = 1;
943
	    return 0;
944
	}
945
	case 30:
946
	{
947
	    if (mag8 != 8)
948
		return 0;
949
950
	    p[0] = hamm8(p, &err);		// designation code
951
	    p[1] = hamm16(p+1, &err);		// initial page
952
	    p[3] = hamm16(p+3, &err);		// initial subpage + mag
953
	    p[5] = hamm16(p+5, &err);		// initial subpage + mag
954
	    if (err & 0xf000)
955
		return 4;
956
957
	    err += chk_parity(p+20, 20);
958
	    conv2latin(p+20, 20, 0);
959
960
	    vbi_send(vbi, EV_XPACKET, mag8, pkt, err, p);
961
	    return 0;
962
	}*/
888
   default:
963
   default:
889
      break;
964
      break;
890
   }
965
   }
(-)osdteletext-0.5.1.orig/txtrecv.h (-3 / +7 lines)
Lines 136-153 Link Here
136
   void registerFile(PageID page);
136
   void registerFile(PageID page);
137
};
137
};
138
138
139
#define TRIPPLETS_SIZE 13*16
140
#define TELEPAGE_SIZE  24*40
141
139
class cTelePage {
142
class cTelePage {
140
 private:
143
 private:
141
  int mag;
144
  int mag;
142
  unsigned char flags;
145
  unsigned char flags;
143
  unsigned char lang;
146
  unsigned char lang;
144
  PageID page;
147
  PageID page;
145
  unsigned char pagebuf[27*40];
148
  unsigned char pagebuf[TELEPAGE_SIZE];
149
  int tripplets[TRIPPLETS_SIZE];           	// tripplets
150
  int next_des;					// next expected designation code
146
  char Directory [255];
151
  char Directory [255];
147
 public:
152
 public:
148
  cTelePage(PageID page, uchar flags, uchar lang, int mag);
153
  cTelePage(PageID page, uchar flags, uchar lang, int mag);
149
  ~cTelePage();
154
  ~cTelePage();
150
  void SetLine(int, uchar*);
155
  void SetLine(int, uchar*);
156
  void SetTripplets(int dcode, int *t);
151
  void save();
157
  void save();
152
 };
158
 };
153
159
Lines 163-169 Link Here
163
class cTxtReceiver : public cReceiver, public cThread {
169
class cTxtReceiver : public cReceiver, public cThread {
164
private:
170
private:
165
   void DecodeTXT(uchar*);
171
   void DecodeTXT(uchar*);
166
   uchar unham16 (uchar*);
167
   tChannelID chan;
172
   tChannelID chan;
168
   cTelePage *TxtPage;
173
   cTelePage *TxtPage;
169
protected:
174
protected:
Lines 175-181 Link Here
175
public:
180
public:
176
   cTxtReceiver(int TPid, tChannelID chan);
181
   cTxtReceiver(int TPid, tChannelID chan);
177
   virtual ~cTxtReceiver();
182
   virtual ~cTxtReceiver();
178
   virtual void Stop();
179
};
183
};
180
184
181
class cTxtStatus : public cStatus/*, public cThread*/ {
185
class cTxtStatus : public cStatus/*, public cThread*/ {
(-)osdteletext-0.5.1.orig/txtrender.c (-11 / +71 lines)
Lines 15-21 Link Here
15
15
16
#include <strings.h>
16
#include <strings.h>
17
#include "txtrender.h"
17
#include "txtrender.h"
18
18
#include <vdr/tools.h>
19
#include "txtrecv.h"
19
20
20
// Font tables
21
// Font tables
21
22
Lines 274-293 Link Here
274
void cRenderPage::RenderTeletextCode(unsigned char *PageCode) {
275
void cRenderPage::RenderTeletextCode(unsigned char *PageCode) {
275
    int x,y;
276
    int x,y;
276
    bool EmptyNextLine=false;
277
    bool EmptyNextLine=false;
278
    cTeletextChar c;
277
    // Skip one line, in case double height chars were/will be used
279
    // Skip one line, in case double height chars were/will be used
278
280
279
    // Get code pages:
281
    // Get code pages:
280
    int LocalG0CodePage=(FirstG0CodePage & 0x78) 
282
    int LocalG0CodePage=(FirstG0CodePage & 0x78)
281
            | ((Lang & 0x04)>>2) | (Lang & 0x02) | ((Lang & 0x01)<<2);
283
            | ((Lang & 0x04)>>2) | (Lang & 0x02) | ((Lang & 0x01)<<2);
282
        
284
285
283
    enumCharsets FirstG0=GetG0Charset(LocalG0CodePage);
286
    enumCharsets FirstG0=GetG0Charset(LocalG0CodePage);
284
    enumCharsets SecondG0=GetG0Charset(SecondG0CodePage);
287
    enumCharsets SecondG0=GetG0Charset(SecondG0CodePage);
285
    // Reserved for later use:
288
    // Reserved for later use:
286
    // enumCharsets FirstG2=GetG2Charset(LocalG0CodePage);
289
    // enumCharsets FirstG2=GetG2Charset(LocalG0CodePage);
287
    
290
288
    for (y=0;y<24;(EmptyNextLine?y+=2:y++)) {
291
    for (y=0;y<24;(EmptyNextLine?y+=2:y++)) {
289
        // Start of line: Set start of line defaults
292
        // Start of line: Set start of line defaults
290
        
293
291
        // Hold Mosaics mode: Remember last mosaic char/charset 
294
        // Hold Mosaics mode: Remember last mosaic char/charset 
292
        // for next spacing code
295
        // for next spacing code
293
        bool HoldMosaics=false;
296
        bool HoldMosaics=false;
Lines 307-313 Link Here
307
        EmptyNextLine=false;
310
        EmptyNextLine=false;
308
        // Skip next line, for double-height
311
        // Skip next line, for double-height
309
312
310
        cTeletextChar c;
311
        // auto.initialized to everything off
313
        // auto.initialized to everything off
312
        c.SetFGColor(ttcWhite);
314
        c.SetFGColor(ttcWhite);
313
        c.SetBGColor(ttcBlack);
315
        c.SetBGColor(ttcBlack);
Lines 355-361 Link Here
355
                    Size=sizeNormal;
357
                    Size=sizeNormal;
356
                    HoldMosaicChar=' ';
358
                    HoldMosaicChar=' ';
357
                    HoldMosaicCharset=FirstG0;
359
                    HoldMosaicCharset=FirstG0;
358
                }                   
360
                }
359
                break;
361
                break;
360
            case 0x18: // Conceal
362
            case 0x18: // Conceal
361
                c.SetConceal(true);
363
                c.SetConceal(true);
Lines 395-401 Link Here
395
                    c2.SetChar(' ');
397
                    c2.SetChar(' ');
396
                }
398
                }
397
            } else {
399
            } else {
398
                // Character code               
400
                // Character code
399
                c2.SetChar(ttc);
401
                c2.SetChar(ttc);
400
                if (GraphicCharset) {
402
                if (GraphicCharset) {
401
                    if (ttc&0x20) {
403
                    if (ttc&0x20) {
Lines 495-501 Link Here
495
                    Size=sizeDoubleWidth;
497
                    Size=sizeDoubleWidth;
496
                    HoldMosaicChar=' ';
498
                    HoldMosaicChar=' ';
497
                    HoldMosaicCharset=FirstG0;
499
                    HoldMosaicCharset=FirstG0;
498
                }                   
500
                }
499
                break;
501
                break;
500
            case 0x0F: // Double Size
502
            case 0x0F: // Double Size
501
                if (Size!=sizeDoubleSize) {
503
                if (Size!=sizeDoubleSize) {
Lines 538-543 Link Here
538
        }
540
        }
539
        SetChar(x,24,c);
541
        SetChar(x,24,c);
540
    }       
542
    }       
543
//enhanced code
544
    int next_des = *(int *)(PageCode+TELEPAGE_SIZE);
545
    int *eh = (int *)(PageCode+TELEPAGE_SIZE+4);
546
    int row = 0;
547
    int *p, *e;
548
549
    if (next_des < 1)
550
	return;
551
552
    for (p = eh, e = p + next_des * 13; p < e; p++)
553
	if (*p % 2048 != 2047)
554
	{
555
	    int adr = *p % 64;
556
	    int mode = *p / 64 % 32;
557
	    int data = *p / 2048 % 128;
558
559
	    if (adr < 40)
560
	    {
561
		// col functions
562
		switch (mode)
563
		{
564
		    case 15: // char from G2 set
565
			c = GetChar(adr, row);
566
			c.SetCharset(CHARSET_LATIN_G2);
567
			c.SetEnhance(data);
568
			c.SetChar(0x20);
569
			SetChar(adr, row, c);
570
//			esyslog("char from G2 set adr=%d,row=%d,data=%d", adr, row, data);
571
			break;
572
		    case 16 ... 31: // char from G0 set with diacritical mark
573
			c = GetChar(adr, row);
574
			c.SetCharset(CHARSET_LATIN_G2);
575
			c.SetEnhance(0x40|(mode&0x0f));
576
			c.SetChar(data);
577
			SetChar(adr, row, c);
578
//            		esyslog("char from G0 set with diacritical mark adr=%d,row=%d,data=%d", adr, row, data);
579
			break;
580
		}
581
	    }
582
	    else
583
	    {
584
		// row functions
585
		if ((adr -= 40) == 0)
586
		    adr = 24;
587
588
		switch (mode)
589
		{
590
		    case 1: // full row color
591
			row = adr;
592
			break;
593
		    case 4: // set active position
594
			row = adr;
595
			break;
596
		    case 7: // address row 0 (+ full row color)
597
			if (adr == 23)
598
			    row = 0;
599
			break;
600
		}
601
	    }
602
	}
541
}
603
}
542
543
(-)osdteletext-0.5.1.orig/txtrender.h (-14 / +21 lines)
Lines 111-116 Link Here
111
    
111
    
112
protected:
112
protected:
113
    unsigned int c;
113
    unsigned int c;
114
    unsigned char eh;
114
115
115
    static const unsigned int CHAR             = 0x000000FF;
116
    static const unsigned int CHAR             = 0x000000FF;
116
    // character code
117
    // character code
Lines 133-142 Link Here
133
    static const unsigned int BLINK            = 0x80000000;
134
    static const unsigned int BLINK            = 0x80000000;
134
    // blinking character
135
    // blinking character
135
136
136
    cTeletextChar(unsigned int cc) { c=cc; }
137
    cTeletextChar(unsigned int cc, unsigned char ee) { c=cc; eh=ee; }
137
138
138
public:
139
public:
139
    cTeletextChar() { c=0; }
140
    cTeletextChar() { c=0; eh=0;}
140
    
141
    
141
    // inline helper functions:
142
    // inline helper functions:
142
    // For each parameter encoded into the 32-bit int, there is
143
    // For each parameter encoded into the 32-bit int, there is
Lines 148-220 Link Here
148
    inline void SetChar(unsigned char chr)
149
    inline void SetChar(unsigned char chr)
149
        { c=(c&~CHAR)|chr; }
150
        { c=(c&~CHAR)|chr; }
150
    inline cTeletextChar ToChar(unsigned char chr)
151
    inline cTeletextChar ToChar(unsigned char chr)
151
        { return cTeletextChar((c&~CHAR)|chr); }
152
        { return cTeletextChar((c&~CHAR)|chr, eh); }
153
154
    inline unsigned char GetEnhance() 
155
        { return eh; }
156
    inline void SetEnhance(unsigned char chr)
157
        { eh=chr; }
152
        
158
        
153
    inline enumCharsets GetCharset() 
159
    inline enumCharsets GetCharset() 
154
        { return (enumCharsets)(c&CHARSET); }
160
        { return (enumCharsets)(c&CHARSET); }
155
    inline void SetCharset(enumCharsets charset) 
161
    inline void SetCharset(enumCharsets charset) 
156
        { c=(c&~CHARSET)|charset; }
162
        { c=(c&~CHARSET)|charset; }
157
    inline cTeletextChar ToCharset(enumCharsets charset) 
163
    inline cTeletextChar ToCharset(enumCharsets charset) 
158
        { return cTeletextChar((c&~CHARSET)|charset); }
164
        { return cTeletextChar((c&~CHARSET)|charset, eh); }
159
    
165
    
160
    inline enumTeletextColor GetFGColor() 
166
    inline enumTeletextColor GetFGColor() 
161
        { return (enumTeletextColor)((c&FGCOLOR) >> LowestSet32Bit(FGCOLOR)); }
167
        { return (enumTeletextColor)((c&FGCOLOR) >> LowestSet32Bit(FGCOLOR)); }
162
    inline void SetFGColor(enumTeletextColor fgc) 
168
    inline void SetFGColor(enumTeletextColor fgc) 
163
        { c=(c&~FGCOLOR) | (fgc << LowestSet32Bit(FGCOLOR)); }
169
        { c=(c&~FGCOLOR) | (fgc << LowestSet32Bit(FGCOLOR)); }
164
    inline cTeletextChar ToFGColor(enumTeletextColor fgc) 
170
    inline cTeletextChar ToFGColor(enumTeletextColor fgc) 
165
        { return cTeletextChar((c&~FGCOLOR) | (fgc << LowestSet32Bit(FGCOLOR))); }
171
        { return cTeletextChar((c&~FGCOLOR) | (fgc << LowestSet32Bit(FGCOLOR)), eh); }
166
    
172
    
167
    inline enumTeletextColor GetBGColor() 
173
    inline enumTeletextColor GetBGColor() 
168
        { return (enumTeletextColor)((c&BGCOLOR) >> LowestSet32Bit(BGCOLOR)); }
174
        { return (enumTeletextColor)((c&BGCOLOR) >> LowestSet32Bit(BGCOLOR)); }
169
    inline void SetBGColor(enumTeletextColor bgc) 
175
    inline void SetBGColor(enumTeletextColor bgc) 
170
        { c=(c&~BGCOLOR) | (bgc << LowestSet32Bit(BGCOLOR)); }
176
        { c=(c&~BGCOLOR) | (bgc << LowestSet32Bit(BGCOLOR)); }
171
    inline cTeletextChar ToBGColor(enumTeletextColor bgc) 
177
    inline cTeletextChar ToBGColor(enumTeletextColor bgc) 
172
        { return cTeletextChar((c&~BGCOLOR) | (bgc << LowestSet32Bit(BGCOLOR))); }
178
        { return cTeletextChar((c&~BGCOLOR) | (bgc << LowestSet32Bit(BGCOLOR)), eh); }
173
    
179
    
174
    inline bool GetBoxedOut() 
180
    inline bool GetBoxedOut() 
175
        { return c&BOXOUT; }
181
        { return c&BOXOUT; }
176
    inline void SetBoxedOut(bool BoxedOut) 
182
    inline void SetBoxedOut(bool BoxedOut) 
177
        { c=(BoxedOut)?(c|BOXOUT):(c&~BOXOUT); }
183
        { c=(BoxedOut)?(c|BOXOUT):(c&~BOXOUT); }
178
    inline cTeletextChar ToBoxedOut(bool BoxedOut) 
184
    inline cTeletextChar ToBoxedOut(bool BoxedOut) 
179
        { return cTeletextChar((BoxedOut)?(c|BOXOUT):(c&~BOXOUT)); }
185
        { return cTeletextChar((BoxedOut)?(c|BOXOUT):(c&~BOXOUT), eh); }
180
    
186
    
181
    inline bool GetDirty() 
187
    inline bool GetDirty() 
182
        { return c&DIRTY; }
188
        { return c&DIRTY; }
183
    inline void SetDirty(bool Dirty) 
189
    inline void SetDirty(bool Dirty) 
184
        { c=(Dirty)?(c|DIRTY):(c&~DIRTY); }
190
        { c=(Dirty)?(c|DIRTY):(c&~DIRTY); }
185
    inline cTeletextChar ToDirty(bool Dirty) 
191
    inline cTeletextChar ToDirty(bool Dirty) 
186
        { return cTeletextChar((Dirty)?(c|DIRTY):(c&~DIRTY)); }
192
        { return cTeletextChar((Dirty)?(c|DIRTY):(c&~DIRTY), eh); }
187
    
193
    
188
    inline enumDblHeight GetDblHeight() 
194
    inline enumDblHeight GetDblHeight() 
189
        { return (enumDblHeight)(c&DBLHEIGHT); }
195
        { return (enumDblHeight)(c&DBLHEIGHT); }
190
    inline void SetDblHeight(enumDblHeight dh) 
196
    inline void SetDblHeight(enumDblHeight dh) 
191
        { c=(c&~(DBLHEIGHT)) | dh; }
197
        { c=(c&~(DBLHEIGHT)) | dh; }
192
    inline cTeletextChar ToDblHeight(enumDblHeight dh) 
198
    inline cTeletextChar ToDblHeight(enumDblHeight dh) 
193
        { return cTeletextChar((c&~(DBLHEIGHT)) | dh); }
199
        { return cTeletextChar((c&~(DBLHEIGHT)) | dh, eh); }
194
    
200
    
195
    inline enumDblWidth GetDblWidth() 
201
    inline enumDblWidth GetDblWidth() 
196
        { return (enumDblWidth)(c&DBLWIDTH); }
202
        { return (enumDblWidth)(c&DBLWIDTH); }
197
    inline void SetDblWidth(enumDblWidth dw) 
203
    inline void SetDblWidth(enumDblWidth dw) 
198
        { c=(c&~(DBLWIDTH)) | dw; }
204
        { c=(c&~(DBLWIDTH)) | dw; }
199
    inline cTeletextChar ToDblWidth(enumDblWidth dw) 
205
    inline cTeletextChar ToDblWidth(enumDblWidth dw) 
200
        { return cTeletextChar((c&~(DBLWIDTH)) | dw); }
206
        { return cTeletextChar((c&~(DBLWIDTH)) | dw, eh); }
201
    
207
    
202
    inline bool GetConceal() 
208
    inline bool GetConceal() 
203
        { return c&CONCEAL; }
209
        { return c&CONCEAL; }
204
    inline void SetConceal(bool Conceal) 
210
    inline void SetConceal(bool Conceal) 
205
        { c=(Conceal)?(c|CONCEAL):(c&~CONCEAL); }
211
        { c=(Conceal)?(c|CONCEAL):(c&~CONCEAL); }
206
    inline cTeletextChar ToConceal(bool Conceal) 
212
    inline cTeletextChar ToConceal(bool Conceal) 
207
        { return cTeletextChar((Conceal)?(c|CONCEAL):(c&~CONCEAL)); }
213
        { return cTeletextChar((Conceal)?(c|CONCEAL):(c&~CONCEAL), eh); }
208
    
214
    
209
    inline bool GetBlink() 
215
    inline bool GetBlink() 
210
        { return c&BLINK; }
216
        { return c&BLINK; }
211
    inline void SetBlink(bool Blink) 
217
    inline void SetBlink(bool Blink) 
212
        { c=(Blink)?(c|BLINK):(c&~BLINK); }
218
        { c=(Blink)?(c|BLINK):(c&~BLINK); }
213
    inline cTeletextChar ToBlink(bool Blink) 
219
    inline cTeletextChar ToBlink(bool Blink) 
214
        { return cTeletextChar((Blink)?(c|BLINK):(c&~BLINK)); }
220
        { return cTeletextChar((Blink)?(c|BLINK):(c&~BLINK), eh); }
215
        
221
        
216
    bool operator==(cTeletextChar &chr) { return c==chr.c; }
222
    bool operator==(cTeletextChar &chr) { return c==chr.c && eh==chr.eh; }
217
    bool operator!=(cTeletextChar &chr) { return c!=chr.c; }
223
    bool operator!=(cTeletextChar &chr) { return c!=chr.c || eh!=chr.eh; }
218
};
224
};
219
225
220
226
Lines 304-309 Link Here
304
    // Interprete teletext code referenced by PageCode
310
    // Interprete teletext code referenced by PageCode
305
    // and draw the whole page content into this object
311
    // and draw the whole page content into this object
306
    // PageCode must be a 40*24 bytes buffer
312
    // PageCode must be a 40*24 bytes buffer
313
307
};
314
};
308
315
309
316

Return to bug 240702