Hacking together an Amiga dev kit

SNASM 68k Manual

Next up on my list of old hardware to put to some kind of use is a Commodore Amiga. This means I need to have some kind of usable development setup. Back in the day, the development kit of choice for the Amiga was SNASM, a PC-based cross-assembler with custom hardware allowing the assembled code to be ’squirted’ straight into the Amiga’s memory to be executed and debugged. Unfortunately, although I still have a copy SNASM 68k manual (exhibit A, right), I don’t have the hardware or software, so something needed hacking together.

Problem #1 – working A500, no bootable disks. Although the Amiga uses standard 3.5″ disks, a PC disk controller isn’t capable of writing them. This was solved with a quick visit to eBay where I got hold of a set of Workbench 1.3 disks. This allowed me to get a copy of transwarp onto the Amiga via an RS232 link, which in turn gives me the ability to send and write ADF files (disk images) direct to disks in the Amiga drive. Instructions for all this can be found here.

Note that once you have a working transwarp copied over the link, the best thing to do next is to write a Hombre disk, or preferably several copies to be on the safe side.

Problem #2 – an assembler. I had a quick look at Easy68k which looks decent enough, but it’s Windows only which I didn’t fancy at all. The next idea was the GNU assembler, which is part of binutils. I spent far too long trying to compile it for the m68k-coff target, only to find that new version won’t work (no longer supported) while old versions won’t work (just don’t compile). Just when I was about to give up on that, I discovered the m68k-elf target which does work, and compiles 68000 assembler perfectly, albeit with unpleasant GNU syntax variations rather than ‘proper’ Motorola syntax.

Using the GNU linker with the ‘binary’ target format on the resulting ELF object files produces a usable binary file containing just the code. Perfect.

Amiga Hardware Reference Manual

Problem #3 – writing some code. Somehow I’ve lost all my Amiga source code, and apparently large sections of my memory. Luckily I haven’t lost the trusty Amiga Hardware Reference Manual (exhibit B, right) or the ability to read, so after a while I came up with some code to do the minimum necessary, i.e. boot up the Amiga, kick out the pesky operating system, and do something visible on the screen. Exhibit C – the code

Problem #4 – running the code. Since my code runs directly from the boot sector, all I needed to to was generate an ADF file and write that to a disk. I wrote a Python script to put the disk image together and calculate the checksum for the boot sector – exhibit D. Also, another Python script to send the completed ADF file to transwarp which is ready and waiting at the other end of the null-modem cable – exhibit E.

The shocking thing about all this is that it actually worked, first time. I nearly fell off my chair. All that remains is problem #5 – thinking of something ‘useful’ to do with this Amiga + Development Kit. A job for another day…

  1. CiaranG’s avatar

    A new improved version of this is now available – see http://ciarang.com/posts/cads

    Reply