A Nintendo Entertainment System (NES) emulator written in Rust, currently focused on CPU emulation.
The 6502 CPU core implements the official instruction set and all addressing modes, enough to run a first program: the classic Snake demo, rendered with SDL3. The project is an ongoing exploration of instruction execution, memory access and the inner workings of a classic gaming system.
- Rust 1.80 or newer
- SDL3 available on your system (see the
sdl3crate docs for installation and build-from-source options)
git clone https://github.com/jpedrosmenezes/RustyNES.git
cd RustyNES
cargo run --release
This launches the Snake demo.
| Key | Action |
|---|---|
W A S D |
Move |
Esc |
Quit |
src/
├── main.rs # SDL3 frontend and Snake demo runner
├── cpu.rs # 6502 CPU: registers, flags, addressing modes, instructions
└── opcodes.rs # Opcode table (mnemonic, length, cycles, addressing mode)
For learning how to build this I used the information/code/insights from:
- Writing NES Emulator in Rust: base structure and the Snake demo program
- 6502 Instruction Set
- NES Emulator From Scratch
- Emulation Online: Nintendo® Entertainment System (NES)
- CPU official instruction set
- Memory addressing modes
- First program execution milestone (Snake demo)
- CPU validation with
nestest - Interrupts (BRK, NMI, IRQ)
- Cycle counting
- Unofficial opcodes
- Bus emulation
- Cartridge support (iNES, mappers)
- Picture Processing Unit (PPU)
- Joypad input
- PPU scrolling
- Audio Processing Unit (APU)
This project is under active development. The checklist reflects the current implementation status and will be updated as new components are completed.
This project is licensed under the MIT License. See the LICENSE file for details.