Amiga file transfer

1. Introduction

This page describes how to transfer data between an Amiga and a Linux based PC. I focus on mechanisms which can be used for stock Amiga systems. Network adapters exist for the Amiga too, so it can be connected to a regular network and corresponding tools for data transfer can be used, but this is not the scope of this document.

Every Amiga model came with both a parallel and a serial port. Except for the A1000, these ports are standard compliant which makes it easy to connect those computers with standard printers, modems, or even other PCs. Also, all Amiga systems have a 3.5" floppy disc drive, which was the last size of floppy discs until they got obsolete. The Amiga 600 and 1200 also are equipped with an PCMCIA slot which can be used to access compact flash cards. In this guide, these four interfaces are considered for data transfer: floppy disc, serial port, parallel port, PCMCIA port.

2. Hardware prerequisites

  1. For floppy disc transfer, you need a PC with a 3.5" floppy disc drive and some floppy discs. This method is slow and not very comfortable.
  2. For serial data transfer, you need a PC with a serial port and a null-modem serial cable. The transfer speed for stock Amigas is low, only 2-4 KByte/s.
  3. For parallel data transfer, you need a PC with a parallel port and a special parallel cable (actually several versions exists, none of them are really standardized). Achievable speeds range from 10 to 40 KByte/s.
  4. For Compact Flash transfer via PCMCIA, you need an Amiga 600 or 1200 and a PCMCIA compact flash adapter. The speed ranges from 100 KByte/s to over 1 MByte/s.
For the first three methods, you can use any Amiga model, as all of them come with a floppy drive, a serial port, and a parallel port. The only exception is the model Amiga 1000 which has a non-standard parallel port, so an additional adapter is required.

3. Best ways to start

For all transfer methods, some kind of special software is needed on the Amiga which brings up the problem of how to transfer this software to the Amiga without having software to transfer data.

Fortunately, there are some workarounds for getting started. For floppy disc transfer, you just need an Amiga with OS version 2.1 or later, which brings support for reading PC floppy discs. For serial transfer, all Amiga operating systems come with some kind of scripting language (Basic or AREXX) which can be used to transfer data. For parallel transfer, there is no easy workaround. So if you want to use that method, you still need to initially bring the software to the Amiga. I suggest using the floppy disc if available, the serial method takes much more effort to get it running. You can also send over an Amiga formatted floppy disc to me and let me put you the software on it.

4. Floppy transfer

Transferring files via the floppy disc does not require any additional hardware, but there are still some limitations. First of all, the PC floppy controller is not able to read Amiga formatted discs. Luckily, the Amiga floppy controller can read DOS formatted disc. Also, the Amiga Workbench version 2.1 (and later) comes with so-called CrossDOS filesystem allowing accessing DOS formatted discs. Workbench 2.1 works with any Kickstart with at least version 2.0 (that means also with the most common 2.05).

4.1. Format the disc

Most Amiga models only have a double-density disc drive (DD) instead of the high-density of the PC. But the floppy disc can be formatted to DD anyway. To do so, you first need to cover the HD hole on the disc. There is one hole with a movable cover for write protection, and HD diskettes have another (permanent) hole on the other sides indicating the capacity. I am not sure, every disc drive has problems with formatting the disc to DD if the hole is not covered, but mine did so just put a small piece of paper over the hole and fix it with some tape.

Then you format the disc. You can either use GUI tools like gfloppy or kfloppy, or just do it on the command line. First, you have to set the parameters after inserting the disc:

setfdprm /dev/fd0 720/720
or
setfdprm /dev/fd0 dd sect=9 cyl=80
which is more or less equivalent.

Then you can format the disc. First do a low-level format with

fdformat /dev/fd0
and then create the DOS file system:
mkdosfs /dev/fd0

4.2. Transfer files

Now you can mount the floppy at the PC and copy the data on it:
mount /dev/fd0 /mnt/floppy
Then unmount it and put it into the Amiga drive:
umount /mnt/floppy
On the Amiga, you need to load the CrossDOS drivers. You can enter
mount PC0:
on the CLI, or double-clicking on the PC0 icon in
Workbench:Storage/DOSDrivers
Once you insert the floppy disc, an icon should appear on the Workbench. You can also change directory in the CLI to PC0: and access the files.

