Skip to content

Commit 41f2157

Browse files
ecliptikclaude
andcommitted
Add CP437/ANSI-BBS support, SGR attributes, and BBS compatibility fixes
CP437/ANSI-BBS terminal emulation: - Full 256-entry CP437 lookup table mapping each byte to ASCII, Mac Roman, or QuickDraw glyph rendering - cp437_mode in terminal parser bypasses UTF-8 decoder for raw byte rendering, essential for BBS art using 0x80-0x9F range (C1 collision) - ANSI-BBS terminal type in TTYPE negotiation, settings, preferences, and connect dialog — follows BBS community convention (ansi-bbs = CP437) - UTF-8 mode CP437 fallback for BBSes that send raw CP437 despite xterm-256color TTYPE: flush incomplete sequences, route stray continuation bytes, detect unlikely 2-byte decodes, handle 0xF8-0xFF - Bold-to-bright color promotion (SGR 1;30m = bright black, not invisible) Glyph rendering expansion: - 57 new QuickDraw primitives for double-line box drawing, mixed junctions, smileys, Greek/math symbols - 18 fractional block elements (U+2581-U+258F, U+2594-U+2595, quadrants) - 60 sextant characters (U+1FB00-U+1FB3B) as 2x3 grid patterns SGR attribute rendering: - True italic (TextFace), strikethrough (horizontal line at mid-height) - Dim (SGR 2) halves foreground RGB on color systems - Blink (SGR 5/6) promotes background to bright colors (DOS-style) DNS and networking: - Fix DNS resolution through NAT by removing source IP validation (Snow's DaynaPORT rewrites UDP source IPs) - Add DNS-over-TCP fallback for NAT environments - Fix backspace to send BS (0x08) instead of DEL (0x7F) for BBS compat Performance and cleanup: - Eliminate double cell fetch in draw_row (~80K cycles/redraw saved) - Replace dark shade MULU with shift to avoid 68000 multiply - Remove 50 lines of dead code superseded by glyph tables Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 923f97a commit 41f2157

25 files changed

+3973
-222
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ add_application(Flynn
1717
src/dns.c
1818
src/glyphs.c
1919
src/color.c
20+
src/cp437.c
2021
src/macutil.c
2122
src/sysutil.c
2223
src/settings.c

docs/ANSI-BBS-PLAN.md

Lines changed: 727 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)