Skip to content
6502Emulator

6502Emulator

NES EMULATOR

6502Emulator

6502Emulator is an open-source NES (Nintendo Entertainment System / Famicom) emulator repository that implements a learning-focused, highly faithful (but not performance-optimized) reproduction of NES hardware and the Ricoh 2A03 (MOS 6502) CPU. It includes an independent CPU core, PPU and APU implementations, several mapper implementations, a simple SDL/olc-

nesPRIMARY SYSTEM
History documentedPROJECT BEGAN
Open sourcePROJECT MODEL

WHY IT MATTERS

Why this project exists

The repository is intended as an educational, highly readable NES implementation that prioritizes clarity and accuracy of hardware behavior over runtime performance. The author states the project is aimed at learners who want to understand how the NES works rather than to provide a highly-optimized consumer emulator.

BEST FOR

Notable capabilities

Implements a standalone 6502 CPU core and surrounding NES subsystems (BUS, Cartridge, Mapper support, 2A03 APU, 2C02 PPU). Ships with implementations for multiple mappers (0, 1, 2, 3, 4 and 66) and headless regression tests for CPU tracing, frame hashing, and audio checks. Provides example ROMs and a playable command-line / windowed binary; supports save/load state, palette switching, pause/step debug keys.

The Legend of Zelda gameplay on NES
Gameplay from The Legend of Zelda on NES.

The people behind 6502Emulator

History and status

The project is maintained on GitHub with an active commit history and issue/PR counts visible in the repository. The README and repository layout document the project goals, implemented modules, supported mappers, build instructions, and regression tests. The author explicitly notes the code is not optimized for speed (tradeoff made to keep the implementation instructive). The repository includes tests and baselines for validation. No formal releases were required by the README, but a GitHub releases page is available for binary downloads if the author publishes them.

What 6502Emulator supports

  • Windows (build with Visual Studio 2019 via provided batch script)
  • Linux (build with CMake / make; requires OpenGL and ALSA or equivalent)
  • macOS (build via CMake; README lists cross-platform intent)
  • download_text

Download and availability

OFFICIAL DOWNLOADS

Get 6502Emulator

Official source and any published releases are hosted on the project's GitHub. The repository includes build scripts, a CMakeLists.txt, and a Windows helper make_VS2019.bat. Check the repository releases page for any prebuilt binaries; otherwise build from source per the README.

Get 6502Emulator ↗

DOCUMENTATION

Official documentation

Read the official configuration, compatibility, and troubleshooting material before changing advanced options.

Read official documentation ↗
Broken or missing download? Emulator projects move and official links sometimes change. Please contact Retro Replay so the source can be verified and updated.

6502Emulator setup guide

Setup note: This guide gives a practical, repository-specific setup and run procedure for building and using 6502Emulator from source on common platforms. It follows the project's documented instructions and points out repository conventions important for running games.

  1. Obtain the source: Clone the official repository: git clone https://github.com/tiansongyu/6502Emulator.git. Inspect readme.md and readme6502.md in the repository root for details and repository-layout notes (6502/ contains the emulator binary, rom/ contains sample ROMs, docs/ contains additional documentation).
  2. Install build dependencies (Linux example): Install CMake, a C/C++ toolchain, OpenGL development headers, ALSA (for audio) and libpng. Example (Ubuntu): sudo apt install cmake mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev alsa-base alsa-utils libasound2-dev libpng-dev. The README lists required packages; adjust per your distribution.
  3. Configure and build (Linux/macOS): From the repo root: mkdir build && cd build; cmake -DCMAKE_BUILD_TYPE=Release ..; make -jN. After building the emulator you will find the runtime binary in build/6502/6502Emulator/ (the README indicates this path).
  4. Build on Windows: Use Visual Studio 2019. The repository includes a helper script make_VS2019.bat. Either run that script or open the generated CMake project in Visual Studio and build. The README documents this approach.
  5. Headless tests and validation: The project provides headless regression test binaries under build/tests. Examples from the README: ./nes_headless trace <rom> 8991 (nestest CPU trace), ./nes_headless frames <rom> 300 [start-frame] (frame hashing), ./nes_headless audio <rom> 5 [start-frame] (audio checks), and savetest for state round-trip checks. These are useful to verify correctness without the GUI.
  6. Running the emulator and ROM handling: Run the built emulator binary with a .nes file path: ./6502Emulator [rom_path]. The repository's default ROM path is ./rom/smb.nes if no argument is provided. The emulator expects standard iNES-format .nes ROM files and implements several mappers; only games using implemented mappers will run correctly.
  7. Controller keys and runtime controls: The README lists keyboard mappings (W/A/S/D for D-pad, T for Start, Y for Select, K for A, J for B) and function keys (F1 save state, F2 load state, Backspace reset, P change palette). If audio backend is unavailable, the README documents debug-only keys: Space to pause/resume, C to step a CPU instruction, F to step a frame.
  8. Mapper and compatibility notes: Implemented mapper list: Mapper 0 (NROM), Mapper 1 (MMC1), Mapper 2 (UxROM), Mapper 3 (CNROM), Mapper 4 (MMC3), Mapper 66 (GxROM). Check a ROM's mapper before attempting to run it; the README points to standard mapper lists and nesdev resources for mapping information. If a game uses an unimplemented mapper, it will not run correctly.

Software reminder: This project does not include commercial game ROMs or copyrighted firmware. Provide your own legally-obtained .nes ROM files. The NES does not require a BIOS file; the emulator implements the required CPU/PPU/APU behavior in software.

Sources and further reading

Detailed guides and tutorials

Explore step-by-step guides for 6502Emulator as they are published.