5. Serial port

For the moment, I cover the serial port only for transferring files from the PC to the Amiga. The positive thing about using the serial port is that you can use standard hardware and standard cables. The negative thing is that it is really slow. If you intend to transfer many or large files, I recommend using the parallel port transfer. But since that requires to have the tool on the Amiga, you still need a way to transfer that tool in the first place.

Fortunately, the Amiga brings some tools to access the serial port which will be used here to transfer that first file.

5.1. Required hardware

You need the following to transfer a file via the serial port:

5.2. Port configuration Amiga

The configuration tool for the serial port differs a little bit for Workbench 1.3 and for Workbench 2.0 (and later), but the basics are the same. Open the configuration program by going to the preferences directory. Start the program "Serial" and use the following settings:

5.3. Port configuration PC

The serial port of the Linux PC can be configured with the "stty" command:
stty 9600 -parenb cs8 crtscts -ixon -ixoff raw iutf8 -F /dev/ttyS0
You may need to change the serial port "ttyS0" to your actual port number. Usually it is ttyS0 or ttyS1 for on-board ports, or ttyUSBx for USB-to-serial connectors.

5.4. First test

To verify that the connection works, a quick test is recommended: Due to buffering, you won't see an immediate result. But the linux command should terminate directly after executing the Amiga counterpart. If it does not terminate, there is already a connection or configuration problem. To actually see the string, you need to start the echo on the PC multiple times (like 20 or more times, remember the buffer size in the Amiga configuration).

5.5. Sending files to the Amiga

Now you have found out that the connection work, the next step is to bring a little program to the Amiga to receive files. Due to buffering you cannot just redirect "SER:" to a file, the file size would be wrong. Therefore a little program is needed to correct the file size. There is no program pre-installed for that use but fortunately the Amiga comes with AmigaBASIC or AREXX as simple programming languages.

Since I have a working parallel connection already working, I was just evaluating the serial connection out of curiosity. So I searched for already existing scripts and found this excellent website. It basically addresses the first step of bring a program to the Amiga too. You can follow the information there as well.

The files we are looking for are either "receive.bas" (method B) or "receive.rexx" (method C), depending on the Amiga OS version. Amiga OS 2.0 and later comes with ARexx, a programming language. Older OS versions (1.x) bring AmigaBasic. So depending on your OS version, you can choose the right file. Since both files are just plain text files, you can transfer them multiple times as described above for the "hello world" example, and afterwards correct the text file with any text editor on the Amiga. Since the files are rather short, you can also just type them into a text editor on the Amiga and save it to a file.

5.5.1. ARexx

First, to transfer the file itself, execute
cat receive.rexx >/dev/ttyS0
on the Linux PC. Then execute
type SER: >receive.rexx
on the Amiga. You probably need to do it twice due to buffering and edit the file deleting the duplicate data.

Once you have the file, you can execute the script to transfer any other file to the Amiga:

rx receive
It will ask for a file name and its size. Then you can "cat" the file into ttyS0 on the PC and see the bytes flying.

5.5.2. AmigaBASIC

Basically the same goes for the AmigaBASIC version. First transfer the receive.bas file. Execute
cat receive.bas >/dev/ttyS0
on the Linux PC and
type SER: to receive.bas
on the Amiga. Again, you probably need to adjust the received file.

Once you have the file, you can execute the Basic program to transfer any file to the Amiga:

amigabasic receive.bas
It will ask for a file name and its size. Then you can "cat" the file into ttyS0.

5.6. Sending files to the PC

The other direction does not work that easily. You need special software to transfer files to the PC which is currently not covered by this guide. I recommend to use the serial transfer method only to transfer the program needed to use the parallel port to the Amiga.

5.7. Speed optimizations

Once you have put everything together, you can try to increase the serial port speed to higher values. 19200 baud should easily work too, anything higher depends on the speed of the Amiga and the PC. The problem with higher values than 19200 is, that the standard Amiga Serial Prefs program only allows 31250 which is not accepted by stty on Linux.

5.8. Advanced tools

Once you are able to transmit some data, you can load a more advanced tool to the Amiga and use that instead.

