Play DOS Games In Chrome With NaClBox and Google Native Client
There are a lot of exciting new Web technologies emerging at the moment, with Google’s Native Client joining HTML5 and CSS3 in paving the way to a more versatile and interactive Internet. It’s not ActiveX and it’s not Java, though much like those two dinosaurs Native Client is designed to allow for the execution of native code in a browser, within the safety of a sandbox .
Robert Isaacs has put this technology to good use with NaClBox, a version of DOSBox that runs in Google’s Chrome browser. The project is a little over a year old and has recently launched a closed beta for the site’s most exciting feature – the ability to upload your own DOS games and store them in the cloud.
Today we’ll be looking at what NaClBox can already do and grabbing a sneak peek of the closed beta that will be expanding “very soon”, according to Robert.
Playing DOS Games in Chrome
While Google has not yet enabled Native Client by default in the stable release of Chrome, you can still try it out without installing the experimental builds. Applications hosted in the Chrome Web Store are able to use it without any tweaking, so the easiest way to get started with the emulator is to add the NaClBox application from the store.
The other way to do it is by enabling Native Client in your browser:
- In Chrome’s address bar type about:flags and hit Enter.
- Find “Native Client” and click Enable.
- Restart your browser.
Once you have done this, head over to the NaClBox Gallery to peruse available games. At the time of writing, there are 18 DOS applications ready to run including full games, shareware titles and the AdLib tracker for composing music. Titles in the gallery require virtually no input from you in order to run, simply click the “play” button, approve the app and watch the magic unfold. If you run into trouble, you probably haven’t installed the NaClBox application or enabled NaCl in your browser above.
Depending on your operating system, you may want to customise the controls based on your game of choice – on Mac OS X, I found games that use the Control key a lot to be problematic as the combination of Ctrl + arrow keys switch between spaces (virtual desktops) on OS X. Controls are customised on a per-game basis, from within each app’s preferences.
Some great titles include Duke Nukem I and II, Epic Pinball and the first game Robert uploaded, a demo version of The Secret of Monkey Island. Be aware that while playing the games in the gallery that save data will not be there should you return to the site at a later date, a limitation that is overcome with My NaClBox.
Playing Your Own Games
“My NaClBox” is the name of the site’s most exciting (and long awaited) feature – your own cloud-based DOS emulator that retains the games you upload, your preferences and most importantly save games. At the moment, this portion of the site is in closed beta, with Robert hard at work on “dynamic recompilation for playing more CPU intensive games”. I’ve been told he hopes to expand it soon, which means you might want to register your interest if you like emulators and contributing feedback to exciting projects. If this sounds like you head over to the My NaClBox homepage for more information.
I’ve been lucky to gain access to the beta and I’ve tested it out with a few of my favourite Apogee titles, Terminal Velocity and Rise of the Triad as well as Frontier, the sequel to Elite. It’s basically one big DOSBox in the cloud, albeit with a fairly smooth upload process. New applications are added by clicking Add Application in the left-hand menu, entering a name and clicking Create. From here’s it’s a case of clicking Add Files which opens an upload interface, choosing your game’s folder and uploading. I’d recommend you choose a suitably short filename – this is DOS after all – so for Terminal Velocity I chose “terminal” and Rise of the Triad I chose “rott”.
Once you’ve uploaded your folder then you can hit Play Game (or Configuration to adjust CPU speed, frame-skipping and other performance tools) which launches a rather plain looking DOSBox window. Unlike the desktop version of DOSBox which requires that you map a drive (e.g. C:\) to a location, NaClBox uses your current application as the C:\ drive, and any folders you uploaded are available using standard DOS commands. So to launch Rise of the Triad I typed “cd rott” and hit enter followed by “setup” to select a sound card (remember: it’s always a Sound Blaster on DOSBox) then type “rott” to launch the game.
Performance on the few titles I tried was – on the whole – very good indeed. All titles in the gallery (playable by all visitors of the site) worked flawlessly, with only aforementioned button mapping causing any problems. Terminal Velocity worked well, though the sound was somewhat garbled – and the seminal old-school FPS Rise of the Triad ran so smoothly I wasted half an hour “thoroughly researching” before deciding it was time to do some work.
Saved games were still there after leaving the application, as were my button mappings and high scores. In my opinion, this is marvellous use of cloud technology.
My NaClBox isn’t quite ready yet, though be sure to register for beta access if you’re salivating at the thought of cloud-based DOS classics you can access from anywhere with a recent version of Google Chrome. Native Client is an exciting and emerging technology which fits right in with Google’s vision for Chrome OS – allowing applications to run at full speed in the cloud. For the rest of us it might be somewhat of a novelty at the moment, but eventually the open source technology will be used in many of our favourite web apps.
Coincidentally, Justin wrote an interesting article on how to run DOS games on a Wii with DOSbox , which you might want to check out.
Let us know what you think of NaClBox as well as Google’s Native Client in the comments, below.