- ✅ Added All 151 official opcodes with instructions.
- ✅ Added Cartridge and Mapper000 support.
- ✅ Added nestest to verify all 151 opcodes are working correctly.
- ✅ Added PPU registers.
- ✅ Added an SDL3 window and app loop.
- ✅ Added PPU background rendering and scrolling.
- ✅ Added controls.
- ✅ Added PPU sprite rendering.
- 🚀 First playable build!
- Compatible with most Mapper000 ROMs (including Super Mario Bros.).
- TODO: Add APU.
- TODO: Add Mapper001 support.
- TODO: Update README build instructions.
- TODO: Improve performance.
| NES Button | Keyboard |
|---|---|
| A | Z |
| B | X |
| Select | Left/Right Shift |
| Start | Enter |
| Up | Up Arrow |
| Down | Down Arrow |
| Left | Left Arrow |
| Right | Right Arrow |
Press ESC to exit the emulator.
Rendering uses SDL3, installed via vcpkg.
Prerequisites
- A C++23 compiler:
- Windows: MSVC / Visual Studio Build Tools with the "Desktop development with C++" workload
- macOS: Xcode Command Line Tools (
xcode-select --install), Xcode 16+ for full C++23 support
- CMake and Ninja
- macOS:
brew install cmake ninja - Windows PowerShell:
winget install -e --id Ninja-build.Ninjaandwinget install cmake
- macOS:
- vcpkg, cloned and bootstrapped:
git clone https://github.com/microsoft/vcpkg ./vcpkg/bootstrap-vcpkg.bat # bootstrap-vcpkg.sh on Linux/macOS - The
VCPKG_ROOTenvironment variable set to that clone's path
SDL3 itself does not need to be installed manually — it's declared in vcpkg.json and vcpkg installs it automatically on first configure.
Configure Build dir: cmake --preset default
Build app target: cmake --build cmake-build-debug --target nes_emulator
Run Emulator: ./cmake-build-debug/nes_emulator <rom_path>
Using doctest.h.
Build tests only: cmake --build cmake-build-debug --target nes_emulator_tests
Build and run tests: cmake --build cmake-build-debug --target run_tests
