[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Sorry if I missed this elsewhere.

Questions on understanding Tracks/Sectors/Heads and LBA:

When MYIDE.ASM or MYIDEROM.ASM is first ran it reports info on the CF card including the Cylinder/Head/Sector counts for that card. Can I trust these values?

Are 'heads' taken into consideration in the code (CHS to LBA conversion)? Based on my review of the code and the comments it seems 'heads' are not taken into account.

From my limited research (wikipedia) the data below shows how to map CHS to LBA; I've done some simple Excel work and the formula below works as expected for my small CF cards taking into account the reported CHS values from MYIDEROM.

CHS (cylinder/head/sector) tuples can be mapped to LBA address with the following formula:

LBA=((C \times HPC) + H ) \times SPT + S -1

·       C, H and S are the cylinder number, the head number, and the sector number

·       LBA is the logical block address

·       HPC is the maximum number of heads per cylinder (reported by disk drive, typically 16 for 28-bit LBA)

·       SPT is the maximum number of sectors per track (reported by disk drive, typically 63 for 28-bit LBA)