This USB to Analog VGA Display Adapter Is More Than GUD Enough for Arcade Gaming

What do you do when you need to drive a classic arcade cabinet's CRT display at weird resolutions? Build a custom USB display adapter.

Gareth Halfacree
2 seconds agoRetro Tech / HW101 / Displays / Games

Programmer Stephen D. has come up with a way to integrate modern hardware into a vintage arcade cabinet without having to replace the cathode-ray tube (CRT) display — by turning an STMicroelectronics STM32H723 microcontroller into a 336×262-capable USB to VGA display adapter via the Generic USB Display (GUD) protocol.

"In November, my friend and fellow Recurser, Frank, picked up an arcade machine for the Recurse Center. We call it the RCade," Stephen explains. "He wanted to leave the original CRT in — which I think is a great choice! — and drove it off of a Raspberry Pi [single-board computer]. Eventually we wanted to move to a more powerful computer, but we needed a way to connect it to the display. Off-hand, I mentioned that I could build a CRT display adapter that interfaces with a normal computer over USB. This is that project."

The CRT display — a bulky but iconic technology that guides an electron beam through a glass tube held at vacuum in order to excite a phosphor coating on the screen into glowing — is a key part of a classic arcade cabinet. While it's possible to swap one out for a modern LCD panel, you'll end up with something that looks weirdly sharp and blocky for your troubles. Keeping the CRT, though, can be a challenge: while some accept a straightforward analog VGA signal, many have their own custom inputs.

The RCade is one such device, being based around the JAMMA standard — built to allow arcade owners to easily swap out the game boards to refresh their collections, but never made with connection to non-JAMMA systems in mind. An adapter to go from an analog VGA input to JAMMA exists, but it's not as straightforward as just plugging a laptop in: "The CRT runs at a weird resolution," Stephen explains. "We started with 320×240 but eventually wanted to target 336×262, which is super non-standard. Even 320×240 is unattainable by most display adapters, which typically can't go below 640×480. A custom solution would allow us to output any arbitrary resolution we wanted."

That custom solution took a few tries to get right. Initially, Stephen created a gadget built around the low-cost Raspberry Pi RP2040 microcontroller and its Programmable Input/Output (PIO) blocks — connecting to an arbitrary PC over USB using the Generic USB Display (GUD) protocol. "It consists of an upstreamed (!!!) kernel module that runs on the host, and separate gadget software that runs on the [Raspberry] Pi Zero," Stephen explains. "I decided I would just write my own gadget implementation to run on the RP2040."

While that worked, the performance wasn't adequate — with the RP2040's USB Full Speed (FS) implementation limiting it to 11Mb/s of throughput, delivering a mere 10 frames per second at 320×240 with 16 bits of color per pixel. The fix: porting the project to a custom board built around the STMicro STM32H724, which offers USB High Speed support with up to 480Mb/s throughput.

"I plugged the board into the [Raspberry] Pi, and Frank reconfigured it to make my display adapter the primary display," Stephen writes of the board bring-up. "We launched the normal RCade software and played some games. They looked truly amazing; nothing like before. Rose, one of the main people who developed the software, joked that it looked so good that some of the graphical shortcuts she took were no longer sufficient. This was a really fun project, and it's not over yet, but I think all the hard stuff is pretty much done (although — I've thought that before!). I really wasn't expecting this to take as long as it did, but I learned so much, and I'm a stronger engineer for it."

The full write-up is available on Stephen's blog, with hardware design files and firmware source code available on GitLab under an unspecified open source license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles