A precise, playable rebuild of River Raid reproduces Carol Shaw’s 1982 Atari 2600 cartridge in JavaScript by reimplementing every 6502 instruction and running on the same 128 bytes of RAM and memory layout. Gameplay and mechanics are preserved: an endless river is generated on the fly from a 16-bit RNG seeded 0xA814, built in 32-line blocks grouped into sections that end with a road and bridge; fuel constantly drains and refueling depots, tankers, helicopters, jet fighters and bridges behave exactly as on the original. Players start with three jets, gain extra lives every 10,000 points up to nine, and scoring/collision rules mirror the hardware limits of the TIA chip. The whole game fits into a 4,096‑byte cartridge, which is why the river is never stored but deterministically recreated.
The rebuild is not an emulator in the usual sense: every routine was rewritten instruction-by-instruction, and a lightweight 6502 core runs the original ROM alongside the port to compare frames and RAM states. Verification produced zero differences across 45,000 compared frames, checked 300,000 river-generator states and matched 31,840 pixels of the opening frame. Inspecting the ROM revealed implementation details - score digits are pointers, collisions are latched by hardware and sampled once per block, and several quirky behaviors (e.g., house-touch handling and a top-of-block collision filing quirk) are retained. Source code is available; the ROM itself is excluded and the project is unofficial.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.