SamurAchzar
Platinum Member
- Feb 15, 2006
- 2,422
- 3
- 76
Woo, I'm back... here we go:
1) Sorry, don't have a floppy driver. My system is all-flash based. It should be pretty straightforward though - a block device is merely a device with read/write/open/close/seek functions. Nothing more, nothing else.
You could probably do it very easily through BIOS interrupts, but I'm by no means an expert for PC programming.
2) You are correct in your understanding of the FAT table, it's exactly like that.
3) No hidden entries in the FAT. completely linear in this regard.
4) The entries in the directory list the beginning cluster of their associated data.
You just seek using the FAT. In my code fat_vol.c provides some low-level lookups for finding the FAT location associated with a specific data cluster, with regard to FAT offset on the disk etc. - that should be useful for you. I strongly recommend that you closely read that file - it's quite simple and contains all the annoying little tidbits you need.
5) The root directory is a pain. Generally, it does NOT use the FAT table, as it's contiguous.
It's comprised of a fixed number of clusters and immediately follows the FAT table.
You can see I've included somewhat different handling when it comes to root directory entries. Again, check fat_vol.c for that.
6) Yep, sector #2 after the FAT. I don't remember the size of the table off the top of my head, but it's of course fixed.
So basically, fat_vol.c contains the key to all your low level annoying problems, read that in you should have most of the stuff figured out. Not that I don't enjoy helping you guys out
Hope that helps, good luck
1) Sorry, don't have a floppy driver. My system is all-flash based. It should be pretty straightforward though - a block device is merely a device with read/write/open/close/seek functions. Nothing more, nothing else.
You could probably do it very easily through BIOS interrupts, but I'm by no means an expert for PC programming.
2) You are correct in your understanding of the FAT table, it's exactly like that.
3) No hidden entries in the FAT. completely linear in this regard.
4) The entries in the directory list the beginning cluster of their associated data.
You just seek using the FAT. In my code fat_vol.c provides some low-level lookups for finding the FAT location associated with a specific data cluster, with regard to FAT offset on the disk etc. - that should be useful for you. I strongly recommend that you closely read that file - it's quite simple and contains all the annoying little tidbits you need.
5) The root directory is a pain. Generally, it does NOT use the FAT table, as it's contiguous.
It's comprised of a fixed number of clusters and immediately follows the FAT table.
You can see I've included somewhat different handling when it comes to root directory entries. Again, check fat_vol.c for that.
6) Yep, sector #2 after the FAT. I don't remember the size of the table off the top of my head, but it's of course fixed.
So basically, fat_vol.c contains the key to all your low level annoying problems, read that in you should have most of the stuff figured out. Not that I don't enjoy helping you guys out
Hope that helps, good luck