Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Jsnes | 5,653 | 10 | 2 | 3 months ago | 7 | August 24, 2021 | 64 | apache-2.0 | JavaScript | |
A JavaScript NES emulator. | ||||||||||
Provenance | 5,216 | a month ago | 258 | other | C | |||||
iOS & tvOS multi-emulator frontend, supporting various Atari, Bandai, NEC, Nintendo, Sega, SNK and Sony console systems… Get Started: https://wiki.provenance-emu.com | | ||||||||||
Nes | 5,155 | 4 | 5 months ago | 1 | January 27, 2021 | 10 | mit | Go | ||
NES emulator written in Go. | ||||||||||
Lemuroid | 1,295 | 2 days ago | 328 | gpl-3.0 | Kotlin | |||||
All in one emulator on Android! | ||||||||||
Pinky | 714 | 3 months ago | 10 | apache-2.0 | Rust | |||||
An NES emulator written in Rust | ||||||||||
Php Terminal Nes Emulator | 651 | 8 months ago | mit | PHP | ||||||
A PHP terminal NES emulator | ||||||||||
Nestur | 517 | a year ago | 1 | Rust | ||||||
The NES (emulator) you left outside in the rain but let dry and still kind of works | ||||||||||
Gym Super Mario Bros | 496 | 2 | a year ago | 96 | June 21, 2022 | 4 | other | Python | ||
An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES | ||||||||||
Jsnes Web | 479 | 10 months ago | 44 | apache-2.0 | JavaScript | |||||
A browser UI for JSNES, a JavaScript NES emulator | ||||||||||
Hnes | 368 | 13 days ago | 1 | bsd-3-clause | Haskell | |||||
:video_game: NES Emulator written in Haskell |
A JavaScript NES emulator.
It's a library that works in both the browser and Node.js. The browser UI is available at bfirsh/jsnes-web.
For Node.js or Webpack:
$ npm install jsnes
(Or yarn add jsnes
.)
In the browser, you can use unpkg:
<script type="text/javascript" src="https://unpkg.com/jsnes/dist/jsnes.min.js"></script>
// Initialize and set up outputs
var nes = new jsnes.NES({
onFrame: function(frameBuffer) {
// ... write frameBuffer to screen
},
onAudioSample: function(left, right) {
// ... play audio sample
}
});
// Read ROM data from disk (using Node.js APIs, for the sake of this example)
const fs = require('fs');
var romData = fs.readFileSync('path/to/rom.nes', {encoding: 'binary'});
// Load ROM data as a string or byte array
nes.loadROM(romData);
// Run frames at 60 fps, or as fast as you can.
// You are responsible for reliable timing as best you can on your platform.
nes.frame();
nes.frame();
// ...
// Hook up whatever input device you have to the controller.
nes.buttonDown(1, jsnes.Controller.BUTTON_A);
nes.frame();
nes.buttonUp(1, jsnes.Controller.BUTTON_A);
nes.frame();
// ...
To build a distribution:
$ yarn run build
This will create dist/jsnes.min.js
.
$ yarn test
You can use JSNES to embed a playable version of a ROM in a web page. This is handy if you are a homebrew ROM developer and want to put a playable version of your ROM on its web page.
The best implementation is jsnes-web but unfortunately it is not trivial to reuse the code. You'll have to copy and paste the code from that repository, the use the <Emulator>
React component. Here is a usage example..
A project for potential contributors (hello!): jsnes-web should be reusable and on NPM! It just needs compiling and bundling.
A more basic example is in the example/
directory of this repository. Unfortunately this is known to be flawed, and doesn't do timing and sound as well as jsnes-web.
All code must conform to Prettier formatting. The test suite won't pass unless it does.
To automatically format all your code, run:
$ yarn run format
JSNES is based on James Sanders' vNES, and owes an awful lot to it. It also wouldn't have happened without Matt Wescott's JSSpeccy, which sparked the original idea. (Ben, circa 2008: "Hmm, I wonder what else could run in a browser?!")