This document discusses the data transfer solutions that are available for 8-bit Commodore computers. Some of them are supported by several software tools, others are specific to one tool or one operating system.
The use of magnetic media has both advantages and disadvantages. The main advantage is that in some cases, no additional hardware is required. The main disadvantages are slow transfer speeds and mechanical wear and tear of the media and the drives.
The 1541 and its precursors use the proprietary Commodore GCR format, which is very difficult to access on other than Commodore computers. But thanks to a hack invented by Daniel Fandrich, most 1541 models (except the 1541-II) can be modified to generate a higher baud rate that is required for reading and writing MFM disks. The 1541-dos package written by Daniel Fandrich and Richard Hable reads single-sided 9-sector 180-kilobyte MFM disks. The package writes files in its own 90-kilobyte format, which can be read with the MS-DOS and Unix programs supplied with the package.
The 1570, 1571 and the 1581 disk drives contain an MFM controller chip that can easily be programmed to read MS-DOS (and CP/M) diskette formats. There are numerous utilities for these drives. Some of these utilities can be found at http://www.funet.fi/pub/cbm/c64/diskutil/.
The 1581 disk drive uses MFM also for its native format, which makes it relatively easy to read and write its disks on an Amiga or PC. For the Amiga, there are Copy1581 and Pasi Ojala's C1581 filesystem. The Linux floppy driver can be configured to read and write 1581 disks, and Daniel Fandrich has written a Commodore file system for Linux, cbmfs. For MS-DOS, there is 1581copy by Wolfgang Moser.
Unlike the Amiga, the floppy drive controller of IBM PC compatibles cannot be easily configured to access other than MFM formats. With the help of Jens Schönfeld's Catweasel disk controller, the floppy drive is capable of reading most formats, except the 100 TPI format of the Commodore 8050 and 8250 disk drives. The disadvantages of the Catweasel controller are its closed design, relatively high price and dependence on low-level hardware and software interfaces on the host computer, which is likely to cause problems with future computer models and operating systems.
There are some hard disk interfaces for Commodore computers.
Although hard disks, also known as
fixed disks, are not
supposed to be removed from the computer, they have much greater
storage capacity and transfer speed than other storage media.
Maybe the best known hard disk interfaces are the SCSI adapters for the Commodore serial bus that were produced by CMD. A more modern design is Asbjørn Djupdal's ATA hard disk controller for the serial bus. It is also possible to use another computer as a file server for 8-bit Commodore computers; see Section 2.2.
For the Commodore 64, there are cartridge-based hard disk interfaces that should outperform serial bus based adapters. In the old days, there was Lt. Kernal, and nowadays you can buy an IDE64 adapter for ATA hard disks.
If the hard disk interface uses a common file system, such as the FAT of MS-DOS, it is relatively easy to install the hard disk in some other computer and copy the files over. Proprietary file systems need special treatment. In the author's opinion, swapping hard disks only makes sense for bulk transfers of large amounts of data—it is not something one would do to copy a single small file to a 8-bit Commodore computer.
Compared to diskette, the tape is slower and more unreliable. However, cassette tape drives used to be cheaper than disk drives, and C cassettes are still available (for audio applications) unlike 5¼-inch diskettes and disk drives. Furthermore, the data recorded on the tape can be captured and produced with the built-in audio equipment of modern personal computers.
Audio data can be represented with a stream of PCM samples. However, the
cassette tape circuitry in 8-bit computers only recognises changes in
the signal polarity. Therefore, the data can be represented as the
delay between polarity changes. Most 8-bit Commodore computers only
recognise the positive-to-negative polarity changes. Thus, most
low-level tape images (
) record the time
between successive positive-to-negative polarity changes.
The built-in tape routines of 8-bit Commodore computers store the
data in blocks, which are 192 bytes in size, with the exception of the
payload of program files, which can be anything between 1 and 65536
bytes in size. If the data is in the standard format, a high-level
tape image (a
represents it more efficiently than a sequence of pulses. This
high-level format is supported by the MESS emulator, and by Marko Mäkelä's cbmconvert and C2N
Many tools related to Commodore tapes are available at http://www.funet.fi/pub/cbm/crossplatform/transfer/datassette/. Some of these tools contain a sound card interface, like the real-time low-level tape imager TAPir for Win32 and GNU/Linux, while others operate on files.
In many cases, a cable connection is faster and more reliable than methods based on physical storage media. Many interfaces are available for a cable connection. Those interfaces that are supported by the built-in firmware of the Commodore equipment are easiest to use. These include the cassette tape drive interface on the computer and the interface between the disk drive and the computer. Other interfaces require that some program code is loaded first.
In the late 1980's, a company released a small collection of games on an audio CD, which was delivered with a simple interface for connecting the headphone jack of the CD player to the cassette drive interface.
A similar device for playing back low-level tape images has been designed by Tomaz Kac.
In practice, the transfer speed of this solution is limited to one or two kilobytes per second, and so far, nobody has written an optimal fastloader.
The C2N232 is a small RS-232 interface that can be plugged to the cassette port of an 8-bit Commodore computer. Its components cost a little more than those of Tomaz Kac's sound card interface, but it is equipped with a programmable microcontroller that can reach 38,400 bits per second transfer speed using a custom protocol.
The C2N232 is supported on the Commodore Amiga, on Win32, and on any system with a POSIX compliant RS-232 interface, most notably GNU/Linux and Apple Mac OS X. There are three support tools: c2n for exchanging data in the standard format, c2nload for loading and starting programs with an automatically starting fastloader at 38,400 bits per second, and cbmlink for remote access and disk transfers.
The disk drive interface can be utilised for data transfers in two ways: the host computer can either directly serve files to the 8-bit Commodore computer, emulating a disk drive, or it can access the disk drive, posing as a 8-bit Commodore computer.
The 8-bit business computers of Commodore use a parallel connection to peripheral devices, which is also known as HPIB and General Purpose Interface Bus. This bus is still used in some laboratory instruments, and controller cards are available for IBM PC compatibles, albeit at a very expensive price.
Hardware projects related to IEEE-488 include LPT2IEC, an IEEE-488 based GNU/Linux file server for the parallel port of IBM PC compatibles, designed by André Fachat. Jochen Adler's IEEE2IEC adapts IEEE-488 devices to Commodore serial bus, with or without JiffyDOS. André Fachat's PAR2SER adapts Commodore serial bus devices to the IEEE-488 bus.
Ruud Baltissen's CBM-HD is an IEEE-488 file server for MS-DOS computers equipped with serial and parallel port, implemented in Turbo Pascal.
Commodore developed a serial version of the parallel IEEE-488 bus. The serial bus is quite difficult for interfacing projects, because the protocol is very picky about the timing. In practice, all software that interfaces to this bus requires a dedicated computer or microcontroller, or real-time scheduling.
The correct timing is easiest to implement on a dedicated processor, such as the microcontroller in Asbjørn Djupdal's ATA hard disk controller. On IBM PC compatibles, it is hard to get the timing right, because the printer interface is usually clocked at a much lower speed than the processor. Nevertheless, there exists some software, mostly for MS-DOS.
File servers or floppy drive emulators include 1541emu by Ville Muikkula, VC1541 by Torsten Paul,
and the closed-source 64HDD by Nicholas Coplin. In order
to achieve real-time performance, all these tools run on MS-DOS. 1541emu has
the most extreme hardware requirements, since it emulates the
processor of the 1541 disk drive in real time, allowing fastloaders to
work. MS-DOS based file servers have a common drawback: the host
computer is exclusively reserved for serving the Commodore, unless the
server can be run in the MS-DOS emulation of
a multi-tasking operating system. However, such emulation can violate
the real-time constraints. In order to allow the Commodore file server
to exchange files with other computers, it may make sense to store all
files on another computer (
The most notable programs for accessing serial bus devices are Star Commander for MS-DOS by Joe Forster/STA, cbm4linux for Linux by Michael Klein, and cbm4win by Spiro Trikaliotis. VICE can access serial bus peripherals via cbm4linux and cbm4win.
For the Commodore Amiga, there exist several emulators that can access a disk drive connected to the printer port. The best such emulator is Frodo written by Christian Bauer. There are also some simpler utilities, like Easy1541, that merely copy data; see http://www.funet.fi/pub/cbm/crossplatform/transfer/Amiga/.
Other interfaces than the tape and disk are less convenient to use, because they require that a piece of software is loaded to the 8-bit Commodore computer first, usually by tape, disk, or even the keyboard.
A long time ago, the only transfer option was an RS-232 cable hooked to an RS-232 adaptor, and a terminal program. Typically, this allowed transfer rates of at most 1,200 bits per second.
Daniel Kahlin's Over5 allows transfer rates of 38,400 bits per second between an Amiga, PC or UNIX box and a Commodore 64 or Vic-20.
Groepaz's software for the Silversurfer add-on of the flash-based Retro Replay cartridge for the Commodore 64 has similar functionality to cbmlink and MagerValp's Serial Slave. The host programs are distributed in binary form for MS-DOS, Win32 and GNU/Linux on IA-32.
Christopher Jam's SnaffleUpADisk is a tool for the PAL models of Commodore 64 equipped with a 6551 cartridge and a 1541 disk drive. It transfers a 1541 disk to a POSIX compliant system in about five or six minutes. The code has only been tested under Apple Mac OS X versions 10.1.2 and 10.1.3, on a G4/AGP with a Keyspan USB to serial converter.
A direct parallel connection of an 8-bit Commodore to another computer is generally the fastest way to go, because multiple bits can be transferred at a time. This kind of utilities existed first for the Amiga and later for IBM PC compatibles.
Most utilities support only the Commodore 64, but Marko Mäkelä's cbmlink, the successor of prlink by him and Olaf Seibert, supports practically all 8-bit Commodores (PET, VIC-20, C64/SX-64, C16/C116/plus4, C128, PET II), Commodore Amiga, Win32, and POSIX compliant systems.
The main disadvantage of parallel connections is that the software requires access to low-level interfaces, which tend not to be available on modern operating systems. Linux and FreeBSD have general-purpose parallel port device drivers, but Win32 lacks them. Furthermore, it can be that future computers will lack a parallel port, and the software support for USB based adapters might not be flexible enough for this kind of interfaces. Last but not least, RS-232 tolerates hot-plugging and voltage potential differences better than the parallel interfaces of 8-bit Commodore computers.
The author believes that microcontrollers and RS-232 have the least compatibility problems now and in the foreseeable future.