├── .terminfo
├── m
│ ├── m100
│ ├── m100-7
│ ├── m100-7-s
│ ├── m100-8
│ ├── m100-8-ns
│ ├── m100-ns
│ └── m100-s
└── t
│ ├── td200
│ ├── td200-15
│ ├── td200-15-s
│ ├── td200-16
│ ├── td200-16-ns
│ ├── td200-ns
│ └── td200-s
├── LICENSE
├── README.md
├── README.md.d
├── acschars.jpg
├── labelbutton.jpg
├── td200-charset.gif
├── trs80-200-216.jpg
├── trs80-217-235.jpg
├── trs80-236-254.jpg
├── trs80-255-273.jpg
├── trs80-274-312.jpg
├── trs80-313-331.jpg
├── trs80-332-350.jpg
├── trs80-351-367.jpg
├── trs80-360-376.jpg
└── worms-lowres.gif
├── acschars.c
├── compare.md
├── compare.vt52
├── dot.inputrc
├── h19.md
├── m100.charmap
├── orig.termcap
├── orig.terminfo
├── tandy.terminfo
├── td200
└── trs100.terminfo
/.terminfo/m/m100:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/.terminfo/m/m100
--------------------------------------------------------------------------------
/.terminfo/m/m100-7:
--------------------------------------------------------------------------------
1 | m100-7-s
--------------------------------------------------------------------------------
/.terminfo/m/m100-7-s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/.terminfo/m/m100-7-s
--------------------------------------------------------------------------------
/.terminfo/m/m100-8:
--------------------------------------------------------------------------------
1 | m100
--------------------------------------------------------------------------------
/.terminfo/m/m100-8-ns:
--------------------------------------------------------------------------------
1 | m100
--------------------------------------------------------------------------------
/.terminfo/m/m100-ns:
--------------------------------------------------------------------------------
1 | m100
--------------------------------------------------------------------------------
/.terminfo/m/m100-s:
--------------------------------------------------------------------------------
1 | m100-7-s
--------------------------------------------------------------------------------
/.terminfo/t/td200:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/.terminfo/t/td200
--------------------------------------------------------------------------------
/.terminfo/t/td200-15:
--------------------------------------------------------------------------------
1 | td200-15-s
--------------------------------------------------------------------------------
/.terminfo/t/td200-15-s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/.terminfo/t/td200-15-s
--------------------------------------------------------------------------------
/.terminfo/t/td200-16:
--------------------------------------------------------------------------------
1 | td200
--------------------------------------------------------------------------------
/.terminfo/t/td200-16-ns:
--------------------------------------------------------------------------------
1 | td200
--------------------------------------------------------------------------------
/.terminfo/t/td200-ns:
--------------------------------------------------------------------------------
1 | td200
--------------------------------------------------------------------------------
/.terminfo/t/td200-s:
--------------------------------------------------------------------------------
1 | td200-15-s
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Tandy-Terminfo
4 | Tandy Model 100, 102, 200 Terminfo for screen control on UNIX machines
5 |
6 |
7 | ## What is this?
8 |
9 | When using the TELCOM terminal program on a Tandy portable computer
10 | such as the Tandy 200, the remote host needs to know how to send
11 | escape sequences to do things like clear the screen, move the cursor,
12 | show text in reverse, and so on. In UNIX, that information is stored
13 | in the TERMINFO database and then used by setting the TERM environment
14 | variable.
15 |
16 | This repository provides both the [source TERMINFO](tandy.terminfo)
17 | file and the [compiled versions](.terminfo/t/).
18 |
19 | ## Installation
20 |
21 | Download the [source TERMINFO](tandy.terminfo) file and compile it
22 | with `tic` on your UNIX host.
23 |
24 | tic tandy.terminfo
25 |
26 | That will create the proper files in your `.terminfo` directory so
27 | they can be used immediately.
28 |
29 |
30 | ## Usage
31 |
32 | Set your TERM environment variable to one of the available terminal
33 | types (see below) to inform programs how to talk to your Tandy. For
34 | example,
35 |
36 | export TERM=td200
37 |
38 | There are different terminal types for the Model 100 (`m100`) and the
39 | Model 200 (`td200`) as those have a different number of lines.
40 |
41 |
42 | There are also different types depending upon whether you have your
43 | status line ("labels") disabled or not. By default it is presumed you
44 | will disable the status line by pressing the LABEL button. If you do
45 | not wish to disable the status line, use the `-s` variant, like so,
46 |
47 | export TERM=td200-s
48 |
49 | For convenience, there are aliases so you can refer to the TERM by
50 | number of lines instead of whether it has a status line (`td200-15`).
51 |
52 |
53 | ## The list of available terminals
54 |
55 | * `td200`: Tandy Model 200 (no status line). 40 columns x 16 rows.
56 | Aliases: `td200-ns`, `td200-16`.
57 | * `td200-s`: Tandy Model 200 (has status line). 40 columns x 15 rows.
58 | Alias:`td200-15`.
59 | * `m100`: Tandy Model 100 (no status line). 40 columns x 8 rows.
60 | Aliases: `m100-ns`, `m100-8`
61 | * `m100-s`: Tandy Model 100 (has status line). 40 columns x 7 rows.
62 | Alias: `m100-7`
63 |
64 |
65 | ## Testing
66 |
67 | You can test whether it worked by pressing Control-L. If it clears the
68 | screen, then you have correctly installed the TERMINFO files. You can
69 | also try running a `curses` program, such as the BSD game "worms"
70 | which animates ASCII worms crawling on your screen. (`apt install
71 | bsdgames`).
72 |
73 |
74 | ## Suggestions
75 |
76 | While setting the `TERM` environment variable will get you most of the
77 | way to a usable interface, there are some other commands which the
78 | author, hackerb9, recommends running when using a Tandy portable as a
79 | terminal. You can put these in your `.bash_profile` so they'll be
80 | sourced when you login or you can put them in a file and use `source
81 | filename` to read the commands into your current shell.
82 |
83 | ### td200 or .bash_profile
84 |
85 | Here is a shell script, [td200](td200),
86 | which configures the teminal and sets
87 | up workarounds for some programs.
88 | Because it sets environment variables,
89 | you must source it by `source td200` or
90 | `. td200`.
91 |
92 | td200 script
93 |
94 | # Set terminal type to Tandy 200
95 | export TERM=td200
96 | # Send ASCII, not Unicode UTF-8 chars
97 | export LANG=C
98 | # Reset the terminal (turns off labels)
99 | reset
100 | # Turn on software flow control (^S/^Q)
101 | stty ixon ixoff
102 | # Some apps ignore the size in TERMINFO
103 | stty rows 16 cols 40
104 | # Backspace key sends ^H not ^?
105 | stty erase ^H
106 | # Right arrow key sends ^\, so don't use that to abort and dump core.
107 | stty quit undef
108 | # Translate Carriage Return to Newline (for uploads > N_TTY_BUF_SIZE)
109 | stty icrnl
110 | # Don't logout when exiting terminal mode in TELCOM
111 | stty clocal
112 |
113 | # Workarounds
114 | export MANPAGER=more
115 | export MANWIDTH=40
116 | export GCC_COLORS=""
117 | alias nano="nano -Opx"
118 | alias w3m="w3m -color=0"
119 |
120 | if [ $SHLVL -gt 1 ]; then
121 | echo "Error, do not run this script."
122 | echo "It must be sourced, like so:"
123 | echo -ne "\n\t"
124 | if type $(basename $0)>/dev/null 2>&1
125 | then
126 | echo ". $(basename $0)"
127 | else
128 | echo "source $0"
129 | fi
130 | echo
131 | exit 1
132 | fi
133 |
134 |
135 | Tip 1: If you put the `td200` program
136 | in your PATH and make it executable,
137 | you can source it without specifying
138 | the full path. For example, `. td200` .
139 |
140 | Tip 2: You can automatically source the
141 | td200 script from your .bash_profile
142 | when logging in from a serial port like
143 | so:
144 |
145 | # If logging in from a serial console,
146 | # it's my Tandy 200 Portable Computer.
147 | if [[ $(tty) =~ /dev/tty(S|ACM) ]]
148 | then
149 | source $HOME/bin/td200
150 | fi
151 |
152 | ### .inputrc for arrow keys
153 |
154 | Hackerb9 also recommends adding the
155 | following to your
156 | [`.inputrc`](dot.inputrc) so that the
157 | arrow keys will work in Bash and other
158 | programs that use libreadline.
159 |
160 | $if term=td200
161 | # No ANSI colors for tab completion
162 | set colored-completion-prefix off
163 |
164 | # Bind Model T's TELCOM keys
165 | Control-^: previous-history
166 | Control-_: next-history
167 | Control-]: backward-char
168 | # Note: Use 'stty quit undef' to make right arrow work.
169 | Control-\: forward-char
170 | # Shift + BkSp to delete next char.
171 | "\d": delete-char
172 | # While we're here, disable ANSI colors for tab completion
173 | set colored-completion-prefix off
174 | $endif
175 |
176 | ### .emacs for flow control
177 |
178 | Emacs by default uses C-s for search. You can tell emacs that the
179 | td200 will be using C-s for XON/XOFF flow control by adding this to
180 | your .emacs file:
181 |
182 | ;; Tandy 200/100/102 requires
183 | ;; XON/XOFF flow control.
184 | (enable-flow-control-on "td200" "m100" "td102")
185 |
186 |
187 | ## Notes on using the TELCOM program
188 |
189 | * For a standard serial port @9600 baud, type this command in TELCOM:
190 |
191 | stat 88n1enn
192 |
193 | * 19200 baud works fine if your UNIX getty is configured to talk that speed:
194 |
195 | stat 98n1enn
196 |
197 | * Software flow control (XON/XOFF) is absolutely necessary as the 8250
198 | UART has a one byte buffer. If you see text followed by garbage, try
199 | `stty ixon ixoff -ixany` .
200 |
201 | * Hardware flow control (RTS/CTS) is not available in TELCOM.
202 |
203 | * To connect to a PC running UNIX, you'll need a null modem cable.
204 |
205 | * The Tandy Model 200 has a *FEMALE* 25 pin RS-232c port.
206 |
207 | * You should have no data corruption when using XON/XOFF flow control,
208 | no matter how much text is sent. If you do, you may need a new
209 | serial adapter on your host computer. Some PC serial cards and USB
210 | RS232 adapters do not work with XON/XOFF due to too large of a FIFO
211 | (e.g., 16550). The solution is to purchase a higher quality adapter
212 | with hardware-level ("on-chip") xon/xoff support. UART chips like
213 | the 16950 provide this, as do most chips from FTDI, and some
214 | ProLific chips.
215 |
216 | ### Special keys:
217 |
218 | \ GRPH - Backslash
219 | | GRPH SHIFT _ Pipe
220 | ` GRPH [ Backtick
221 | ~ GRPH SHIFT ] Tilde
222 | { GRPH 9 Open curly brace
223 | } GRPH 0 Close curly brace
224 | ^@ GRPH P Sends 0x80, useful in Emacs to set the mark
225 |
226 | Note that Tandy docs say CTRL-@ is supposed to work, but it does not.
227 |
228 |
229 | ## Enabling a serial login on Unix systems with systemd and agetty
230 |
231 | If you have a UNIX box running `systemd`, such as Debian GNU/Linux,
232 | you can enable a serial port login like so:
233 |
234 | systemctl enable serial-getty@ttyS0
235 | systemctl start serial-getty@ttyS0
236 |
237 | (For a USB to serial converter, try `ttyUSB0` instead of `ttyS0`.)
238 |
239 | When you connect with your Tandy portable, you'll see some garbage
240 | characters instead of a Login prompt and need to hit ENTER several
241 | times. This is because getty tries 115,200 then 38,400 and finally
242 | 9600 baud. Every time you hit ENTER it should detect that the speed is
243 | mismatched and switch to the next one. There is no harm in hitting
244 | ENTER too many times as it won't change baud rate once they match.
245 |
246 | ### Optional: Change getty's default baud rate
247 |
248 | You may wish to change the default baud rate so that it only connects
249 | at 9600 baud. Hackerb9 suggests adding 19200 baud to the list since
250 | the Tandy 200 can handle that and it is a significant improvement.
251 |
252 | To do that, copy the symlink that `enable` created into a file, make a
253 | symlink to the new file (because systemd is overly persnickety), and
254 | then edit the file by hand.
255 |
256 | sudo -s
257 | systemctl enable serial-getty@ttyS0
258 | cd /etc/systemd/system/getty.target.wants/
259 | cp serial-getty@ttyS0.service ..
260 | ln -sf ../serial-getty@ttyS0.service
261 | editor serial-getty@ttyS0.service
262 | exit
263 |
264 | When editing, change the line that says:
265 |
266 | ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,38400,9600 %I $TERM
267 |
268 | to
269 |
270 | ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 19200,9600 %I $TERM
271 |
272 | To connect at 19200 baud, you'll need to type this into TELCOM:
273 |
274 | stat 98n1enn
275 |
276 |
277 | ## Problems
278 |
279 | * If you have trouble with the screen occasionally scrolling, be sure
280 | you have the status line turned off by pressing the LABEL button.
281 |
282 | * If you are trying to use the arrow keys, many applications will not
283 | accept them because Tandy's TELCOM program sends them as simple
284 | control-key characters instead of escape sequences.
285 |
286 | key_up=^^, key_down=^_,
287 | key_left=^], key_right=^\,
288 |
289 | However, see the .inputrc workaround above for Bash and other
290 | readline programs.
291 |
292 | * If control-L clears the screen, but certain programs show
293 | uninterpreted escape sequences (e.g., `0;m`), then the problem is
294 | that those programs are not using TERMINFO. They are instead
295 | presuming there is only one kind of terminal and implementing the
296 | escape sequences themselves which not only is redundant work, it is
297 | incorrect.
298 |
299 | ### Reportedly buggy programs
300 |
301 | * man (workaround, `export MANPAGER=more`)
302 | * bash's PS1 prompt, tab completion when ambiguous
303 | * gcc error messages (workaround, `export GCC_COLORS=""`)
304 | * w3m colors (workaround `w3m -color=0` or use **O**ptions to set
305 | *Display With Color* to 0)
306 | * w3m disables flow control (workaround, w3m-mode in emacs works fine)
307 | * git (workaround, disable ANSI color using `git config --add color.ui false`)
308 | * nano mumbles about XON/XOFF
309 | (workaround, `nano -p` or `set preserve` in .nanorc)
310 | * apt
311 | * pacman
312 | * ssh disables flow control (workaround, see below).
313 |
314 | You can test if an application is indeed buggy by running `xterm -ti
315 | vt52 -tn vt52`. If that terminal shows the same errors as on your
316 | Tandy 200, then it is the program that is at fault and you should
317 | file a bug report with that project. On the other hand, if xterm's
318 | vt52 emulation works (does not show escape sequences), please file a
319 | bug with this project. (Bug reports are always appreciated.)
320 |
321 | ### Ssh disables flow control
322 |
323 | Because `ssh` disables flow control, it will often have garbage shown
324 | on the screen. A workaround is to login from another terminal on the
325 | local host after ssh has started and run:
326 |
327 | stty -F /dev/ttyS0 ixon ixoff
328 |
329 | (Where `ttyS0` is the name of the serial port your Tandy is on.)
330 |
331 |
332 | ## Further Reading
333 |
334 | * terminfo(5) - terminal capability data base
335 | * tic(1) - the TERMINFO entry-description compiler
336 | * infocmp(1) - compare or print out TERMINFO descriptions
337 | * [Tandy 200 TELCOM manual](https://archive.org/details/Telcom_for_Tandy_200_1985_Microsoft)
338 | Particularly:
339 | * [Table of Escape Sequence Codes](https://archive.org/details/Telcom_for_Tandy_200_1985_Microsoft/page/n48/mode/1up)
340 | * [TERMCAP for use with Microsoft Xenix](https://archive.org/details/Telcom_for_Tandy_200_1985_Microsoft/page/n40/mode/1up):
341 |
342 |
343 | ## Table of Escape Sequences
344 |
345 | The Escape sequences listed in the official manual were incomplete.
346 | Here are the escape sequences which hackerb9's Tandy 200 responds to.
347 |
348 | Sequence | Meaning | Notes
349 | ---------|---------|------
350 | \eA | cursor Up
351 | \eB | cursor Down | ^J may be equivalent.
352 | \eC | cursor Right
353 | \eD | cursor Left | ^H may be equivalent.
354 | \eE | clear screen | \ej may be equivalent, undocumented in [TELCOM manual](https://archive.org/details/Telcom_for_Tandy_200_1985_Microsoft/page/n48/mode/1up), but this is what the sample TERMCAP in the same manual actually uses.
355 | \eF | ignored | see Alternate Character Set section below
356 | \eG | ignored
357 | \eH | cursor home | Cursor moves to upper left corner
358 | \eI | type answerback id | Types **"#RSM200"** on hackerb9's **R**adio-**S**hack **M**odel **200**.
359 | \eJ | clear to the end of screen
360 | \eK | clear to the end of line
361 | \eL | insert line | moves lines below down
362 | \eM | delete line | moves lines below up
363 | \eP | cursor normal
364 | \eQ | cursor invisible
365 | \eR | restore saved line from first buffer | _not documented,_ currently used by dsl to restore status line. May only work on Tandy 200.
366 | \eS | save current line to first buffer | _not documented,_ currently used by dsl to save status line. May only work on Tandy 200.
367 | \eT | enable status line | used in init for variants which have a status line (e.g. td200-s).
368 | \eU | disable status line | used in init_1string for variants which have no status line (e.g. td200).
369 | \eV | disable scrolling | _not used,_ not defined by terminfo. Overwrites bottom line repeatedly. May be useful for downloading large files as it saves one second per kilobyte (18% less time).
370 | \eW | enable scrolling | used in init_2string for `reset`.
371 | \eY | Move to cursor address *r,c* | cursor_address=\eY%p1%' '%+%c%p2%' '%+%c
Row and column are sent as single bytes which start at 32 (ASCII space) for zero.
372 | \ej | Clear screen | _not used,_ \eE is the same
373 | \el | Clear line | _not used,_ terminfo does not define this function. Unlike Delete line (\eM), this does not close the gap by moving lines up.
374 | \ep | Reverse text
375 | \eq | Normal text
376 | \er | restore saved line from second buffer | _not documented,_ currently unused. May only work on Tandy 200.
377 | \es | save current line to second buffer | _not documented,_ currently unused. May only work on Tandy 200.
378 |
379 | ### Comparison with VT52
380 |
381 | The TELCOM manual claims the terminal is DEC VT52 compatible, but that
382 | seems [approximate](compare.vt52). While the cursor movement and
383 | screen clearing are the same, it is just different enough to cause
384 | problems.
385 |
386 | 1. Perhaps most noteworthy is that TELCOM uses one of the escape
387 | sequences, \eI, the VT52's scroll_reverse (AKA "reverse index"), for a
388 | completely different purpose. So, if you are editing a file with
389 | `TERM=vt52` and you scroll back, your Tandy portable will muck up the
390 | screen and type its "Answerback ID" into your file.
391 |
392 | 1. Additionally, the sequences expected for the arrow keys have been
393 | redefined to control characters. This is rather inconvenient as those
394 | control characters were already used for other things and it is a
395 | rather questionable decision to redefine them.
396 |
397 | 1. A final downside of using the VT52 terminfo file is that extra
398 | capabilities that TELCOM has will not be used: reverse mode, delete
399 | line, toggle status line, and hide cursor.
400 |
401 | Perhaps of interest is that the Model T escape sequences seem to
402 | actually be much closer to a VT52-clone called the the Heathkit H19
403 | (Zenith Z-19) which Microsoft was known to be using at that time for
404 | development. For more information, please see the [h19](h19.md) and
405 | [h19 comparison](compare.md) pages.
406 |
407 | ### Alternate Character Set
408 |
409 | One feature supported by the DEC VT52 is Alternate Character Set (ACS)
410 | mode. ACS uses 7-bit ASCII characters for box drawing and glyphs such
411 | as π. It would at first glance appear that TELCOM does not support it
412 | since the VT52 \eF and \eG escape sequences which enter and exit ACS
413 | are ignored.
414 |
415 | However, hackerb9 realized it is possible to embed 8-bit codes into
416 | the terminfo file and could use Tandy's Extended ASCII to represent
417 | those characters directly in the acs_chars string. Here's the mapping
418 | hackerb9 came up with:
419 |
420 | acs_chars=}\243.\231\,\233+\232
421 | -\230h\345~\325a\377
422 | f\246`\235{\210q\361
423 | i\251n\372m\366
424 | j\367|\212g\2150\357
425 | w\363u\371t\364v\370
426 | l\360k\362x\365,
427 |
428 | #### [acschars.c](acschars.c)
429 |
430 | Here is a simple [ncurses test program](acschars.c) written by
431 | hackerb9 which shows all the ACS characters on the screen. It works on
432 | any terminal, not just Tandy portables. If a terminal were to support
433 | all the possible ACS characters, the output would look something like:
434 |
435 | NCURSES EXTENDED CHARACTERS
436 |
437 | ↑ Diamond ◆ Scan ⎺⎻─⎼⎽
438 | ┌─┬─┐ Board ⯐ Pi π
439 | │ │ │ CkBoard ▒ PlMinus ±
440 | ←├─┼─┤→ Block █ LEqual ≤
441 | │ │ │ Bullet · GEqual ≥
442 | └─┴─┘ Degree ° NEqual ≠
443 | ↓ Lantern ɸ Strling £
444 |
445 | Tandy's Extended ASCII lacks some of those characters, such as the
446 | scan lines and Less-Than-or-Equal-To. Ncurses automatically replaces
447 | undefined ACS chars with similar ASCII, so here's what it looks like
448 | on the Tandy 200:
449 |
450 |
451 |
452 |
453 | #### ACS Chars as a table
454 |
455 | Here is the character mapping represented by the acs_chars string above:
456 |
457 | Glyph|Name | VT100
Name | Model 100
charset
(octal) | Notes
458 | --|-----------------------|-----------|---------------------|--------------
459 | £ |UK pound sign | } | \243
460 | ↓ |arrow pointing down | . | \231
461 | ← |arrow pointing left | , | \233
462 | → |arrow pointing right | + | \232
463 | ↑ |arrow pointing up | - | \230
464 | ⯐ |board of squares | h | \345 | Substitute 2x2 checkerboard
465 | · |bullet | ~ | \325 | Substitute o-slash (ø)
466 | ▒ |checker board (stipple)| a | \377
467 | ° |degree symbol | f | \246
468 | ◆ |diamond | ` | \235
469 | ≥ |greater-than-or-equal-to| z | | NO TANDY 200 EQUIVALENT
470 | π |greek pi | { | \210
471 | ─ |horizontal line | q | \361
472 | ɸ |lantern symbol | i | \251 | Substitute Section symbol
473 | ┼ |large plus or crossover| n | \372
474 | ≤ |less-than-or-equal-to | y | \251
475 | └ |lower left corner | m | \366
476 | ┘ |lower right corner | j | \367
477 | ≠ |not-equal | \| | \212
478 | ± |plus/minus | g | \215
479 | ⎺ |scan line 1 | o | | NO TANDY 200 EQUIVALENT
480 | ⎻ |scan line 3 | p | | NO TANDY 200 EQUIVALENT
481 | ⎼ |scan line 7 | r | | NO TANDY 200 EQUIVALENT
482 | ⎽ |scan line 9 | s | | NO TANDY 200 EQUIVALENT
483 | █ |solid square block | 0 | \357
484 | ┬ |tee pointing down | w | \363
485 | ┤ |tee pointing left | u | \371
486 | ├ |tee pointing right | t | \364
487 | ┴ |tee pointing up | v | \370
488 | ┌ |upper left corner | l | \360
489 | ┐ |upper right corner | k | \362
490 | │ |vertical line | x | \365
491 |
492 |
493 | ## Charmap
494 |
495 | Hackerb9 has created a new locale charmap. (See `locale -m` and
496 | `locale(1)`) This lets UTF-8 unicode show up correctly on the Tandy
497 | 200 for any program that uses the GNU C Library. One can also convert
498 | back and forth between Tandy's Extended ASCII and Unicode characters
499 | using `iconv`. Please see [tandy-locale](../tandy-locale) for details.
500 |
501 | ## History
502 |
503 | This started out as a woefully inadequate TERMCAP entry for
504 | Microsoft's Xenix in the back of the TELCOM manual. (Yes,
505 | Microsoft had their own flavor of UNIX back then. And you could buy it
506 | at Radio Shack on their [TRS-80 Model 16](https://archive.org/details/RSC-09_Computer_Catalog_1983_Radio_Shack/page/n3/mode/1up)
507 | computer). Just for historical interest, [here](orig.termcap) is the
508 | original Tandy 16/Xenix termcap entry from [page 72 of the TELCOM Manual](https://archive.org/details/Telcom_for_Tandy_200_1985_Microsoft/page/n40/mode/1up):
509 |
510 | n1|td200|Tandy 200:\
511 | :am:bs:xt:co#40:li#16:al=\EL:dl=\EM:cd=^L:ce=\EK:cl=\EE:cm=\EY%+ %+ :\
512 | :nd=^\:dn=^_:up=\EA:se=\Eq:so=\Ep:kl=^J:kr=^^:ku=^^:kd=^_:
513 |
514 | ### Differences
515 |
516 | Using captoinfo we can convert the above entry to
517 | [terminfo](orig.terminfo) and compare it to [the current
518 | terminfo](tandy.terminfo) for this project. As you can see, there was
519 | a lot hackerb9 was able to add.
520 |
521 | $ infocmp -L -d origtd200 td200 | tr , : | column -t -s:
522 | comparing origtd200 to td200.
523 | comparing booleans.
524 | auto_left_margin F T.
525 | xon_xoff F T.
526 | comparing numbers.
527 | init_tabs NULL 8.
528 | comparing strings.
529 | acs_chars NULL '+\232\054\233-\230.\2310\357`\235a\377f\246g\215h\345i\251j\367k\362l\360m\366n\372q\361t\364u\371v\370w\363x\365{\210|\212}\243~\325'.
530 | clr_eos '^L' '\EJ'.
531 | cursor_down '^_' '\EB'.
532 | cursor_home NULL '\EH'.
533 | cursor_invisible NULL '\EQ'.
534 | cursor_left '^H' '\ED'.
535 | cursor_normal NULL '\EP'.
536 | cursor_right '^\' '\EC'.
537 | dis_status_line NULL '\EU\EY0 \ES\EM'.
538 | enter_reverse_mode NULL '\Ep'.
539 | exit_attribute_mode NULL '\Eq'.
540 | init_1string NULL '\EU'.
541 | init_2string NULL '\EW\Eq\EE'.
542 | key_left '\n' '^]'.
543 | key_right '^^' '^\'.
544 |
545 | ## Future
546 |
547 | This will hopefully eventually be added to the official TERMINFO
548 | databases used by BSD and GNU/Linux systems, but it'd be good to find
549 | out all the undocumented features before doing that. (See Questions
550 | and TODO below).
551 |
552 |
553 | ## Questions
554 |
555 | * Why not use TERM=vt52
556 |
557 | While Model T escape codes are very similar to the VT52 — and even
558 | more similar to the H19 — Tandy portables are missing important
559 | functionality. In particular, full screen programs will send the
560 | **Reverse Index** escape code ('\eI') to try to scroll the text down
561 | on the page. TELCOM interprets that as "Send Answerback".
562 |
563 | * Is it possible to read the Function keys?
564 |
565 | It does not appear so.
566 |
567 | * Eight bit codes show up as graphics characters, but they are not in
568 | Latin-1 order. Is there something that can be done about that? Yes!
569 | Hackerb9 has created a project which sets up a T200 locale which
570 | will automatically translate from Unicode to display "extended
571 | ASCII" characters on the Tandy 200. It works by compiling a gconv
572 | module for glibc/iconv. Please see [tandy-locale](../tandy-locale).
573 |
574 | * Do all escape sequences (including the undocumented ones) work the
575 | same on a Model 100?
576 |
577 | No. It appears the sequences for saving and restoring an entire line
578 | do not exist.
579 |
580 |
581 | ## TODO
582 |
583 | * Figure out why man pages have `\e[m` sent at the end of each line,
584 | but *only* when my PAGER is `less`. Note that `nroff | less` doesn't
585 | have the same problem.
586 |
587 | * Maybe report bugs to projects which presume ANSI colors are always
588 | available. Why don't programs like `git` link with ncurses?
589 |
590 | * Maybe get cursor keys working in Emacs.
591 |
592 | Cursor keys work in vi, but not in Emacs. Emacs is doing something
593 | clever to get around xon/xoff brain damage. Right (^]) takes over
594 | for Search Forward (normally ^S) and Up (^^) is bound to quote next
595 | character (usually ^Q). This is actually kind of handy for me since
596 | I never use the arrow keys. I just wish they had bound one of the
597 | others to run Help, since that is missing as ^H.
598 |
599 |
600 | ## Implementation Notes
601 |
602 | * What Tandy calls "LABELS" hackerb9 calls a
603 | "Status Line" because in terminfo
604 | parlance "Soft Labels" is for text
605 | above reprogrammable Function keys.
606 | From a Unix program's perspective,
607 | the Tandy Function keys are
608 | immutable. While "Status Line" is
609 | not quite correct as it doesn't
610 | show any status, it is more correct
611 | than the alternatives.
612 |
613 | * Terminfo allows codes to overwrite
614 | the status line using tsl/fsl. We
615 | could implement tsl, but how would
616 | we define fsl which is
617 | supposed to pop back to the
618 | previous cursor location. Since
619 | ncurses never uses tsl/fsl, there's
620 | probably also no point in trying.
621 |
622 | For anyone who cares to try, the
623 | following will overwrite your
624 | status line for one second and then
625 | restore it.
626 |
627 | echo $'\eU\eY0 \eS\eM'$(date)$'\eT'
628 | sleep 1
629 | echo $'\eU\eY0 \eR\eT'
630 |
631 | * Why hackerb9 overloaded dsl:
632 |
633 | Terminfo doesn't support enabling status lines (a strange lack). It
634 | can, however, disable them with "dsl". dsl is used in this standard
635 | way for the terminal types without a status line (e.g., `td200`).
636 |
637 | However, hackerb9 made a kludge that seems to work pretty well: the
638 | "dsl" sequence for variants _with_ status lines (e.g., `td200-s`)
639 | actually enables it.
640 |
641 | Just for fun, my dsl strings also
642 | save and restore the labels in the
643 | status line using the undocumented
644 | \eS and \eR escape sequence. This
645 | works to properly turn off the
646 | status line then to re-enable it on
647 | my Tandy 200 (but I have not tested
648 | a Model 100 or 102):
649 |
650 | $ TERM=td200
651 | $ tput dsl
652 | $ TERM=td200-s
653 | $ tput dsl
654 |
655 | By default, the Tandy terminals do *not* rewrite the status line
656 | when it is enabled with an escape sequence. That means you would not
657 | get back the line that says "Prev Down Up Full".
658 |
659 | * Reminder to self: although scroll backward can be faked with HOME,
660 | Insert Line (\eH\eL), there's no point in doing it since ncurses
661 | is smart enough to do it for us.
662 |
663 | * The `td200` entry defaults to presuming the status line is _off_
664 | (which is the preferred way to use it), not _on_ (which is how the
665 | TELCOM software always starts up).
666 |
667 | * Why `clocal` is suggested and included in the [td200](td200) script.
668 | When UNIX detects that a serial login has disconnected, it sends the
669 | HUP (hangup) signal to the user's processes and logs the user out.
670 | Unfortunately, exiting to the MENU from TELCOM (even if we answer
671 | "no" to the "disconnect?" question) will trigger this. Fortunately,
672 | there's a workaround, tell UNIX this is a "local" terminal, not a
673 | modem: `stty clocal`.
674 |
675 | [Technically, exiting from TELCOM to the MENU drops the DTR ("Data
676 | Terminal Ready") line on the serial port. DTR is wired to the UNIX
677 | box's DCD ("Data Carrier Detect"). Back in the days of modems, it
678 | was critical to detect when carrier was dropped, otherwise the next
679 | person dialing in would get the previous person's session, already
680 | logged in!]
681 |
682 | With clocal set, one can interact with a remote program using a
683 | different Tandy 200 program, such as BASIC. As a simple example, if
684 | one wants to upload the ASCII version of a Tandy BASIC program, they
685 | could do the following:
686 |
687 | 1. In TELCOM, login to foreign host.
688 | 1. `cat > somefilename.txt`
689 | 1. Exit TELCOM (F8), then switch to BASIC.
690 | 1. `LOAD "PROGNAME.BA"`
691 | 1. `SAVE "COM:98N1E",A`
692 | 1. Exit BASIC (F8), run TELCOM, and reconnect (F4).
693 | 1. Press Control-D (at the beginning of a newline)
694 | to finish writing to `somefilename.txt`.
695 |
696 | [Thank you to @Dawidi for this tip!]
697 |
698 |
699 |
--------------------------------------------------------------------------------
/README.md.d/acschars.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/acschars.jpg
--------------------------------------------------------------------------------
/README.md.d/labelbutton.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/labelbutton.jpg
--------------------------------------------------------------------------------
/README.md.d/td200-charset.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/td200-charset.gif
--------------------------------------------------------------------------------
/README.md.d/trs80-200-216.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-200-216.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-217-235.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-217-235.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-236-254.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-236-254.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-255-273.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-255-273.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-274-312.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-274-312.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-313-331.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-313-331.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-332-350.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-332-350.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-351-367.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-351-367.jpg
--------------------------------------------------------------------------------
/README.md.d/trs80-360-376.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/trs80-360-376.jpg
--------------------------------------------------------------------------------
/README.md.d/worms-lowres.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hackerb9/Tandy-Terminfo/84be675316d53106a2585cc27cf5687c0488e823/README.md.d/worms-lowres.gif
--------------------------------------------------------------------------------
/acschars.c:
--------------------------------------------------------------------------------
1 | #include /* For keypad_local */
2 | #include
3 | int main(void)
4 | {
5 | initscr();
6 |
7 | int startrow=2;
8 | if (LINES<12) startrow=0;
9 |
10 | if (LINES>=12) {
11 | attron(A_REVERSE);
12 | mvprintw(0,0," NCURSES EXTENDED CHARACTERS \n");
13 | attroff(A_REVERSE);
14 | printw("\n");
15 | }
16 |
17 | int col=1;
18 | int row=startrow;
19 | mvprintw(row++, col ," ");
20 | addch(ACS_UARROW);
21 | printw(" ");
22 | printw("\n");
23 |
24 | mvprintw(row++,col," ");
25 | addch(ACS_ULCORNER);
26 | addch(ACS_HLINE);
27 | addch(ACS_TTEE);
28 | addch(ACS_HLINE);
29 | addch(ACS_URCORNER);
30 | printw(" ");
31 | printw("\n");
32 |
33 | mvprintw(row++,col," ");
34 | addch(ACS_VLINE);
35 | printw(" ");
36 | addch(ACS_VLINE);
37 | printw(" ");
38 | addch(ACS_VLINE);
39 | printw("\n");
40 |
41 | move(row++,col);
42 | addch(ACS_LARROW);
43 | addch(ACS_LTEE);
44 | addch(ACS_HLINE);
45 | addch(ACS_PLUS);
46 | addch(ACS_HLINE);
47 | addch(ACS_RTEE);
48 | addch(ACS_RARROW);
49 | printw("\n");
50 |
51 | mvprintw(row++,col," ");
52 | addch(ACS_VLINE);
53 | printw(" ");
54 | addch(ACS_VLINE);
55 | printw(" ");
56 | addch(ACS_VLINE);
57 | printw("\n");
58 |
59 | mvprintw(row++,col," ");
60 | addch(ACS_LLCORNER);
61 | addch(ACS_HLINE);
62 | addch(ACS_BTEE);
63 | addch(ACS_HLINE);
64 | addch(ACS_LRCORNER);
65 | printw(" ");
66 | printw("\n");
67 |
68 | mvprintw(row++,col," ");
69 | printw(" ");
70 | addch(ACS_DARROW);
71 | printw(" ");
72 | printw("\n");
73 |
74 | col=14;
75 | row=startrow;
76 | mvprintw(row++, col, "Diamond ");
77 | addch(ACS_DIAMOND);
78 | mvprintw(row++, col, "Board ");
79 | addch(ACS_BOARD);
80 | mvprintw(row++, col, "CkBoard ");
81 | addch(ACS_CKBOARD);
82 | mvprintw(row++, col, "Block ");
83 | addch(ACS_BLOCK);
84 | mvprintw(row++, col, "Bullet ");
85 | addch(ACS_BULLET);
86 | mvprintw(row++, col, "Degree ");
87 | addch(ACS_DEGREE);
88 | mvprintw(row++, col, "Lantern ");
89 | addch(ACS_LANTERN);
90 |
91 |
92 | col=29;
93 | row=startrow;
94 | printw("\n");
95 | mvprintw(row++,col, "Scan ");
96 | addch(ACS_S1);
97 | addch(ACS_S3);
98 | addch(ACS_HLINE);
99 | addch(ACS_S7);
100 | addch(ACS_S9);
101 | mvprintw(row++, col, "Pi ");
102 | addch(ACS_PI);
103 | mvprintw(row++, col, "PlMinus ");
104 | addch(ACS_PLMINUS);
105 | mvprintw(row++, col, "LEqual ");
106 | addch(ACS_LEQUAL);
107 | mvprintw(row++, col, "GEqual ");
108 | addch(ACS_GEQUAL);
109 | mvprintw(row++, col, "NEqual ");
110 | addch(ACS_NEQUAL);
111 | mvprintw(row++, col, "Strling ");
112 | addch(ACS_STERLING);
113 | printw("\n");
114 |
115 | if (LINES>=12) {
116 | /*Long name is last string after pipe*/
117 | printw("\n");
118 | char *p=ttytype;
119 | while (*p++)
120 | ;
121 | while (p>=ttytype && *p--!='|')
122 | ;
123 | p+=2;
124 | printw("Terminal type: %s\n", p);
125 | }
126 |
127 | move(LINES-1, 0);
128 | refresh();
129 |
130 | /* Exit, but don't use endwin as that has the titeInhibit misfeature
131 | which clears the screen annoyingly. Use reset_shell_mode() instead. */
132 |
133 | putp(keypad_local); /* disable application keys mode. */
134 | reset_shell_mode(); /* reset the terminal but don't clear screen. */
135 |
136 | // getch(); /* Old method was wait for key */
137 | // endwin(); /* before clearing screen. */
138 |
139 | return 0;
140 | }
141 |
--------------------------------------------------------------------------------
/compare.md:
--------------------------------------------------------------------------------
1 | # Escape sequence comparison
2 |
3 | DEC VT52 and Heath H19 terminals use escape codes similar to the Model
4 | T computers. But are they similar enough that one could use such a
5 | terminal as a screen? This table lists all the escape codes and
6 | whether the code is recognized by an H19 or VT52. If it is not
7 | recognized, but an equivalent exists for that terminal, then the
8 | equivalent is listed.
9 |
10 | In the tables below, '\e' stands for Esc.
11 |
12 | ## Output escape sequences
13 |
14 | | Sequence | Meaning (on a Model T) | H19 | VT52 |
15 | |----------|------------------------------|------|--------|
16 | | \eA | cursor Up | [x] | [x] |
17 | | \eB | cursor Down | [x] | [x] |
18 | | \eC | cursor Right | [x] | [x] |
19 | | \eD | cursor Left | [x] | [x] |
20 | | \eE | clear screen | [x] | \eH\eJ |
21 | | \eH | cursor home | [x] | [x] |
22 | | \eJ | clear to the end of screen | [x] | [x] |
23 | | \eK | clear to the end of line | [x] | [x] |
24 | | \eL | insert line | [x] | |
25 | | \eM | delete line | [x] | |
26 | | \eP | cursor normal | \ey5 | |
27 | | \eQ | cursor invisible | \ex5 | |
28 | | \eT | enable status line | | |
29 | | \eU | disable status line | | |
30 | | \eV | disable scrolling | \e[ | |
31 | | \eW | enable scrolling | \e\ | |
32 | | \eY | Move to cursor address *r,c* | [x] | [x] |
33 | | \ej | Clear screen (alias) | \eE | \eH\eJ |
34 | | \el | Clear line | [x] | |
35 | | \ep | Reverse text | [x] | |
36 | | \eq | Normal text | [x] | |
37 |
38 | ## Input escape sequences
39 |
40 | The Model T computers do not define keys the same way as VT52/H19. In
41 | fact, they always send a single byte (a control character), not an
42 | escape sequence.
43 |
44 | | Sequence | Meaning (on a Model T) | H19 and VT52 |
45 | |----------|------------------------|--------------|
46 | | ^^ | Arrow Up | \eA |
47 | | ^_ | Arrow Down | \eB |
48 | | ^\ | Arrow Right | \eC |
49 | | ^] | Arrow Left | \eD |
50 |
51 |
52 |
53 | ## Unusual escape sequences
54 |
55 | These escape sequences are recognized sometimes, but in such limited
56 | circumstances that it wouldn't matter if a terminal did not support
57 | them.
58 |
59 | | Sequence | Model T Meaning | Where available |
60 | |----------|---------------------------------------|-----------------|
61 | | \eI | type answerback id | TELCOM |
62 | | \eR | restore saved line from first buffer | Tandy 200 |
63 | | \eS | save current line to first buffer | Tandy 200 |
64 | | \er | restore saved line from second buffer | Tandy 200 |
65 | | \es | save current line to second buffer | Tandy 200 |
66 |
--------------------------------------------------------------------------------
/compare.vt52:
--------------------------------------------------------------------------------
1 | $
2 | $ infocmp -L -c td200 vt52 # SHOWING ONLY VALUES THEY HAVE IN COMMON.
3 | comparing td200 to vt52.
4 | comparing booleans.
5 | back_color_erase= F.
6 | can_change= F.
7 | ceol_standout_glitch= F.
8 | col_addr_glitch= F.
9 | cpi_changes_res= F.
10 | cr_cancels_micro_mode= F.
11 | eat_newline_glitch= F.
12 | erase_overstrike= F.
13 | generic_type= F.
14 | hard_copy= F.
15 | hard_cursor= F.
16 | has_meta_key= F.
17 | has_print_wheel= F.
18 | has_status_line= F.
19 | hue_lightness_saturation= F.
20 | insert_null_glitch= F.
21 | lpi_changes_res= F.
22 | memory_above= F.
23 | memory_below= F.
24 | move_insert_mode= F.
25 | move_standout_mode= F.
26 | needs_xon_xoff= F.
27 | no_esc_ctlc= F.
28 | no_pad_char= F.
29 | non_dest_scroll_region= F.
30 | non_rev_rmcup= F.
31 | over_strike= F.
32 | prtr_silent= F.
33 | row_addr_glitch= F.
34 | semi_auto_right_margin= F.
35 | status_line_esc_ok= F.
36 | tilde_glitch= F.
37 | transparent_underline= F.
38 | comparing numbers.
39 | init_tabs= 8.
40 | comparing strings.
41 | bell= '^G'.
42 | carriage_return= '\r'.
43 | clr_eol= '\EK'.
44 | clr_eos= '\EJ'.
45 | cursor_address= '\EY%p1%' '%+%c%p2%' '%+%c'.
46 | cursor_down= '\EB'.
47 | cursor_home= '\EH'.
48 | cursor_left= '\ED'.
49 | cursor_right= '\EC'.
50 | cursor_up= '\EA'.
51 | key_backspace= '^H'.
52 | newline= '\r\n'.
53 | scroll_forward= '\n'.
54 | tab= '^I'.
55 | $
56 | $ infocmp -L -d td200 vt52 | tr , : | column -t -s:
57 | # comparing td200 to vt52 SHOWING ONLY VALUES THAT DIFFER.
58 |
59 | comparing td200 to vt52.
60 | comparing booleans.
61 | auto_left_margin T F.
62 | auto_right_margin T F.
63 | backspaces_with_bs F T.
64 | dest_tabs_magic_smso T F.
65 | xon_xoff T F.
66 | comparing numbers.
67 | columns 40 80.
68 | lines 16 24.
69 | comparing strings.
70 | acs_chars NULL '+h.k0affggolpnqprrss'.
71 | clear_screen '\EE' '\EH\EJ'.
72 | cursor_invisible '\EQ' NULL.
73 | cursor_normal '\EP' NULL.
74 | delete_line '\EM' NULL.
75 | dis_status_line '\EU\EY0 \ES\EM' NULL.
76 | enter_alt_charset_mode NULL '\EF'.
77 | enter_reverse_mode '\Ep' NULL.
78 | enter_standout_mode '\Ep' NULL.
79 | exit_alt_charset_mode NULL '\EG'.
80 | exit_attribute_mode '\Eq' NULL.
81 | exit_standout_mode '\Eq' NULL.
82 | init_1string '\EU' NULL.
83 | init_2string '\EW\Eq\EE' NULL.
84 | insert_line '\EL' NULL.
85 | key_down '^_' '\EB'.
86 | key_left '^]' '\ED'.
87 | key_right '^\' '\EC'.
88 | key_up '^^' '\EA'.
89 | scroll_reverse NULL '\EI'.
90 |
--------------------------------------------------------------------------------
/dot.inputrc:
--------------------------------------------------------------------------------
1 | # ~/.inputrc is read by Bash when the
2 | # user first logs in or if the user
3 | # runs "bind -f ~/.inputrc" (or hits
4 | # C-x C-r)
5 |
6 | $if term=td200
7 | # No ANSI colors for tab completion
8 | set colored-completion-prefix off
9 | # Bind Model T's TELCOM keys
10 | Control-^: previous-history
11 | Control-_: next-history
12 | Control-]: backward-char
13 | # Use 'stty quit undef' to make right arrow work.
14 | Control-\: forward-char
15 | # Shift + BkSp to delete next char.
16 | "\d": delete-char
17 | $endif
18 |
19 |
--------------------------------------------------------------------------------
/h19.md:
--------------------------------------------------------------------------------
1 | # Comparing Tandy Terminfo to Heathkit H19
2 |
3 | The Heathkit h19 terminfo is so similar to the one used by the Tandy
4 | 200 that it seems likely that when the Kyotronic-85 was first
5 | developed, output was probably to an h19 before the screen hardware
6 | was working.
7 |
8 | The h19 was a VT52 clone with additional features that make it more
9 | similar to a Tandy portable
10 |
11 | * Standout Mode (reverse video) is enabled with
12 | Escp, disabled with
13 | Escq.
14 |
15 | * Clear screen is EscE.
16 |
17 | The H19 was also sold as the Zenith Z19.
18 |
19 |
20 | ## Using a Tandy portable as an h19 emulator
21 |
22 | Not possible because the Tandy portables (at least when running the
23 | builtin TELCOM software) are missing too many features
24 | * Scroll reverse
25 | * Insert mode
26 | * Different ACS characters,
27 | * Special graphic characters
28 | * Status line
29 |
30 | ## Using an h19 as a Tandy portable display
31 |
32 | _May_ be possible depending on the program being run. There is an h19
33 | terminal emulator written in Python available from
34 | [http://h8.cowlug.org/h19term.php].
35 |
36 | Many of the possible problems I can foresee with using an h19 as a
37 | terminal are relatively minor or unlikely.
38 |
39 | * h19 does not support any of the high ASCII characters from 128 to 255.
40 |
41 | * Status line is completely different, so any program that tries to
42 | manipulate the status line using CHR$(27)+"T" or "U" will fail.
43 |
44 | * h19 lacks save current line and restore saved line. However, those
45 | escape sequences were not well-documented and only worked on entire
46 | lines, so I would guess that their use was rare.
47 |
48 | * h19 only understands '\EE' for clear screen. However, Model T's may
49 | send '\Ej' which does the same thing.
50 |
51 | * The terminfo for the H19 shows that it does not have automatic left
52 | margins (backspace in the first column goes to the last column in
53 | the previous row). While that is how the Tandy portables work, it's
54 | not something programs often purposefully do. Also, I believe the
55 | terminfo database may be incorrect about the h19.
56 |
57 | * Tandy portables have "destructive tabs"; that is, if the TAB
58 | character would pass over text, that text is erased. I suspect few
59 | programs relied on that feature. If they did, garbage characters
60 | might be left on the screen.
61 |
62 | * I've only seen disable scrolling escape sequence as useful for
63 | speeding up downloads in TELCOM. Was there any other reason for its
64 | existence?
65 |
66 | * The inability to hide the cursor would be noticeable on an h19, but
67 | wouldn't prevent the program from running.
68 |
69 | * Key codes sent by arrow keys are different.
70 |
71 |
72 | ## Nitty gritty comparison
73 |
74 | Using infocmp it is possible to compare the terminfo file for the
75 | Tandy portables to the h19. In fact that is how the analysis above was
76 | done. What follows is the detailed data and some notes on the
77 | differences.
78 |
79 | ### Differences
80 |
81 | ```
82 | infocmp -L -d td200 h19 |
83 | tr , : | sed -r 's/^[[:space:]]*|\.$|NULL//g' |
84 | column -c102 -t -W2 -E2 -s: -N attribute,td200,h19 -o'|'
85 | ```
86 |
87 | attribute |td200 |h19
88 | -|-|-
89 | COMPARING BOOLEANS | |
90 | auto_left_margin | T |F
91 | backspaces_with_bs | F |T
92 | dest_tabs_magic_smso | T |F
93 | has_status_line | F |T
94 | move_insert_mode | F |T
95 | status_line_esc_ok | F |T
96 | xon_xoff | T |F
97 | COMPARING NUMBERS | |
98 | columns | 40 | 80
99 | lines | 16 | 24
100 | COMPARING STRINGS | |
101 | acs_chars | '+\232\054\233-\230.\2310\357`\235| '+h.kaiggjdkclfmenbozqas{tvutvuwsx`~\136'
102 | " |a\377f\246g\215h\345i\251j\367k\362|
103 | " |l\360m\366n\372q\361t\364u\371v\370|
104 | " |w\363x\365{\210\|\212}\243~\325'|
105 | cursor_invisible | '\EQ' |
106 | cursor_left | '\ED' | '^H'
107 | cursor_normal | '\EP' | '\Ey4'
108 | cursor_visible | | '\Ex4'
109 | delete_character | | '\EN'
110 | delete_line | '\EM' |
111 | dis_status_line | '\EU\EY0 \ES\EM' |
112 | enter_alt_charset_mode | | '\EF'
113 | enter_insert_mode | | '\E@'
114 | enter_reverse_mode | '\Ep' |
115 | exit_alt_charset_mode | | '\EG'
116 | exit_attribute_mode | '\Eq' |
117 | exit_insert_mode | | '\EO'
118 | from_status_line | | '\Ek\Ey5'
119 | init_1string | '\EU' |
120 | init_2string | '\EW\Eq\EE' |
121 | insert_line | '\EL' |
122 | insert_padding | | '$<1.5/>'
123 | key_down | '^_' | '\EB'
124 | key_f1 | | '\ES'
125 | key_f2 | | '\ET'
126 | key_f3 | | '\EU'
127 | key_f4 | | '\EV'
128 | key_f5 | | '\EW'
129 | key_f6 | | '\EP'
130 | key_f7 | | '\EQ'
131 | key_f8 | | '\ER'
132 | key_home | | '\EH'
133 | key_left | '^]' | '\ED'
134 | key_right | '^\' | '\EC'
135 | key_up | '^^' | '\EA'
136 | lab_f6 | | 'blue'
137 | lab_f7 | | 'red'
138 | lab_f8 | | 'white'
139 | newline | '\r\n' |
140 | scroll_reverse | | '\EI'
141 | to_status_line | | '\Ej\Ex5\EY8%p1%' '%+%c\Eo\Eo'
142 | user8 | '#RSM%[0123456789]c' |
143 | user9 | '\EI' |
144 |
145 |
146 | ### Common features
147 |
148 | ```
149 | infocmp -L -c td200 h19 |
150 | sed -r 's/^[[:space:]]*|\.$|NULL//g' |
151 | column -t -s= -N Attribute,"Both Tandy and H19" -o'|'
152 | ```
153 |
154 | Attribute |Both Tandy and H19
155 | -|-
156 | COMPARING BOOLEANS |
157 | auto_right_margin | T
158 | back_color_erase | F
159 | can_change | F
160 | ceol_standout_glitch | F
161 | col_addr_glitch | F
162 | cpi_changes_res | F
163 | cr_cancels_micro_mode | F
164 | eat_newline_glitch | F
165 | erase_overstrike | F
166 | generic_type | F
167 | hard_copy | F
168 | hard_cursor | F
169 | has_meta_key | F
170 | has_print_wheel | F
171 | hue_lightness_saturation| F
172 | insert_null_glitch | F
173 | lpi_changes_res | F
174 | memory_above | F
175 | memory_below | F
176 | move_standout_mode | T
177 | needs_xon_xoff | F
178 | no_esc_ctlc | F
179 | no_pad_char | F
180 | non_dest_scroll_region | F
181 | non_rev_rmcup | F
182 | over_strike | F
183 | prtr_silent | F
184 | row_addr_glitch | F
185 | semi_auto_right_margin | F
186 | tilde_glitch | F
187 | transparent_underline | F
188 | COMPARING NUMBERS |
189 | init_tabs | 8
190 | COMPARING STRINGS |
191 | bell | '^G'
192 | carriage_return | '\r'
193 | clear_screen | '\EE'
194 | clr_eol | '\EK'
195 | clr_eos | '\EJ'
196 | cursor_address | '\EY%p1%' '%+%c%p2%' '%+%c'
197 | cursor_down | '\EB'
198 | cursor_home | '\EH'
199 | cursor_right | '\EC'
200 | cursor_up | '\EA'
201 | enter_standout_mode | '\Ep'
202 | exit_standout_mode | '\Eq'
203 | key_backspace | '^H'
204 | scroll_forward | '\n'
205 | tab | '^I'
206 |
207 | ### Notes
208 |
209 | #### Differences which are not actual
210 |
211 | * cursor_left on the h19 is defined as ^H. The VT52 and Tandy Terminfo
212 | specify '\ED'. But both of those codes are synonyms and they work
213 | the same on all three terminals.
214 |
215 | * Tandy Terminfo's enter_reverse_mode is just an alias for
216 | enter_standout_mode. Likewise exit_attribute_mode for
217 | exit_standout_mode.
218 |
219 | * newline is not defined in the h19 terminfo, but probably should be
220 | the same ('\r\n').
221 |
222 | * insert_line/delete_line: The terminfo file for the h19 incorrectly
223 | does not define these. They are actually the same ('\eL', '\eM').
224 |
225 | #### Differences which look like bugs but aren't
226 |
227 | It may appear that hackerb9's terminfo file is buggy because some
228 | differences are unexpected, but that is not the case, at least for the
229 | following items:
230 |
231 | * has_status_line: What the Tandy portables call a "status line" is
232 | very different from a typical UNIX status line such as on the h19.
233 |
234 | * auto_left_margin: The Tandy 200 goes up to the previous line when
235 | backspacing from column 0.
236 |
237 | * dest_tabs_magic_smso: This means "destructive tabs, magic so char"
238 | While primarily known as a glitch in the Teleray t1061 terminal,
239 | this problem also affects the Tandy computers. Specifically a Tab
240 | character will clear any text that it passes over. Note that
241 | [h19term.py](http://h8.cowlug.org/h19term.php) emulator has
242 | destructive tabs, so it is likely the terminfo for h19 is incorrect
243 | and should have had this set.
244 |
245 | * backspaces_with_bs (OTbs): It actually is set in the Tandy terminfo,
246 | but modern versions of tic simply strip it out as it is an "obsolete
247 | termcap capability".
248 |
249 | * scroll_reverse: Moves all text on the screen down one line. For no
250 | apparent reason, this does not work on the Tandy Portables. It would
251 | have been easy to implement using existing cursor controls: home +
252 | insert_line. Note that in TELCOM, the escape sequence for this,
253 | '\EI', actually sends the terminal answerback.
254 |
255 |
256 |
--------------------------------------------------------------------------------
/m100.charmap:
--------------------------------------------------------------------------------
1 | TANDY-200
2 | %
3 | /
4 | % Tandy Radio-Shack TRS-80 Model 100, 102, and 200 "extended ASCII" charmap.
5 | %
6 | % version: 1.1
7 |
8 | % source: Created by Hackerb9 based on analysis by Diwadi of a
9 | % European TRS-80 Model 100 character set which is identical
10 | % to Hackerb9's American Model 200.
11 |
12 | % See charmap(5) for info on this format and how to use it with locale.
13 |
14 | % , 2020
15 |
16 | % alias TD200
17 | % alias T200
18 | % alias TRS80-MODEL100
19 | % alias M100
20 | % alias TRS80-MODEL102
21 | % alias M102
22 | % alias TRS80-MODEL200
23 | % alias M200
24 |
25 | CHARMAP
26 | /x00 NULL (NUL)
27 | /x01 START OF HEADING (SOH)
28 | /x02 START OF TEXT (STX)
29 | /x03 END OF TEXT (ETX)
30 | /x04 END OF TRANSMISSION (EOT)
31 | /x05 ENQUIRY (ENQ)
32 | /x06 ACKNOWLEDGE (ACK)
33 | /x07 BELL (BEL)
34 | /x08 BACKSPACE (BS)
35 | /x09 CHARACTER TABULATION (HT)
36 | /x0a LINE FEED (LF)
37 | /x0b LINE TABULATION (VT)
38 | /x0c FORM FEED (FF)
39 | /x0d CARRIAGE RETURN (CR)
40 | /x0e SHIFT OUT (SO)
41 | /x0f SHIFT IN (SI)
42 | /x10 DATALINK ESCAPE (DLE)
43 | /x11 DEVICE CONTROL ONE (DC1)
44 | /x12 DEVICE CONTROL TWO (DC2)
45 | /x13 DEVICE CONTROL THREE (DC3)
46 | /x14 DEVICE CONTROL FOUR (DC4)
47 | /x15 NEGATIVE ACKNOWLEDGE (NAK)
48 | /x16 SYNCHRONOUS IDLE (SYN)
49 | /x17 END OF TRANSMISSION BLOCK (ETB)
50 | /x18 CANCEL (CAN)
51 | /x19 END OF MEDIUM (EM)
52 | /x1a SUBSTITUTE (SUB)
53 | /x1b ESCAPE (ESC)
54 | /x1c FILE SEPARATOR (IS4)
55 | /x1d GROUP SEPARATOR (IS3)
56 | /x1e RECORD SEPARATOR (IS2)
57 | /x1f UNIT SEPARATOR (IS1)
58 | /x20 SPACE
59 | /x21 EXCLAMATION MARK
60 | /x22 QUOTATION MARK
61 | /x23 NUMBER SIGN
62 | /x24 DOLLAR SIGN
63 | /x25 PERCENT SIGN
64 | /x26 AMPERSAND
65 | /x27 APOSTROPHE
66 | /x28 LEFT PARENTHESIS
67 | /x29 RIGHT PARENTHESIS
68 | /x2a ASTERISK
69 | /x2b PLUS SIGN
70 | /x2c COMMA
71 | /x2d HYPHEN-MINUS
72 | /x2e FULL STOP
73 | /x2f SOLIDUS
74 | /x30 DIGIT ZERO
75 | /x31 DIGIT ONE
76 | /x32 DIGIT TWO
77 | /x33 DIGIT THREE
78 | /x34 DIGIT FOUR
79 | /x35 DIGIT FIVE
80 | /x36 DIGIT SIX
81 | /x37 DIGIT SEVEN
82 | /x38 DIGIT EIGHT
83 | /x39 DIGIT NINE
84 | /x3a COLON
85 | /x3b SEMICOLON
86 | /x3c LESS-THAN SIGN
87 | /x3d EQUALS SIGN
88 | /x3e GREATER-THAN SIGN
89 | /x3f QUESTION MARK
90 | /x40 COMMERCIAL AT
91 | /x41 LATIN CAPITAL LETTER A
92 | /x42 LATIN CAPITAL LETTER B
93 | /x43 LATIN CAPITAL LETTER C
94 | /x44 LATIN CAPITAL LETTER D
95 | /x45 LATIN CAPITAL LETTER E
96 | /x46 LATIN CAPITAL LETTER F
97 | /x47 LATIN CAPITAL LETTER G
98 | /x48 LATIN CAPITAL LETTER H
99 | /x49 LATIN CAPITAL LETTER I
100 | /x4a LATIN CAPITAL LETTER J
101 | /x4b LATIN CAPITAL LETTER K
102 | /x4c LATIN CAPITAL LETTER L
103 | /x4d LATIN CAPITAL LETTER M
104 | /x4e LATIN CAPITAL LETTER N
105 | /x4f LATIN CAPITAL LETTER O
106 | /x50 LATIN CAPITAL LETTER P
107 | /x51 LATIN CAPITAL LETTER Q
108 | /x52 LATIN CAPITAL LETTER R
109 | /x53 LATIN CAPITAL LETTER S
110 | /x54 LATIN CAPITAL LETTER T
111 | /x55 LATIN CAPITAL LETTER U
112 | /x56 LATIN CAPITAL LETTER V
113 | /x57 LATIN CAPITAL LETTER W
114 | /x58 LATIN CAPITAL LETTER X
115 | /x59 LATIN CAPITAL LETTER Y
116 | /x5a LATIN CAPITAL LETTER Z
117 | /x5b LEFT SQUARE BRACKET
118 | /x5c REVERSE SOLIDUS
119 | /x5d RIGHT SQUARE BRACKET
120 | /x5e CIRCUMFLEX ACCENT
121 | /x5f LOW LINE
122 | /x60 GRAVE ACCENT
123 | /x61 LATIN SMALL LETTER A
124 | /x62 LATIN SMALL LETTER B
125 | /x63 LATIN SMALL LETTER C
126 | /x64 LATIN SMALL LETTER D
127 | /x65 LATIN SMALL LETTER E
128 | /x66 LATIN SMALL LETTER F
129 | /x67 LATIN SMALL LETTER G
130 | /x68 LATIN SMALL LETTER H
131 | /x69 LATIN SMALL LETTER I
132 | /x6a LATIN SMALL LETTER J
133 | /x6b LATIN SMALL LETTER K
134 | /x6c LATIN SMALL LETTER L
135 | /x6d LATIN SMALL LETTER M
136 | /x6e LATIN SMALL LETTER N
137 | /x6f LATIN SMALL LETTER O
138 | /x70 LATIN SMALL LETTER P
139 | /x71 LATIN SMALL LETTER Q
140 | /x72 LATIN SMALL LETTER R
141 | /x73 LATIN SMALL LETTER S
142 | /x74 LATIN SMALL LETTER T
143 | /x75 LATIN SMALL LETTER U
144 | /x76 LATIN SMALL LETTER V
145 | /x77 LATIN SMALL LETTER W
146 | /x78 LATIN SMALL LETTER X
147 | /x79 LATIN SMALL LETTER Y
148 | /x7a LATIN SMALL LETTER Z
149 | /x7b LEFT CURLY BRACKET
150 | /x7c VERTICAL LINE
151 | /x7d RIGHT CURLY BRACKET
152 | /x7e TILDE
153 | /x7f DELETE (DEL)
154 | /x80 PHONE
155 | /x81 HOUSE WITH LETTER P, USING PLUTO (consider 1F17F)
156 | /x82 PHONE DISCONNECT
157 | /x83 RAMP WITH RECTANGLE. USING SESQUIQUADRATE. MAIL?
158 | /x84 RACECAR, REPLACED BY DOUBLE DAGGER (not 1F3CE)
159 | /x85 AIRPLANE
160 | /x86 HOUSE WITH CROSS, GIFT PACKAGE, TARDIS?
161 | /x87 REVERSE VIDEO T. USING CIRCLE T.
162 | /x88 PI
163 | /x89 SQUARE ROOT
164 | /x8A NOT EQUAL
165 | /x8B SIGMA/SUM
166 | /x8C ALMOST EQUAL
167 | /x8D PLUSMINUS
168 | /x8E INTEGRAL
169 | /x8F TRIANGLE POINTING LEFT
170 | /x90 ROUNDED THINGY WITH FEET OUTWARDS, APPARENTLY A BELL SYMBOL
171 | /x91 ROUNDED THINGY WITH FEET INWARDS, APPROXIMATED BY INTERSECTION SYMBOL
172 | /x92 ARROW UP AND DOWN
173 | /x93 STICK FIGURE, REPLACED WITH WHITE SMILEY FACE
174 | /x94 STICK FIGURE GESTURING "STOP", REPLACED WITH BLACK SMILEY FACE
175 | /x95 MALE
176 | /x96 FEMALE
177 | /x97 C/O
178 | /x98 ARROW UP
179 | /x99 ARROW DOWN
180 | /x9A ARROW RIGHT
181 | /x9B ARROW LEFT
182 | /x9C CLUB SUIT
183 | /x9D DIAMOND SUIT
184 | /x9E HEART SUIT
185 | /x9F SPADE SUIT
186 | /xA0 CLOSING SINGLE QUOTATION
187 | /xA1 A ACCENT GRAVE
188 | /xA2 C WITH CEDILLA
189 | /xA3 POUND SIGN
190 | /xA4 OPENING SINGLE QUOTATION
191 | /xA5 MICRO
192 | /xA6 DEGREE
193 | /xA7 TRIANGLE POINTING DOWN
194 | /xA8 CROSS OR DAGGER
195 | /xA9 SECTION (LEGAL)
196 | /xAA REGISTERED
197 | /xAB COPYRIGHT
198 | /xAC ONE QUARTER
199 | /xAD THREE QUARTERS
200 | /xAE ONE HALF
201 | /xAF PILCROW
202 | /xB0 YEN
203 | /xB1 A UMLAUT
204 | /xB2 O UMLAUT
205 | /xB3 U UMLAUT
206 | /xB4 CENT
207 | /xB5 SMALL TILDE
208 | /xB6 A UMLAUT
209 | /xB7 O UMLAUT
210 | /xB8 U UMLAUT
211 | /xB9 SHARP S
212 | /xBA TRADEMARK
213 | /xBB E ACCENT AIGU
214 | /xBC U ACCENT GRAVE
215 | /xBD E ACCENT GRAVE
216 | /xBE DIAERESIS
217 | /xBF MATHEMATICAL CURVED F
218 | /xC0 A CIRCUMFLEX
219 | /xC1 E CIRCUMFLEX
220 | /xC2 I CIRCUMFLEX
221 | /xC3 O CIRCUMFLEX
222 | /xC4 U CIRCUMFLEX
223 | /xC5 SMALL CARET
224 | /xC6 E DIAERESIS
225 | /xC7 I DIAERESIS
226 | /xC8 A ACCENT AIGU
227 | /xC9 I ACCENT AIGU
228 | /xCA O ACCENT AIGU
229 | /xCB U ACCENT AIGU
230 | /xCC FLIPPED EXCLAMATION
231 | /xCD N TILDE
232 | /xCE A TILDE
233 | /xCF O TILDE
234 | /xD0 CAPITAL AE
235 | /xD1 AE
236 | /xD2 CAPITAL A CIRC
237 | /xD3 A CIRC
238 | /xD4 CAPITAL O DIAG
239 | /xD5 O DIAG
240 | /xD6 CAPITAL N TILDE
241 | /xD7 CAPITAL E ACCENT AIGU
242 | /xD8 CAPITAL A ACCENT AIGU
243 | /xD9 CAPITAL I ACCENT AIGU
244 | /xDA CAPITAL O ACCENT AIGU
245 | /xDB CAPITAL U ACCENT AIGU
246 | /xDC FLIPPED QUESTION
247 | /xDD CAPITAL U ACCENT GRAVE
248 | /xDE CAPITAL E ACCENT GRAVE
249 | /xDF CAPITAL A ACCENT GRAVE
250 | /xE0 BLOCK EMPTY, SUBSTITUTED BY NBSP
251 | /xE1 BLOCK 10-00
252 | /xE2 BLOCK 01-00
253 | /xE3 BLOCK 00-10
254 | /xE4 BLOCK 00-01
255 | /xE5 BLOCK 10-01
256 | /xE6 BLOCK 01-10
257 | /xE7 BLOCK 11-00
258 | /xE8 BLOCK 00-11
259 | /xE9 BLOCK 10-10
260 | /xEA BLOCK 01-01
261 | /xEB BLOCK 11-10
262 | /xEC BLOCK 11-01
263 | /xED BLOCK 10-11
264 | /xEE BLOCK 01-11
265 | /xEF BLOCK 11-11 FULL
266 | /xF0 FRAME TOP LEFT
267 | /xF1 FRAME HORIZONTAL
268 | /xF2 FRAME TOP RIGHT
269 | /xF3 FRAME TOP MIDDLE
270 | /xF4 FRAME LEFT MIDDLE
271 | /xF5 FRAME VERTICAL
272 | /xF6 FRAME BOTTOM LEFT
273 | /xF7 FRAME BOTTOM RIGHT
274 |