Page 1 of 1

Fat12/16 problems

Posted: Mon Jan 06, 2003 6:48 am
by FlashBurn
[attachment deleted by admin]

Re:Fat12/16 problems

Posted: Mon Jan 06, 2003 4:40 pm
by mr. xsism
what do u mean by garbage? Do u read in sector 0 index sector ok? try debugging it by printing ascii every step. That helps too :)

regards,
mr. xsism

Re:Fat12/16 problems

Posted: Wed Jan 08, 2003 11:42 am
by FlashBurn
With garbage I mean chars, which cannot be in the root-sir. Yes, I read in the first sector(bootsector) and calc the start of the root dir and the size. I think the start of the root dior is the problem. I get a number is this a logical sector or a normal sector just in the first track/head on the disk?

Re:Fat12/16 problems

Posted: Thu Jan 09, 2003 12:56 am
by Pype.Clicker
afaik. whatever sector nr you'll receive reading the FAT filesystem is a CLUSTER number. Which means you have to do

Code: Select all

chs = logical2chs(reserved_sectors + cluster_nr * cluster_size)
Check http://www.nondot.org/sabre/os/files/FileSystems/FatFormat.pdf in Operating System Resources Center for more infos.