diff --git a/test/benchmark/wasmboy/.gitignore b/test/benchmark/wasmboy/.gitignore new file mode 100644 index 0000000..960160c --- /dev/null +++ b/test/benchmark/wasmboy/.gitignore @@ -0,0 +1 @@ +.gb diff --git a/test/benchmark/wasmboy/README.md b/test/benchmark/wasmboy/README.md new file mode 100644 index 0000000..06e18f7 --- /dev/null +++ b/test/benchmark/wasmboy/README.md @@ -0,0 +1,28 @@ +# WasmBoy + +

+ +To run WasmBoy, you need a Gameboy ROM file. For example, you can download [`tobudx.gb` (Tobu Tobu Girl ROM)](https://tangramgames.itch.io/tobu-tobu-girl-deluxe/purchase?popup=1) + +`wasm3.wasm` is a normal WASI build of Wasm3. + +### Run with Webassembly.sh + +Drag'n'drop `wasm3.wasm`, `wasmerboy.wasm`, `tobudx.gb` to [Webassembly.sh](https://webassembly.sh) and run: + +```sh +wasm3 /tmp/wasmerboy.wasm /tmp/tobudx.gb +``` + +To speed it up (at your own risk, this disables security features): +```sh +chromium-browser --no-sandbox --js-flags="--wasm-opt --wasm-no-bounds-checks --wasm-no-stack-checks" "https://webassembly.sh" +``` + +### Run with Wasmer + +`TODO` + +### Also + +Check out [Aaron Turner's article on Wasmer and WasmBoy](https://medium.com/wasmer/wasmer-io-devices-announcement-6f2a6fe23081). diff --git a/test/benchmark/wasmboy/image.png b/test/benchmark/wasmboy/image.png new file mode 100644 index 0000000..2f579a6 Binary files /dev/null and b/test/benchmark/wasmboy/image.png differ diff --git a/test/benchmark/wasmboy/tobudx.gb b/test/benchmark/wasmboy/tobudx.gb new file mode 100644 index 0000000..2e6ba8f Binary files /dev/null and b/test/benchmark/wasmboy/tobudx.gb differ diff --git a/test/benchmark/wasmboy/wasmerboy.wasm b/test/benchmark/wasmboy/wasmerboy.wasm new file mode 100644 index 0000000..e7ee466 Binary files /dev/null and b/test/benchmark/wasmboy/wasmerboy.wasm differ diff --git a/test/benchmark/wasmsynth/README.md b/test/benchmark/wasmsynth/README.md new file mode 100644 index 0000000..3c527ac --- /dev/null +++ b/test/benchmark/wasmsynth/README.md @@ -0,0 +1,24 @@ +# Wasm Synth + +

+ +Here is some music created by [Peter Salomonsen](https://petersalomonsen.com/) in his [wasm music experiment](https://petersalomonsen.com/webassemblymusic/livecodev2/): + +- **Hondarribia (opening track from WASM summit 2020)**, `hondarribia.wasm` [SoundCloud](https://soundcloud.com/psalomo/hondarribia) +- **WASM song**, `wasm-song.wasm` [SoundCloud](https://soundcloud.com/psalomo/wasm-song) +- **Shuffle Chill**, `shuffle-chill.wasm` [SoundCloud](https://soundcloud.com/psalomo/shuffle-chill) +- **"WebChip" music**, `webchip-music.wasm` [SoundCloud](https://soundcloud.com/psalomo/webchip-music) + +Check out Peter's [excellent talk on WebAssembly Summit 2020](https://www.youtube.com/watch?v=WZp0sPDvWfw&t=18670). + +### Running + +Generate a `wav` file: +``` +wasm3 hondarribia.wasm | sox -S -t raw -b 32 -e float -r 44100 -c 2 - hondarribia.wav +``` + +Play live (choppy on most machines): +``` +wasm3 hondarribia.wasm | sox -S -t raw -b 32 -e float -r 44100 -c 2 - -d +``` diff --git a/test/benchmark/wasmsynth/hondarribia.wasm b/test/benchmark/wasmsynth/hondarribia.wasm new file mode 100644 index 0000000..e58fbd7 Binary files /dev/null and b/test/benchmark/wasmsynth/hondarribia.wasm differ diff --git a/test/benchmark/wasmsynth/image.png b/test/benchmark/wasmsynth/image.png new file mode 100644 index 0000000..992c4c4 Binary files /dev/null and b/test/benchmark/wasmsynth/image.png differ diff --git a/test/benchmark/wasmsynth/wasm-song.wasm b/test/benchmark/wasmsynth/wasm-song.wasm new file mode 100644 index 0000000..f89fb87 Binary files /dev/null and b/test/benchmark/wasmsynth/wasm-song.wasm differ