TECHNOLOGY
Developer gets Game Boy emulator running at about 30 FPS on an ESP32 e-paper board using a custom display driver
A YouTube creator says a custom driver took a Game Boy emulator on an ESP32 e-paper board from about 2 FPS to around 30 FPS, with four-shade grayscale and sound. The driver is not public yet, but the creator plans to put it on GitHub.
Image: Youtube / Bo Made It
A developer has shown a Game Boy emulator running at around 30 frames per second on an ESP32 board with a small e-paper screen. The creator says the speed comes from a custom display driver they wrote themselves.
For comparison, the video also shows the same setup with the driver that comes with the board. On paper it should manage about 3 frames per second, the creator says, but in practice it barely reaches 2. The creator notes that Waveshare specifies about 300 milliseconds for a partial refresh, which is far too slow for games.
The slowness comes from how e-paper works. The screen holds its image using charged black and white pigment particles. Changing the electric field moves those particles toward or away from the surface. A normal update sends a sequence of electrical pulses, called a waveform, to push the pigment back and forth. That gives a clean image, but it takes time.
The creator's first step was to shorten the waveform. They cut it from about 17 drive steps to two, which brought a full update down to roughly 50 milliseconds, or close to 20 updates per second. The image looked bad, though. Old content stayed visible, an effect called ghosting, and over longer runs the whole screen slowly turned gray.
The fix was to track each pixel separately. When a pixel changes, it gets a drive budget, and each pulse uses some of that budget up. Once the budget is spent, the driver stops driving that pixel. The creator found that about six to eight drives was enough for a full black-to-white change. There is a trade-off: more drive gives clearer pixels, but moving objects blur more.
The creator credits an earlier project called Paperboy, a Game Boy emulator on e-paper built by someone named Zeph Ray. Paperboy uses different display hardware that exposes the panel directly. The creator's board has a dedicated display controller that cannot be bypassed, so Paperboy's driver could not simply be ported. The per-pixel driving idea does come from Paperboy, according to the creator.
Grayscale was the next problem. A Game Boy has four shades, and the creator first used dithering, which mimics gray with patterns of black and white dots. The display here is 200x200 pixels, and a Game Boy image is 160x144, so each Game Boy pixel gets only one screen pixel. The dither patterns were clearly visible.
The creator noticed that the display already produced gray by accident, because pigment does not jump instantly from black to white. Stopping the drive partway through a transition gives gray on demand. With four shades there are 12 possible transitions, and each needs different driving. The creator built tests for each one, captured photos and video of the panel, and calibrated again and again. The result is four-shade output without dithering. The creator says it is still not perfect.
Sound was simpler than in Paperboy. The creator says their board has an audio codec and a speaker, so the emulator's sound plays directly. The creator also adapted an existing controller design into a USB gamepad that plugs into the board, and says Bluetooth controllers should work too.
The work is not finished. The creator says heavy scenes can still drop slightly below 30 FPS, and some grayscale transitions need better calibration. Once they are happy with it, they plan to publish the driver and the rest of the project on GitHub, along with the controller files. No repository was available in the video.
The emulator was a side project. The creator was building a personal device with this board, with Anki flashcards, voice memos and possibly e-reader features. Menus felt painfully slow, which led to the faster driver. The creator says the interface is now much faster too, and describes plans for a small operating system with an online Anki planner, voice memos that work with Obsidian, and possibly local speech-to-text.