emu_x86 Part 3: Inside the Emulator
This is the last of three articles about emu_x86. Part 1 shows how to use it and Part 2 covers the tools. Here I describe how it works inside, and the bugs that taught me the most.
The two PCs
| IBM PC/XT | 386 PC | |
|---|---|---|
| CPU | Intel 8088, 4.77 MHz | 386 (also 486, Pentium or Pentium II) |
| Firmware | GLaBIOS | SeaBIOS and SeaVGABIOS |
| Video | MDA and CGA | VGA with VESA modes up to 1600x1200 |
| Sound | PC speaker | PC speaker, Sound Blaster 16 with FM |
| Disks | Floppies, a hard disk, a CD-ROM | Floppies, an IDE hard disk, a bootable CD-ROM |
| Network | NE1000 | RTL8029 or NE2000 |
| RAM | 640 KB | 16 MB by default, up to 512 MB in the page |
One core, two hosts
The emulator core is portable C with no calls to the operating system. That is what lets the same code run in two places: in the browser, compiled to WebAssembly with Emscripten, with a page of plain HTML and ES modules around it, and on Linux, as command line programs and a native SDL2 window.








