Chances are you want to change your Amiga emulator's configuration quite often, for example for developing and testing purposes. A script that runs the emulator can help you to do so without effort.
There are thousands of ways to somehow simplify Amiga emulator usage. If you're a GUI & mouse user some of the work has already been done, but for the CLI user there might be some annoying typing involved.
Below is an example Linux bash script that selects fs-uae emulator configurations and sets options based on a single short command line argument. It doesn't do very much, but it saves some typing, especially because fs-uae has a somewhat clumsy way of handling floppy disk images, aka ADFs.
![]() |
| Linux bash script to run fs-uae with different setups |
The idea is this:
- You run the script without additional command line arguments, it runs your emulator with your preferred default configuration.
- You run the script with a given keyword (e.g. "4000", see script below), it runs your emulator with another configuration.
- You run the script with a path to an ADF, it additionally inserts that ADF in drive 1 (without booting from it).
- You run the script the keyword "adf" (see script below), and a path to an ADF, it runs your emulator with a basic Amiga 500 configuration, and inserts that ADF in drive 0 to boot from.
There's of course room for improvement here, for example there's no proper error checking for the "adf" setup (ADF path?) in this script, and sometimes it might be nice to reuse some configuration with another fs-uae command line parameter than the floppy configuration, e.g. input device selection.
#!/bin/bash
UAEBIN=fs-uae
# no trailing slash here:
CONFDIR=/home/data/uae/configurations
# default configuration:
UAECONFIG=$CONFDIR/A4000-040-fast.fs-uae
OPTS=
ADF="$1"
DRIVE=1
if [ "x$1x" == "x4000x" ] ; then
UAECONFIG=$CONFDIR/A4000-040.fs-uae
ADF="$2"
fi
if [ "x$1x" == "x600x" ] ; then
UAECONFIG=$CONFDIR/a600.fs-uae
ADF="$2"
fi
if [ "x$1x" == "x500x" ] ; then
UAECONFIG=$CONFDIR/a500-wb13.fs-uae
ADF="$2"
fi
if [ "x$1x" == "xadfx" ] ; then
UAECONFIG=$CONFDIR/a500-adf.fs-uae
ADF="$2"
DRIVE=0
fi
if [ "x${ADF}x" != "xx" ] ; then
OPTS="--floppy_image_0=$ADF --floppy_drive_$DRIVE=$ADF $OPTS"
fi
CMD="$UAEBIN $UAECONFIG $OPTS"
echo "running fs-uae:"
echo " $CMD"
echo
$CMD
* * *
DISCLAIMER: No responsibility is taken. Use at your own risk.

No comments:
Post a Comment