Re: Embedded FAT16 -> FAT copy handling



nono240-no-spam@xxxxxxxxxx wrote:
Hi all,

I've successfully implemented a FAT16 on my CF, but i don't know how to
deal with the fat copy !

When modidying the original FAT, should i *REALLY* have to modify the
2nd FAT for each writes, or operating systems can handle *some* errors
in the 2nd fat ?

Thank you.


As far as I remember, the FAT format allows for 1, 2, or 3 copies of the FAT. DOS and Windows use two copies, and which they always update when writing. However, they only ever read the first copy - the second copy is ignored, so they will not notice if it is not updated. It may be that that will compare the two FATs during a chkdsk, but even then they treat the first copy as correct (after all, without any checksums or timestamps, there is no way of identifying the correct version). Other implementations of FAT might be more sophisticated and spot inconsistencies.
.