Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fd(4S) — OS/MP 4.1A3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

read(2V)

write(2V)

dkio(4S)

FD(4S)  —  DEVICES AND NETWORK INTERFACES

NAME

fd − disk driver for Floppy Disk Controllers

CONFIG — S4000

controller fdc0 at obio ? csr 0x8000C000 priority 11
disk fd0 at fdc0 drive 0

DESCRIPTION

The fd driver provides an interface to floppy disks using the Intel 82077 disk controller on Solbourne S4000 systems. 

The minor device number in files that use the floppy interface encodes the unit number as well as the partition.  The bits of the minor device number are defined as rrruuppp where r=reserved, u=unit, and p=partition.  The unit number selects a particular floppy drive for the controller.  The partition number picks one of eight partitions [a-h]. 

When the floppy is first opened the driver looks for a label in logical block 0 of the diskette.  If a label is found, the geometry and partition information from the label will be used on each access thereafter.  The driver first assumes high density characteristics when it tries to read the label.  If the read fails it will try the read again using low density characteristics.  If both attempts to read the label fail, the open will fail.  Use the FNDELAY flag when opening an unformatted diskette as a signal to the driver that it should not attempt to access the diskette.  If block 0 is read successfully, but a label is not found, the open will fail for the block interface.  Using the raw interface, the open will succeed even if the diskette is unlabeled.  Default geometry and partitioning are assumed if the diskette is unlabeled. 

The default partitions are:

a −> 0, N-1

b −> N-1, N

c −> 0, N

where N is the number of cylinders on the diskette. 

The fd driver supports both block and raw interfaces.  The block files access the disk using the system’s normal buffering mechanism and may be read and written without regard to physical disk records.  There is also a “raw” interface that provides for direct transmission between the disk and the user’s read or write buffer.  A single read(2V) or write(2V) call usually results in one I/O operation; therefore raw I/O is considerably more efficient when many words are transmitted.  The names of the raw files conventionally begin with an extra ‘r’. 

FILES

Note: the fd driver on the S4000 system auto-senses the density of the floppy. 

/dev/fd0[a-c] block file

/dev/fd0 block file (same as /dev/fd0c)

/dev/rfd0[a-c] raw file

/dev/rfd0 raw file (same as /dev/rfd0c)

SEE ALSO

read(2V), write(2V), dkio(4S)

DIAGNOSTICS

fd%d: %s failed (%x %x %x)
The command, %s, failed after several retries on drive %d. The three hex values in parenthesis are the contents of status register 0, status register 1, and status register 2 of the Intel 82072 Floppy Disk Controller on completion of the command as documented in the data sheet for that part. This error message is usually followed by one of the following, interpreting the bits of the status register:

fd%d: not writable

fd%d: crc error

fd%d: overrun/underrun

fd%d: bad format

fd%d: timeout

Solbourne Computer, Inc.  —  11 October 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026