Skip to content

deepneko/jsnes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSNES

NES emulator for the browser (JavaScript + Vite).

Live Demo: https://jsnes.dev/

Current Features

  • Load local .nes ROM files from a folder picker.
  • Mapper support: NROM (000), MMC1 (001), UNROM (002), CNROM (003).
  • Quick Save / Quick Load with slot selector (SLOT 0-9).
  • Quick states are persisted in IndexedDB per ROM + slot.
  • Battery SRAM (in-game save data) auto-save/auto-load via IndexedDB.
  • Battery save export/import as .sav files.

Save System

Two save systems are available and they are independent:

  1. Quick State
  • Buttons: Q-SAVE, Q-LOAD
  • Scope: full emulator runtime state
  • Storage: IndexedDB (per ROM + selected quick slot)
  1. Battery Save (SRAM)
  • Scope: in-game save data (for games that use SRAM)
  • Storage: auto-managed IndexedDB entry (dedicated internal battery slot)
  • File IO: BATT EXPORT, BATT IMPORT for .sav

Usage

  1. Open the app.
  2. Click LOAD ROM FOLDER.
  3. Select a local directory containing .nes files.
  4. Click a ROM in the list to start.
  5. Use RESET to restart the currently running game.

Controls

NES Keyboard
Move Arrow keys
A Button Z
B Button X
Start Enter
Select Space
Emulator Quit (debug) Q
Emulator Reset (hotkey) R

Development

Install dependencies:

npm install

Run dev server:

npm run dev

Build:

npm run build

Preview production build:

npm run preview

Notes

  • Folder loading uses the File System Access API (showDirectoryPicker), which is best supported in Chromium-based browsers.
  • Save data is origin-scoped. Clearing browser site data removes IndexedDB saves.

Tested Games

NROM (iNES Mapper 000)

Super Mario 1 Xevious Spelunker Druaga

MMC1 (iNES Mapper 001)

Rockman 2 Final Fantasy I Dragon Quest III Dragon Quest IV

UNROM (iNES Mapper 002)

Rockman

CNROM (iNES Mapper 003)

Dragon Quest I Portopia Renzoku Satsujin Jiken Takahashi Meijin no Boken Jima

References

License

MIT. See LICENSE.

About

Simple NES Emulator in JavaScript

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors