29.12.2012 Views

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

accessed a single-sided diskette, the system will not recognize the second<br />

side of the new diskette until the logging process. When the DCT is<br />

associated with a hard disk drive, this bit may be used <strong>to</strong> indicate that a<br />

logical cylinder represents two physical cylinders thereby providing support<br />

for twice as many cylinders as limited by the Granule Allocation Table (the<br />

GAT limits the number of logical cylinders <strong>to</strong> 203 - thus by using this bit,<br />

hard drives <strong>to</strong> 406 cylinders can be supported as a single logical drive). In<br />

the case of hard drives, this bit is termed the "DBLBIT" bit.<br />

Bit 4 This bit is used <strong>to</strong> indicate the controller associated with the DCT position<br />

is an "alien" controller. <strong>The</strong> term, "alien", refers <strong>to</strong> a controller that<br />

does not return index pulses in its status register. <strong>The</strong> system uses index<br />

pulse transitions in a finite time period (usually 0.5 seconds) <strong>to</strong> detect<br />

the presence of a rotating diskette. If a disk drive does not contain a<br />

diskette, or does but the drive door is open, the status obtained on<br />

continuous selection of the drive will not indicate the presence of any<br />

index pulse transitions. By examining the state of the index pulse over a<br />

period of time corresponding <strong>to</strong> 2.5 possible rotations of a disk, the lack<br />

of an OFF-ON-OFF transition state will indicate that the drive is not<br />

available. If a controller does not return the state of an index pulse in<br />

the controller status byte, then the system will never be able <strong>to</strong> detect the<br />

availability of the drive if it maintains the state transition examination<br />

in the logging process. This bit should be set when such controllers are<br />

used <strong>to</strong> inhibit the @CKDRV routine from performing such an examination and<br />

proceed <strong>to</strong> the configuration logging.<br />

Bits 3-0 This subfield is used for different purposes depending on whether the drive<br />

associated with the DCT is a floppy drive or a hard drive. For floppies, the<br />

field contains the physical drive address (1, 2, 4, or 8) corresponding <strong>to</strong><br />

the drive select line (DS0, DS1, DS2, or DS3). Thus, only one of the four<br />

bits will ever be set. Hard drive installations that partition a drive by<br />

head, may use this field <strong>to</strong> indicate the relative starting head number of<br />

the logical drive partition. This provides support for a drive of up <strong>to</strong> 16<br />

heads although 4 heads is typical.<br />

4.2.4 CURCYL - <br />

This field is used for different purposes depending on whether the drive associated with<br />

the DCT is a floppy drive or a hard drive. For floppies, the field is used by the disk<br />

driver <strong>to</strong> s<strong>to</strong>re the current cylinder position of the disk drive assigned <strong>to</strong> the DCT<br />

position. Since a Floppy Disk controller is used <strong>to</strong> access up <strong>to</strong> four different drives,<br />

when it accesses a drive, its track register must be loaded with correct information as<br />

<strong>to</strong> the current track position of the head. <strong>The</strong> current cylinder position is maintained by<br />

the disk driver in this s<strong>to</strong>rage field. <strong>The</strong> driver can then be use this field <strong>to</strong> reload<br />

the FDC track register prior <strong>to</strong> a seek operation and update the field <strong>to</strong> the cylinder<br />

requested in the seek. Hard disk controllers generally contain their own internal track<br />

register that is not accessible <strong>to</strong> a software driver. This means that hard disk drivers<br />

do not need <strong>to</strong> maintain the current cylinder position in this field. <strong>The</strong> field is thus<br />

available for the s<strong>to</strong>rage of other data items as required by the hard disk driver. Other<br />

data items may include the <strong>to</strong>tal quantity of heads on the physical drive (as needed by<br />

XEBEC controllers), the complex drive select code (as used by Lobo Drives UniVersal<br />

Controller), or data associated with drive partitioning by cylinder rather than by head.<br />

4.2.5 MAXCYL - <br />

This field contains the highest numbered logical cylinder on the drive referenced from a<br />

starting cylinder numbered "0". Thus, a 35-cylinder drive would be entered as X'22', a<br />

40-cylinder drive as X'27', and an 80-cylinder drive as X'4F'. A typical 153-cylinder ST-<br />

506 compatible winchester drive would have an entry of X'98'. If a hard drive has more<br />

than 203 cylinders but less than 407 cylinders and is <strong>to</strong> be maintained as a single drive<br />

(or one partitioned by heads), then the system must access it as if each two physical<br />

4-6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!