Skip to content
Tennessee Titans linebacker, Arden Key, playing against the New England Patriots at Nissan Stadium on November 3, 2024. Image is a screen shot of Youtube video ~ 01:48
Tennessee Titans linebacker, Arden Key, playing against the New England Patriots at Nissan Stadium on November 3, 2024. Image is a screen shot of Youtube video ~ 01:48 Image by Tennessee Titans, via Wikimedia Commons (CC BY 3.0).

nes

NES EMULATOR

nes

OnaNES (repo named nes) — a JavaScript implementation of the Nintendo Entertainment System (6502 CPU and PPU) provided as a minimal library that can run .nes ROM data and emit frame buffers. Distributed under GPL-3.0 on GitHub.

nesPRIMARY SYSTEM
2018PROJECT BEGAN
Open sourcePROJECT MODEL

WHY IT MATTERS

What this project is

A lightweight NES emulator written in JavaScript intended as a bare library (no full graphical frontend bundled). It exposes a Console API to load ROM data, receive frame-ready events, and control execution. The author provides example frontends (React demo) but the core repository focuses on the emulation engine.

BEST FOR

Notable strengths / limits

Strengths: clear, small JS codebase suitable for embedding in web demos, supports basic mappers (NROM, CNROM, UXROM, MMC1, MMC3), and implements CPU and PPU to produce 256×240 frames. Limits: audio is not implemented; the CPU is not cycle-accurate and some PPU glitches are not handled; mapper coverage is incomplete and compatibility with all commercial cartridges is not promised.

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

The people behind nes

History & status

The repository (OnaNES) is authored by Frédéric Cambon and published on GitHub. The README and repository activity show the project is maintained as a library rather than a polished end-user emulator: it includes build scripts, examples and a React-based demo linked from the README. The project contains work-in-progress notes (additional mappers, tests) and explicitly lists missing features (sound, some PPU and CPU accuracy items). The license is GPL-3.0. The project is suitable for experimentation, embedding in web demos, or as a learning reference rather than as a high-compatibility desktop emulator.

What nes supports

  • Browser (runs as JavaScript library / demo)
  • Node.js (library install via npm/yarn and build)
  • Any OS with a modern browser (Windows, macOS, Linux)
  • Frontend embedding (React example provided separately)

Download and availability

OFFICIAL DOWNLOADS

Get nes

Official sources and release assets are on the project's GitHub repository and Releases page. You can clone the repository, install from npm/yarn, or download source tarballs from the GitHub releases section. The project README documents npm and yarn install instructions.

Get nes ↗

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.

nes setup guide

Setup note: This guide covers obtaining the source, building the library, running the provided demo, and embedding the emulator in a simple app. The emulator expects standard iNES .nes ROM data provided by the user; it does not include or provide commercial ROMs, BIOS, or firmware.

  1. 1) Get the code: Clone the official GitHub repository (fredericcambon/nes) or download the release archive from the Releases page. Prefer cloning when you plan to build or contribute.
  2. 2) Install dependencies: From the repository root use Yarn or npm as documented: yarn install or npm install. The package.json and yarn.lock in the repo control the build dependencies.
  3. 3) Build the library: Run the build script documented in the README (example: yarn run build). The repository uses webpack/babel tooling; a successful build produces the distributable JS module(s).
  4. 4) Run the example/demo: The README links to a React demo and a live demo (historically hosted). To run locally, build the example frontend (if provided) and serve it with a static server or the project's development server. The demo shows how to hook the Console API and draw frame buffers to a canvas.
  5. 5) Using the Console API in your app: Import the library (import { Console } from 'nes-emulator' or require the built bundle). Create a Console instance, add an observer to receive signals (frame-ready, nes-reset), call console.loadROM(romData) where romData is the contents of a .nes file (Uint8Array), then call console.start(). The emulator triggers 'frame-ready' with a 256×240×4 byte array at about 60 FPS for rendering.
  6. 6) ROMs and legal note: Provide .nes ROM files yourself. The project does not include games or firmware; do not use copyrighted commercial ROMs unless you have the legal right to do so. The emulator does not require BIOS files.
  7. 7) Known configuration and limitations: The README documents implemented mappers (UXROM, NROM, CNROM, MMC1, MMC3) and missing features (sound, more mappers, cycle accuracy). If a cartridge uses an unimplemented mapper or expects precise PPU timing, games may not run correctly. Expect to integrate your own audio subsystem if needed.
  8. 8) Packaging and distribution: You can publish an app that bundles the built JS engine, subject to the GPL-3.0 license requirements. If embedding in a webpage, ensure you comply with the license when distributing modified code or a combined work.

Software reminder: This project is GPL-3.0 licensed and provided as source. It requires user-supplied .nes ROM files to run games and does not include sound support. If you need higher compatibility or audio, consider other, more mature NES emulators.

Sources and further reading

Detailed guides and tutorials

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