SIOCOPY Parallel-Port Drive Cable (1994)

Year
1994
Type
DIY project
Category
PC-to-Atari-drive cable
Manufacturer
Homebrew (Michael Munoz)

Overview

Most ways of connecting a PC to Atari hardware go through the PC's serial port and need a level converter, as in SIO2PC and its 1050-2-PC mode. In July 1994 Michael Munoz took a different route. A PC's parallel port uses TTL levels, the same 0–5 V signalling as the Atari's SIO bus, so an Atari disk drive can be wired straight to it. His DOS program SIOCOPY then generates and reads the SIO serial signals entirely in software, which is known as "bit-banging", and copies a whole disk into a file on the PC's hard disk.

Munoz released the C++ source with the executable and called it both the beta and the final release. He had only tested it on his own 33 MHz 486DX. It would not run on his 12 MHz 286. Copies survive in the Nir Dary collection on ftp.pigwa.net.

The cable

PC parallel port (DB-25 male) Atari SIO (13-pin) Signal
1 7 Command (PC to drive)
14 5 Data out of the drive (drive to PC)
16 10 +5 V / Ready (PC to drive)
17 3 Data into the drive (PC to drive)
24 4 Ground
25 6 Ground

Pins 1, 14, 16 and 17 are the parallel port's control lines, which can be both written and read. Keep the cable under 3 feet. The drive must be the only thing on its SIO chain. In particular, don't connect an Atari computer at the same time. Munoz wrote that, because both sides use TTL levels, a miswired cable can't damage anything, even if pins are shorted to ground. Even so, check your wiring with a meter before you power up.

How the software works

  • Timing: SIOCOPY first calibrates a delay loop against the PC's 8253 timer, measuring how many loop passes fill half a bit period at the chosen baud rate. That's why CPU speed matters. Too slow a machine can't keep up.
  • Baud rate: 19,200 bit/s by default, adjustable on the command line because real drives vary slightly. Munoz found 18,250–19,400 the workable range, and noted in the source that about 18,350 seemed most reliable.
  • Protocol: it sends normal SIO command frames: Status ($53), Read Sector ('R'), and the PERCOM configuration commands ($4E read, $4F write) to set the drive's format. It checks the ACK and Complete bytes, and the checksum of every sector. A checksum error stops the copy with "Bad disk, copy protected disk or wrong disk type".
  • Output: a raw dump of every sector with no header, the same layout as an XFD image. Munoz used .sd and .ed extensions for single and enhanced density. To use the file in an emulator, rename it to .xfd or convert it to ATR.

Using it

siocopy test.sd            (single density, 720 sectors)
siocopy test.ed -e         (enhanced density, 1040 sectors)
siocopy myfile.sd -s 18750 (single density at 18,750 bit/s)

The program was written for the primary parallel port, LPT1. Its control-port address is hard-coded in the source, and you must edit every port read and write to use another port.

Limitations

  • Double density never worked. Munoz couldn't work out the format: the first four sectors appeared to be single density and the rest double, and he left it for someone else to finish.
  • It reads drive 1 only, and only makes images. It can't write images back to disk.
  • The timing loop assumes real DOS on a PC of the right speed. Under Windows, or on a modern PC with a USB or PCIe parallel adapter, the bit-banging won't hold.

Today

The modern way to read real disks on a PC is a 1050-2-PC or ProSystem-style cable with APE ProSystem, AtariSIO's atarixfer or ALibPc, or Lotharek's dual-mode 10502PC USB interface (see USB SIO2PC cable). SIOCOPY is still a neat demonstration of how little hardware SIO really needs.

Credits