Skip to content

A cycle-accurate MOS 6502 virtual machine with modular memory and debugging support.

License

Notifications You must be signed in to change notification settings

dwego/Rosetta-6502

Rosetta-6502

License: MIT

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:

Classic 8-bit CPUs

Deeply accurate replication of 6502 hardware behavior.

Modern development workflows

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


Platform Compatibility

Rosetta-6502 currently supports:

  • macOS
  • Linux

Other platforms are not officially supported.


Building Rosetta-6502

Prerequisites

  • clang or any C11-compatible compiler
  • make
  • ncurses development headers
  • optional: cc65 (to build custom 6502 firmware)

Build

make

Artifacts:

  • Executable: ./main
  • Object files: ./build/**

Running Custom 6502 Firmware

Rosetta-6502 can load and execute raw 6502 binaries (produced by ca65 + ld65) using:

./main --bin firmware.bin

Firmware is placed at ROM address $E000, then executed from the 6502 reset vector at $FFFC.

Documentation


External Resources


About

A cycle-accurate MOS 6502 virtual machine with modular memory and debugging support.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages