Fun stuff › Electronics › RunCPM

RunCPM on an ESP32-S3

A CP/M 2.2 computer running on a microcontroller, with networking bolted on.

RunCPM running on the Adafruit Metro ESP32-S3
Photo: images/projects/runcpm.jpg

What is RunCPM?

RunCPM, by MockbaTheBorg, is a Z80 CP/M emulator that runs original 8-bit CP/M programs on modern hardware. It's written in modular C, so porting it to a new board mostly means writing a small platform layer.

I've built it for a Mac, a Raspberry Pi Pico, a Waveshare RP2040-PiZero and a few other boards. I prefer boards with a built-in microSD slot, since that's where the CP/M disk images live.

Current hardware

BoardAdafruit Metro ESP32-S3
Memory16 MB flash, 8 MB PSRAM
CPUDual-core ESP32-S3 with native USB
PowerUSB-C or LiPo, with battery monitoring
ExpansionSTEMMA QT I²C connector, microSD

What I added

Code size

I replaced a lot of #ifdef blocks with boolean flags that can be switched at runtime. That costs a little flash, but with everything enabled the build still only uses about half of the ESP32's flash.

Updates on this project go in the build log.