#!/usr/bin/env bash # Launch the built Atari ST example in Hatari. Defaults to PATTERN; # pass "hello" to run HELLO instead. Hatari autostarts the .PRG via # the --auto flag; EmuTOS (toolchains/emulators/support/emutos-512k.img) # provides the TOS ROM since the Ubuntu hatari package does not bundle # one. # # scripts/run-atarist.sh # runs PATTERN.PRG # scripts/run-atarist.sh hello # runs HELLO.PRG set -euo pipefail prog=${1:-pattern} repo=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) bin_dir=$repo/build/atarist/bin case $prog in hello) file=HELLO.PRG ;; pattern) file=PATTERN.PRG ;; *) echo "usage: $0 [hello|pattern]" >&2; exit 2 ;; esac tos=$repo/toolchains/emulators/support/emutos-512k.img if [[ ! -f "$bin_dir/$file" ]]; then echo "$bin_dir/$file not built. Run 'make atarist' first." >&2 exit 1 fi if [[ ! -f $tos ]]; then echo "TOS ROM missing: $tos" >&2 echo "run ./toolchains/install.sh (EmuTOS should have been staged)." >&2 exit 1 fi # Hatari's --auto needs the target on a mounted GEMDOS drive. exec hatari \ --tos "$tos" \ --harddrive "$bin_dir" \ --gemdos-drive C \ --auto "C:\\$file"