Emulators, Immutability, and Time Travel
summary
Built a time-traveling NES in Clojure that models the Ricoh 2A03 CPU, the PPU clock and scanline timing, and cartridge mappers (implemented NROM-128 mapper). Uses a single immutable state map — the one big atom model — plus custom 8‑bit arithmetic and Reagent cursors for a frame-stepping debugger. Verification runs against known test ROM logs; emulator matches about 3,000/8,000 log entries so far, can run some tests and rewind state but is not yet cycle‑accurate. Code is on GitHub.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 0:38Beam Racing
- 3:23The Chip
- 4:40The Magic
- 5:56Interactive Systems
- 7:26Speedrunning Community
- 12:11The CPU
- 13:38The registers
- 14:26The data flow
- 14:44Closure maps
- 16:21Map lookup
- 17:11Arithmetic
- 17:54Arithmetic Shift
- 18:53Cartridge
- 20:44Mapper
- 21:24Debugger
- 22:52PPU
- 29:28Mental Model
- 31:17Log Entries
- 35:15Software Archaeology
- 36:05Emulation is not magic
- 36:33Future work
related talks
10mState of Retro Gaming in Emacs
18mEmulating the Nintendo Game Boy CPU with Elm
29mEmulating With JavaScript
30mControlling the NES with Javascript
35mBuilding a GameBoy emulator with Elixir and Scenic
48mRobotron Autopsy Learning About Hardware From Vintage Video Games
45mEmulating a 6502 System in JavaScript
27mWriting an emulator in JavaScript?
