vPLASMA: fold in the real ROM fonts and firmware-confirmed commands

Replaces the guessed font/cursor model with what the firmware dump proved:

- The 8 real Babcock ROM fonts, extracted from tms27pc512.BIN into
  PlasmaFonts.cs (6x8, 6x10, 7x10, 12x16, 12x20). Drops the public-domain
  5x7 stand-in and PlasmaFont.cs.
- Pixel-addressed cursor with the real positioning commands: ESC Q (row Y,
  0-31) and ESC R (column X, 0-127), matching the firmware's range checks.
  Cursor motion (BS/HT/LF/VT/CR) now moves by font pixels, not cells.
- ESC K selects fonts 0-7 (out-of-range ignored, per firmware); ESC H
  attributes are the low 4 bits (half/underline/reverse/flash).

Deferred (documented in FIRMWARE.md): the 10 double-buffered pages
(ESC I/i) and vector-graphics primitives (ESC A-F); vPLASMA keeps a
single-page model for now.

Verified: 24 unit tests pass; the three self-test pages render the real
glyphs (big font 4 banner, full charset in font 0, graphics). Next: begin
the modern-parts hardware replica, with this as the reference firmware.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-16 17:39:07 -05:00
co-authored by Claude Opus 4.8
parent 2dca8bfd8f
commit 49e88fbe20
9 changed files with 663 additions and 293 deletions
+8 -4
View File
@@ -127,10 +127,14 @@ at `$8000`). It's how the new `ESC R/I/Q/i/K` commands were first spotted, e.g.
## What this means
**For vPLASMA:** the recovered commands can replace guessed behavior. Notably
`ESC Q`/`ESC R` are the real cursor-positioning commands (row/col), and the
`ESC P` "screen" byte selects one of 10 double-buffered pages — vPLASMA
currently models a single buffer.
**For vPLASMA (folded in 2026-07-16):** the recovered spec replaced the
guessed behavior. vPLASMA now uses the **8 real ROM fonts** (extracted to
`src/VPlasma.Core/Device/PlasmaFonts.cs`), a **pixel-addressed cursor** with
the real `ESC Q` (row) / `ESC R` (column) positioning, `ESC K` 07 font
select, and `ESC H` attributes as the low 4 bits. Verified: 24 unit tests +
the three self-test pages render the real glyphs. Still deferred (documented,
single-page model retained): the 10 double-buffered pages (`ESC I`/`ESC i`)
and the vector-graphics primitives (`ESC A``F`).
**For the replica:** this *is* the spec. The firmware confirms a clean model —
a byte-stream command parser, a 512-byte-per-page frame buffer, 10 pages with