Works

Super Mario 64 Web 2022

Super Mario 64 from 1996 was originally developed for the Nintendo© game cube and was loved among gamers. After so many years of reverse engineering it finally happened and the first playable version of Super Mario 64 on pc (without emulator) was possible. But why stop there when even browser are capable of running games? WebAssembly first announced in 2015 and a recommended standard in 2019 is one of the greatest software yet developed for web. With the combination of Emscripten and the reverse engineered Super Mario 64 files there was nothing left of holding it back to be playable in a browser!

buildTools.sh
sudo apt update
sudo apt install build-essential git python3 bsdextrautils libsdl2-dev libglew-dev
emscriptenSDK.sh
mkdir -p ~/sm64-web
cd ~/sm64-web
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
sm64ex.sh
git clone --branch nightly https://github.com/sm64pc/sm64ex.git
cd sm64ex
python3 - <<'PY'
from pathlib import Path

path = Path("Makefile")
text = path.read_text()
text = text.replace("EXTRA_EXPORTED_RUNTIME_METHODS", "EXPORTED_RUNTIME_METHODS")
text = text.replace("-g4", "-gsource-map")
path.write_text(text)
PY
# Replace this path with the location of your ROM:
cp "/path/to/your/sm64.us.z64" baserom.us.z64
build.sh
make TARGET_WEB=1 VERSION=us EXTERNAL_DATA=0 -j4
test.sh
python3 -m http.server 8080 --bind 127.0.0.1 --directory build/us_web
Play now
  • Decompiled fileshttps://github.com/n64decomp/sm64
  • Emscriptenhttps://github.com/emscripten-core/emscripten/
Start Screen
Start Screen 2
Select Save
World Screen
© 2021 - 2026 Daniel Sulzer