Files
vt1200/bad-apple/tools/run_mame_gui.sh
T

40 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# Run the current debugger-path demo in a MAME window.
#
# bad-apple/tools/run_mame_gui.sh
# M=/path/to/vt1200 BA_MOVIE=/path/to/movie.bin bad-apple/tools/run_mame_gui.sh
#
# The payload is loaded at frame BA_AT, takes over, and plays the full movie.
# Close the window or let it exit at BA_END. Recovery after takeover is a
# power cycle (in MAME: Shift+F3 or close the window).
set -eu
HERE=$(cd "$(dirname "$0")" && pwd)
ROOT=$(cd "$HERE/../.." && pwd)
M=${M:-/home/arti/code/k-space/mame0289/vt1200}
BA_MOVIE=${BA_MOVIE:-$ROOT/bad-apple/data/movie.bin}
BA_AT=${BA_AT:-2500}
BA_END=${BA_END:-8000}
if [ ! -x "$M" ]; then
echo "run_mame_gui.sh: no MAME binary at $M" >&2
exit 1
fi
if [ ! -f "$BA_MOVIE" ]; then
echo "run_mame_gui.sh: no movie at $BA_MOVIE" >&2
echo " build it with: cd bad-apple && python3 -m pipeline.build ..." >&2
exit 1
fi
if [ ! -f "$ROOT/bad-apple/player/build/player.bin" ]; then
echo "run_mame_gui.sh: no payload; run bad-apple/player/build.sh" >&2
exit 1
fi
cd "$ROOT"
VT1200_SKIP_LEVEL1=1 \
BA_MOVIE="$BA_MOVIE" BA_MOVIE_BASE=0x00080000 BA_WAIT=1 BA_PACE=1 \
BA_AT="$BA_AT" BA_END="$BA_END" \
"$M" vt1200 -rompath harness/mame/roms -sound none -skip_gameinfo -window \
-debug -debugger none \
-autoboot_script "$ROOT/bad-apple/tools/load_mame.lua" -autoboot_delay 0