# z2rs: an incremental Rust reconstruction of Zelda II checked against an emulator

> Rebuilds Zelda II: The Adventure of Link (NES) in Rust for desktop, browser and Android by replacing the game’s 6502 routines one at a time. A built-in interpreter still runs the user’s ROM and hands ported routines to Rust, while a verifier compares RAM, sprites, palette and frames with a reference emulator. It is a behavioral, clean-room-style reconstruction guided by a community disassembly, not a decompilation or a finished standalone engine.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-18
- Added to the catalog: 2026-10-18
- Original resource: <https://github.com/troyedwardsjr/z2rs>
- Primary source: <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/README.md>
- Catalog page: <https://awesomerea.org/resources/z2rs-zelda2-reconstruction-case/>
- Record JSON: <https://awesomerea.org/resources/z2rs-zelda2-reconstruction-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/z2rs-zelda2-reconstruction-case/index.md)

## Requirements & limits

- **Prerequisites:** Only the No-Intro USA dump is accepted, identified by the hash of the ROM body without its 16-byte iNES header (CRC32 BA322865). Graphics, maps, text and music are read from that ROM at run time, and nothing from the game is in the repository. Co-op, widescreen, HD packs, the randomizer and other enhancements are optional additions; Android lacks online co-op, the randomizer and enhancements.
- **Prerequisites:** Source builds need stable Rust; the browser build adds the wasm32-unknown-unknown target and wasm-pack, Android adds the SDK, NDK and cargo-ndk, and the default desktop netplay feature needs a C compiler. Release archives are not code-signed. Online co-op uses a public signalling server by default, and the desktop build shows Discord presence unless it is turned off.
- **Scope:** The reviewed commit is release v0.5.2 (2026-10-10), with Linux, macOS (Intel and Apple Silicon) and Windows archives plus an Android 8.0+ APK; z2rs.com hosts the browser build. PROVENANCE.md says it is not yet a standalone reimplementation: ported routines register in trap tables and the rest of the ROM is interpreted. The pinned ports.toml still marks all 2,960 routines unported.
- **Testing evidence:** z2-verify runs the ROM in tetanes-core 0.15 beside z2rs with identical input and compares RAM, battery WRAM, sprite OAM, palette and framebuffer after every frame, with two documented edge allowances for that emulator. Long tests replay TASVideos movies downloaded separately, and ROM-dependent tests skip without their inputs. The reviewed workflow only packages releases; no published verification results were found.
- **Attribution:** The sole maintainer releases the code under MIT; vendored matchbox_socket is MIT OR Apache-2.0, and the game itself is not covered. Routine layout comes from the CC0 FiendsOfTheElements/z2disassembly submodule and Data Crystal notes; the project describes one maintainer working from that material, not a two-team clean room, and publishes only a snapshot of earlier private history.

## Primary sources

1. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/README.md>
2. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/PROVENANCE.md>
3. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/LEGAL.md>
4. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/guide/development.md>
5. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/ports.toml>
6. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/crates/z2-core/src/traps.rs>
7. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/.github/workflows/release.yml>
8. <https://github.com/troyedwardsjr/z2rs/blob/4fe7a35f8ccfdccdf32421badf97b48b02d0127f/LICENSE>
9. <https://github.com/troyedwardsjr/z2rs/releases/tag/v0.5.2>
10. <https://z2rs.com/>

## More in Games

- [ArkWeb: a two-game movement and collision experiment](https://awesomerea.org/resources/arkweb-two-game-case/index.md) · Case study
- [Batla 3D server emulator (2015 client)](https://awesomerea.org/resources/batla-3d-server-emulator-case/index.md) · Case study
- [bf-private-server: a Brave Frontier revival server](https://awesomerea.org/resources/bf-private-server-case/index.md) · Case study
- [D2R Mobile: rehosting Diablo II: Resurrected’s Switch program on Apple devices](https://awesomerea.org/resources/d2r-mobile-switch-rehost-case/index.md) · Case study
- [Destiny 2 build 86657: Sunrise/Dawn reconstruction research report](https://awesomerea.org/resources/destiny2-build-86657-reconstruction-report-case/index.md) · Case study
- [DLSSNR-AMD: reimplementing DLSS 5 neural rendering for RDNA4](https://awesomerea.org/resources/dlssnr-amd-neural-rendering-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
