mirror of
https://github.com/D-Modem/app.git
synced 2026-11-28 17:38:05 -08:00
45db5c8e08cd10d7cb0f6eab7b94e8a42b2bfa13
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
e8dec59b58 |
Graphics terminals: Tektronix 4014, ReGIS and the VT340 (Phase 4) (#38)
* Graphics: Tektronix 4014, ReGIS and the VT340 A Raster drawn over the screen (PictureLayer keeps it the screen's size and puts it on the screen as picture tiles). The Tektronix 4014 as its own terminal and as xterm's and the VT340's Tek mode (DECSET 38, on the alternate screen until ESC ETX). ReGIS read as it comes in DCS p: P, V, C (circles, arcs, curves), F, T, W, S (the colour map among them), R, L and macrographs. The VT340 profile has sixel and ReGIS sharing 16 colour registers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY * iOS: sixel images and graphics pictures drawn The bridge gives each row's image tiles as runs (ImageRun) and an image's pixels as premultiplied RGBA in Latin-1; the iOS model makes a CGImage once per image and the canvas draws each run clipped to its cells. 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> |
||
|
|
0c448f7d4d |
VT220 to VT525 and videotex terminals (Phases 2, 3 and 8) (#37)
* VT220 and VT320: G0-G3 and shifts, NRCS, 8-bit replies, DECSCA, DECUDK Phase 2, part 1. The character sets move into CharsetShifting, which VtInterpreter composes: G0-G3, GL and GR, the locking shifts (SI, SO, LS2, LS3, LS1R-LS3R) and single shifts (SS2, SS3, and their C1 forms), designators of two characters and 96-character sets (ESC - . /), the national replacement sets, DEC Supplemental, DEC Technical and Latin-1, each at the level that has it, and DECSC keeping them all. Also: - S7C1T/S8C1T: replies with C1 controls - DECSCA with DECSED and DECSEL (a protected bit SGR leaves alone) - DECSCL: the operating level and 7- or 8-bit replies - DSR ?15, ?25, ?26 and ?6 (DECXCPR) - DECRQPSR (DECCIR, DECTABSR), DECRQUPSS and DECAUPSS - DECRQSS for DECSCL, DECSCA, DECSLPP, DECSCPP, DECSNLS - DECUDK in UserKeys: Shift with F6-F20 sends what the host loaded - F13-F20, Find and Select keys, and LK201 and UDK key bar pages - a VT320 profile (level 3) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY * VT320 status line and DECDLD soft characters Phase 2, part 2: - DECSSDT and DECSASD: the indicator status line (the cursor's place) or the host's own, written with a cursor of its own (StatusLine); shown below the screen on Android and iOS, the screen a line shorter - DECDLD (SoftFont): a soft set's glyphs read from their sixels, kept as code points of plane 15, designated by the host's Dscs (a GSet SOFT slot in CharsetShifting) and drawn from their bitmaps by both apps; BitmapFont now takes a width (rows as Ints), so the soft glyphs keep theirs (a VT320's 15x12) - DECRQSS for DECSSDT and DECSASD; DECCIR names the soft set Pages (NP, PP, PPA and the rest) are a VT330's and VT420's: they go with Phase 3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY * VT420, VT510, VT520, VT525: margins, rectangles, pages, colour table Phase 3. A Vt420Interpreter extends VtInterpreter through its hooks (an ESC, a CSI, a DCS, DECRQSS and DECRQM a subclass takes): - DECLRMM and DECSLRM: the emulator's printing, wrapping, CR, scrolling, IL/DL and ICH/DCH keep between the margins - Rectangles: DECCRA, DECERA, DECSERA, DECFRA, DECCARA and DECRARA (DECSACE: a stream or a rectangle), DECRQCRA's checksum, DECIC/DECDC - DECBI and DECFI - pages: NP, PP, PPA, PPR, PPB over six, DECXCPR telling the page - DECSNLS, DECSLPP, DECSCPP; DECNKM, DECBKM - VT5xx: DECRQDE, the bell volume and keyboard sequences taken; VT525: DECAC and the colour table (DECRQTSR 2, DECRSTS in RGB or HLS) - VT420, VT510, VT520 and VT525 profiles Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY * Viewdata (Prestel) and Minitel terminals Phase 8. Both build on ByteControlInterpreter through a VideotexInterpreter (the teletext palette, the mosaics' glyphs on the emulator, a cursor wrapping round the screen): - Mosaic: 2x3 block graphics, contiguous and separated, drawn from bitmaps the app makes, at plane 15 code points (the soft glyph path) - Viewdata: the screen kept as its codes, each row drawn again from them with teletext Level 1's spacing attributes (set-at and set-after); Prestel's controls; # and Enter send 0x5f - Minitel: row 0 the status row, US addressing, G0/G1, SS2 accents and symbols, ESC attributes with the background and separation taken at a delimiter, REP, CSI commands, PRO1-PRO3 (ENQROM answered, ROULEAU, Mixte's 80 columns, Téléinformatique as a VT100), its function keys - key bars for both, captures as .vdt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY * VT525 colour table: DEC's HLS from Sixel's, not a copy 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> |
||
|
|
c0bf3e41a2 |
ANSI-BBS as SyncTERM is: VGA font, 80x25, ANSI music, iCE, speed, doorway (#36)
The ANSI-BBS profile gets its own interpreter, a VtInterpreter subclass through two new hooks (a code point taken before the parser, a CSI carried out before it), adding CTerm's sequences without copying the parser: - an 80x25 screen drawn in a VGA's 8x16 code page 437 (Unscii-16, public domain, the two glyphs it lacks drawn in the generator); BitmapFont now takes a height, and both apps shape the cells by it - ANSI music: CSI | always, CSI N and a bare CSI M as CSI = n M allows (a bare CSI M only when a PLAY string follows, so DL still works), parsed by AnsiMusic (PLAY's notes, lengths, dots, octaves, tempo, articulation, kept from string to string) and played as square waves on Android (AudioTrack) and iOS (AVAudioEngine) - iCE colours when the remote asks (CSI ? 33 h), over the user's setting - the line speed to show text at (CSI * r, for ANSI animations), paced by the Android session and the iOS model - doorway mode (CSI = 255 h): keys as NUL and a PC's scan code - font selection (CSI SP D) taken and ignored: only code page 437 is there Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
a2a7d36688 |
Commodore and Atari terminals: PETSCII and ATASCII (Phase 5, part of 7) (#35)
* Commodore terminals: PETSCII for the C64, C128, Plus/4, VIC-20 and PET The Commodore 8-bits become terminal types, as CCGMS and Novaterm speak PETSCII. A shared ByteControlInterpreter template does what a home computer's screen editor did (octets read in the machine's own set, the screen's size and palette set while it's the profile, a wrap as soon as the last column is written, cursor keys wrapping round line ends, delete and insert in the line, typing turned back into the set's codes); the PetsciiInterpreter adds Commodore's codes: colours, cursor, HOME, CLR, DEL, INST, RVS, the two sets, the bell, and the C128 and Plus/4 ESC sequences. The profiles are a hierarchy (C64 <- C128 <- C128 80-column, C64 <- Plus/4, C64 <- VIC-20, PET <- PET 80) changing only their screen, palette, sets and extras. The characters are drawn from 8x8 bitmaps: Unscii's glyphs (public domain) for the code points Rebecca Bettencourt's Legacy Computing mappings give each code, generated into LegacyCharsets.kt by tools/gen_legacy_charsets.py. No Commodore ROM font is shipped. Android and iOS draw them in square cells, the view fitted to the machine's columns and no more than its rows. Keys and typing go through the interpreter (TerminalEmulator.keyOctets and charOctets), so a Commodore's cursor keys, F1-F8, CTRL and C= colours and C= graphics send PETSCII; pasted Legacy Computing characters map back. The key bar gets the Commodore pages (RUN/STOP, CLR/HOME, INST/DEL, RVS, F-keys, colour swatches) through a new BarKey.Octets. Captures under a Commodore profile are saved as .seq. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY * Atari terminals (ATASCII), and the doc comments the docs check wants ATASCII joins PETSCII on the shared ByteControlInterpreter: an Atari 8-bit profile (and one with the XL's international set) speaks the screen editor's codes as Ice-T and BobTerm do: cursor keys wrapping round the screen, CLEAR, BACK S, TAB, EOL, delete and insert of lines and characters, tab stops, the buzzer, ESC to show a control's character, 0x80 up in inverse video. Keys and typing send ATASCII (CTRL with a letter its graphic, the key bar's INV key the next character inverse). The generator adds the two Atari sets, completing their control codes' glyphs from the screen-code mappings and drawing the two Unscii lacks. The tab stops move into the template for the C128 and the Atari alike, and a profile names its capture extension (.seq for the Commodores) instead of the session testing for one. 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> |
||
|
|
2642a752a7 |
DEC terminals: VT52, line sizes, 132 columns, keypad, printer port (#34)
The DEC levels get what their terminals had: a VT52 profile with its own interpreter (ESC Y addressing, ESC F graphics from the DECscope manual, ESC Z), and a VT100's VT52 mode (DECANM) hosted by the VT interpreter. Double-width and double-height lines (DECDWL, DECDHL) are drawn scaled on Android and iOS. DECCOLM asks for 80 or 132 columns and both apps refit the font to the width (xterm only once mode 40 allows it). Character sets become GSet (ASCII, DEC graphics, UK, VT52 graphics). DECLL keeps the LEDs, DECREQTPARM and DECID answer, and a printer port (VT102 on: MC controller mode, auto print, print screen) hands output to the listener, which Android saves to a text file. The key bar is now shared: KeyBars has the pages each profile offers, the DEC ones adding a keypad page (PF1-PF4, digits, minus, comma, period, Enter) that KeyEncoder sends in numeric or application mode, VT52 style where the terminal is one. Android maps a hardware numpad onto it. Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
1c753a7a50 |
Terminal profiles: the emulator's screen with a swappable interpreter (#33)
The first step of the terminal emulation plan (Phase 0). The emulator is now the screen every kind of terminal shares (the screens, scrollback, cursor, modes and the print/scroll/erase/insert operations), and what the remote's characters mean is an interpreter chosen by a profile. The VT/xterm parser moved as it was into VtInterpreter. Profiles are classes that extend the terminal they grew out of: VT100 <- VT102 <- VT220 <- xterm <- ANSI-BBS. Each has its own DA1/DA2 answers, TERM and Telnet TERMINAL-TYPE, and its own extensions (colour, sixel, xterm's titles, alternate screen, mouse and reports). xterm stays the default, so nothing changes for anyone who doesn't pick another. Android: a Terminal type setting, and one per directory entry; SSH's TERM and Telnet's TERMINAL-TYPE follow it. iOS: the same setting through the bridge. Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
9915decc6d |
Comments for every function: the last batch; CI checks it
The UI tests, Gradle's script, the iOS app and the native test hosts (batch 6 of 8, comment lines only) and the checker's own. Every function in the app is now documented; android.yml's docs job runs tools/doc_check.py first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs |
||
|
|
133d5acb61 |
iOS app: SwiftUI on DModemKit and the shared terminal
ios/DModem (XcodeGen's project.yml, iOS 16): Home (the modem's state, the rates and what the CONNECT was, the call's time, start, hang up, stop, an AT command line and its last words), the terminal (the shared Kotlin emulator through TerminalBridge, drawn run by run in a Canvas; CP437 and the VGA colours; the keyboard and a hardware one's arrows and Esc; Esc, a sticky Ctrl, Tab and the arrows on a bar; pinch for the font), the log (shared as text) and the settings (the SIP account or user:password@host, incoming calls, T.38, the speaker, the AT commands at start, the log levels). The modem's speaker on AVAudioEngine; the audio session (its sound, or quiet) keeps a call going in the background. The DNS servers from the resolver's state (SystemDNS.c: iOS has no resolv.conf for the engine). shared: TerminalBridge, the terminal for Swift (octets as Latin-1 strings both ways, rows as runs, keys, replies, the title, the look and the character set), tested on the JVM and natively; the framework also as an XCFramework (assembleDModemSharedXCFramework). CI: the macOS job builds the shared XCFramework, runs DModemKit's tests and builds the app for the simulator; the Linux job runs DModemKit's tests on the host engine. Not built here: no Xcode on Linux (DModemKit, TerminalBridge and SystemDNS.c are). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs |