demoscene-recomp

─═≡ Classic PC demoscene productions running in the browser. ≡═─

How It Works

Each demo's original DOS code, recompiled instruction for instruction, runs in your browser:

  1. The demo is run on an x86 emulator that records every block of code the CPU actually executes, over the whole demo.
  2. That recording is translated into C - the original instructions, one for one, with the exact cycle timing of the emulated machine.
  3. The C is compiled to WebAssembly, together with models of the hardware the demo talks to: the timer, the VGA card and the Sound Blaster.
  4. The result is checked against the emulator event for event: every interrupt, port access and frame at the same moment of emulated time.

The demos' own loaders, music players and effects all run as they did in 1992 and 1993; only the hardware is modelled.

The demos ran on VGA at 70 Hz, so they look smoothest on a display running at 70 Hz, or at 140 Hz or higher.

demoscene-recomp on GitHub

Credits

Unreal and Second Reality are by Future Crew, Crystal Dream II is by Triton, Stars: Wonders of the World is by NoooN; all were released free to the demoscene.

The original release files are served unmodified, as the demos read them at run time.

Font: IBM VGA 8x16 by VileR, int10h.org (CC BY-SA 4.0)