Commit Graph
46 Commits
Author SHA1 Message Date
Claude e087235b05 Add the ASCII Setup receive items to the terminal
An LF after each CR, 7-bit ASCII and no wrap, in the shared emulator
(TerminalEmulator.addLineFeeds, sevenBit, wrapLines) with a test, and in
the Android terminal settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
2026-11-20 22:43:18 +00:00
Claude a2c364d2b8 Add YMODEM-G, Skip file, transfer timing and text delays
The HyperTerminal gaps of phase B, as in the GUI:
- YMODEM-G both ways. A G sender that is asked with C uses plain YMODEM.
- Skip file when receiving by ZMODEM (ZSKIP) or Kermit (X in the ACK).
- Elapsed time, remaining time and cps/bps on the progress (Android, iOS).
- Line and character delays for a text file sent (Android settings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
2026-11-20 22:36:30 +00:00
Claude fe090f12ab ConnectionPath: each function and test documented (tools/doc_check.py)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvKupDGEromPgYtjG
2026-11-13 14:34:07 +00:00
Claude c67157fe4e Settings: the connection path at the top, as PCOMM draws its link
Settings now opens with how a call is made: the terminal (and what else
shares the modem: dial-up internet, dial-in, the bridges), the modem,
the line and what it reaches; for a modem of its own, the USB serial
adapter or Bluetooth it's reached by, the modem and its line. Each
step's role is above its icon and what it is below, one line joining
them. Idle it shows the settings as they are (a step still to set in
red, its line dashed, and a line saying what); starting, dialling and
online it lights as the call goes. On Android a step opens its page.

The shared Kotlin's ConnectionPath has the steps and their words,
tested, for Android (Compose) and iOS (SwiftUI) alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvKupDGEromPgYtjG
2026-11-13 14:31:31 +00:00
Neo ef758ec96f Merge pull request #47 from D-Modem/claude/project-thread-eywog3
SSH, Telnet and rlogin: rlogin on Android, all three on iOS
2026-11-12 05:09:43 -08:00
Claude 58b6ab9368 Document the remote login functions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSV65geuGd6zMt2V6r
2026-11-12 12:44:38 +00:00
Claude f1eb22c591 SSH, Telnet and rlogin: rlogin on Android, all three on iOS
- shared: TelnetCodec and RloginCodec (sans-I/O), and LoginBridge for Swift
- Android: rlogin directory entries (RloginLink on the shared codec)
- iOS: a Remote screen from the Terminal tab; SSH on SwiftNIO SSH
  (ios/DModemSSH, tested against a real sshd), Telnet and rlogin on
  Network with the shared codecs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSV65geuGd6zMt2V6r
2026-11-12 12:41:55 +00:00
NeoandClaude 93febb3790 Draw the retro terminals in their machines' own fonts (#46)
The BBS and home computer terminal types now draw with their machines'
character ROM fonts, SyncTERM's copies of them from Synchronet's ciolib
(LGPL-2.0-or-later), instead of Unscii's lookalikes: the IBM VGA's code
page 437, RIPterm's 8x8, the C64's and C128's, the Atari 8-bit's, the
Amiga's Topaz, Prestel's and the Atari ST's.

- tools/gen_rom_fonts.py writes RomFonts.kt from allfonts.c; RomFont
  keeps a ROM in its machine's code order and doubles or halves it.
- MachineFonts reads each ROM in its machine's set, so a cell's code
  point gets the glyph its machine drew; what a ROM hasn't got comes
  from Unscii.
- ANSI-BBS takes SyncTERM's font selection (CSI 0 ; n SP D) for the
  fonts here, including the Amiga scene fonts.


Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-12 04:33:26 -08:00
Claude 23ccab3538 Read greetings from more sound files than WAV
The shared code reads WAV of 8 to 32-bit PCM, floats, A-law, mu-law,
IMA and Microsoft ADPCM, AIFF and AIFF-C, and Sun/NeXT .au (SoundFile,
a port of the desktop library's decoder: the same output on the same
files). The rest goes to the phone's own decoders:

- Android: MediaExtractor and MediaCodec (MP3, AAC/M4A, FLAC, Ogg,
  Opus, AMR), off the main thread
- iOS: AVAudioFile (MP3, AAC/M4A, FLAC, ALAC, CAF)

The file pickers take any audio file now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
2026-11-11 14:29:33 +00:00
Claude c37f611b33 Voice test: the microphone and speaker driven by the time gone by
As a sound card is: a sleep that takes longer than asked (the iOS
simulator's) no longer starves the call of the microphone's samples or
leaves the far end's unread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
2026-11-11 12:51:55 +00:00
Claude 0004653763 Voice test: the call's pace measured over the time it ran
On the iOS simulator's three slow CPUs, the fixed bounds of a second's
samples failed; the rates are now taken over the loop's own time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
2026-11-11 12:44:13 +00:00
Claude 98aa27f9ea Add voice calls and a local answering machine
Calls through D-Modem's V.253 voice mode, on the phone's earpiece or
loudspeaker and microphone: a number called, the ringing call answered,
the keypad (DTMF), mute. The answering machine, off until the user turns
it on, answers after the rings set, plays the greeting and a beep, and
keeps the caller's message as a WAV file on the phone.

The call is the shared Kotlin's VoiceJob (with G.711, tones and WAV
files, tested against a fake V.253 modem). Android has Home's Phone
section, a settings page and the incoming call popup's two new answers;
iOS a Phone tab. D-Modem bumped to main (Rockwell/USR voice, #109).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
2026-11-11 12:34:44 +00:00
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
NeoandClaude 160eea3446 Terminal types: a screen drawn on each, their docs page, Tek's fix (#41)
ProfileRenderTest draws a screen of each terminal type's own codes
through the Android view and keeps it as build/profiles/<id>.png. It
found the Tektronix drawing nothing in the app: the picture's raster
was made before the view sized its cells, and only replaced at flush,
after the drawing. PictureLayer now checks the size before each drawing.
docs/terminals.md lists the types, the graphics, how to test them (vttest
notes) and what isn't done.


Claude-Session: https://claude.ai/code/session_01B82eRSyCmXjaURxSYoHxCY

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 17:59:36 -08:00
NeoandClaude Opus 5.5 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>
2026-11-10 17:33:42 -08:00
NeoandClaude Opus 5.5 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>
2026-11-10 17:19:36 -08:00
NeoandClaude 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>
2026-11-10 17:01:57 -08:00
NeoandClaude Opus 5.5 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>
2026-11-10 16:38:13 -08:00
NeoandClaude 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>
2026-11-10 16:09:09 -08:00
NeoandClaude 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>
2026-11-10 15:52:26 -08:00
Claude 71c649bce1 README as a landing page; D-Modem-RE is now D-Modem; CI skips doc-only changes
The README, titled for Android only, now introduces the app on Android
and iOS with a short feature list, a quick start, the suite's
repositories and the licence. Its sections move to docs/: the modem's
lines, fax, adapters and phone lines, the app screen by screen, building,
the iOS app and the source layout.

D-Modem-RE becomes D-Modem in comments, docs, workflows and the
generator's header, as in brand's naming guide; the build info line says
'D-Modem core <commit>' for the submodule's commit. Identifiers and the
external/d-modem-re path keep their names.

The Android and Apple workflows no longer run for a change to Markdown,
docs/ or COPYING alone (tag pushes still run).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSqjp9Pn2KBr9N9LAn
2026-11-05 10:46:04 +00:00
Claude 24525a0d17 Rename the Android app to org.dmodem.app.android
The application id, namespace and Kotlin package of the Android app
are now org.dmodem.app.android (was com.neodesktop.dmodem), with the
JNI symbols (pty.c, jni.cpp's class name), ProGuard keeps, the USB
permission action, README and the generator scripts to match. The
shared Kotlin Multiplatform code moves to org.dmodem.app alongside it,
so the app now imports what it used to see as its own package.

The iOS bundle ids are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRipoddxponCaexwE4
2026-10-31 13:08:06 +00:00
Claude 299daabfb1 PeerLoopbackTest: the fake pipe delivers what was written before its close
A phone turning down a wrong PIN writes DENIED and closes. The test's
pipe returned -1 as soon as it saw the close, before reading what was
already queued, so the caller now and then missed DENIED, took the call
as unanswered (503) and aPinToCall waited out its 15 s for a 403. A
socket delivers the data before the end; the fake now does too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSgB6M9Vp9dEP1haEE
2026-10-30 12:20:37 +00:00
Claude 688b99b2bb ByteQueue: a chunk sent as a timed read runs out is no longer lost
poll(ms) waited with withTimeoutOrNull { ch.receive() }. When a chunk
arrived just as the timeout fired, the cancelled receive had already
taken it from the channel, and kotlinx.coroutines drops an element
delivered to a cancelled receive. Readers that poll in short waits
(the fake fax line's modems, TransferIo under every job, the PPP
loopback's pumps) lost bytes now and then: a lost AT command or frame
became a 4-10 s stall, and on slower CI runners a failed test
(EcmTest, JobsTest.dialUpInternet on iOS, PppLoopbackTest).

The wait is now a select of the receive and a timeout, which can't both
win, so the chunk stays in the channel when the timeout does. The new
ByteQueueTest loses a chunk within the first hundred on the old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSgB6M9Vp9dEP1haEE
2026-10-30 11:51:45 +00:00
Claude 4d24662752 Comments back above the functions they describe
PeerLine's tone(), XYModem's readBlock() and TransferJob's protocols:
the older comment had a property between it and its function (or
described the next one too); each now sits above what it describes,
and the properties have their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-27 08:32:42 +00:00
Claude 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
2026-10-27 08:23:54 +00:00
Claude 96fe07be7e Comments for every function: the shared code, batch 7 of 8
Comment lines only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-27 08:17:47 +00:00
Claude 9b4debf4f5 Comments for every function: the first two batches; doc_check.py stricter
The tests' and shared code's functions in two of eight batches (comment
lines only). doc_check.py skips only lines of annotations alone, so a
function under an annotated property (@Volatile var) needs its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-27 08:16:27 +00:00
Claude 7e1eb444cc PeerLoopbackTest: what C got when its BUSY doesn't come
It has failed now and then ("no C's BUSY") in a full run, not since in
14 alone: the failure now says C's events, its line's state and error,
and A's and B's events, for the next time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 08:03:19 +00:00
Claude 00b335a9d3 File transfers: plain text, verbatim
Protocol TEXT: a file's bytes sent exactly as they are (no line ending
changed, nothing added), as if typed, to an editor, a BBS, cat > a file;
received, what comes saved as it is until the line has been quiet for
10 s (a cancel ends it, what came kept). No cancel bytes: no protocol.
TextTransfer; the terminal's dialogs say what it does; iOS's transfers
have it too.

TextTransferTest (JVM and native): CR, LF, CR LF, tabs, UTF-8 and every
byte value sent unchanged and received as sent; through Transfer, its
end, nothing sent on cancel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 07:43:39 +00:00
Claude d699982f2e File transfers: Intel HEX and Motorola S-records
Two more ways to send and receive a file, for EPROM programmers, monitor
ROMs and boot loaders on a plain serial line: HexRecords encodes an image
as Intel HEX (16-byte data records, an extended linear address at each
64 KB, the end record) or S-records (an S0 header of the file's name,
S1/S2/S3 by the image's end, S5's count, S7/S8/S9) and decodes them back,
checksums and lengths checked, other lines (prompts, echoes) passed over,
gaps as an erased EPROM's 0xFF. HexTransfer sends a file a record a line
(a file of the format's records already, as it is), and receives the
records until the end record (or a 10 s pause once they've come) into
the image they hold. Protocol INTEL_HEX and SREC: the terminal's send and
receive dialogs (with what each does), iOS's transfers too. A cancel sends
nothing: there's no protocol to tell.

HexRecordsTest (JVM and native): Intel's and the S-record examples, images
there and back at three base addresses, address sizes, gaps, wrong
checksums, and sent and received on a line through Transfer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-25 07:25:04 +00:00
Claude e999857e57 Call tones without pops; the line chosen from a menu
The tones popped: the player asks for 50 ms at a time, and each piece
ramped its start in from silence (a counter that began at 0 each time),
some 20 dips a second. A burst's ramps now come from where the sample is
in the tone's cadence (Tone.burst), so the pieces are exactly one sound
(CountryTonesTest.inPiecesAsInOne: the same samples in pieces as in
one, and no jump bigger than the tone's own slope).

Settings: the line (SIP, Wi-Fi, Bluetooth, mobile calls) is a drop-down
menu instead of four radio buttons (PeerShotsTest.theLineFromItsMenu).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 23:45:14 +00:00
Claude 7a986263e6 The country's call progress tones: dial, ringing, busy, congestion
D-Modem-RE's ITU table (dsp/tones.cpp, 192 countries after E.180) in
the shared Kotlin (tones/: generated by tools/country_tones.py, checked
against the submodule by CountryTonesSourceTest), with a synthesizer
for its tones (two frequencies, or one modulated; the cadence, its
edges ramped).

Android:
- Settings: the country picked from the list (searched, each with its
  tones, a button to hear them), for the modem (its line settings, how
  it hears busy) and the tones; "Call progress tones" on or off
- dialling a directory entry plays a second of the country's dial tone
  before ATD
- CallProgress plays the busy tone on BUSY, the congestion tone for a
  dial that ends (NO CARRIER, NO DIALTONE) before the far end answered,
  and the ringing tone while the other phone rings on the phone-to-phone
  line (no network there to play one); a handshake stops them
- CallTones plays them on the phone's speaker, in their own stream

iOS: the country picker in Settings (it had the setting, not the UI).

Tests: CountryTonesTest (the table, each tone's frequencies and cadence,
on the JVM and natively), CallTonesTest (when each plays; a second of
the UK's dial tone, stopping, the preview).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 23:24:55 +00:00
Claude 1ff80c180f Shared jobs for iOS: fax calls, file transfers, dial-up internet
The modem's DTE lent to a job as Swift drives it: octets as Latin-1
strings, callbacks through fun interfaces (DteOut, LogOut, Changed)
rather than Kotlin lambdas, state read when it says it changed.

- FaxJob: send pages to a number, or answer and save the pages as a PDF
- TransferJob: ZMODEM/YMODEM/XMODEM/Kermit on the shared Transfer, now
  in common code (the Android terminal uses the same one)
- DialUpJob: ISP dialled, login script, PPP, packets to a PacketTunnel
- FaxImage: grey pixels as fax pages, at a threshold or dithered
- nativeMain: PosixFiles/PosixFolderIncoming for files by path, and
  UdpPacketTunnel relaying packets to iOS's packet tunnel extension
- PeerHost takes LogOut for its events and log (Swift can't pass a
  Unit-returning Kotlin lambda as a plain closure)

JobsTest runs each job on the JVM and natively (the fax both ways on
the fake class 1 line, ZMODEM between two jobs, PPP to a fake ISP);
NativeJobsTest covers the files and the UDP relay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 04:17:40 +00:00
Claude befcd0d5ef iOS: the line to another phone over Wi-Fi, found with Bonjour
shared (Kotlin/Native, iOS and Linux): FdDuplex (a socket: the engine's
line, a TCP connection; closing it wakes a blocked read), PosixTcpTransport
(calls taken on a port, polled so close() always ends it; host[:port] and
[IPv6]:port called within 5 s; no SIGPIPE: Linux's send flag, Apple's
socket option), and PeerHost: PeerLine on it from plain values for Swift
(no default arguments or flows there), its state as text. PosixPeerTest
(native): two phones over real TCP on the loopback, the modems socket
pairs: a call rung, answered and heard both ways, busy, the hang-up, a
wrong PIN turned away, nobody there.

DModemKit: ModemSession.onLine, the peer line's modem off hook to the
app (tested: a dial reaches it, its FAILED a NO CARRIER).

The app: the settings' line (a SIP account or another phone on Wi-Fi:
whom ATD calls, the port, the PIN, taking calls), phones found with
Bonjour (_dmodem._tcp, as the Android app's NSD offers them), this one
offered while it takes calls; Home's line its state and last failure.
And a start fixed: the modem's log while it started ended the
background audio (and now the line) before it was running.

The Swift and appleMain's Kotlin aren't built here (no Xcode); the
Kotlin is built and tested for Linux native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 02:27:41 +00:00
Claude 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
2026-10-18 02:15:16 +00:00
Claude 7db2a88b79 iOS: DModemKit, the app's modem apart from its views; terminal rows as runs
ios/DModemKit (Swift package): the engine (dmodem_engine.h) from Swift
(Engine: its config, its callbacks to a listener), its DTE (read on a
thread of its own, written), the settings (ModemSettings, as the Android
app's: the SIP account or the Wi-Fi peer line, user:password@host, kept in
UserDefaults, read leniently), ConnectInfo ("V.cvm · LAPM"), and
ModemSession (started from the settings: status, log, console, the DTE's
data, the speaker) for the views to watch. On Apple's systems the engine
is the XCFramework; on Linux the host build's libraries
(DMODEM_HOST_BUILD), so its tests run there: a session on a peer line
answering AT commands, a dial handed to the app and turned down busy.

shared: TerminalEmulator.runs(), a screen row as styled runs with their
colours resolved as TerminalView has them (the remote's palette, bold as
bright, iCE colours, inverse, faint), for a view that draws text (the iOS
app's); tested on the JVM and natively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-18 02:09:13 +00:00
Claude 0f43be88a5 ZMODEM receiving: a noisy fast line's leftovers aren't errors
After a damaged subpacket our ZRPOS reaches sz at once, but what it
streamed before it still comes; broken headers in that data counted as
errors in a row, each with a ZRPOS of its own (each a restart, with
leftovers of its own), until ten of them gave up on the line. For a
second after a ZRPOS a broken header is let go by; 8 KB without a
header is one missing, asked for again; a stale ZEOF is asked for again
only after the second. A ZDATA not where we are still always gets one
(sz waits for our ACKs now and then: ignoring it, both sides waited).

Found by the interop tests once they stopped tracing every byte (the
trace had slowed the line). The cancel test reads the line slowly, so sz
is mid-file when cancelled, not done with all 2 MB queued here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 21:41:05 +00:00
Claude 7642aaa59f Shared io: background() on threads as many as the work, not I/O's 64
Blocking reads held on coroutines' I/O dispatcher (64 threads at most)
could leave the next background job waiting for a thread that never
came free: PeerLoopbackTest's PIN call hung in the full suite, after the
other tests' readers. The peer line, PPP and the transfers each hold a
few such threads in the app too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 19:31:55 +00:00
Claude b534be0dbc Fax: error correction mode (T.30 Annex A), sending and receiving
ECM when both machines have it (DIS/DCS bits 24 and 27): the page in
blocks of up to 256 FCD frames of 256 octets on the fast modulation,
RCP three times, then PPS; the receiver's MCF, or PPR with a map of the
frames that didn't come, sent again; after four PPRs CTC at a rate lower
(with the long training), after three CTCs EOR; RR for RNR; a PPS again
for an MCF lost. A class 1 modem carries ECM's HDLC as bits, so the
framing is ours (EcmHdlc: flags, zero stuffing, FCS-16).

A setting (on by default); FaxProgress.ecm. Tests: common Kotlin on
two class 1 modems in memory that spoil what they're told (PPR, CTC,
EOR, no ECM); the real modems with and without ECM; efax (no ECM) still.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 18:30:42 +00:00
Claude 7b60aedd9d Phone-to-phone line: an optional PIN, as a challenge and response
With a PIN set, the phone called answers RING with CHALLENGE <nonce>
(16 random octets), the caller AUTH <md5("DMODEM/1:" nonce ":" PIN)>:
the PIN never goes on the connection. A wrong PIN (or none) gets DENIED
before the phone rings, the caller's modem NO CARRIER (FAILED 403), and
each failure in a row a longer wait (1 s doubling, up to a minute) before
the next PIN is checked. Mobile calls have none of it.

The setting in the Wi-Fi and Bluetooth line's fields; secureRandomBytes
in the shared io (SecureRandom, /dev/urandom natively); tests in common
Kotlin and with the real modems (peer_host).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 18:13:13 +00:00
Claude 8e85d1a465 Shared Kotlin: the line to another phone (PeerLine), the fax test page
PeerLine moves to shared/'s common Kotlin: its connections (Duplex) on
Source and Sink, its threads coroutines' I/O threads (background()), a
latch, atomicfu's locks and atomics; the transports (TCP, Bluetooth, the
mobile call) and the native modem's line stay the app's, on the same
interface.

The fax test page (a frame, bars, dashes, a checkerboard) is shared code
(FaxTestPage): the app's fax tests and T4Test both have it. (The fax
move left the app's fax tests without it: they compile again.)

PeerLoopbackTest (common: the JVM and native): two phones' lines in
memory, each modem answering every sample with its own; the call rung,
answered and heard both ways after the exchange's tones, a third phone
busy, the hang-up. The app's tests on two real modems pass on the shared
code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 15:16:15 +00:00
Claude 0fba297f3c Shared Kotlin: fax (T.4's MH, T.30, class 1, the PDF of the pages)
T4, T30, Class1 and FaxPdf move to shared/'s common Kotlin (the PDF
written to a Sink); the documents' rendering (Android's PdfRenderer) and
the fax manager stay the app's. T4Test in common Kotlin: the JVM and
native. The app's fax tests pass on the shared code, efax's calls over
two modems among them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 15:02:04 +00:00
Claude 9387f5eb21 Shared Kotlin: PPP (HDLC, LCP/PAP/CHAP/IPCP, client and server), IP packets, the chat scripts
Hdlc, Ip, Ppp and ChatScript move to shared/'s common Kotlin; the NAT
(its sockets) and Android's VPN stay the app's. What they needed of the
JVM, common: an IPv4 address (Inet4: on the JVM java.net.Inet4Address
itself, the app's code as it was), MD5 for CHAP, a timer (coroutines, one
piece at a time, as the scheduled executor), atomicfu's synchronized.

PppLoopbackTest (common: the JVM and native): a client and a server in
memory, the link up, the address and DNS given, IP both ways, the
hang-up; MD5 against RFC 1321's vectors. The app's PPP tests (the ISP,
the chat scripts, the internet line over two modems, the phone as an
ISP) pass on the shared code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 14:54:05 +00:00
Claude 65be65b015 Shared Kotlin: the file transfers (X/Y/ZMODEM, Kermit) and the I/O they're on
shared/'s io: what the shared code needs of I/O the same on the JVM and
iOS: Source and Sink (the JVM's streams through asSource()/asSink()), a
byte buffer, a queue of bytes read with a timeout (on coroutines'
channels), IOException (java.io's own on the JVM), the monotonic clock,
a sleep, the local time zone's offset.

The transfers move there (TransferIo, X/Y/ZMODEM, Kermit, the CRCs, the
files' Outgoing and Incoming); a folder of received files and a JVM file
to send stay the JVM's (FolderIncoming, Outgoing.of). Kermit's dates by
arithmetic (civil from days and back) in the local zone.

TransferLoopbackTest (common: the JVM and native): each protocol both
ways in memory, the files and their dates as sent. It found Kermit's
dates read wrong when they came as yyyymmdd (the 6-digit form matched
first): the 8-digit form first now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 14:48:27 +00:00
Claude 74a9c84cfc Kotlin Multiplatform: shared/, what the Android and iOS apps share, starting with the terminal's emulator
The terminal's VT/xterm emulator, its screen, Sixel, the character sets,
the keys, the characters' widths and the themes move to shared/'s common
Kotlin (the same package: the app's code as it was), their JVM-only calls
in common Kotlin's ways (code points, ISO 8859-1, copyInto, Base64.Mime).
The Android app has its JVM side; iOS its framework, DModemShared (iOS
devices, simulator); Linux native runs the common tests too.

TerminalEmulatorTest in common Kotlin (kotlin.test): on the JVM and
native; XtermFeaturesTest on the JVM. CI: the shared tests on Linux
(JVM, native) and on an iOS simulator (apple.yml).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
2026-10-17 13:57:05 +00:00