Skip to content
Screenshot published by the potatis project
Screenshot published in the potatis project's official README. Image source: potatis project on GitHub.

potatis

NES EMULATOR

potatis

Potatis is an open-source MOS-6502 core and a work-in-progress NES emulator written in Rust with multiple platform targets (native SDL, WebAssembly, Android, embedded RP2040, and a novelty cloud/terminal target). It implements several common NES mappers but is explicitly incomplete (APU not implemented; more mappers planned).

nesPRIMARY SYSTEM
History documentedPROJECT BEGAN
Open sourcePROJECT MODEL

WHY IT MATTERS

Why Potatis exists

Potatis is both an educational MOS-6502 implementation (unit-tested) and a multi-target NES effort intended to run on native desktops (SDL), in the browser via WebAssembly, on Android, on small microcontrollers (RP2040) and even as an experiment in terminal/cloud rendering. The project emphasizes a small, auditable Rust codebase suitable for experimentation, embedded use and learning how CPU/memory/mappers interact.

BEST FOR

Best use cases

– Developers and learners who want a readable Rust MOS-6502 implementation and a simple, extendable NES codebase. – Porting or embedded experiments where small footprint and Rust toolchain portability matter (RP2040, Android). – Browser demos via the nes-wasm target for quick inspection of behavior without local build, and native testing via nes-sdl for local development and debugging.

The Legend of Zelda gameplay on NES
Gameplay from The Legend of Zelda on NES.

The people behind potatis

Status & history

The repository documents a small but complete MOS-6502 CPU crate and a ‘very incomplete NES emulator’ crate. README and source tree list supported mappers (NROM, MMC1, UxROM, CNROM, MMC3) and multiple platform targets: nes-sdl (native), nes-wasm (browser), nes-android, nes-embedded (RP2040), nes-cloud (terminal+netcat). The README explicitly lists APU and additional mappers as TODO. The project contains unit and integration tests and provides instructions for running tests (cargo test). The author provides example command lines for running native and embedded targets and build instructions for wasm and Android. The project is maintained on GitHub and distributed under an open-source license in the repository (LICENSE file present).

What potatis supports

  • Native (nes-sdl – SDL)
  • Web (nes-wasm – WebAssembly)
  • Android (nes-android)
  • Embedded RP2040 (nes-embedded)
  • Cloud/terminal novelty target (nes-cloud)

Download and availability

OFFICIAL DOWNLOADS

Get potatis

Official source and release artifacts are distributed from the GitHub repository. Prebuilt releases (if any) are listed on the project's Releases page on GitHub; the repository itself is the authoritative source for source builds.

Get potatis ↗

DOCUMENTATION

Official documentation

Read the official configuration, compatibility, and troubleshooting material before changing advanced options.

Read official documentation ↗
Broken or missing download? Emulator projects move and official links sometimes change. Please contact Retro Replay so the source can be verified and updated.

potatis setup guide

Setup note: This guide describes how to build and run Potatis from source for the main targets documented in the repository. It follows the project README guidance: builds are performed with Rust/Cargo for native and embedded targets, wasm-pack/npm for the browser target, and requires Android NDK for Android. The guide assumes you will supply your own NES ROMs (Potatis does not include commercial games, firmware, or BIOS files).

  1. Common prerequisites: Install Rust and Cargo (rustup recommended). Install git and clone the repository from the official GitHub URL. Familiarize yourself with Cargo workspaces if you plan to build multiple crates/targets. Ensure your system has a C toolchain (clang/gcc) for linking where needed.
  2. Build & run native (nes-sdl): 1) Install SDL2 development libraries for your OS (package manager or from SDL website). 2) From the repository root run: cargo run –release –bin nes-sdl — path/to/rom.nes (the README shows cargo run –release path/to/rom.nes for nes-sdl). 3) Use the documented keymapping to control the emulator (WASD for directions, K/L for buttons, Space/Enter for Select/Start, R for Reset). Notes: Build may require adding pkg-config or linker flags so SDL2 is found. If Cargo build fails with missing libs, ensure the SDL2 dev package and pkg-config are installed and visible to your toolchain.
  3. Browser target (nes-wasm): 1) cd nes-wasm 2) wasm-pack build –release –target web 3) npm install 4) npm run dev The README points to an online demo (project author’s gh-pages). The wasm target uses wasm-pack and a small JS wrapper; follow typical wasm-pack dev workflows. The built bundle is suitable to serve from a static web server or the npm dev server defined in the crate.
  4. Android target (nes-android): 1) Install Android NDK and add required Rust targets: rustup target add aarch64-linux-android (and others if needed). 2) Configure ~/.cargo/config with the Android NDK linker settings as shown in the repository README (examples for aarch64, armv7, x86_64). 3) cd nes-android && ./install.sh release Note: the README notes the provided install.sh targets arm64-v8a (aarch64) by default. Ensure you have matching NDK toolchains and Android API/ABI choices in your configuration.
  5. Embedded RP2040 (nes-embedded): 1) The nes-embedded target is designed for RP2040 (Raspberry Pi Pico). 2) From the repo: cd nes-embedded; ROM=/path/to/rom.nes cargo run –release 3) The README describes using elf2uf2 or a debug-probe; if you lack a debug probe adjust .cargo/config to use elf2uf2. 4) Expect limited performance without optimizations; the author documents initial FPS numbers and memory usage. Hardware wiring for display (ST7789) and SWD debugging is referenced in the repo documentation.
  6. Testing & development: Run cargo test at repository root to execute unit and integration tests across crates. The mos6502 crate includes CPU tests (including illegal op tests) that are useful to confirm a correct build before attempting NES playback. Use the provided nestest-like output and debugger hooks for step-through debugging as described in the README.

Software reminder: Potatis does not include commercial games, BIOS, or firmware. Provide your own legally-obtained NES ROMs or test ROMs; the repository contains some test-roms and examples but does not bundle commercial content.

Sources and further reading

Detailed guides and tutorials

Explore step-by-step guides for potatis as they are published.