Skip to content
tuxnodePublic

About

mos 6502 simulater support NES

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

ox6502

MOS 6502 / CMOS W65C02 CPU emulator with NES system emulation, written in Rust.

简体中文

MOS 6502 ox6502 NES demo

Features

  • CPU: Full 6502/65C02 instruction set, 247/256 NMOS illegal opcodes (SST 96.5%), all 13 addressing modes, page-crossing cycle penalties, interactive debugger with Capstone disassembly
  • NES PPU: Background + sprite rendering, loopy address system, OAM DMA, NMI timing
  • NES APU: Pulse 1/2, Triangle, Noise channels with frame counter and audio output
  • Mappers: NROM (0), MMC1 (1), UxROM (2), CNROM (3), MMC3 (4), AxROM (7), Color Dreams (11), GxROM (66)
  • Input: Keyboard → NES joypad mapping
  • Display: Notan real-time window (3x, pure-Rust stack) or offline PPM renderer

Usage

cargo build

# CPU test ROMs
cargo run -- tests/roms/6502_functional_test.bin
cargo run -- tests/roms/6502_functional_test.bin --debug

# NES games (Notan frontend)
cargo run --features frontend --bin nes_notan -- <game.nes>
cargo run --bin nes_render -- <game.nes> [frames]

Keyboard Controls

Key NES Button
A A
S B
Backspace Select
Enter Start
↑ ↓ ← → D-Pad
Esc Quit

Monitor Commands

s step · c continue · r regs · d [addr] [n] disassemble · m [addr] [len] memory · b <addr> breakpoint · bc <id> clear · bl list · t [n] trace · h help · q quit

SST Results

247/256 opcodes pass (96.5%). 9 remaining are unstable opcodes with behavior varying by CPU revision.

References

License

MIT

About

mos 6502 simulater support NES

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages