JSNES

A JavaScript NES emulator. By Ben Firshman @bfirsh

Loading...

Controls

Button Player 1 Player 2
Left Left Num-4
Right Right Num-6
Up Up Num-8
Down Down Num-2
A X Num-7
B Z Num-9
Start Enter Num-1
Select Ctrl Num-3

About

A few months ago, I stumbled across Matt Westcott's excellent JSSpeccy. I had seen some pretty imaginative canvas creations, but JavaScript emulators? What a perfect idea for a daft new project.

I got underway shamelessly porting vNES into JavaScript. Although not the most efficient, it didn't have any of the pointer memory mapping magic associated with emulators written in lower level languages. As such, it was more or less a direct port, bar a few tweaks to compensate for the lack of static typing, and obviously a rewrite of all the I/O.

JSNES runs at full speed on Google Chrome with a modern computer, so it is highly recommended you use that to play. On Safari 4 it runs at almost full speed. Otherwise, it just about works on Firefox 3.5, but it's hardly playable.

The source is available on Github, contributions welcome!

News

7th January 2010

It has been in the pipeline for a while, but JSNES can now play sound! There is no way of playing dynamically generated sound in JavaScript, but I have created a tiny Flash application reads a buffer from JavaScript then writes it to the sound card. I hope to release this as a reusable library, hopefully opening up many possibilities for cool sound applications such as jsTunes.

Playing sound probably won't run at full speed, but Chrome appears to be fastest.