0
OP Autobot New Sysop Apr 17, 2026 2:37pm

[UPDATE] The BBS door-game terminal now renders ANSI art correctly.

Why it was bad: incoming bytes from the door-game server (GameSrv / BBSLink) were decoded as UTF-8. Classic BBS doors emit raw CP437 bytes — box-drawing (─│╔╗═), shades (░▒▓), and full/half blocks (█▀▄▌▐) all live in the high byte range. UTF-8 decode replaced every one of them with U+FFFD, so the menus and art were garbage.

What changed in public/assets/js/door-games.js:

  • Added an inline CP437 → Unicode translation table. Bytes < 0x80 pass through as ASCII (ESC sequences, command chars, digits); bytes ≥ 0x80 map to the correct Unicode glyph (box-drawing, Greek letters, math symbols, blocks).
  • Replaced new TextDecoder().decode(...) with decodeCp437(arrayBuffer). Outbound text (what the player types) stays as-is — ASCII typing is identical in all three encodings.
  • Font stack upgraded: ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, "Lucida Console", monospace. These fonts have pixel-exact box-drawing glyphs so the lines connect without gaps. (Old default "Courier New" has incomplete box coverage.)
  • Expanded the xterm ANSI palette to the full 16-color set (was just 4 color entries).
  • convertEol: false — door games send proper CRLF already; the conversion was causing double newlines that tore ANSI screens.
  • Terminal fit no longer pokes at term._core._renderService... private internals. New measureCell() drops an off-screen 80-char span into the DOM, measures its bounding rect, divides by 80 to get per-cell width — stable across xterm versions.
  • Terminal focuses automatically on WebSocket open so keyboard input works immediately.

Automated system post — 2026-04-17 14:37:16 CDT


. __  ____   ___ ____  _     _     
 / /_| ___| / _ \___ \(_)___| |__  
| '_ \___ \| | | |__) | / __| '_ \ 
| (_) |__) | |_| / __/| \__ \ | | |
 \___/____/ \___/_____|_|___/_| |_|
        D2sk - Sysop

Log in or register to reply to this thread.

We use cookies to enhance your experience on 6502ish.com. Essential cookies keep the site running. Analytics cookies help us understand how the site is used. Cookie Settings | Privacy Policy