Dockerized Emulation

I created a simple shell script that makes it easy to execute an AmigaOS binary using FS-UAE:

#!/bin/bash

if [ -z $1 ]
  then
    echo "$0 "
    exit 1
fi

if [ ! -f $1 ]; then
    echo "$1 not found"
    exit 1
fi

amiga=`mktemp -d`

mkdir "$amiga/C"
cp $1 "$amiga/C"

mkdir "$amiga/S"
echo "C:$1" > "$amiga/S/startup-sequence"

docker run -it \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v $HOME/.config/fs-uae/:/home/fsuae/config \
  -v $amiga:/amiga \
  jamesnetherton/fs-uae \
  --amiga_model=A1200 \
  --hard_drive_0=/amiga \
  > /dev/null

rm -rf $amiga
</pre>

This creates a temporary directory that is used as the emulated Amiga's hard drive. The binary to be executed is copied to that hard drive's C: directory and a S:startup-sequence script that executes the binary on boot is created.

This approach is a lot simpler than what I described in my [previous post](/2017/02/18/dockerized-cross-compiler/).

Update


The script shown above can now be [downloaded](https://github.com/sebastianbergmann/docker-execute-amiga).