This guide is for developers of ATA/ATAPI software drivers. It does not attempt to treat hardware issues, such as connector layouts, termination, or signalling schemes. The guide came out of attempts to make OpenBSD communicate with my tape drive.
First, a little about the acronyms. IDE and ATA are synonymous. ATA is short for AT-attached, referring to the original IBM AT computer. The ATA acronym is preferred today over IDE. Why is it called AT-attached? The signals on the 40-pin ATA ribbon cable follow the timings and constraints of the ISA system bus on the IBM PC AT.
Luckily for the developer, many of the specifications needed to talk to ATA/ATAPI devices are public, national or international standards. This guide contains links to DRAFTS of those standards. The actual standards may be different and cost money. The ANSI T10 and T13 groups maintain the standards. Also, check out the Storage Resource Cornucopia maintained by Brian Berg.
The ATA/ATAPI interface has evolved over a period of 15 years, starting with the original PC AT hard disk. As of the writing of this page, the ANSI T13 committee is working on version 7 of the specification and a near final draft of version 6 is available. The document is quite complete.
Though ATA/ATAPI-6 describes the best current practices, there is often a need to understand the behavior of older devices. Here are links to drafts of the ATA-1 and ATA-2 specifications. Also, the ATAPI guys unsuccesfully described the ATA bus in their 8020 series of specifications; their descriptions, especially of master/slave issues, are full of bugs. Again, ATA/ATAPI-6 is the gold standard.
Intel and partners have architected a serial replacement to the ATA parallel bus. The specs can be downloaded off of the Serial ATA web site. They emulate the old parallel bus for backwards compatibility.
ATAPI devices include CD-ROMs, CD-Recordable, CD-RW, DVD, tape drives, some super-floppy drives (ZIP and LS-120), and changers.
Hosts control ATAPI devices using SCSI command packets. The SCSI command packets are transported over the ATA interface, instead of the parallel SCSI bus. This cool hack is described in ATA/ATAPI-6.
Different devices accept different sets of SCSI command packets. There are some differences in command packet format between ATAPI and SCSI. Mostly, these are simplifications, i.e. features are missing in ATAPI that would appear on a SCSI device. There are some areas, though, where ATAPI defined new commands and responses.
The set of SCSI command packets applicable to all SCSI devices is described in the SCSI-3 Primary Commands. Again, ATAPI devices don't implement all of these, so it's best to consult the associated ATAPI spec for a device.
The sections below enumerate the documents associated with the various devices.
CD-ROM command packets were originally described in INF-8020. This document contains many inaccuracies in its description of the ATA bus interface, so please double check any statements against ATA/ATAPI-6. (Unfortunately, some of those inaccuracies were implemented!)
Three groups seem to contribute to the latest CD/DVD specifications: ANSI T10 MMC, the SFF committee's 8090 group, and the Mt. Fuji group. The latest Mt. Fuji DVD command set related documents can be found here. The latest 8090 spec seems to be available here. The 8090 groups and Mt. Fuji groups seem to be the same and working on the same specification.
The ANSI T10 group also works on CD/DVD standards, through the Multimedia Command set (MMC) series of standards. ANSI T10 draft standards are found here.
The UDF file system found on most DVD-ROMs is described here and here.
INF-8070 describes the command packets used for removable disk devices, like many ZIP and LS-120 drives. The ANSI T10 committee has a couple relevant standards: the Standard Block Commands (SBC/SBC-2) and the Reduced Block Commands (RBC). The SBC is targeted at hard disks and the RBC is targeted at floppy drives and other simpler devices.
ATAPI tape devices are defined by QIC 157D. The command packets for ATAPI tape devices are a subset of the SCSI Streaming commands specification and QIC-121. Note, QIC 157D defines a bus release protocol for ATAPI tape devices which is NOT described in ATA/ATAPI-4 or ATA/ATAPI-5.
Two specs for generic PCI IDE controllers: programming and general.