A deep dive into the multi-iteration process of creating a custom USB-to-CRT adapter that solves unique resolution and color depth challenges in arcade machine restoration.

The Resurrection Imperative
When Frank installed an original CRT in Recurse Center's "RCade" machine, we confronted a fundamental truth about display technology: modern solutions fail vintage hardware. Standard VGA adapters couldn't handle the CRT's 336x262 resolution, and 18-bit color from Raspberry Pi implementations showed visible banding. This sparked a hardware odyssey to build a custom USB display adapter that respects both the CRT's analog soul and modern computing needs.
VGA's Analog Heartbeat

At its core, VGA is a direct translation of CRT physics:
- RGB signals modulate electron guns
- HSYNC/VSYNC synchronize magnetic deflection coils
- Porch intervals give the beam retrace time
This simplicity becomes complex when modern digital systems must generate precisely timed analog waveforms. Our solution needed to:
- Output arbitrary resolutions
- Achieve 24-bit color depth
- Interface via USB from laptops
The RP2040 Proof of Concept

Our first attempt leveraged Raspberry Pi's RP2040 microcontroller with its Programmable I/O (PIO) blocks. Three synchronized PIO programs handled:
- HSYNC generation with precise porch timing
- VSYNC sequencing using interrupt coordination
- RGB output via DMA-driven pixel streaming
The initial implementation proved the concept but revealed critical limitations:
- USB bandwidth: Full-speed USB (11 Mbps) capped framerates at ~10 FPS for 320x240x16bpp
- Color depth: Our resistor-ladder DAC only provided 12-bit color
- Timing brittleness: Hard-coded resolution parameters made adjustments difficult
Protocol Discovery: GUD

We pivoted to Linux's GUD kernel module, an upstreamed USB display protocol offering:
- Delta compression: Only changed framebuffer regions transmitted
- Flexible feature negotiation: Adaptable to gadget capabilities
- Zero client-side configuration: Works with standard Linux kernels
Reverse-engineering the undocumented protocol led to a Rust implementation for RP2040, but USB bandwidth limitations remained insurmountable.
The STM32H7 Hardware Revolution

Our final architecture combined:
- STM32H723 MCU: 480 MHz Cortex-M7 with USB HS and LTDC peripheral
- Custom 8-bit DACs: Precision resistor networks for 0.7V output with 75Ω impedance matching
- HyperRAM: Frame buffer storage for 336x262x24bpp@60Hz
The rev2 board features:
- Length-matched traces: 38 signals synchronized for RAM interface
- USB PHY integration: UTMI Low-Pin Interface for true 480 Mbps operation
- YAPP-designed case: Parametric 3D model integrated into CI/CD pipeline
Lessons from the Electron Trenches
- Datasheet theology matters: The STM32H7's USB HS required an external PHY - a critical detail buried in documentation
- Analog respects no shortcuts: Crystal oscillator stability required exact resistor values (confirmed via human body experimentation)
- Legacy protocols demand modern rigor: VGA's analog nature exposed digital timing imperfections through screen tearing and drift
The CRT Renaissance
Our final implementation delivers:
- True 24-bit color: Eliminates visible banding in gradient-heavy games
- 60 FPS performance: Full USB HS bandwidth utilization
- Resolution flexibility: Supports any CRT-compatible timing
The project source code and hardware designs demonstrate that CRT preservation requires both analog understanding and digital precision. As modern displays prioritize pixel density over temporal performance, projects like this preserve the visceral experience of light being painted by electron guns in real time.
Future Horizons
- Integrated audio: Adding tube-based amplification for period-accurate sound
- Input capture: JAMMA controller interface integration
- Protocol enhancements: Kernel modifications for triple buffering support
This journey proves that even obsolete technologies deserve high-fidelity interfaces when they provide irreplaceable experiential qualities. The CRT's glow persists not through nostalgia, but through engineers willing to bridge analog and digital worlds with equal reverence for both.

Comments
Please log in or register to join the discussion