Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Platform:Nintendo Entertainment System

From ReverseEngineering.wiki
Platform
On this wiki Facts · Code · Notes · Topics

Nintendo's 8-bit home console (Famicom 1983 JP, NES 1985 NA): a Ricoh 2A03 (6502 core without decimal mode, plus APU), the 2C02 PPU, 2 KiB RAM and 2 KiB VRAM; cartridge hardware (mappers) adds bank switching, extra RAM and sound.

Overview

The CPU sees PRG ROM at 0x8000-0xFFFF (vectors at 0xFFFA-0xFFFF) and the PPU sees CHR ROM/RAM at 0x0000-0x1FFF; cartridges differ by their mapper, a board-specific chip that switches 8/16/32 KiB PRG banks and 1/2/4/8 KiB CHR banks, controls nametable mirroring and may add IRQ counters, PRG RAM or expansion audio. Reverse engineering a NES game means first identifying the mapper.

Files

  • ROM dumps: Format:iNES and NES 2.0 ROM image (.nes), also FDS disk images (Famicom Disk System), NSF music rips.
  • Mesen's source (Core/NES/Mappers, MapperFactory.cpp) is the most complete open list of mapper numbers and behaviour.

Memory map (CPU)

0x0000-0x07FF RAM (mirrored to 0x1FFF), 0x2000-0x2007 PPU registers (mirrored to 0x3FFF), 0x4000-0x4017 APU and I/O, 0x4020-0xFFFF cartridge space.

Code & repositories

  • https://github.com/SourMesen/Mesen2 @ b9fa69ddc6d0a331fb103fdb5eef6904305703c2 · license: GPL-3.0-only (declared by the contributor for the files used; GitHub reports GPL-3.0 for the repository)
    Multi-system emulator with a debugger: iNES/NES 2.0 header parsing (Core/NES/NesHeader.cpp), SNES header detection (Core/SNES/BaseCartridge.cpp), Game Boy, GBA, PC Engine, SMS, WonderSwan
    Tested on: source read, not run: source read, not run · checked 2026-10-18; archived; last activity 2026-06-04; Note: the latest release ships binaries; the wiki links only the source, never the binaries