Sunday, 5 March 2017

Amiga disk transfer bootstrap

I was given an old Amiga A600HD in a pretty poor state with a collection of various disks.  To be usable I need to transfer Amiga disk images in ADF format between my PC and the Amiga.

I'm on a Linux PC so I followed the guide here:

First we need to bootstrap the machine by getting an ADF program (transwarp) onto an Amiga format disk which the machine can read.  We can then use transwarp to transfer other ADF disk images and build from there.

The only Workbench disk I could find was a bad copy of Workbench 2.05 (37.71) which I couldn't even copy due to bad sectors.  Fortunately it would boot into Workbench and open a CLI.

I found a 25way to 9 way serial cable and plugged it into my Linux PC via a USB to serial adapter as /dev/ttyUSB0 

1. Transfer ARexx receive script to Amiga

The version of "type" on the A600 with Workbench 2.05 (the version I have) has problems with binary files.  Use the following ARexx receive script as described here:

On Amiga:
Go into Prefs and set Serial to 9600 baud 8N1, RTS/CTS hardware flow control enabled.  I left everything else at defaults.

> type ser: to ram:receive

In Linux:
You can use minicom by adding a new binary File Transfer Protocol (/usr/bin/cat) but it's fairly easy from the command line.

$ stty -F /dev/ttyUSB0 cs8 -parenb -cstopb -crtscts raw speed 9600
$ cat receive.rexxlong > /dev/ttyUSB0

You may need to send additional characters to fill Amiga serial buffer if the command prompt doesn't appear immediately.  I sent a break character from Minicom (Ctrl-A, Z,  F).

Check the file is received on the Amiga side with:
> type ram:receive

2. Transfer Transwarp to Amiga

We'll do this in the RAM disk.

Run the ARexx script with:
> RAM:
> rx receive

Bytes? 21363

$ stty -F /dev/ttyUSB0 cs8 -parenb -cstopb -crtscts raw speed 9600
$ cat > /dev/ttyUSB0

The ARexx script knows exactly how many bytes to receive and terminates nicely.

3. Unpack self-extracting archive.
Make sure file is named "" on the ram disk.


It should unpack the relevant files (transwarp, baudbandit.device) to the ram disk. If there's an error (file is not executable, bad loadfile hunk, etc.) the file was corrupted during serial transfer.  Try again and maybe at a lower baud rate.

To avoid having to do this initial serial transfer ever again, copy the Transwarp files from RAM: to a blank disk DF0:

3. Transfer Hombre utilities disk image to blank disk

This step isn't really necessary as we already have Transwarp available on an Amiga format disk and can therefore transfer disk images over serial.  However, this is a useful set of utilities and boots stand-alone without Workbench.
Transfer the Hombre v1.01 (single disk version) ADF to a new bank disk.

On Amiga:

> RAM:
> transwarp -w ser: -b 9600 -1

On Linux:

Send the binary file as we did before:

$ stty -F /dev/ttyUSB0 cs8 -parenb -cstopb -crtscts raw speed 9600
$ cat Hombre*.adf > /dev/ttyUSB0

    0860e27d5ae3cd519a0f7740d774f3ff  Hombre_v1.01_1d_[pal].adf

Now reboot into Hombre!

4. Reading ADF images from the Amiga

As I only had a broken copy of Workbench 2.05, I then wrote a copy of Workbench 2.1 using the same transfer method above using transwarp.

As a sanity check I read back the newly written Workbench disk image from the Amiga and compared the md5sum with the original ADF file.

On Linux:
For reading Amiga disks we can run at full 115,200 baud rate.
$ stty -F /dev/ttyUSB0 cs8 -parenb -cstopb -crtscts raw speed 115200
$ cat < dev/ttyUSB0 > verify.adf

On Amiga:

> transwarp -b 115200 -s 0 -e 79

Do a Control-C to terminate cat on Linux when all bytes have been received.

7310f152b05f66bcfbffe3529a41f3fb  Workbench v2.1 rev 38.35 (1992)(Commodore)(M10)(Disk 2 of 5)(Workbench).adf
7310f152b05f66bcfbffe3529a41f3fb verify.adf

Perfect match!
I'm happy to use Transwarp for now until I can get an Ethernet connection set up and maybe use the Amiga Forever from CloneTo.

No comments:

Post a Comment