Speaking at Evoke 2017

The organizers of the Evoke demoparty asked me to present a seminar on Docker-ized cross-compilation and emulation for Amiga software development at this year's event.

Here's the abstract I submitted for the seminar:

Amiga Software Development in 2017

Two years ago, at Evoke 2015, I shared my experience of turning on my Amiga 1200 for the first time after 17 years of not using it. This year I return to show how you can develop software for AmigaOS using Assembler and C on Linux. We will cover cross-compilation with GCC and vasm as well as emulation with fs-uae and vamos, for instance, and use Docker to containerize our toolchain.

See you in Cologne in August!

Transparent Amiga 1200 Case

Transparent Amiga 1200 Case

Back in September 2015, I supported a Kickstarter campaign that had the production of new Amiga 1200 cases as its goal.

Last week (while I was out of the country on a business trip), my transparent Amiga 1200 case was finally delivered.

This case will eventually house a Commodore A1200 Reloaded motherboard.

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

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.

Update

The script shown above can now be downloaded.

Dockerized Development Tools

Stefan "Bebbo" Franke has forked Krystian Bacławski's AmigaOS cross compiler toolchain in an effort to update, amongst other components, GCC to version 6.

I have created a Dockerfile for building a software container for use with Docker. This allows me to conveniently build and use the AmigaOS cross compiler toolchain, which requires a 32-bit environment, on my 64-bit Linux system.

Once Docker is installed we can compile hello.c, the famous "Hello world!" example:

Hello world!

$ docker run -v $HOME:/host \
  -it sebastianbergmann/m68k-amigaos-bebbo \
  m68k-amigaos-gcc /host/hello.c -o /host/hello -noixemul

Christian Vogelgsang created amitools, a collection of tools to work with AmigaOS binaries. One of these tools is xdftool which can be used to work with Amiga Disk File (ADF)s. In the example below, I use another Docker container for running xdftool.

Using xdftool, we can create a fresh a floppy image, format it using Fast File System (FFS), copy the binary we compiled in the previous step to it, and create a S:startup-sequence script that executes our binary:

$ echo C:hello > $HOME/startup-sequence

$ docker run -v $HOME:/host \
  -it sebastianbergmann/amitools \
  xdftool \
  /host/hello.adf \
  format HelloWorld ffs + \
  boot install + \
  makedir C + \
  write /host/hello C/hello + \
  makedir S + \
  write /host/startup-sequence S/startup-sequence

$ rm $HOME/startup-sequence

Now that we have a floppy image with our compiled binary we can finally test it using the FS-UAE emulator (provided by yet another Docker container):

$ docker run -it \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v $HOME/.config/fs-uae/:/home/fsuae/config \
  -v $HOME:/host \
  jamesnetherton/fs-uae \
  --amiga_model=A1200 \
  --floppy_drive_0=/host/hello.adf

Hello world!

The above assumes that you have Kickstart ROM files in the $HOME/.config/fs-uae directory on the host.

If you do not have Kickstart ROM files available then you can omit the -v $HOME/.config/fs-uae/:/home/fsuae/config \ line in the command shown above and FS-UAE will fall back to the Open Source AROS kernel:

Hello world!

By the way: the binary created by compiling hello.c is simple enough to be executed through vamos, the Virtual AmigaOS that allows to run AmigaOS m68k binaries directly on Linux:

Hello world!

Viva Amiga

Back in 2011, there was a Kickstarter campaign to produce a "a film about the legendary Amiga system". Today I was able to purchase this film on Vimeo.

Unfortunately I have to say that I am happy that I did not support this film's campaign back then (because I heard about it too late). It's not only that this film was delayed again and again. From what I was able to observe as an outsider (as someone who did not back the film) it appears that the communication by the project creator was lacking. As far as I can see, no physical copies of the film are available at this point in time. Backers of the Kickstarter campagin were promised a DVD of the film. And while DVD might have been fine back in 2011 it's not acceptable to not offer a BluRay in 2017.

The film itself turned out rather short: 62.5 minutes including opening titles and closing titles. The content is not bad but if you have seen "From Bedrooms to Billions: The Amiga Years", for instance, then there is not much in this film that you have not seen before. I have to say, though, that I enjoyed the focus on artistic usage of the Amiga.