https://github.com/bfirsh/jsnes-web
A browser UI for JSNES, a JavaScript NES emulator
https://github.com/bfirsh/jsnes-web
canvas emulation emulator nes webaudio
Last synced: 18 days ago
JSON representation
A browser UI for JSNES, a JavaScript NES emulator
- Host: GitHub
- URL: https://github.com/bfirsh/jsnes-web
- Owner: bfirsh
- License: apache-2.0
- Created: 2017-05-06T10:05:47.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-16T13:03:46.000Z (over 2 years ago)
- Last Synced: 2025-03-28T08:06:57.334Z (25 days ago)
- Topics: canvas, emulation, emulator, nes, webaudio
- Language: JavaScript
- Homepage: https://jsnes.org
- Size: 2.13 MB
- Stars: 600
- Watchers: 19
- Forks: 162
- Open Issues: 53
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JSNES Web UI
A React-based web UI for [JSNES](https://github.com/bfirsh/jsnes).
## Running in development
$ yarn install
$ yarn start## Building for production
$ yarn build
The built app will be in `build/`.
## Running tests
$ yarn test
## Formatting code
All code must conform to [Prettier](https://prettier.io/) formatting. The test suite won't pass unless it does.
To automatically format all your code, run:
$ yarn run format
## Embedding JSNES in your own app
Unfortunately this isn't trivial at the moment. The best way is copy and paste code from this repository into a React app, then use the [``](https://github.com/bfirsh/jsnes-web/blob/master/src/Emulator.js). [Here is a usage example.](https://github.com/bfirsh/jsnes-web/blob/d3c35eec11986412626cbd08668dbac700e08751/src/RunPage.js#L119-L125).
A project for potential contributors (hello!): jsnes-web should be reusable and on NPM! It just needs compiling and bundling.
## Adding roms
Open `src/config.js` and add a new key to `config.ROMS`. For example:
```javascript
const config = {
ROMS: {
// ...
myrom: {
name: "My Rom",
description: This is my own homebrew NES rom,
url: "http://localhost:3000/roms/myrom/myrom.nes"
}
}
}
```Then, add the ROM file as `public/roms/myrom/myrom.nes`. The ROM should now be available to play at http://localhost:3000/run/myrom