JSNES: a NES Emulator Written in JavaScript

By | | JavaScript & CSS

JSNESToday’s award for the most unlikely, probably pointless, but simply stunning use of JavaScript goes to Ben Firshman and his Nintendo Entertainment System emulator, JSNES.

Visit the JSNES page…

The emulator is port of the Java-based vNES project. It uses the HTML canvas element for screen rendering (sorry Internet Explorer users) although sound is not supported yet.

There are 17 working games to try. Most will run in Firefox 3.5 or Safari 4, but neither browser offers a playable gaming experience. You’ll be lucky to achieve 10 frames per second on the highest-specification liquid-nitrogen-cooled ninja PC.

The real revelation, however, is Google Chrome — it runs the emulator at full speed (50-60 fps) on a modest PC. Google’s canvas performance optimization appears to be out-pacing the competition by a considerable margin. Both Mozilla and WebKit have raised bugs to investigate why there is such a noticeable speed difference.

Although JSNES is little more than an interesting experiment, it illustrates what can be achieved with modern JavaScript engines, some ingenuity, and lots of caffeine. Ben Firshman — you are a genius. My only question is … why?!!

See also: SitePoint’s Exclusive Interview With Ben Firshman, Creator of JSNES

Written By:

Craig Buckler

Craig is a Director of OptimalWorks, a UK consultancy dedicated to building award-winning websites implementing standards, accessibility, SEO, and best-practice techniques.

Website
>> More Posts By Craig Buckler

 

{ 15 comments }

Craig Buckler October 16, 2009 at 3:46 am

I can now help answer “why” Ben wrote it…
SitePoint’s Exclusive Interview With Ben Firshman, Creator of JSNES

Aikeru October 9, 2009 at 6:16 am

Am I the only one thinking we need a “Doom” port to test browser performance? :D

Ivan September 30, 2009 at 9:03 am

Good work!

chaoszvvz September 29, 2009 at 12:14 pm

Cool, it runs perfect.

Anonymous September 28, 2009 at 7:26 pm

I can’t seem to play it. The controls aren’t doing anything in google chrome (or firefox for that matter). It’s like the game is in demo mode (like the computers playing).

Dean C September 28, 2009 at 6:55 pm

Am I missing something? What are the controls

r4ccoon September 28, 2009 at 8:28 am

why?
maybe he get bored with c++, or csharp, or java
maybe he loves javascript
maybe he hates IE!!

Raffles September 28, 2009 at 7:33 am

Very cool.

I can’t figure out what to do in Mario Bros! Once he gets to the top, what’s he supposed to do? There seems to be nothing to do except avoid the tortoises!

kurole September 28, 2009 at 6:06 am

Thats cool.
Gchrome beating even firefox

Florent V. September 27, 2009 at 10:15 pm

Nostalgia plus technical challenge, i guess.

Now we have a new JavaScript and Canvas performance benchmark. :D

HereAndNow September 27, 2009 at 6:40 pm

I tried the Javascript NES emulator, with Chrome 4 on Ubuntu, and it works great!

Anyone interested in checking out HTML5 sites & demos can try some of these:
http://www.youtube.com/html5
http://demo.sproutcore.com/video/
http://www.rgraph.net/
http://html5gallery.com/
http://tinyvid.tv/

I’m not sure, if the people who installed Google Chrome Frame need to prefix the URLs with “cf:” or not.

This stuff is really cool!

NetNerd85 September 27, 2009 at 1:49 pm

Maybe Craig is too old to understand why ;)

Anyone that can hum the music to the original super mario brothers (and occasionally does out of the blue) understands “why”.

nrg_alpha September 27, 2009 at 9:05 am

“My only question is … why?!!”

Simple.. It’s nostalgic. I grew up on that stuff. Brings back good memories. :)

WWW September 27, 2009 at 5:49 am

Why? Why not?

Jason Garrison September 27, 2009 at 4:42 am

I believe the answer is, “because he can”. Very, very cool!

Comments on this entry are closed.