JSNES: a NES Emulator Written in JavaScript

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

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Jason Garrison

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

  • WWW

    Why? Why not?

  • http://www.olsenportfolio.com/ nrg_alpha

    “My only question is … why?!!”

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

  • http://www.jasonbatten.com NetNerd85

    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”.

  • HereAndNow

    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!

  • http://fvsch.com Florent V.

    Nostalgia plus technical challenge, i guess.

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

  • kurole

    Thats cool.
    Gchrome beating even firefox

  • http://ratherodd.com Raffles

    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!

  • r4ccoon

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

  • http://www.deanclatworthy.com Dean C

    Am I missing something? What are the controls

  • Anonymous

    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).

  • chaoszvvz

    Cool, it runs perfect.

  • Ivan

    Good work!

  • Aikeru

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

  • http://www.optimalworks.net/ Craig Buckler

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