I wrote a tool named APCComm, initially used to transfer data via the parallel port, but since version 3.0.0 it can also utilize the serialport.

5.9. Alternative method without any Amiga software

There is a new interesting approach which does not require any software at the Amiga. It uses a debug feature of the Amiga Kickstart ROM to directly talk to the Amiga via the serial port.

The software is called amigaXfer and it is supposed to reach speeds up to 512 kbps even on a stock Amiga 500. It can read and write floppy discs and files, and dump the ROM.

The software uses python and therefore is available for a variety of OSs. To use it, you basically just need to have Workbench disc available and start the Workbench in debug mode:

loadwb -debug

But even if you don't have a Workbench disc available, you can still enter the Kickstart debugger using a hardware hack where you need to carefully connect two pins of the main processor to enter the debugger.

You can read more about how this works.

This is a very neat method as it does not require any software on the Amiga and works with modern computers at the other side, as there plenty of serial-to-USB converter that can be used.

6. Parallel port

To transfer files via the parallel port, I wrote a tool named APCComm since no other tool existed for that purpose. The software requires to use a so-called LapLink cable, more information can be found in the requirements section of the APCComm homepage.

The tool can transfer files and directories (also recursively) between the Linux PC and the Amiga. It can also be used to transfer disc images directly to the floppy disc, and to create disc images from floppy disc. Information about how to use it can be found in the usage section.

In a nutshell, the usage is pretty straight-forward, since no configuration is required:

  1. You need a PC with a parallel port. It can be an on-board port, or an USB-to-parallel adapter.
  2. Switch off both computers.
  3. Connect the LapLink cable.
  4. Boot both computers.
  5. Sending files to the PC:
    Execute on the Amiga:
    apccomm filename
    Execute on the PC:
    apccomm
  6. Or sending files to the Amiga:
    Execute on the PC:
    apccomm filename
    Execute on the Amiga:
    apccomm

7. PCMCIA port

The Amiga 600 and 1200 can use a PCMCIA compact flash adapter. All you need is the adapter, a compact flash card and compact flash card reader on the PC.

Installation steps:

  1. Switch off the Amiga.
  2. Insert PCMCIA compact flash adapter.
  3. Boot the Amiga.
  4. Install the compact flash driver: CFD
    • Download the archive, bring it to the Amiga and unpack it.
    • Copy the following files to DEVS:
      • CFD/devs/CF0
      • CFD/devs/CF0.info
      • CFD/devs/compactflash.device
  5. Install the Fat95 file system driver: fat95
    • Download the archive, bring it to the Amiga and unpack it.
    • Copy the following files to L:
      • fat95/l/fat95
  6. Go to DEVS: and double click the CF0 icon. This will load the drivers. On the next reboot, the drivers will be loaded automatically.
  7. Insert a fat95 formatted compact flash card. You should see an icon on the Workbench allowing to read and write files to it.

Note: Accessing the compact flash card via this driver is save for accelerator cards with up to 8MB of additional RAM, maybe more depending on the layout. The CF card is accessed via special IO registers mapped at 0xA00000 upwards, not the address space at 0x600000 used for PCMCIA mapped memory.

8. Further reading

There is also additional software for transferring files between the Amiga and the PC. For Windows based PCs, there is PC2Am which supports mounting the PC file system into the Amiga file system allowing to access the files with any Amiga program. The ADF Sender Terminal also supports to transfer data between a Windows PC and the Amiga.

Hombre is a nice collection of software for the Amiga to transfer files, via serial and parallel ports.

You can also find additional links to software and tutorials at the APCComm links section.

There are also some advanced solutions available. The catweasel controller card allows to connect Amiga and C64 disc drives (and also some other hardware) to the PC. Also, some Amiga hardware extensions provide an Ethernet port to connect to a existing network.

Finally, I also want to note that some (newer) Amiga models come with an IDE interface which supports standard hard discs. Linux brings support for the Amiga partition table and the file system, so it is possible to connect a Amiga hard drive to an IDE port at the PC and directly access the data on it. It's good for bulk data transfer, but for smaller files it's usually too much of a hassle to remove the hard disc from the Amiga and attach it to the PC.

tags: amiga10