About
A NES emulator running inside s&box.
Running it
Press Play. You land on the ROM browser, which lists every `.nes` file it finds
and lets you pick one. Filenames don't matter - whatever is in the folder shows
up.
Leaving a game with Tab parks it rather than shutting it down - the whole console state (RAM, PPU, mapper banks) is kept, and the game shows a RESUME tag in the list. Picking it again drops you back exactly where you were, so you can switch between several games freely. Parked sessions live in memory only; they don't survive closing the game.
Adding ROMs
Drop `.nes` files into the game's data folder, roughly:
```
<steam>/steamapps/common/sbox/data/rosner/s_famicom/roms/
```
Press Tab in the browser to rescan without restarting. The emulator logs
every ROM it finds on each scan, so if something isn't showing up the console
will say what it did see.
ROMs are not included - supply your own.
Controls
D-Pad -> WASD/Arrow keys
A button -> X key
B button -> Z key
Start button -> Enter key
Select button -> Backspace key
Pause emulation -> P key
Reset console -> F5 key
Back to the game list -> Tab key
In the browser: up/down to move, Enter or X to play, Tab to rescan. The mouse
works too.
Known limitations
- Undocumented 6502 opcodes (LAX, SAX, DCP, ISB, SLO, RLA, SRE, RRA) execute
as no-ops. Most commercial games never touch them, but a few do.
- Mappers are limited to the six listed above. That covers a large majority
of the library, but not all of it - unsupported ones report an error instead of
running badly.
- No battery-save persistence. MMC1/MMC3 carts get their 8K of work RAM, but
it isn't written to disk between sessions.
- NTSC only - no PAL timing.
- No colour emphasis (the top three bits of `$2001`). Rarely used, and mostly
for full-screen tints.
- No save states.
Credits
- nes-sharp - the C# NES core this was ported from.
- psxemu - the reference for how to host an emulator inside s&box: texture upload path, `SoundStream` handling and frame pacing.
- NESdev Wiki - hardware documentation, particularly for the APU channels and mixer, which were written from scratch here.