RetroPie-Setup/scriptmodules/emulators/atari800/atari800.sh

26 lines
462 B
Bash
Executable file

#!/bin/bash
emulator="./EMULATOR"
rom="$1"
shift
params=("$@")
pushd "${0%/*}" >/dev/null
if [[ -z "$rom" ]]; then
"$emulator" "${params[@]}"
else
source "../../lib/archivefuncs.sh"
archiveExtract "$rom" ".a52 .atr .bas .bin .car .dcm .xex .xfd"
# check successful extraction and if we have at least one file
if [[ $? == 0 ]]; then
rom="${arch_files[0]}"
fi
"$emulator" "$rom" "${params[@]}"
archiveCleanup
fi
popd