Emulator core geared towards emulating ZZT and Super ZZT.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

zeta_wasm.sh 962B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. if [ ! -d build ]; then mkdir build; fi
  3. if [ ! -d build/web ]; then mkdir build/web; fi
  4. rm build/zeta_native.js
  5. rm build/zeta_native.js.mem
  6. rm build/zeta_native.wasm
  7. rm build/zeta_native.wasm.map
  8. rm build/zeta_native.wast
  9. xxd -i res/8x14.bin > res/8x14.c
  10. emcc -O3 --js-library src/emscripten_glue.js \
  11. -s WASM_OBJECT_FILES=0 --llvm-lto 1 \
  12. -s ENVIRONMENT=web \
  13. -s 'EXPORTED_FUNCTIONS=["_malloc","_free"]' \
  14. -s 'EXTRA_EXPORTED_RUNTIME_METHODS=["AsciiToString"]' \
  15. -s MODULARIZE=1 -s 'EXPORT_NAME="ZetaNative"' \
  16. -s ALLOW_MEMORY_GROWTH=0 -s ASSERTIONS=0 \
  17. -s 'MALLOC="emmalloc"' -s NO_FILESYSTEM=1 \
  18. -s TOTAL_MEMORY=4194304 -s TOTAL_STACK=262144 \
  19. -s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE="[]" \
  20. -DNO_MEMSET -o zeta_native.js \
  21. src/cpu.c src/zzt.c res/8x14.c src/audio_stream.c
  22. mv zeta_native.js build/zeta_native.js
  23. mv zeta_native.wasm build/zeta_native.wasm
  24. cp build/zeta_native.js build/web/
  25. cp build/zeta_native.wasm build/web/