2
911_chr.h: character definitions for 911_vdt.c
4
We define the character matrix for each character.
6
The US terminal uses the standard 7-bit ASCII character set, with
7
additional graphic characters in the 32 first positions.
9
The various European terminals use variants of the 7-bit ASCII character
10
set with national characters instead of various punctuation characters.
11
I think these national character sets were standardized at a point, but
12
I don't know how close to this standard the character sets used by the
15
The japanese terminal uses 8-bit character codes. The 128 first characters
16
are identical to the US character set (except that '\' is replaced by the
17
Yen symbol), and the next 128 characters include the katakana syllabus.
18
Kanji ideograms are not supported in this scheme.
20
The arabic terminal uses 8-bit character codes, too. It requires
21
additional code in the TI990 OS for correct operation, as the keyboard
22
returns codes for isolated characters (i.e. without ligatures), which need
23
to be substituted with codes with correct context-dependent ligatures.
24
And both OS and application programs need to support the fact that the
25
writing direction can be either right-to-left or left-to-right, according
26
to whether the characters are latin or arabic.
28
As the original ROMs have not been dumped yet, I recreated the matrices
29
from various matrix printouts in TI documentation.
32
The arabic character set is not implemented, because documentation is ambiguous
33
(it says there are 115 characters, but I can hardly see 80 characters in the
34
attached table), and the character matrices are not documented.
39
Offsets in the char_defs array
43
/* US ASCII: 128 characters (32 symbols + 95 ASCII + 1 blank (delete character)) */
44
char_defs_US_base = 0,
45
/* additionnal katakana set (128 characters, including JIS set) */
46
char_defs_katakana_base = char_defs_US_base+128,
47
/* extra symbols for national character sets */
48
char_defs_pound = char_defs_katakana_base+128, /* pound sign (UK 0x23, French WP 0x23) */
49
char_defs_yen, /* yen sign (Japan 0x5C) */
50
char_defs_auml, /* latin small letter a with diaeresis (Swedish/Finish 0x7B, German 0x7B) */
51
char_defs_Auml, /* latin capital letter A with diaeresis (Swedish/Finish 0x5B, German 0x5B) */
52
char_defs_Aring, /* latin capital letter A with ring above (Swedish/Finish 0x5D, Norwegian/Danish 0x5D) */
53
char_defs_uuml, /* latin small letter u with diaeresis (Swedish/Finish 0x7E, German 0x7D) */
54
char_defs_aring, /* latin small letter a with ring above (Swedish/Finish 0x7D, Norwegian/Danish 0x7D) */
55
char_defs_Uuml, /* latin capital letter U with diaeresis (German 0x5D) */
56
char_defs_ouml, /* latin small letter o with diaeresis (German 0x7C) */
57
char_defs_Ouml, /* latin capital letter O with diaeresis (German 0x5C) */
58
char_defs_szlig, /* latin small letter sharp s (German 0x7E) */
59
char_defs_aelig, /* latin small letter ae (Norwegian/Danish 0x7B) */
60
char_defs_AElig, /* latin capital letter AE (Norwegian/Danish 0x5B) */
61
char_defs_oslash, /* latin small letter o with stroke (Norwegian/Danish 0x7C) */
62
char_defs_Oslash, /* latin capital letter O with stroke (Norwegian/Danish 0x5C) */
63
char_defs_agrave, /* latin small letter a with grave (French WP 0x40) */
64
char_defs_deg, /* degree sign (French WP 0x5B) */
65
char_defs_ccedil, /* latin small letter c with cedilla (French WP 0x5C) */
66
char_defs_sect, /* section sign (French WP 0x5D) */
67
char_defs_egrave, /* latin small letter e with grave (French WP 0x7B) */
68
char_defs_ugrave, /* latin small letter u with grave (French WP 0x7C) */
69
char_defs_eacute, /* latin small letter e with acute (French WP 0x7D) */
70
char_defs_uml, /* diaeresis (French WP 0x7E) */
72
char_defs_count /* total character count */
75
/* structure used to describe differences between national character sets and
77
/* much more compact than defining the complete 128-char vector */
78
typedef struct char_override_t
80
unsigned char char_index; /* char to replace */
81
unsigned short symbol_index; /* replacement symbol */
84
/* One UK-specific character */
85
static const char_override_t UK_overrides[1] =
87
{ 0x23, char_defs_pound }
90
/* One japan-specific character (see below for the 128 additionnal characters) */
91
static const char_override_t japanese_overrides[1] =
93
{ 0x5C, char_defs_yen }
96
/* 5 sweden/finland-specific characters */
97
static const char_override_t swedish_overrides[/*5*/7] =
99
{ 0x7B, char_defs_auml },
100
{ 0x5B, char_defs_Auml },
101
{ 0x5D, char_defs_Aring },
102
{ 0x7E, char_defs_uuml },
103
{ 0x7D, char_defs_aring },
104
/* next characters described in D-4 but not 1-10 */
105
{ 0x5C, char_defs_Ouml },
106
{ 0x7C, char_defs_ouml }
109
/* 7 german-specific characters */
110
static const char_override_t german_overrides[7] =
112
{ 0x5D, char_defs_Uuml },
113
{ 0x7D, char_defs_uuml },
114
{ 0x7C, char_defs_ouml },
115
{ 0x5C, char_defs_Ouml },
116
{ 0x7B, char_defs_auml },
117
{ 0x7E, char_defs_szlig },
118
{ 0x5B, char_defs_Auml } /* 945423-9701 rev. B p. 1-10 says 0x5D, but it must be a mistake */
121
/* 6 norway/denmark-specific characters */
122
static const char_override_t norwegian_overrides[6] =
124
{ 0x5D, char_defs_Aring },
125
{ 0x7B, char_defs_aelig },
126
{ 0x5B, char_defs_AElig },
127
{ 0x7D, char_defs_aring },
128
{ 0x7C, char_defs_oslash},
129
{ 0x5C, char_defs_Oslash}
132
/* 9 french-specific characters (word-processing model only: the data-processing model uses
133
the US character set, although the keyboard mapping is different from the US model) */
134
/* WARNING: I have created the character matrices from scratch, as I have no printout of
135
the original matrices. */
136
static const char_override_t frenchWP_overrides[9] =
138
{ 0x23, char_defs_pound },
139
{ 0x40, char_defs_agrave},
140
{ 0x5B, char_defs_deg },
141
{ 0x5C, char_defs_ccedil},
142
{ 0x5D, char_defs_sect },
143
{ 0x7B, char_defs_eacute}, /* 945423-9701 rev. B says char_defs_egrave, but it must be a mistake */
144
{ 0x7C, char_defs_ugrave},
145
{ 0x7D, char_defs_egrave}, /* 945423-9701 rev. B says char_defs_eacute, but it must be a mistake */
146
{ 0x7E, char_defs_uml }
150
char_defs array: character matrices for each character
152
static const UINT8 char_defs[char_defs_count][10] =
155
/* US character set: 128 7*10 character matrix */
1694
/* 128 additional characters for japanese terminals */
3233
/* extra symbols for various national terminals, which use slightly modified
3234
variants of the US character set */
3417
/* WARNING: I have created the next 8 French character matrices from scratch,
3418
as I have no printout of the original matrices. */