Files
app/docs/terminals.md
T
NeoandClaude Opus 5.5 24db6fc483 BBS terminals: RIPscrip, Avatar, Amiga ANSI, Atari ST (Phase 7) (#43)
* Atari ST terminals, and pure white kept as a colour

The Atari ST's TOS VT52 in medium resolution (80x25, four colours) and
low (40x25, sixteen): ESC b and ESC c pens, reverse, wrap, the cursor
saved and hidden, the extra erases, line insert and delete, and the ST's
character set. Vt52Interpreter gains a character hook and an argument
hook for it; the machine size and palette set-up is shared with the
byte-oriented machines (useMachine, releaseMachine).

colorOverride's "none" was -1, which is also opaque white, so a machine's
pure white (the ST's screen, Viewdata's and the Minitel's white) fell back
to the theme's colour. "None" is now NO_COLOR (transparent black), and
overrides are kept opaque.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY

* Avatar (AVT/0 and AVT/0+) over ANSI-BBS

FidoNet's compact codes taken in ANSI-BBS's intercept hook: ^L, ^Y's
repeat, ^V's PC attributes (DLE-quoted too), blink, cursor moves and
place, clear to the line's end, and AVT/0+'s insert mode, area scrolls,
clears and fills (through Rectangles), character delete and pattern
repeat. ANSI, music and the rest of ANSI-BBS work underneath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY

* Amiga ANSI

ANSI-BBS in Latin-1, drawn 8x8 (Unscii's glyphs, Topaz's size; the
generator now adds Latin-1's to the 8x8 set) in colours from the Amiga's
12-bit palette. An ANSI-BBS profile can now carry its own sixteen colours
(AnsiBbsProfile.colors), which its interpreter puts over the theme's and
takes back off when another profile takes over. The per-profile render
test now uses the profile's character set, as connecting does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY

* RIPscrip 1.54

ANSI-BBS whose lines starting !| (or ^A|, ^B|) are RIP's commands on a
640x350 EGA screen over an 80x43 text window: lines in their styles and
thickness, rectangles, bars, circles, ellipses, arcs, pies, Beziers,
polygons and polylines, flood fills, BGI's fill patterns and the host's,
text, the palette, the viewport and text window, the clipboard, text
blocks, and mouse regions and buttons. ESC [ ! answers RIP's version, and
ESC [ 1 ! and 2 ! turn it off and on. Line continuation and the CR LF
ending a RIP line are the line's own.

Raster gains ellipses, patterned fills, flood fill, a clip rectangle and
grab and put, and draws shrunk glyphs with their rows merged (a thin
stroke was lost). Taps: an interpreter can take a tap at a point on the
screen (TerminalEmulator.tap); Android's view and the iOS screen (through
TerminalBridge.tap) send what it gives, so RIP's buttons work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 18:16:53 -08:00

7.8 KiB

Terminal types

The terminal (Android and iOS) can be any of the terminals below. Pick one in Settings, or give a directory entry its own. The choice sets what the screen understands, how it answers the remote's identity requests, what SSH sends as TERM and Telnet as TERMINAL-TYPE, the screen's size, its character set and glyphs, and the key bar.

All of them live in shared/src/commonMain/kotlin/org/dmodem/app/terminal/: a TerminalProfile subclass for each type (TerminalProfile.kt, Commodore.kt, Atari.kt, Videotex.kt, Minitel.kt, Tektronix.kt) and the interpreter it makes (VtInterpreter, Vt420Interpreter, AnsiBbsInterpreter, ByteControlInterpreter and its subclasses, TektronixInterpreter). ReGIS is Regis.kt, sixel Sixel.kt, and both graphics terminals draw through Raster.kt.

Type Id TERM / Telnet type Screen What it is
xterm xterm xterm-256color / XTERM-256COLOR any The default: a VT220 with 256 and 24-bit colour, sixel, the mouse, titles, and Tek mode
ANSI-BBS (PC) ansi-bbs ansi / ANSI 80x25 A PC's BBS terminal, as SyncTERM is: CP437 in a VGA font, iCE colours, ANSI music, doorway mode
RIPscrip rip rip / ANSI 80x43 text over 640x350 graphics RIPscrip 1.54 over ANSI-BBS: `!
Avatar (AVT/0+) avatar avatar / ANSI 80x25 ANSI-BBS with FidoNet's Avatar codes: ^L, ^Y repeat, ^V's attributes, moves and AVT/0+'s area scrolls, clears, fills and pattern repeat
Amiga ANSI amiga amiga / ANSI 80x25 ANSI-BBS in Latin-1 with 8x8 glyphs (Topaz's size, Unscii's drawing) and colours from the Amiga's 12-bit palette
DEC VT52 vt52 vt52 / DEC-VT52 80x24 The VT52's own escape codes and graphics
DEC VT100 vt100 vt100 / DEC-VT100 80/132x24 ANSI codes at level 1: no colour; double-size lines; VT52 mode
DEC VT102 vt102 vt102 / DEC-VT102 80/132x24 Adds character and line insert and delete, and a printer port
DEC VT220 vt220 vt220 / DEC-VT220 80/132x24 Level 2: G0-G3 character sets, 8-bit controls, soft fonts, user-defined keys, selective erase
DEC VT320 vt320 vt320 / DEC-VT320 80/132x24 Level 3: DEC Technical, the state reports, a status line
DEC VT340 vt340 vt340 / DEC-VT340 80/132x24 A VT320 with graphics: sixel and ReGIS in 16 shared colour registers, and Tek mode
DEC VT420 vt420 vt420 / DEC-VT420 80/132x24+ Level 4: left and right margins, rectangle operations, six pages
DEC VT510, VT520 vt510, vt520 vt510 / DEC-VT510, … 80/132x24+ Level 5: the display extent report, bell volumes
DEC VT525 vt525 vt525 / DEC-VT525 80/132x24+ A VT520 in colour, with its colour table
Commodore 64, 128 (40 and 80), Plus/4, VIC-20, PET (40 and 80) c64, c128, c128-80, plus4, vic20, pet, pet80 petscii / PETSCII 40x25 (VIC-20: 22x23; 80 for the C128's VDC and the 8032) PETSCII as CCGMS and Novaterm do it, each in its machine's palette
Atari 8-bit atari, atari-intl atascii / ATASCII 40x24 ATASCII and the screen editor's controls; the XL's international set as a second type
Atari ST atari-st, atari-st-low st52 / VT52 80x25 in 4 colours, or 40x25 in 16 TOS's VT52 with its colours (ESC b, ESC c), reverse, wrap, cursor save and on/off, more erases, line insert and delete, in the ST's character set
Viewdata (Prestel) viewdata viewdata / VIEWDATA 40x24 Teletext Level 1 attributes and mosaics; # sends
Minitel minitel minitel / MINITEL 40x25 Teletel videotex with the status row, the protocol commands, Mixte (80 columns) and Téléinformatique (a VT100)
Tektronix 4014 tek4014 tek4014 / TEK4014 4096x3120 tube Vectors, points, incremental plots and alpha text on a storage tube

A VT510's and later screen size can change at the host's request (DECSNLS, DECSLPP, DECSCPP). xterm and ANSI-BBS fit the view.

Graphics

Sixel images are cells of an image that scroll with the text. ReGIS and the Tektronix draw a picture over the whole screen instead. It is kept the screen's size in pixels, and only the cells it has drawn in show it. Resizing the screen starts the picture again, as on a storage tube.

  • Sixel: xterm, ANSI-BBS and the VT340. On the VT340 the images share ReGIS's 16 colour registers.
  • ReGIS (ESC P p … ESC \, VT340 only):
    • The screen is 800x480. Positions can be absolute or relative, and use the position stack and pixel vectors.
    • Commands: P, V, C (circles, arcs, closed and open curves), F, T, W, S, R, L and macrographs (@).
    • Commands are run as they become whole, so a drawing sent over many reads shows as it comes. ESC P 1 p starts afresh, and ESC P p carries on from where the last one left off.
  • Tektronix 4014: its own terminal type, and Tek mode on xterm and the VT340.
    • ESC [ ? 38 h switches to the alternate screen, and ESC ETX goes back to the text.

Testing

Each sequence has unit tests in shared/src/commonTest. Run them with ./gradlew :shared:jvmTest :shared:linuxX64Test.

ProfileRenderTest in app/src/test draws a screen on every terminal type through the real Android view and keeps it as app/build/profiles/<id>.png. Run it with ./gradlew :app:testDebugUnitTest --tests '*ProfileRenderTest*' and look at the pictures after a change to drawing.

vttest

To run vttest, open the app's Linux shell and install it (apk add vttest, or the distro's equivalent). Set the terminal type in Settings, then run vttest.

What to expect, menu by menu, from the unit tests and the code. These haven't yet been checked against a vttest run on a device: update the table when they are.

vttest menu Profiles Expect
1 Cursor movements all DEC, xterm passes
2 Screen features (132 columns, scrolling regions, origin mode) all DEC, xterm passes. Smooth scrolling (DECSCLM) is drawn as jump scrolling
3 Character sets VT100 and later passes. NRCS needs a VT220 or later
4 Double-sized characters VT100 and later passes
5 Keyboard all the LEDs and auto-repeat can't be checked on a phone. Use the key bar for the keypad and function keys
6 Terminal reports all passes. The answerback message is empty
7 VT52 mode VT100 and later passes
8 VT102 features VT102 and later passes
9 Known bugs all n/a
10 Reset and self-test all the self-test (DECTST) does nothing
11 Non-VT100 terminals by level VT220: passes. VT320: passes. VT420: passes except the locator (no mouse reports on a DEC type). VT520: passes except the keyboard's own settings (bell volumes and key click are accepted and ignored). xterm: its own menus

What isn't done

ReGIS

  • Text is drawn upright in any direction: the string moves the way it's told, but the glyphs don't turn.
  • Italics (T(I)) and the hard copy and scrolling of S are accepted and ignored.
  • R(M) (macrograph storage) isn't answered.
  • A colour register changed after drawing doesn't recolour what's already drawn.

RIPscrip

  • Icons (1I, 1W) and scenes (1R) from the host's files aren't loaded.
  • Text variables (…) aren't expanded.
  • The stroke fonts are drawn with the PC's bitmap font at their size.
  • Vertical text runs down, but its glyphs don't turn.

Tektronix

  • No graphic input (GIN) cross-hair.
  • No write-through or defocused modes.

Viewdata and Minitel

  • Double height and double size are drawn single.

DEC

  • No locator (DECELR), and no answerback message.

iOS

  • The picture and image drawing is built but not yet compiled in Xcode (the bridge's imageRuns and imagePixels).