Geometry From Fixed Disk Parameter Table

The Fixed Disk Parameter Table (FDPT), a structure which is normally constructed by the BIOS at POST time, is utilized to determine actual geometry. The FDPT for the drive is referenced by the address contained in the INT 41h or INT 46h vectors for the master and slave drive, respectively, on the primary controller. The primary controller is the IDE controller whose base port address is 1F0h. For determination of actual disk geometry, the table must be constructed as described below:

FDPT_Apparent_Cyls    dw ?  ; # of apparent cylinders
FDPT_Apparent_Heads   db ?  ; # of apparent heads
FDPT_Signature        db ?  ; signature (Axh)
FDPT_Actual_SPT       db ?  ; # of actual sectors per track
FDPT_Precompensation  dw ?  ; write precompensation
FDPT_Reserved         db ?  ; reserved
FDPT_Control          db ?  ; drive control byte
FDPT_Actual_Cyls      dw ?  ; # of actual cylinders
FDPT_Actual_Heads     db ?  ; # of actual heads
FDPT_Landing          dw ?  ; landing zone
FDPT_Apparent_SPT     db ?  ; # of apparent sectors per track
FDPT_Checksum         db ?  ; checksum byte

The checksum of the entire table must be zero. Therefore, the checksum byte should be chosen to cause the summation of all of the bytes in the table to equal 00h. The signature must be set to Axh (only the high nibble is checked). These two characteristics indicate that translation is occurring in the BIOS, and that the actual geometry in the table is correct.

Once the two characteristics described above have been verified by Windows 95, the parameters for the actual number of heads, sectors per track, and cylinders are extracted from the table and are used as the actual geometry of the drive. Windows 95 then verifies that the actual and apparent geometry values that have been retrieved do indeed facilitate accessing the disk drive correctly.