ProDOS 8 #16: How to Format a ProDOS Disk Device

Apple II Technical Notes Developer Technical Support

Revised by: Matt Deatherage November 1988
Revised by: Pete McDonald November 1985

This Technical Note supplements the ProDOS 8 Technical Reference Manual in its description of the low-level driver call that formats the media in a ProDOS device.


The ProDOS 8 Technical Reference Manual describes the low-level driver call that formats the media in a ProDOS device, but it neglects to mention the following:


1. It does not work for Disk II drives or /RAM, both of which ProDOS treats specially with built-in driver code.
2. ProDOS has no easy way to tell you whether a device is a Disk II drive or /RAM.

Once ProDOS finishes building its device table, which it does when it boots, it no longer cares about what kind of devices exist, so it does not keep any information about the different types of devices available. ProDOS identifies Disk II devices and installs a built-in driver for them. When it has installed all devices which are physically present, ProDOS then installs /RAM, in a manner similar to Disk II drives, by pointing to the driver code which is within ProDOS itself. This method presents a problem for the developer who wishes to format ProDOS disks since the Disk II driver and the /RAM driver respond to the FORMAT request in non-standard ways, yet there is no identification in the global page that tells you which devices are Disk II drives or /RAM.

The Disk II driver does not support the FORMAT request, and the /RAM driver responds by "formatting" the RAM disk and also writing to it a virgin directory and bitmap; neither of these two cases is documented in the ProDOS 8 Technical Reference Manual. To write special-case code for these two device types, you must be able to identify them, and the method for identification is available in ProDOS 8 Technical Note #21: Identifying ProDOS Devices.

You should note, however, that AppleTalk network volumes cannot be formatted; they return a DEVICE NOT CONNECTED error for the FORMAT and any low-level device call. You may access AppleTalk network volumes through ProDOS MLI calls only.

Also note that Apple licences a ProDOS 8 Formatter routine, which correctly identifies and handles Disk II drives and /RAM. You should contact Apple Software Licensing at Apple Computer, Inc., 20525 Mariani Avenue, M/S 38-I, Cupertino, CA, 95014 or (408) 974-4667 if you wish to license this routine.

Further Reference