Offset to Disk information
Offset to Disk information
How can I know the disk information (the cluster , side and track number ) of any OFFSET ( like 0x3533 ) ???
Here is a little C that will extract that information. LBA is the offset from the start of the disk in sectors (0 based). The rest looks pretty easy to figure out.
And here is some code to reverse the process.
Code: Select all
cylinder = LBA / ( heads_per_cylinder * sectors_per_track );
head = ( LBA / sectors_per_track ) % heads_per_cylinder;
sector = ( LBA % sectors_per_track ) + 1;
Code: Select all
LBA = ( (cylinder * heads_per_cylinder + heads ) * sectors_per_track ) + sector - 1;
-
- Member
- Posts: 62
- Joined: Fri Jun 29, 2007 8:36 pm