#!/bin/sh # SPDX-License-Identifier: MIT # Run a machine headless in MAME for a few emulated seconds and log its YM2151 # accesses (scripts/mame_ym2151_tap.lua). docs/mame-oracle.md has the recipe and # what the log is worth. # # sh scripts/mame_tap.sh [rompath] # YM_TAP_CPU=:soundcpu YM_TAP_BASE=2800 YM_TAP_CHIP=:fm sh scripts/mame_tap.sh ddragon 5 # # Everything MAME writes lands in reference/mame-run// (git-ignored). # The ROMs are read in place and never copied. set -e root=$(cd "$(dirname "$0")/.." && pwd) machine=${1:?machine name} seconds=${2:-5} roms=${3:-${MAME_ROMPATH:?set MAME_ROMPATH or pass a rompath}} run="$root/reference/mame-run/$machine" mkdir -p "$run" cd "$run" YM_TAP_OUT="$run/ym2151-tap.txt" mame "$machine" \ -rompath "$roms" \ -video none -sound none -nothrottle -noreadconfig -skip_gameinfo \ -cfg_directory "$run/cfg" -nvram_directory "$run/nvram" \ -seconds_to_run "$seconds" \ -autoboot_script "$root/scripts/mame_ym2151_tap.lua" echo "log: $run/ym2151-tap.txt"