Commit Graph
11 Commits
Author SHA1 Message Date
Claude ce1fa43f5c ZMODEM: zstd compression (CANZSTD/ZTZSTD)
ZMODEM with zstd as docs/zmodem-zstd.md of D-Modem specifies, on top of
the crash recovery of #22:

- core/src/zstd_codec.c: a Zstandard (RFC 8878) encoder and decoder for
  whole frames, and XXH64, in plain C (a port of the app's Zstd.kt; no
  libzstd).
- xfer_z.c: CANZSTD in ZRINIT ZF1, ZTZSTD in ZFILE ZF2. Each chunk of the
  file goes as one frame (64 KB, halved after a ZRPOS to 1 KB, doubled
  after an ACK); the receiver writes only whole frames, so positions stay
  file offsets and ZRPOS and crash recovery work as before. Files of 0
  bytes, with a compressed extension, or whose first 64 KB don't get 5%
  smaller go as they are. A ZTZSTD file is skipped when we did not set
  CANZSTD.
- dmc_xfer_options.no_zstd stops it, and dmc_xfer_zstd() tells if the file
  now goes with zstd (the status struct is not changed).
- Windows: Transfer > ZMODEM Compression (zstd), on by default, and
  "(zstd)" after the file name in the progress dialog.
- Tests: the specification's vector, XXH64, round trips, against the
  reference zstd CLI when installed; ZMODEM with zstd in memory (smaller
  on the line, a noisy line, off on either side, a .zip, resume).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRR1WNeCEtXUcjE8RgY
2026-11-20 22:38:20 +00:00
Claude e6a3f4ad89 Add Copy, Capture and Print to the Windows terminals
The terminal control keeps a selection: drag with the left button,
double-click a word, Shift with the mouse when the remote takes it.
Copy (Ctrl+Insert), Paste to Host (Shift+Insert) and Select All are in
a new Edit menu and on the right button's menu, as HyperTerminal has
them.

