#!/usr/bin/env bash # Reconstruct the survey environment. Nothing here is redistributed; every # artifact is fetched from its origin at a pinned revision or verified hash. set -euo pipefail cd "$(dirname "$0")" echo "== third-party cores ==" for r in folkertvanheusden/PyMSX MSXALL/pymsx natdan/py-speccy pawlos/Timex.Emu \ deadsy/py_z80 jamespbarrett/pyz80 hyano/z80py gameblabla/multirexz80 \ szilvasyz/z80 boert/Z80-Emulator; do n=${r//\//_} [ -d "$n" ] || git clone -q --depth 50 "https://github.com/$r.git" "$n" done echo "== SingleStepTests/z80 (MIT) ==" if [ ! -d sst-z80 ]; then git clone -q https://github.com/SingleStepTests/z80.git sst-z80 git -C sst-z80 checkout -q --detach ebe1875d48f374bcfd4b505d8eb8ee751568b5f7 fi mkdir -p oracles && cd oracles echo "== FUSE 1.6.0 core tests (GPL-2.0) ==" if [ ! -d fuse-1.6.0 ]; then curl -sL -o fuse.tar.gz "https://sourceforge.net/projects/fuse-emulator/files/fuse/1.6.0/fuse-1.6.0.tar.gz/download" echo "3a8fedf2ffe947c571561bac55a59adad4c59338f74e449b7e7a67d9ca047096 fuse.tar.gz" | sha256sum -c - tar xzf fuse.tar.gz fuse-1.6.0/z80/tests/tests.in fuse-1.6.0/z80/tests/tests.expected # The tarball is Fuse's GPL emulator source: never kept (decision L5, 2026-11-25). rm -f fuse.tar.gz fi echo "== raxoft/z80test v1.2a (MIT) ==" if [ ! -d z80test-1.2a ]; then curl -sL -o z80test.zip "https://github.com/raxoft/z80test/releases/download/v1.2a/z80test-1.2a.zip" echo "7df0443d703e6b3114ea04b4cdef3e13b91421c62e37185c1036d06864cacbaf z80test.zip" | sha256sum -c - unzip -oq z80test.zip python3 - <<'PY' for n in ("z80full","z80doc","z80flags","z80docflags","z80ccf","z80memptr"): d = open(f"z80test-1.2a/{n}.tap","rb").read() i, blocks = 0, [] while i < len(d): ln = d[i] | (d[i+1] << 8); i += 2 blocks.append(d[i:i+ln]); i += ln open(f"{n}.bin","wb").write(blocks[-1][1:-1]) # strip flag + checksum print("extracted", n) PY fi echo "done."