In OSDev6, BrokenThorn says the LBA to CHS conversion formulas are:
link: http://www.brokenthorn.com/Resources/OSDev6.htmlabsolute sector = (LBA % sectors per track) + 1
absolute head = (LBA / sectors per track) % number of heads
absolute track = LBA / (sectors per track * number of heads)
I believe the "absolute track" formula is incorrect and the correct set of equations should be:
Adding this would reduce confusion with people wondering why the code never multiplies by "number of heads".absolute sector = (LBA % sectors per track) + 1
absolute head = (LBA / sectors per track) % number of heads
absolute track = (LBA / sectors per track) / number of heads
I don't have permissions to edit the Wiki yet, but if this looks correct, I can add the reference.