
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
| Board | Adafruit Metro ESP32-S3 |
|---|---|
| Memory | 16 MB flash, 8 MB PSRAM |
| CPU | Dual-core ESP32-S3 with native USB |
| Power | USB-C or LiPo, with battery monitoring |
| Expansion | STEMMA QT I²C connector, microSD |
What I added
- WiFi clock. Connects to the network to set the time, with a hardware RTC planned. CP/M 2.2 itself doesn't use the date or time, but later programs can.
- Telnet. Remote access using a Telnet module by Mark Bramwell. It's written for the ESP32, so other boards may need changes.
- Network printing. Anything sent to the
LST:device goes to a network printer. This was harder than I expected, and a couple of issues are still open. - Web interface. Change settings like the CCP and output devices from a browser, without recompiling.
- OLED status screen. Shows activity and the board's IP address.
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.