Expand description
Front-end independent core of the BadTerm BBS client: CP437 handling, ANSI-BBS terminal emulation, the telnet protocol, the dialing directory and connection sessions (telnet, raw TCP, SSH, RLogin and modems) with file transfers.
Re-exports§
pub use ansi::Encoding;pub use ansi::TermEvent;pub use ansi::Terminal;pub use dialer::Directory;pub use dialer::Entry;pub use dialer::Protocol;pub use screen::Cell;pub use screen::Color;pub use screen::Screen;pub use session::AuthPrompt;pub use session::NetEvent;pub use session::PromptKind;pub use session::Session;pub use session::SessionConfig;pub use session::SessionEvent;
Modules§
- amigafont
- Amiga disk fonts, for SkyPix’s
ESC [ 10(seecrate::skypix):name.fontand aname/folder holding a file per size, each an AmigaDOS load file whose code hunk holds the font’sDiskFontHeaderandTextFont. The glyphs are one bitmap, a bit per pixel, with each character’s place and width, and (for proportional fonts) its spacing and kerning. - ansi
- ANSI-BBS / ANSI X3.64 terminal emulation.
- atascii
- Atari 8-bit BBSes: ATASCII, on the 40x24 screen of the Atari’s text mode, light text on blue.
- audio
- SyncTERM’s audio APCs (
ESC _ SyncTERM:A;... ESC \), as CTerm documents them: 256 slots of sound (16-bit stereo at 44.1 kHz) filled from files in the cache or sent inline (WAV, AIFF, VOC and Ogg Opus are decoded here), or synthesized; and 16 channels the BBS queues them on, with fades, loops, crossfades and volume. Synchronet’s doors play their sound effects and music this way. - autologin
- Logging in with the entry’s stored user name and password: answering the BBS’s prompts by itself, or one step at a time on the user’s request (Alt-L).
- avatar
- AVATAR (AVT/0 and AVT/0+): the compact screen codes of Opus, Maximus and other FidoNet-era BBSes, interpreted alongside ANSI.
- codepage
- The code pages behind CTerm’s built-in fonts (IDs 1-31): what a byte in
one is as Unicode, and back, for typing, pasting and copying text when
the BBS shows its screen in one of them. Bytes below 0x80 are ASCII in
all of them. Generated from Python’s codec tables, and for haik8 (7),
ARMSCII-8 (15) and CP1131 (31), which it lacks, from SyncTERM’s
(
src/conio/utf8_codepages.c), where bytes with no character of their own show CP437’s, as its fonts draw them. - cp437
- IBM code page 437 <-> Unicode conversion.
- dialer
- The dialing directory: saved BBS entries, stored as TOML, with import and
export in SyncTERM
.lst, CSV, JSON and TOML formats. - export
- Turning screen contents back into files or clipboard text: plain text,
and ANSI as BBS art viewers and editors expect it (CP437 bytes for
.ansfiles, or Unicode for pasting). - fontfile
- Font files from disk, for a directory entry’s font: raw DOS fonts
(
.fnt,.f08,.f14,.f16: 256 glyphs of 8 pixels a row, one byte per row) and Linux console fonts (.psf, versions 1 and 2), 8 pixels wide. They become 8x8, 8x14 or 8x16 fonts, as CTerm’s loaded fonts are (seecrate::screen::Look::load_font); other heights are stretched to the nearest of those. - iff
- IFF ILBM pictures, the Amiga’s: a SkyPix brush sent by XMODEM (see
crate::skypix). Bit planes, interleaved a row at a time, uncompressed or ByteRun1, with an optional mask plane; the result is a pen (palette index) per pixel. - igs
- Atari ST BBSes with IGS, Larry Mears’s “Instant Graphics and Sound” (version 2.19): VT-52 text and GEM VDI drawing on the ST’s own screen, 640x200 in four colors (medium resolution, where BBSes start), 320x200 in sixteen or 640x400 in two.
- igs_
sound - IGS’s sound (see
crate::igs): GIST sound effects, chip music, the ST’s sound chip driven directly, and MIDI notes, rendered to sound for the audio channels (seecrate::audio). - kermit
- Kermit file transfers, as C-Kermit, G-Kermit and Kermit-95 speak them, in both directions.
- modem
- Dialing out with a real modem on a serial port (or anything that acts like one: a USB modem, a WiFi modem, tcpser).
- mouse
- Mouse reports for the BBS, as xterm (and CTerm, after it) sends them
once the BBS asks: X10’s presses (
CSI ? 9 h), presses and releases (1000), with drags (1002) or every movement (1003), in the oldCSI M b x yform or, with 1006,CSI < b ; x ; y M/m(1016: the same, in pixels). - music
- ANSI music: the BASIC
PLAYlanguage that BBSes send betweenESC [ M(orESC [ N,ESC [ |) and Ctrl-N, turned into tones to play. - palette
- Color definitions: the 16-color CGA/VGA palette plus the xterm 256-color extension and 24-bit RGB used by modern BBS software.
- petscii
- Commodore 64 BBSes: PETSCII, on a 40x25 screen in the C64’s colors; and the Commodore 128’s 80-column screen (its VDC chip): the same PETSCII on 80x25, in the VDC’s RGBI colors.
- rip
- RIPscrip 1.54 graphics: the vector scenes, buttons and clickable mouse regions of RIPterm-era BBSes, drawn on a 640x350 EGA canvas under the 80x43 text screen.
- ripvars
- RIPscrip’s text variables (see
crate::rip):$DATE$,$TIME$and the other built-in ones, and the user’s own, which a BBS defines withRIP_DEFINE(1D) and fills into what buttons send or what it asks withRIP_QUERY(1 ESC). - sauce
- SAUCE, the record at the end of most ANSI art: title, artist, group, date, the width it was drawn at, its font and whether it uses iCE colors, plus any comment lines (https://www.acid.org/info/sauce/sauce.htm).
- screen
- The character-cell screen model: a grid of CP437 glyphs with attributes, a cursor, a scrolling region and a scrollback buffer.
- script
- Scripts: small programs, in Rhai, that log in to a BBS or find their way around it, as Telix’s SALT and Qodem’s scripts did.
- session
- A live connection to a BBS: protocol decoding, terminal state, ZMODEM
transfers and session capture. Networking lives in
crate::transport. - sixel
- Sixel graphics:
DCS p1 ; p2 q <data> ST, as DEC’s VT340 drew them and SyncTERM (CTerm) and xterm do today. Decoded here to anImage, which the screen places at the cursor (seecrate::screen::Screen::place_image). - skypix
- Amiga BBSes with SkyPix (SkyLine’s, later C-Net’s): ANSI text and
drawing commands (
ESC [ n ; ... !) on a 640x200 screen in 8 or 16 colors, as the “ANSI/SkyPix Documentation” (v1.12, 1994) describes them. - syncterm
- SyncTERM’s Application Program Commands (
ESC _ SyncTERM:... ESC \), as CTerm documents them: a cache of files the BBS stores on this machine, pictures (PPM and JPEG XL, from the cache or sent inline) drawn anywhere on the screen with clipping, flips, zoom and masks, and copying and pasting pixels. Synchronet’s graphical doors (SyncDoom and the like) draw with these. - telnet
- Telnet protocol (RFC 854) with the option negotiation a BBS client needs: BINARY (RFC 856), ECHO (857), SGA (858), TERMINAL-TYPE (1091) and NAWS (1073).
- tls
- Telnet over TLS (“TelnetS”, usually port 992), on rustls with the same ring crypto as SSH.
- transfer
- File transfers: ZMODEM here, XMODEM and YMODEM in
crate::xmodem, and Kermit incrate::kermit. - transport
- Network transports. Each connection runs on its own background thread
and reports
NetEvents through a callback; the caller writes through theWriterhanded over inNetEvent::Connected. - update
- Checking for a newer BadTerm: one HTTPS request for the newest release on the project’s Forgejo, made only when the user has turned the check on. It sends nothing but the request itself (with a “BadTerm/x.y.z” user agent).
- viewdata
- Viewdata BBSes (Prestel, and the teletext look): a 40x24 page of text and 2x3 block “mosaic” graphics in eight colors, as a Prestel terminal showed them, following CTerm’s description of its Prestel mode.
- xmodem
- XMODEM (checksum, CRC and 1K) and YMODEM (batch, and the streaming YMODEM-G) file transfers, for the BBSes and doors that offer them.