Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

fd(7)                           (RM400 only)                          fd(7)

NAME
     fd - floppy disk driver

DESCRIPTION
     Floppy disks are used on the RM400 mainly for access to key disks dur-
     ing the installation of optional software packages.

     Floppy disks are accessed through the special files in the /dev/at/flp
     directory (see FILES).

     The following devices are supported:

     [r]fx3d[t]     These devices refer to double density floppy disks with
                    9 sectors per track, the devices ending in t access the
                    entire disk, providing 720 kbytes of formatted storage,
                    the devices without the t access all but the first
                    cylinder, providing 711 kbytes of formatted storage.

     [r]fx3h[t]     These devices refer to high density floppy disks with
                    18 sectors per track, the devices ending in t access
                    the entire disk, providing 1.44 mbytes of formatted
                    storage, the devices without the t access all but the
                    first cylinder, providing 1.422 mbytes of formatted
                    storage.

     [r]f0[t]       These are the auto-detection devices that probe the
                    floppy disk inside the drive in order to determine the
                    format. Again, the devices ending in t access the
                    entire disk, providing 720 kbytes or 1.44 mbytes of
                    formatted storage, those without the t access all but
                    the first cylinder, providing 711 kbytes or 1.422
                    mbytes of formatted storage. Obviously these devices
                    can only be used if the floppy disk inside the drive
                    has already been formatted.

     All t-devices have 80 cylinders, 2 heads and 512 bytes per sector.

DEVICE NUMBERS
   Major Device Number
     The floppy disk driver fd has the major number 23 for both the block
     special and character special devices.

   Minor Device Number
     The minor device number selects one of the recording formats and the
     partition of the floppy disk the user wishes to access.










Page 1                       Reliant UNIX 5.44                Printed 11/98

fd(7)                           (RM400 only)                          fd(7)

     The recording formats currently supported are:

          6: for double density floppy disks ([r]fx3d[t])

          7: for high density floppy disks ([r]fx3h[t])

          8: for the auto-detection mechanism ([r]f0[t])

     The partitions currently supported are:

          0: for access to the entire disk (all 80 cylinders, device name
             ending in t)

          2: for access to all but the first cylinder of the disk (i.e. to
             the cylinders 1 to 79, device names not ending in t)

     The minor number can then be computed by "format * 16 + partition * 2".

IOCTLs
     The ioctl(2) system calls have the form

          ioctl(fd, command, arg)
          int fd, command;
          /* see below for arg */

     The floppy disk driver fd currently supports 5 ioctl-requests:

     VGETPARMS
          Retrieve device parameters (device type, number of heads, number
          of cylinders, number of sectors per track, etc.). arg is a
          pointer to the following structure:

          struct diskparms
          {
              char    dptype;       /* Disk type (see below) */
              unchar  dpheads;      /* Number of heads */
              ushort  dpcyls;       /* Number of cylinders */
              ushort  dpsectors;    /* Number of sectors/track */
              ushort  dpsecsiz;     /* Number of bytes/sector for this
                                        partition */
              ushort  dpptag;       /* Partition tag */
              ushort  dppflag;      /* Partition flag */
              daddrt dppstartsec;  /* Starting absolute sector number */
              daddrt dppnumsec;    /* Number of sectors */
          }

          The floppy disk driver will always set dptype to DPT_FLOPPY to
          denote a floppy disk drive. Currently the driver will always set
          dpheads to 2, fdcyls to 80, dpsecsiz to either 9 (double den-
          sity) or 18 (high density), and dpsecsiz to 512. dpptag and
          dppflag are currently unused and set to 0. dpstartsec and
          dpnumsec are set according to the selected partition.


Page 2                       Reliant UNIX 5.44                Printed 11/98

fd(7)                           (RM400 only)                          fd(7)

          The total capacity of the partition can be calculated with the
          formula:

                         "arg->dpsecsiz * arg->dppnumsec".

     VFORMAT
          Format one or more tracks with a specified interleave factor
          (this function is not available on the auto-detection devices f0,
          rf0, f0t and rf0t). arg is a pointer to the following structure:

          struct iafmt
          {
              ushort starttrk;  /* first track # */
              ushort numtrks;   /* number of tracks to format */
              ushort intlv;      /* interleave factor */
          };

          For compatibility with industry standard PCs, the sectors in each
          track will be numbered starting with sector number 1.

     FDOR
          Reset the floppy disk drive to a known state, arg is a pointer to
          a character. If that character has the third-lowest bit reset,
          then the drive will be reset.

     FFCR
          Change the data transfer rate, arg is a pointer to a character.
          The two least significant bits select one of three transfer
          rates:

          0  selects 500 kbits per second transfer rate,

          1  selects 300 kbits per second transfer rate,

          2  selects 250 kbits per second transfer rate, and

          3  selects 125 kbits per second transfer rate (this value is
             currently unsupported).

     FDTYP
          Determine the drive type.

          arg is a pointer to an unsigned character, which will be set to 4
          denoting a 3.5" floppy disk drive.










Page 3                       Reliant UNIX 5.44                Printed 11/98

fd(7)                           (RM400 only)                          fd(7)

FILES
     /dev/at/flp/f0

     /dev/at/flp/rf0

     /dev/at/flp/f0t

     /dev/at/flp/rf0t

     /dev/at/flp/fx3d

     /dev/at/flp/rfx3d

     /dev/at/flp/fx3dt

     /dev/at/flp/rfx3dt

     /dev/at/flp/fx3h

     /dev/at/flp/rfx3h

     /dev/at/flp/fx3ht

     /dev/at/flp/rfx3ht






























Page 4                       Reliant UNIX 5.44                Printed 11/98

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