- 1# Build X16 emulator webassembly:
- 2
- 3# Install emscripten:
- 4# https://emscripten.org/docs/getting_started/downloads.html
- 5
- 6git clone https://github.com/emscripten-core/emsdk.git
- 7cd emsdk
- 8
- 9# Fetch the latest version of the emsdk (not needed the first time you clone)
- 10git pull
- 11
- 12# Download and install the latest SDK tools.
- 13./emsdk install latest
- 14
- 15# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
- 16./emsdk activate latest
- 17
- 18# Activate PATH and other environment variables in the current terminal
- 19source ./emsdk_env.sh
- 20
- 21# Get emulator
- 22git clone https://github.com/x16community/x16-emulator.git
- 23
- 24# Get latest ROM build (can also be downloaded directly from github actions if logged in)
- 25gh run download -R https://github.com/x16community/x16-rom -n "ROM Image" --dir latest_rom
- 26
- 27# Copy ROM symbols (seems to not be needed?)
- 28cp latest_rom/*.h x16-emulator/src/.
- 29
- 30# Build emulator
- 31mkdir x16-emulator/build
- 32cp latest_rom/rom.bin x16-emulator/build
- 33cd x16-emulator/build
- 34emcmake cmake .. -DENABLE_FLUIDSYNTH=OFF -DENABLE_TRACE=OFF
- 35emmake make
- 36
- 37# Package emulator
- 38cd ..
- 39mkdir emu_binaries
- 40cp build/x16emu.data build/x16emu.html build/x16emu.js build/x16emu.wasm emu_binaries/
- 41mkdir emu_binaries/webassembly
- 42cp webassembly/styles.css webassembly/main.js webassembly/jszip.min.js emu_binaries/webassembly/
- 43file emu_binaries/*
Raw Paste