Spaced

This is a VGA DOS game I wrote in 1996. (original page.) It is mostly C++ (Borland C++ 3.1) with some 386 optimization and hardware specific routines in TASM assembler. source code

Screen Shot from Spaced

Running it in a browser (really!)

em-dosbox

You can run spaced.exe in a browser window! It's incredible that this works, many thanks to em-dosbox! I've tested it in Chrome on Ubuntu, ymmv.

To play, you need to allow it to "disable your mouse cursor" and then click a second time to start the game.

Type Esc to get the mouse back once it is "captured" by the game and again to pause the game.

If you hit Esc and end up at a DOS C:\ prompt, type spaced.exe to restart.

emscripten

The em-dosbox version is emulating a 386 processor and VGA card to run the original executable using JavaScript.

I also recompiled the original C++ source code using emscripten directly to JavaScript. The emscripten version works better on the iPad because I could add buttons to simulate the keyboard commands.

I attempted to minimize the changes to the original code, largely just replacing inline assembler with inline JavaScript using EM_ASM. Some changes were made to suppress compiler warnings and functions from DOS specific header files were mostly reimplemented in shim.h/shim.cpp.

Running it in dosbox

This is a tiny bit harder to setup, but dosbox runs on any OS and will emulate spaced.exe as fast as possible (without me rebuilding it for modern operating systems and processors.)

  1. Install dosbox
  2. Download and unzip spaced.zip
  3. Type cd spaced at the shell prompt
  4. Then type dosbox .
  5. Type spaced.exe at the dosbox C:\ prompt

It might take a little while to start, and if it doesn't do anything, try hitting Esc and running it again.

tompaton.com