Repository navigation
Mapper Ecosystem
Specification and full family list: docs/mappers.md. Cartridge formats: docs/cartridge-format.md. Tiering decision: ADR 0011. Crate: crates/rustynes-mappers.
A mapper is the logic on a cartridge that banks ROM and RAM into the console's address space and, on many boards, generates interrupts or extra audio. RustyNES implements each family against a single Mapper trait; the Cartridge owns the ROM and RAM banks and the boxed mapper (ADR 0001). Adding a mapper never touches CPU, PPU or APU code.
The PPU calls notify_a12 on every A12 transition of its address bus, and the mapper filters the edges itself (the MMC3 family's counter). MMC5 uses scanline and VBlank notifications instead. Boards with CPU-cycle counters (the VRC line, Sunsoft FME-7, Namco 163 and others) tick on a per-cycle hook. Every hook defaults to doing nothing.
At v3.2.0 RustyNES supports 208 mapper families, written from the NESdev wiki and pinned by test ROMs, unit tests and the commercial-ROM oracle. Each family is classified by the evidence behind it (mapper_tier):
| Tier | Meaning | Count at v3.2.0 |
|---|---|---|
| Core | The original families, gated by the accuracy suites | 51 |
| Curated | Backed by a test ROM, a commercial dump, or a precise register description with a synthetic fixture | 130 |
| BestEffort | Thin documentation; excluded by a CI gate from every accuracy claim | 27 |
The tier is an honesty marker: runtime behaviour does not depend on it. Counts change as families are added or promoted; docs/mappers.md and docs/STATUS.md hold the current split.
- Expansion audio (VRC6, VRC7, MMC5, Namco 163, Sunsoft 5B, FDS): see APU-Mixer.
- Self-flashing homebrew boards (GTROM, UNROM 512) emulate their flash chip, so games that save by rewriting their own ROM keep those saves.
- Header corrections. A per-game database fixes known bad mapper, mirroring and region headers on every platform, but never overrides a correct NES 2.0 header or mapper-controlled state (ADR 0031).
- Famicom Disk System, Vs. System and PlayChoice-10 boards, and UNIF dumps mapped to their iNES numbers. See the compatibility guide.
RustyNES is a cycle-accurate NES emulator written in Rust, licensed GPL-3.0-or-later. It is a derivative work of GPL-licensed emulators; see provenance and NOTICE. This wiki is a summary; the repository's docs/ are authoritative. | GitHub Repository | Web Demo