Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.61 KB

WebAssembly.md

File metadata and controls

36 lines (24 loc) · 1.61 KB

WebAssembly/HTML5 Support

The Commander X16 emulator supports a HTML/WebAssembly build target using the Emscripten compiler.

Demo

HTML X16 Emulator Demo

Installation

Follow installation steps from here

Build

make wasm

This outputs the following artifacts in the build directory, which can be uploaded to any web server.

ex16mu.data x16emu.html x16emu.js x16mu.wasm webassembly/styles.css webassembly/main.js

You will also need the system ROM (rom.bin) which you can build from the X16 ROM source or take from the latest binary release. (It is not always guaranteed though that the latest binary release is compatible with the current state of the emulator source.)

Testing

To run a test webserver:

python -m SimpleHTTPServer 8080

And start http://localhost:8080/x16emu.html

Note: You will get the error wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly'... This is because SimpleHTTPServer does not serve .wasm files with the correct mime type. don't worry, everything will still work fine though.

Supported Browsers

Working Browsers are Chrome, Safari, FireFox, Opera and Microsoft Edge (Beta)

Known Issues

  • Speed of the webassembly emulation is lacking, compared to the native version
  • No support to load PRGs (yet)
  • Doesn't display particularly well in portrait mode on mobile