#!/bin/sh # SPDX-License-Identifier: MIT # Build the referees: since 2026-11-24 their GPL tools build them. # # sh validation/build_referees.sh # # lvd2's AY model (ay-3-8910_reverse_engineered, GPL-3.0+, cf8d14d) and nukeykt's # YM2203-LLE (GPL-2.0+, 817387f) are closed boxes here: run, never opened, and since # 2026-11-24 never fetched into this repository (Aubrey's rule). Each tool in the GPL tool # repository EMU_TOOLS_GPL names fetches its model at the pin and builds it (see the # tools' READMEs): # $EMU_TOOLS_GPL/tools/ay-die-model/build.sh -> build/ay_ref (the trireg keepers are # its patch; needs Icarus Verilog on the PATH or under $OSS_CAD_SUITE/bin) # $EMU_TOOLS_GPL/tools/ym2203-lle/build.sh -> build/ssg_ref # This script calls both and checks the programs are there. validation/icarus_port.py's # step is retired (the keeper change is the tool's patch). Without the variable or a # program it stops with status 3 (a missing input). set -e if [ -z "${EMU_TOOLS_GPL:-}" ]; then echo "the referees are GPL tools kept outside this repository: set EMU_TOOLS_GPL (expects \$EMU_TOOLS_GPL/tools/ay-die-model/ and ym2203-lle/)" >&2 exit 3 fi for tool in ay-die-model ym2203-lle; do [ -f "$EMU_TOOLS_GPL/tools/$tool/build.sh" ] || { echo "$EMU_TOOLS_GPL/tools/$tool/build.sh not found (EMU_TOOLS_GPL names a checkout of emu-tools-gpl)" >&2; exit 3; } done sh "$EMU_TOOLS_GPL/tools/ay-die-model/build.sh" sh "$EMU_TOOLS_GPL/tools/ym2203-lle/build.sh" for program in ay-die-model/build/ay_ref ym2203-lle/build/ssg_ref; do [ -f "$EMU_TOOLS_GPL/tools/$program" ] || { echo "$EMU_TOOLS_GPL/tools/$program was not built" >&2; exit 3; } done echo "referees: $EMU_TOOLS_GPL/tools/ay-die-model/build/ay_ref, $EMU_TOOLS_GPL/tools/ym2203-lle/build/ssg_ref"