snes4nacl — SNES emulation in the browser

I was at Google I/O in San Francisco last week and went to a great talk about Google Native Client, which is a new technology that allows direct execution of x86 code in the browser via some clever sandboxing. While in the talk about Gaming in the Cloud I got the idea of porting a SNES emulator to Native Client and started working on it right then and there. Well, here’s the result 🙂

You can of course try it out here. This requires Chrome 19+, and you will need to enable Native Client by going to about:flags and clicking the “Enable” link under Native Client and restarting your browser. This is because currently only Native Client applications published by the Chrome Web Store can run by default.

Clicking here makes your wildest dreams come true

snes4nacl is based on Snes9x, a popular open source SNES emulator. It uses OpenGL ES 2 via the Pepper API for rendering/full screen goodness. I will be updating this more in the future, including using Pepper’s game controller API and making regular saves/save states accessible. For now enjoy and check out the GPLed source on Google Code. If you don’t have any ROMs, here’s a legal homebrew one to check out.


This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

6 thoughts on “snes4nacl — SNES emulation in the browser”

  1. I must express my respect for your kind-heartedness supporting folks who have the need for assistance with this subject. Your special commitment to passing the solution all through ended up being particularly informative and have regularly encouraged associates like me to reach their goals. Your personal informative help can mean so much a person like me and additionally to my peers. Regards; from all of us.

  2. I’m on a chromebook, and would like to be able to have this stored locally for when I’m traveling.

    I can run it just fine by hitting the url, but for some reason when I try to store the files and access them locally, it doesn’t work. There isn’t any error, but there’s never any box (grey or black.) There are also no console messages.

    I was curious if anyone knew of a reason this wouldn’t work; I suspect it’s related to not having to actually fetch any files from anywhere, but damned if I can figure it out.

  3. According to this:

    “Make sure that the .nexe files are being served from a web server. Native Client uses the same-origin security policy, which means that modules will not load in pages opened with the file:// protocol. In particular, you can’t run the examples in the SDK by simply dragging the HTML files from the desktop into the browser. See Running Native Client Applications for instructions on how to run the mini-server included in the SDK.”

    How about that.

Leave a Reply

Your email address will not be published.