How Wine-Assembly works: articles, design docs and reverse-engineering notes

Wine-Assembly runs real Windows 98 programs in the browser: an x86 interpreter, a Win32 API layer, a software GDI, DirectX and a 16-bit loader, all written directly in WebAssembly Text. The articles below each answer one question about how that is built and are the place to start; the design docs and per-application reverse-engineering notes after them are the working record the articles are drawn from. The story tells it in order.

Start here

Five pages that cover the whole idea, in the order they build on each other:

  1. How to write an x86 interpreter in raw WebAssembly Text, the machine everything else runs on.
  2. Implementing the Win32 API in WebAssembly, the operating system the program thinks it is talking to.
  3. A software GDI in WebAssembly, how pixels get from the program to the canvas.
  4. Wine-Assembly vs v86, what this approach gives up and gains against booting a real Windows 98.
  5. Building an emulator with AI coding agents, how it was actually written.

Articles

The machine

The operating system

The process

Compared with other emulators

Design docs and reverse-engineering notes

These pages are the working notes behind it — the memory map, the interpreter's dispatch and lazy-flag design, the software GDI rasterizer, the DirectX and Win16 layers, the performance ledger, and one file per game or application we have taken apart to make it run. They are rendered from the Markdown in docs/ on GitHub.

Emulator design and performance

Reverse-engineering notes, one per application