PCulator - An x86 PC emulator written in C
https://github.com/mikechambers84/pculator/tree/dev
I'll just say up front, it's still very early in development, but it's working well enough to boot Debian 2.2 "Potato" and play a bunch of old DOS4GW games.
This is an extension of my older project XTulator which was a simpler 8086 16-bit only PC emulator, now being expanded to 32-bit x86. I started working on PCulator about 4 months ago.
There is a lot of code that needs to be cleaned up and reorganized, and several ugly hacks that need to be unhacked. The code's a bit ugly in general.
It's also just an interpreter-style CPU emulator, so it's no speed demon. It runs roughly like a 486 DX2/66 or a bit better on my i9-13900KS. There are things that can be done to optimize performance, but I'm focusing on functionality first.
It supports the 486 instruction set at this point, but the goal is to reach at least the Pentium Pro (686) level.
Current major feature set:
- 486 CPU (plus a few Pentium+ instructions... let's just call it an "enhanced 486" for now)
- x87 FPU
- ATA/IDE controller
- CGA/VGA graphics
- Microsoft-compatible serial mouse
- NE2000 network card (borrowed from Bochs)
- Sound Blaster (my implementation) + OPL3 (NukedOPL)
A few thanks are due:
- To Bochs for the NE2000 emulation module.
- To the NukedOPL project, which I'm using for OPL3 emulation.
- To the Blink project, which I stole and adapted the FPU from. (Though I would like to write my own from scratch later)
The rest of the code is mine.
Posted Jun 23, 2025, 4:18 AM UTC