Rosetta-6502 is a cycle-accurate, from-scratch implementation of the MOS 6502 CPU —
the legendary 8-bit processor found in the Apple II, Commodore 64, NES, Atari 2600,
and countless embedded systems.
This project aims to be both a faithful emulator and a learning tool, offering:
- A clean, modern C11 codebase
- A modular bus and memory system
- Extensible MMIO interfaces (software-defined hardware) - COMING SOON
- A complete opcode table with per-instruction folders
- Cycle-accurate execution and timing helpers
- A RAM visualizer (ncurses) and execution traces for debugging
- Support for assembling and running real 6502 firmware via
ca65/ld65
Rosetta-6502 is designed to act as a bridge (“Rosetta”) between:
Deeply accurate replication of 6502 hardware behavior.
Clean architecture, test suites, modular components, and readable code.
Whether you are building a retro-inspired computer, writing 6502 assembly,
creating BIOS routines, or studying how classic machines worked internally
Rosetta-6502 currently supports:
- macOS
- Linux
Other platforms are not officially supported.
clangor any C11-compatible compilermakencursesdevelopment headers- optional:
cc65(to build custom 6502 firmware)
makeArtifacts:
- Executable:
./main - Object files:
./build/**
Rosetta-6502 can load and execute raw 6502 binaries (produced by ca65 + ld65) using:
./main --bin firmware.binFirmware is placed at ROM address $E000, then executed from the 6502 reset vector at $FFFC.
- docs/firmware.md — building firmware, addressing modes, linker config
- docs/instructions.md — detailed notes on all opcodes
- docs/debug.md — detailed to how debug your firmware
- docs/examples.md - detailed to how execute any example
- 6502 Tutorials: http://6502.org/tutorials/
- cc65 Documentation: https://cc65.github.io/doc/
- Unity Test Framework: https://github.com/ThrowTheSwitch/Unity