Commit Graph
5 Commits
Author SHA1 Message Date
CydandClaude Fable 5 0ed6d9495e Replica: swap G/B HUB75 pins for panels with green/blue LEDs exchanged
Manufacturer confirmed these matrices have the green and blue LEDs
swapped; orange (255,96,0) rendered purple. Exchange the G and B pin
assignments so every color is corrected at the wire level and the
firmware's color values stay identical to vPLASMA's.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 16:48:54 -05:00
CydandClaude Opus 4.8 68e3d1f367 VPlasma.Wire: add diff + TeslaSuite plasma authoring tools
- diff — compare two frames/images/encodings (.bin ESC P / .png / .txt
  bitmap=), each reduced to 128x32; reports differing dots and match %, writes
  a red-on-mismatch image, exits 1 if they differ. Closes the differential-test
  loop: diff a cropped panel/replica photo against the vPLASMA golden image.
- text / encode / decode — ported from TeslaSuite's three plasma tools (Plasma
  Font Tool, Bitmap Decoder, Editor) via PlasmaBitmap.cs:
    * text   — render text in an auto-sized Windows font to a plasma bitmap.
    * encode — an image → plasma bitmap.
    * decode — the game's bitmap= hex encoding → a preview PNG.
  Each bridges to an ESC P wire stream (and/or the bitmap= hex encoding), so
  authored content replays straight to vPLASMA, the replica, or the real panel.

Verified: text "ALERT 12" → ESC P → vPLASMA renders it; the ESC P and hex
paths diff as byte-identical (504/504 lit, 100% match).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 21:20:50 -05:00
CydandClaude Opus 4.8 78cd679b53 Add VPlasma.Wire: differential-test helper
A console tool for validating the hardware replica against vPLASMA and the
real panel by feeding all three identical byte streams.

- synth   — build a repeatable command stream (selftest/demo/banner/charset).
- render  — feed a stream through the vPLASMA engine and save the resulting
            128x32 frame as a PNG: the pixel-exact golden image.
- replay  — send a stream to any target port: the real panel (RS-232, self-
            pacing), the Matrix Portal replica (USB-CDC), or a virtual port
            (--paced).
- capture — log live traffic to a file, with --tee to forward it on to the
            real display so capture is non-intrusive.

Reuses VPlasma.Core (same parser/fonts as the emulator and the ported
firmware). The replica README documents the differential-test workflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 20:42:00 -05:00
CydandClaude Opus 4.8 ebad6ee5fe PD4 display test: cycle diagnostic patterns, not just all-on
The real display's power-on test (JP1 jumper 5, firmware $B888) runs through
several drawing sequences — a solid fill, a border+grid, more — each held
briefly, to expose dead dots and addressing faults; it isn't just full on/off.

Both vPLASMA and the replica firmware now cycle 5 representative patterns:
solid, border+grid, horizontal stripes, vertical stripes, checkerboard.
- VPlasmaDevice.ShowTestPattern(int) + TestPatternCount; the app cycles them
  on a 1.2s timer while jumper 5 is installed.
- PlasmaDisplay::showTestPattern(int) + TEST_PATTERN_COUNT (shared logic); the
  Matrix Portal sketch's DOWN button toggles the cycling test.

(The firmware's exact byte patterns live in the display's native scan-buffer
layout, which we haven't mapped, so these stand in for that sequence rather
than reproducing it byte-for-byte.)

Verified: 29 C# tests pass; the C++ patterns render distinctly on the host.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 20:34:33 -05:00
CydandClaude Opus 4.8 ab36cdd826 PlasmaNew/replica: Matrix Portal S3 firmware for the hardware replica
The hardware replacement for the failing Babcock PD01D221: an Adafruit Matrix
Portal S3 (ESP32-S3) reads the game's serial command stream over its native
USB-CDC port and renders it to two chained Adafruit 64x32 HUB75 RGB panels
(= 128x32) in neon-orange, via Adafruit Protomatter.

- PlasmaDisplay.h/.cpp — the PD01D221 command parser + 128x32 framebuffer,
  ported line-for-line from vPLASMA's VPlasmaDevice (the reference oracle):
  the full ESC command set, pixel-addressed cursor, attributes, orientation,
  and the rotate-onto-glass plot() mapping.
- plasma_fonts.h — the 8 real ROM fonts (PROGMEM), generated from
  tms27pc512.BIN.
- demo_screens.h — the 10 firmware demo screens (PROGMEM).
- MatrixPortalPlasma.ino — Protomatter init (128x32), USB serial input,
  the orange/dim/blink render loop, and onboard buttons (UP = firmware demo,
  DOWN = panel test) for no-host bring-up.
- README.md — BOM, wiring, build/flash, DOSBox-X serial config.

Parser verified on the host with g++ (font-0 'H', ESC Q/R positioning,
demo replay, test pattern) against a minimal Arduino shim.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 20:22:06 -05:00