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>
Plasma display replica — Adafruit Matrix Portal S3 + HUB75
A hardware replacement for the failing Babcock PD01D221 cockpit plasma display (../README.md, ../FIRMWARE.md). A modern microcontroller reads the same serial command stream the game sends and renders it to a modern LED matrix — a drop-in from the host's point of view, with none of the plasma physics or high voltage.
The firmware's command parser and fonts are ported verbatim from vRIO's
vPLASMA emulator (src/VPlasma.Core), which is the reference oracle. Feed
the replica and vPLASMA the same byte stream and they produce the same frame.
Bill of materials
| Part | Notes |
|---|---|
| Adafruit Matrix Portal S3 | ESP32-S3 controller; plugs into the HUB75 header; native USB-C = the virtual COM port |
| 2 × Adafruit 64×32 RGB LED Matrix (P-pitch to taste; 1/16 scan) | chained → 128×32, the panel's native resolution |
| 5 V power supply, ≥ 4 A | the panels are the load; USB cannot power them |
| USB-C cable | data (and logic power) from the host PC |
An amber-leaning pitch and diffuser best mimic the neon-orange plasma; the
firmware already renders in orange (255,96,0 full / 110,40,0 half).
Wiring
- Chain the panels: panel A
OUT→ panel BIN, left-to-right, so the pair reads as one 128-wide canvas (x 0–63 = panel A, 64–127 = panel B). If the image comes out swapped, reverse the chain order. - Mount the Matrix Portal S3 onto panel A's
INHUB75 header. - Power: 5 V ≥ 4 A into the Matrix Portal's screw terminals; run the panels' power pigtails from the same 5 V. USB-C carries data (and powers the S3 logic) — do not rely on USB for panel current.
Build & flash
Arduino IDE (or arduino-cli):
- Boards Manager → install esp32 (Espressif). Select board "Adafruit
Matrix Portal S3". Set USB CDC On Boot: Enabled (so
Serialis the USB port the game opens). - Library Manager → install Adafruit Protomatter (pulls in Adafruit GFX / BusIO).
- Open
MatrixPortalPlasma/MatrixPortalPlasma.ino(keepPlasmaDisplay.*,plasma_fonts.h,demo_screens.hbeside it) and Upload.
The HUB75 pin arrays at the top of the .ino are Adafruit's published Matrix
Portal S3 values; if the panel garbles, verify them against your installed
Protomatter version.
Using it with the game
The Matrix Portal enumerates as a USB CDC COM port. In Windows Device Manager you can pin it to the COM number the host expects. Point the game's plasma output at it — under the DOSBox-X fork:
serial2 = directserial realport:COMx
Baud is cosmetic over USB CDC (the 9600 line-coding is accepted as a no-op),
so the display keeps up regardless. The link is one-way (the game writes, the
display listens), exactly as the cockpit drove the real panel.
No-host testing (onboard buttons)
- UP — toggle the built-in firmware demonstration (the real 10-screen
PLASMADOT demo,
demo_screens.h, extracted from the ROM). - DOWN — the panel test pattern (all dots lit; a dead-dot check).
- Power-on briefly lights every dot (confirms both panels), then clears.
Files
| File | |
|---|---|
MatrixPortalPlasma/MatrixPortalPlasma.ino |
sketch: Protomatter init, USB serial, render loop, buttons |
MatrixPortalPlasma/PlasmaDisplay.h/.cpp |
the PD01D221 parser + 128×32 framebuffer — a C++ port of VPlasmaDevice |
MatrixPortalPlasma/plasma_fonts.h |
the 8 real ROM fonts (PROGMEM), generated from tms27pc512.BIN |
MatrixPortalPlasma/demo_screens.h |
the 10 firmware demo screens (PROGMEM) |
Keeping it faithful
PlasmaDisplay is a line-for-line port of VPlasmaDevice; keep the two in
sync (same commands, fonts, orientation/plot mapping). To validate the
replica, run the differential test: send identical byte streams to the
hardware and to vPLASMA and compare the glass. The real panel still works, so
it can be the third reference.
Still deferred (as in vPLASMA, documented in ../FIRMWARE.md): the 10
double-buffered pages (ESC I/ESC i are consumed but single-page) and the
vector-graphics primitives (ESC A–F).