Play it live at: https://daneelsan.github.io/spacewasm/

Spacewasm runs the original 1962 Spacewar! code on a PDP-1 emulator written in Zig, compiled to WebAssembly, and rendered on an HTML5 Canvas. The original game binary — unchanged — runs inside the emulated machine.

Two ships orbit a central star that pulls them with gravity. One wrong move and they explode into pixel dust.

  • A, D, S, W — spin, thrust, and fire the Needle
  • J, L, K, I — same controls for the Wedge

What makes this project interesting is that it sits at the intersection of computer history and modern web tech: a 60-year-old program, running on emulated 1960s hardware, delivered via WebAssembly in a browser. Writing the PDP-1 emulator meant working directly from the original hardware manuals — including the PDP-1 Handbook and I/O reference — and faithfully replicating its instruction set and display system.