PCE.js runs classic computers in the browser. It's a port of Hampa Hug's excellent PCE emulator, put together by James Friend.
PCE.js currently emulates Mac Plus, IBM PC/XT and Atari ST functionally in recent versions of Chrome and Firefox.
More info:
PCE.js is available from npm as a set of browserify compatible node packages.
There is one for each emulator build:
- pcejs-macplus - Mac Plus
- pcejs-ibmpc - IBM PC/XT
- pcejs-atarist - Atari ST
See each of the above links for install and usage instructions
Note: This is a bit complicated. I recommend using the npm packages listed above, unless you really want to hack on the C source of the emulators themselves (which is not necessary if you just want to get them running on your website).
Make sure you've installed node.js and Grunt
Run npm install
in this directory (the source root). This should install the
required node.js modules. You might want to npm install -g coffee-script http-server
also.
Clone my fork of Emscripten and checkout
the pcejs-fastcomp
branch (now that we're using emscripten-fastcomp, you'll want to get that working, or disable it by running your commands prefixed with EMCC_FAST_COMPILER=0). Add the path to the emscripten fork repo to your $PATH
so you can run emcc
. Similarly you
should be working with my fork of PCE on the
pcejs
branch, but that's where you're reading this, right?
Most of the build process involves running Grunt tasks. Run grunt --help
for a
list of possiblities.
Run grunt build:[target]
to build the emulator, where [target] is macplus
,
ibmpc
or atarist
. This will output a pce-[target].js
file to dist/
.
Once the output file for the target you're interested in has been built, you can:
- run the examples in the
example/
directory withexample/run_example.sh [target]
- build the npm packages in the
commonjs/[target]/
directories using their respectiveprepublish.sh
scripts