Fat12/16 problems

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
FlashBurn

Fat12/16 problems

Post by FlashBurn »

[attachment deleted by admin]
mr. xsism

Re:Fat12/16 problems

Post 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
FlashBurn

Re:Fat12/16 problems

Post 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?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Fat12/16 problems

Post 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.
Post Reply