Genesis-Plus-GX WebAssembly porting
$ source ./emsdk_env.sh
Adding directories to PATH:
PATH += /home/hiromasa/devel/toolchain/emsdk
PATH += /home/hiromasa/devel/toolchain/emsdk/upstream/emscripten
PATH += /home/hiromasa/devel/toolchain/emsdk/node/12.18.1_64bit/bin
Setting environment variables:
EMSDK = /home/hiromasa/devel/toolchain/emsdk
EM_CONFIG = /home/hiromasa/devel/toolchain/emsdk/.emscripten
EMSDK_NODE = /home/hiromasa/devel/toolchain/emsdk/node/14.15.5_64bit/bin/node
$ emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.18
clang version 13.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 94340dd5bb23fb7c4bc7d91d5ac0608eb25660a8)
Emscripten
git clone --recursive https://github.com/h1romas4/wasm-genplus.git
cd wasm-genplus
mkdir build && cd build
emcmake cmake ..
emmake make
webpack
cd ..
npm install
npm run start
ROM file
Deploy the .bin file
docs/roms
Set path, src/main/js/index.js
const ROM_PATH = './roms/sonic2.bin';
Play
(recommended) Firefox or Safari
http://localhost:9000
Open in Gitpod
Gitpod terminal:
mkdir build && cd build
emcmake cmake ..
emmake make
ROM file
Drag and drop the .bin file
docs/roms/
Set path, src/main/js/index.js
const ROM_PATH = './roms/sonic2.bin';
Play
cd ..
npm run server
Genesis-Plus-GX License