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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
==============================================================<br />
| |<br />
| SECTORS PER SECTORS PER GRANULES PER MAXIMUM |<br />
| TRACK GRANULE TRACK CYLINDERS |<br />
| ----------- ----------- ------------ --------- |<br />
| 5" SDEN 10 5 2 96 |<br />
| 5" DDEN 18 6 3 96 |<br />
| 8" SDEN 16 8 2 77 |<br />
| 8" DDEN 30 10 3 77 |<br />
| |<br />
==============================================================<br />
Figure 5-2: Allocation for Single-Sided Floppy Media<br />
Figure 5-2 assumes single sided media. <strong>The</strong> DOS supports two-sided operation within the<br />
confines of the hardware interfacing the physical drives <strong>to</strong> the CPU. A two-headed floppy<br />
drive functions as a single volume with the second side treated as an extension of the<br />
first in a true cylinder structure. A bit in the Drive Control Table (DCT) indicates onesided<br />
or two-sided drive configuration.<br />
A winchester-type hard disk also has a similar configuration. However, since many<br />
different sizes of winchesters are available, the recommended configurations for<br />
representative hard drives are covered in chapter 6 - DISK FILE ACCESS AND CONTROL. For<br />
the purposes of this chapter, it is sufficient <strong>to</strong> mention that hard drives may use the<br />
first 203 GAT bytes <strong>to</strong> reference ALLOCATION information (positions X'00' through X'CA').<br />
Hard drives that exceed 203 physical cylinders require remapping or partitioning. Methods<br />
of achieving remapping and partitioning are also discussed in chapter 6.<br />
<strong>The</strong> following describes the structure of the Granule Allocation Table and the information<br />
contained in it. <strong>The</strong> numbers in angle brackets indicate the relative positions of the<br />
field within the GAT. Figure 5-3 illustrates the entire GAT.<br />
5.2.1 ALLOCATION TABLE - <br />
This table contains a bit image of what space is available for use (and conversely what<br />
space is not available). GAT+0 corresponds <strong>to</strong> cylinder 0, GAT+1 corresponds <strong>to</strong> cylinder<br />
1, GAT+2 corresponds <strong>to</strong> cylinder 2, and so forth. As previously noted, bit 0 of each byte<br />
corresponds <strong>to</strong> the first granule on the cylinder, bit 1 corresponds <strong>to</strong> the second<br />
granule, etc. A "1" indicates the granule is not available for use. <strong>The</strong> amount of GAT<br />
space assigned <strong>to</strong> this table permits a maximum of 96 cylinders; however, the formatter<br />
restricts the format of 8" media <strong>to</strong> 77 cylinders.<br />
5.2.2 LOCKOUT TABLE - <br />
This table contains a bit image of what space has been locked out from use. Granules may<br />
be locked out because they either do not physically exist (i.e. granules 3-7 on 5-1/4"<br />
double density floppy media) or the verify process of the floppy formatter had detected a<br />
bad sec<strong>to</strong>r in a granule. <strong>The</strong> table corresponds on a cylinder for cylinder basis as does<br />
the allocation table. It is used specifically during mirror-image backup functions <strong>to</strong><br />
determine if the disk has the available capacity <strong>to</strong> effect a backup of the source<br />
diskette.<br />
5.2.3 EXTENDED ALLOCATION TABLE - <br />
This table is used in hard drive configurations by extending the ALLOCATION table from<br />
X'00' through X'CA' and omitting a distinct lockout table. <strong>The</strong> table then provides a<br />
capacity of up <strong>to</strong> 203 cylinders. <strong>The</strong> hard drive DBLBIT bit is available in the Drive<br />
Control Table <strong>to</strong> permit combining two physical cylinders in<strong>to</strong> a single logical cylinder<br />
provided the limit of 256 sec<strong>to</strong>rs per cylinder is not exceeded. This arrangement<br />
therefore provides support for up <strong>to</strong> 406 cylinders. Lockout information, where available,<br />
is generally denoted by setting the appropriate bit assigned in the ALLOCATION table.<br />
5-3