Whenever someone has a software hobby project, more often than not, one of their endeavors will be to get Doom running on some odd piece of software, like an ESA satellite. As a welcome change, programmer He Chunhui did something slightly different: they decided to build an i386 PC emulator that runs on a tiny ESP32-S3 microcontroller board. It can boot Windows 95, Linux, and likely runs Doom, too.
The project is called Tiny386, and offers emulation for the main CPU and its optional x87 floating-point unit. A processor does not a PC make, so Chunhui ported a host of basic peripherals from the TinyEMU, QEMU, and Seabios projects: BIOSes and their I/O accoutrements, a VGA card, an IDE disk controller, and even a Sound Blaster 16 soundcard. Given that the ESP board doesn't have usable ports for these peripherals, keyboard and mouse inputs are forwarded to the emulator via Wi-Fi.
(Image credit: He Chunhui / Microsoft)
The ESP32-S3-based JC3248W535 microcontroller board that Chunhui used can be obtained for $25 to $30 from AliExpress, and that price already includes a decent 3.5" display. The SoC within has a dual-core CPU, a DSP, WiFi and Bluetooth, and a host of I/O microcontroller connectors of various shapes and sizes. But more to the point, an ESP32-S3 is a simpler device and packs far less horsepower than, say, a Raspberry Pi.
Chunhui says their emulator is "simple and stupid" and is missing some features, but that it "should run most 16/32 bit software". Given that Linux has long dropped support for the i386 processor, Chunhui saw fit to bolt on some 486 and Pentium instructions to his emulator so that the virtual machine can boot modern Linux (without a BIOS, even) and Windows NT.
The emulator core is roughly 6,000 lines of code and is written from scratch in C, more specifically, the C99 standard. That ought to make it easy to port, a fact the author emphasizes on the GitHub repository. Inquiring hobbyists can check out the emulator running in a Webassembly demo here, or watch a YouTube video of it running at this link here. Watching Windows 3.2 and Windows 95 boot on a $25 thumb-sized SoC will never get old.
Follow Tom's Hardware on Google News, or add us as a preferred source, to get our latest news, analysis, & reviews in your feeds.