/nes-rs

Primary LanguageRustOtherNOASSERTION

An in progress emulator for the venerable Nintendo Entertainment System. Within the limitations listed in the todo list below, it has a pretty complete core and can run a good variety of games. One key thing missing is any kind of UI. Specify the cartridge to load on the command line. The following control scheme is (currently) hard coded

Control Key
Up W
Left A
Down S
Right D
A K
B J
Start Enter
Select \

On my system, the only way to get acceptable performance is cargo run/build --release. Debug mode just won't cut it - PPU cycles take 10x as long under debug as they do under release.

TODO List

  • 6502
    • Official opcodes
    • Unofficial opcodes
  • Cartridge
    • Cartridge Core
    • INes 1.0
    • INes 2.0
    • Persistent SRAM
  • Input
    • General controller support infra
    • Joypad 1
    • Joypad 2
    • Other controllers TBD
  • PPU
    • Registers
    • Scrolling
    • Background rendering
    • Sprite DMA
    • Sprite rendering
  • APU
    • Pulse channels
    • Mixer
    • Play sounds
    • Triangle channel
    • Noise channel
    • DMC channel
  • Detailed Timing
    • Cycle correct 6502
    • Accurate NMI timing
    • DMA should only pause CPU on 'read' cycle
    • DMC DMA and OAM DMA interact in weird ways
  • Top 10 Mappers 1
    • Mapper 1
    • Mapper 4
    • Mapper 2
    • Mapper 0
    • Mapper 3
    • Mapper 7
    • Mapper 206
    • Mapper 11
    • Mapper 5
    • Mapper 19
  • Related Mappers
    • Mapper 76
    • Mapper 88
    • Mapper 94
    • Mapper 95
    • Mapper 105
    • Mapper 118
    • Mapper 119
    • Mapper 154
    • Mapper 155
    • Mapper 180
    • Mapper 185
    • More TBD
  • Graphical UI
    • Cart database
    • Pause/resume
    • Input config

Footnotes

  1. Mappers are software "shims" used to create compatibility with different cartridges.The original NES was quite limited in the capacity and capability built into the machine. However, as time went by and chips became cheaper, cartridges added their own capabilities and capacities by adding more memory storage, interrupt counters, and even sound channels. The bits of software needed to emulate different cartridge capabilities are called "mappers" because much of what they do is "map" a limited range memory addresses to large memory stores via address banking. Those mappers can't be captured in cartidge dumps, so emulator authors have to build them. The bad news is that there are hundreds of mappers. The good news is that the top 10 will cover ~90% of all cartridges.