NES EMULATOR
marius
Marius is a small, open-source NES (Nintendo Entertainment System) emulator that implements core NES components (6502 CPU, PPU, common cartridge mappers) with a native build using SDL2 and a WebAssembly (WASM) port for running in browsers.

WHY IT MATTERS
Why Marius exists
Marius is designed as an educational, lightweight implementation that illustrates the inner workings of the NES through straightforward algorithms and exposes debug utilities and configuration options. It is intended for learning and experimentation rather than as a replacement for mature emulators.
BEST FOR
What Marius does well
Clear, compact implementation of NES core pieces (6502 CPU and PPU), built-in debug helpers (instruction log, state reset), support for a range of common cartridge mappers, and an Emscripten-compiled WebAssembly port that can run in modern browsers for easy inspection and demonstration.
The people behind marius
History and status
The project repository shows active development history and a public source tree with build instructions and documentation. It is a single-repo, authored project distributed under an MIT license and intended primarily as an educational emulator and demo. The author supplies instructions for native builds (CMake + SDL2) and for compiling the project to WebAssembly using Emscripten. The repository lists topics such as 6502, NES, PPU, SDL2 and WASM and has a small community presence on GitHub.
What marius supports
- Nintendo Entertainment System (NES)
- Common NES cartridge mappers (as implemented in source)
- Native builds (Linux/macOS/Windows via SDL2 and CMake)
- WebAssembly (browser build via Emscripten)
Download and availability
OFFICIAL DOWNLOADS
Get marius
Official source, releases and prebuilt assets are published on the project's GitHub repository and its Releases page. Prebuilt artifacts (if any) are available from the repository's Releases section; source can be cloned from the project repository and built locally.
Get marius ↗DOCUMENTATION
Official documentation
Read the official configuration, compatibility, and troubleshooting material before changing advanced options.
Read official documentation ↗marius setup guide
Setup note: Practical setup notes for Marius. This guide assumes you will either build the native executable (requires SDL2, nlohmann/json, spdlog, CMake) or the WebAssembly browser build (requires Emscripten). Marius does not include commercial game ROMs or BIOS files; for the demo WebAssembly build the README documents placing a ROM file into the res folder manually (you must supply legally-obtained ROMs).
- 1) Get the source: Clone the official repository from GitHub (alanjian85/marius). Use git clone to fetch the source tree before following the build steps.
- 2) Native build dependencies: Install the dependencies listed in the README: SDL2, json for Modern C++ (nlohmann/json), and spdlog. On Linux use your package manager (apt, dnf, pacman) or build from source. Ensure a working CMake and a C++ toolchain (clang or gcc on Linux/macOS, MSVC on Windows) are installed.
- 3) Build the native binary with CMake: From the repository root: mkdir build && cd build ; cmake -DCMAKE_BUILD_TYPE=Release .. ; cmake –build . . The compiled binary will be produced as build/marius. Launch it from the command line and pass the path to a .nes ROM as the first argument.
- 4) WebAssembly (browser) build: To produce a WASM build compile using Emscripten. From the repo root: mkdir build && cd build ; emcmake cmake -DCMAKE_BUILD_TYPE=Release .. ; make. Per the README, the project’s default browser demo expects a ROM file placed at marius/res and renamed to mario.nes (you must provide this file yourself). The build process will copy required index.html assets into the build directory. Serve the build directory from a local webserver (Emscripten’s tools or a simple static HTTP server) and open the page in a modern browser.
- 5) Running and controls: Marius' README documents keyboard mappings for controller inputs (e.g., J/K for A/B on Controller 1, arrow keys or WASD for directions). F1 dumps the executed 6502 instruction log; F2 resets the console state. The native binary accepts a ROM path as the first command-line argument; the WASM demo loads the ROM placed in the res folder as described above.
- 6) Cartridge mappers and compatibility: Marius implements a selection of common cartridge mappers; compatibility is limited to what is implemented by the project. Check the source code and README for the exact mappers implemented. Expect that not all commercial NES games are supported unless their mapper and special hardware are implemented.
- 7) Debugging and development notes: The project exposes debug utilities including instruction logging and configurable debug options. Use the provided code and documentation when experimenting; inspect the source files for the CPU and PPU implementations to understand behavior. When compiling for WASM, ensure all native dependencies used at build time were compiled with the same Emscripten toolchain or are replaced by browser-compatible code.
- 8) Legal and ROM handling: Marius does not include ROMs or commercial game files. You must supply legally-obtained .nes ROM files yourself. Follow local laws and the license terms for any ROMs you use. Do not expect the project to provide BIOS or commercial game images.
Software reminder: This project is intended as an educational emulator. Confirm mapper support in source code before expecting full compatibility with any given commercial NES title. Use legally-obtained ROMs and follow license rules.
Sources and further reading
Detailed guides and tutorials
Explore step-by-step guides for marius as they are published.
Retro Replay Retro Gaming History, Reviews & Emulation
