Project Plateau
Project Plateau는 네 개의 유리판과 하나의 살아있는 계곡, 캠프로 돌아가는 길을 의미
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
Berzerk (Atari 2600, 1982) translated into JavaScript instruction for instruction from the cartridge, verified against the ROM frame by frame
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Dan Hitchens' Berzerk (Atari, 1982), translated into JavaScript instruction for instruction from the original cartridge and checked against the real ROM frame by frame. Play it at https://plicerin.github.io/berzerk-rom-port/.
The translated program runs on a model of the 2600's TIA (picture, collisions, sound registers) and RIOT (RAM, timer, joystick and console switches):
src/berzerkRecomp.mjs: the cartridge's code, one case per instruction at its ROM address, with the disassembly's labels and comments and each instruction's cycle count. Generated by tools/recompile.mjs.src/berzerkRomData.mjs: the cartridge's tables and graphics, i.e. the bytes no instruction occupies. The cartridge image itself is not included.src/vcsBus.mjs, src/tia.mjs, src/cpu6502.mjs: RAM, RIOT timer and switches, the TIA, and the 6502 registers and arithmetic. The game and the dev oracle share them.src/berzerkMachine.mjs: the translated code on the bus, one frame per runFrame().src/berzerkPlayer.mjs: canvas, keyboard, gamepad, touch buttons, Game Select / Game Reset and the TIA sound worklet (src/tiaSound.worklet.js).index.html: the site, with the game embedded. game.html: the game on its own.img/: the poster, room pictures, sprite plates and icons, rendered from the game by tools/gen-images.mjs.The engine is the one built for the Donkey Kong and Adventure ports. Berzerk waits on the RIOT timer before it ever sets it, so the bus gives the timer a power-on value (a fixed $FF counting every 1,024 cycles; on the console it is arbitrary, and Stella makes it random).
python -m http.server 5503 --bind 127.0.0.1
Then open http://127.0.0.1:5503/. ES modules need a server; opening the file directly will not work.
Controls: arrows or WASD move, hold Space or Z to shoot, Enter is Game Reset, G is Game Select (hold it to step through the games), P pauses, M mutes. After a game the fire button starts the next one. Gamepads work too (Start = Game Reset, Back = pause), and phones get touch buttons.
Needs DASM 2.20.17 with vcs.h and macro.h in tools/dasm/. The ROM is assembled from Berzerk (decomp).asm and lands in rom/ and tools/build/, both git-ignored.
powershell -File tools/build-rom.ps1 # assemble the disassembly; checks the image's MD5
node tools/recompile.mjs # regenerate src/berzerkRecomp.mjs and src/berzerkRomData.mjs
node tools/verify-recomp.mjs 20000 1 cover # translation vs the ROM, frame by frame
node tools/verify-tia.mjs 3000 1 # fast TIA model vs the per-pixel reference
tools/build-rom.ps1 makes two adjustments for current DASM without touching the source: today's macro.h defines BOUNDARY N as "pad to a multiple of N", so BOUNDARY 0 divides by zero, and the build defines it as the disassembly means it ("pad to byte N of the page", as macro.h's own comment describes); and <A-B low-byte expressions that come out negative are written as [A-B] & $FF. The result has MD5 136f75c4dd02c29283752b7e5799f978 and matches a dump of the cartridge (Berzerk (USA).a26) byte for byte.
verify-recomp runs the ROM on a 6502 interpreter (tools/atari/) next to the translation with identical inputs, including Game Select, Game Reset and the fire-button quick start, and requires identical CPU registers, cycle counts, RAM, TIA write logs and pictures after every frame. With cover, identical RAM pokes in both machines top up the lives and set random levels and maze numbers now and then. 100,000 frames over five seeds show no differences, across all twelve games.
The picture matches a reference screenshot of the first room pixel for pixel, apart from where the robots and the player happen to be.
archive_old_port/ holds the previous TypeScript port (Vite, Vitest, the hand-ported game logic and renderer) for reference.
Berzerk is © 1980 Stern Electronics; the Atari 2600 version is © 1982 Atari, programmed by Dan Hitchens. This is an unofficial preservation project, not affiliated with Atari or Stern. Berzerk (decomp).asm is Dennis Debro's disassembly. Colors are from Stella's NTSC palette; the sound worklet follows Ron Fries' TIASound.