An emulator for the Nintendo Entertainment System written in Rust, with SDL2 and web frontends.
emu.mp4
This isn't meant to be a full-featured or 100% accurate emulator, but rather a fun educational project. It still aims to be fairly accurate, emulating some hardware quirks such as unofficial CPU opcodes.
Ensure that you have cargo installed.
cargo build --release
cd target/release
./nesrs <path-to-rom>
Controls are bound to:
Z
: BX
: AA
: SelectS
: StartArrow keys
: Up/Down/Left/Right
Meta controls (Not controller inputs):
Space
: Pause/unpause emulation[
: Decrease volume]
: Increase volume1-5
: Load save state [1-5]Shift+[1-5]
: Write save state to slot [1-5]
Ensure that you have wasm-pack, Node and pnpm installed. First, build the wasm crate:
cd emu-wasm
wasm-pack build
Then just spin up the frontend:
cd web
pnpm i
pnpm dev
cargo test
This will run test ROMs for the CPU emulation.
-
nestest
(kevtris) -
instr_test-v5
(blargg)
iNES Mappers 0, 1, 2, 3, 4 and 9 are supported. Any game that uses a different mapper will not work for now. To find out which mapper a game uses, search it on NesCartDB.
- Accurate audio emulation
- Implement DMC channel for APU
- Investigate issues with envelope/sweep unit
- Fix issues with buffer underrun/overrun and reduce audio latency
- Investigate performance issues
- Implement more mappers
- Mapper 4 (MMC3)
- Mapper 5 (MMC5)
- Mapper 7 (AxROM)
- Mapper 9 (MMC2)
- Mapper 10 (MMC4)
- Mapper 66 (GxROM)
- Run test ROMs for PPU emulation
- Save states
- Remappable controls