Amiga Software Development in 2017

Sebastian Bergmann

Sebastian Bergmann

Sebastian Bergmann

                                               __________
     _ _:_________/_________________/\_________\___     /\_______
        ¦    ____/___.________     /  ________    /    /   _____/____:__ _ __/\__
        :    \__     |      _/   _/   \_    \    /    /   ___/       ¦     \ QQ /
     _ _¦______|     |______\     \____|     \_______/_______________¦__ _ /_\/_\
               |     |-Mo!   \_____/   l______/aC!                   :       \/
           ____|____ | /\__________________ ________     /\_______________________
         _/   _____/ |/  _____________     \_   ___/____/_  _________.______     /
         \    \|     |   \_    \    l/      /   \        / ___/      ¦    _/   _/
          \__________l____|     \___/      /____________/____________¦____\     \_
                          l______/ \______/                          ·     \_____/

      :          __________.            .______      ________              ______:
      :      ____\___     _|____ ____ __|__    |_ ___\      /________ _____\     :
      : _____\      /   _|     /    /     /     /    /     /\        \     /     :
      :/     /    //___________\  _/|   //_   _|_____\_______\       \\   /______\
      :     /______\        /____________\\|   |÷e÷        \__________/___\      :
      :_____\                           |______|                                 :
      :                                                                          :

         - Desaster Fame Design -   __ /\
                                    \//  \
           __________         ______ /     _______   _______.    -Mo!/aL-
           \        _\_____.  \     /      \     / __\_.   _|____ _________
            \    \  \     _|_ _\    \      _\    \/    |_ _\    /_  _     /
            /________\   _\   /_____/      /_____/     _/________\  /    /_
       «- -----------/_________\              \--\_____|--------/___\_____\----- -»
                                /______________\
thePHP.cc

By day, I help development teams as a consultant to successfully craft software using PHP.

Amiga 1200

By night, I enjoy Amiga retrocomputing
as well as hacking on open source software.

Evoke 2015

https://amiga.sebastian-bergmann.de/evoke2015

Disclaimer

I stand on the shoulders of giants.

Stefan Franke, Krystian Bacławski, Christian Vogelgsang, and others are the real heroes.

C

 

"Hello World" C Example

Compile hello.c

Invoke the SAS/C linker

We can now execute our freshly compiled and linked executable

Do we have to do this
on a real Amiga?

Richard Löwenstein working on Reshoot at Amiga30.de
(macOS with XCode and ASM-One inside FS-UAE)

No, we do not have to do this
on a real Amiga!

“It should not be a surprise that countless Amiga users migrated to Linux and other open-source OSs as the Amiga's necessary ultimate fate became clear, for much of the spirit of the Amiga free-software community persisted in these communities without being tied to a single corporation's decisions and fate. Indeed, the Amiga's fate serves as an object lesson for the modern open-source movement, speaking to the way that even excellent hardware and software can wither when said excellence is proprietary and closed source.”

"The Future Was Here", Jimmy Maher

Linux
https://kernel.org
Docker
https://docker.com

Docker

“Containers are UNIX processes,
not lightweight virtual machines.”

"Docker in Production", Robert Lemke

Docker

“Docker is a tool that can package an application and its dependencies in a virtual container that can run on any Linux [machine] ...”

"Docker: A 'Shipping Container' for Linux Code", Katherine Noyes

Docker

Please note that Docker is not required at all to use the tools shown in this presentation.

IMO, Docker makes it a lot easier to use these tools.

Especially since some of the tools require a 32bit Linux system.

SAS/C

 

SAS/C

(run through Virtual AmigaOS)

Virtual AmigaOS (vamos)

"Hello World" C Example

Run a command in a new container

Make $HOME available as /host inside the container

Make /opt/amiga/sc available as /sc inside the container

Automatically remove the container when it exits

Use the sebastianbergmann/amitools image

Execute the vamos command inside the container
(with debugging messages suppressed)

Use /sc as AmigaOS volume sc:

Define some AmigaOS ASSIGNs

Define AmigaOS command search path

Invoke the SAS/C compiler

Compile /host/hello.c
(which is $HOME/hello.c on the host)

We now have an AmigaOS object in /host/hello.o
(which is $HOME/hello.o on the host)

When you use a Docker image for the first time ...

... it is automatically downloaded from hub.docker.com

We now have an AmigaOS object in /host/hello.o
(which is $HOME/hello.o on the host)

Invoke the SAS/C linker

We now have an AmigaOS executable in /host/hello
(which is $HOME/hello on the host)

We now have an AmigaOS executable in /host/hello
(which is $HOME/hello on the host)

We can now execute our freshly compiled and linked executable with vamos

Lets put SAS/C inside the Docker image

Dockerfile

Line 1: Use sebastianbergmann/amitools as base image

Line 3: Extract sasc658.tar.xz to /sc (inside the new image)

Line 4: Copy _vamosrc to /root/.vamosrc (inside the new image)

_vamosrc

Building the Docker image

Invoke the SAS/C compiler

Invoke the SAS/C linker

We can now execute our freshly compiled and linked executable

GNU make build automation script

GNU make in action

What about GUI applications?

C program that opens a window

Execute M68K/AmigaOS binary with FS-UAE

docker-execute-amiga

Assembler

ASMTwo

http://www.coppershade.org/asmskool/Tut3.S

Do we have to do this
on a real Amiga?

Cross-Compiler

“A cross-compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running.”

"Cross-Compiler", Wikipedia

For example, a compiler that runs on a Linux PC but generates code that runs on an Amiga is a cross-compiler.

Cross-Compiler

“A cross-compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running.”

"Cross-Compiler", Wikipedia

For example, a compiler that runs on a Linux PC but generates code that runs on an Amiga is a cross-compiler.

VASM

Download http://coppershade.org/asmskool/Tut3.S example

Invoke the assembler

We now have an AmigaOS executable in /host/Tut3
(which is $HOME/Tut3 on the host)

GNU Compiler Collection (GCC)

Compile (and link) hello.c with GCC

We can now execute our freshly compiled and linked executable

The End