capture.cpp adds Capture Text (the line's bytes to a file), Capture to
Printer (its text printed when you stop), each with Pause, and
Modem > Print (the screen or the selection). What the remote sends to
its printer port (CSI 5 i) now goes to the printer; before, the app
discarded it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
2026-11-20 22:14:14 +00:00
Claude e5842d2223 Add file transfers to the Windows app
Port the file transfer protocols of the D-Modem app to libdmodemctl:
ZMODEM (with automatic receive for sz, rz and kermit -s), YMODEM,
XMODEM, XMODEM-1K, Kermit, Intel HEX, Motorola S-records and plain
text. Each transfer runs on its thread, with two queues to the app.

The Windows app gets a Transfer menu, Send File and Receive File
dialogs, a progress dialog, and Send and Receive buttons on the
Terminal page. A transfer uses the modem line or the Remote login.

Also:
- link_pump takes only as much session output as the port can hold.
  Before, a large output was cut.
- The winport shims for serial, pipes, the environment and Beep are
  guarded, because the latest clang-retro MFC layer has them.
- core/test/xfer_test tests each protocol on a clean and a noisy
  line, and against lrzsz and C-Kermit when they are installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRekyRUhR43KbmGNXK
2026-11-20 22:01:10 +00:00
Claude f354ab01d0 Build the Windows app for Linux and macOS over clang-retro MFC's Win32 layer
First pass: TCP and SSH. With -DDMODEM_GUI_WINPORT=ON and CLANG_RETRO_MFC
set to a clang-retro MFC checkout, winport/ builds libwinport.a with the
MFC Makefile, converts app.rc with res2cpp.py, and links the same Win32
sources (now listed once, in windows/sources.cmake) as dmodem-win32.

The layer does not have serial ports, pipes or audio yet: winport/include
and winport/src/stubs.cpp supply stand-ins that fail, to remove when the
layer gets these functions. DMODEM_WINPORT blocks in the app: the settings
in ~/.config/D-Modem, TCP as the default line, ~/.ssh and '/' for SSH,
Unicode marks in the path view (no Wingdings), and group boxes put under
the other controls (the layer's hit test stops at HTTRANSPARENT).

CI builds it on Linux and macOS, and on Linux starts it in Xvfb against
a test modem on the TCP port (winport/test/smoke.sh).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRhKGCaYUyYtH7Boap
2026-11-20 13:58:32 +00:00
Claude 47a11a3f1d Build the Windows app with clang-retro
Replace Open Watcom (windows/build-watcom.sh) and MSVC in CI with
clang-retro: cmake/clang-retro.cmake, a CMake toolchain file that takes
the clang-dos toolchain package (CLANG_DOS) and a --config target
(CLANG_RETRO_CONFIG).

- Windows 95 and later: win32-picolibc (static C library, no msvcrt.dll),
  no SSH. CI checks its imports for 9x and NT 4.0.
- Windows 7 and later: win7, with libssh and mbedTLS built for it.
- CI runs the tests of both builds in Wine.
- picolibc names for _snprintf, _stricmp and _strnicmp; a main for
  picolibc's start-up code; DMODEM_GUI_SSH to turn the SSH build off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRhKGCaYUyYtH7Boap
2026-11-19 11:42:05 +00:00
Claude 50844a1e6f Anonymous SIP: dial a SIP address with no account (Linux, Windows, macOS)
A "No account (anonymous)" switch in the line settings starts dmodemd
with SIP_LOGIN=anonymous: nothing registered, sip:user@host (or
user@host) dialled as it is from "Anonymous", for the Modem page's
data calls and the Phone page's voice calls; the account's fields are
hidden (Linux, macOS) or greyed (Windows) and kept.  The number fields
say they take a SIP address too.  Needs D-Modem with the anonymous user
agent (D-Modem/D-Modem#112).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSJKSd2kxxKFZAiaXQ
2026-11-12 19:25:20 +00:00
Claude fe56f25743 Windows and macOS: SSH by libdmodemssh, built in
The Windows app runs libdmodemssh on a thread that posts its events to
the main window, with a login dialog that fits its questions; the
Windows 95 build keeps Windows' ssh.exe in a pseudo console.  The macOS
app's SSHConnection polls it on a thread for the main queue, with
SwiftUI alerts for a new host, a password or the server's questions;
PtySpawn goes.  libssh and mbedTLS are built universal for macOS by the
repository's CMake.  Linux CI logs in to a real sshd; docs follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSV65geuGd6zMt2V6r
2026-11-12 13:09:00 +00:00
Claude 2d974d5f1d Remote page on Windows: Telnet and rlogin over Winsock 1.1, SSH by Windows' ssh.exe in ConPTY
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSV65geuGd6zMt2V6r
2026-11-12 12:26:14 +00:00
Claude 9b2206e29a Add voice calls and a local answering machine
libdmodemctl now drives dmodemd's V.253 voice mode: placing and
answering voice calls, the DLE stream and its events, G.711 mu-law,
DTMF, and an answering machine (greeting, beep, recording) that takes
messages as WAV files. It is off until the user turns it on.

Each app gains a Phone page: Linux (PulseAudio), Windows (waveOut and
waveIn, Windows 95 and later) and macOS (AVAudioEngine).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTvbHMpudRfQWK4c4H
2026-11-11 12:15:46 +00:00
Claude f7a9b12c0e Licence: AGPL-3.0-only, or a commercial licence from the D-Modem Authors
The suite's licence, as D-Modem, bbs, menu and brand: the AGPL-3.0-only
by default, and a commercial licence from the D-Modem Authors for uses
that can't meet its terms (COMMERCIAL-LICENSE.md).  The contributor
agreement grants the licence for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U
2026-11-07 11:01:39 +00:00
Claude f62777b994 Windows and macOS apps, the app icon, and terminal fixes
- windows/: the Windows app in plain Win32 C++ (ANSI APIs, Win95
  common controls, Winsock 1.1), so that it runs on Windows 95 and
  later: Modem, Terminal, Settings, Call Stats and Log pages over
  libdmodemctl.  dmodemd is started where Windows can run it; on 9x
  the app reaches a modem over TCP or a COM port.  build-watcom.sh
  builds it with Open Watcom; CMake builds it with MinGW or MSVC.
- macos/: the SwiftUI app (XcodeGen project), with the terminal drawn
  from libdmodemctl's screen, the SIP password in the keychain.
- The app icon (assets/dmodem.svg, from the brand's jack art) as .ico
  and an asset catalogue, by tools/icons.js and tools/icons.py.
- libdmodemctl: anonymous enums (Swift imports them as constants),
  Backspace as BS (the modem's S5), key table without designated
  initialisers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRVTPinTtLUajudobBC
2026-11-06 13:53:21 +00:00