Re: Windows 8.1 Effect on FAT12

Posted:
Fri Jun 20, 2014 10:04 am
by Tight Yorky
Hi,
pcbbc you are correct about the allocation, any cluster can be valid, and may be due to the history of transactions on the disk.
But just to expand on my previous post, that may not be obvious to a reader that has not seen the internal MSD code by MChip. There is no format command in the application, the FAT12 'disk' format is effectively coded in the 'C' file as constant byte arrays. So if the application is adapted for your own use, it is necessary to re-evaluate (all) the relevant sector entries to ensure the format is valid for an operating system to read. If you add or remove a pre-loaded file for example, the root dir, both FAT entries, the data cluster(sectors) have to be altered in the byte arrays.
hoosier, I find it easier to work with FAT12 by remaining in bytes rather than constructing words. Writing the bytes backwards helps interpret the FAT12 clusters (see the attached jpg which is a screen capture of an excel sheet).
You can be prevent Windows formatting your disk by preventing write access to LBA 0 and 1 (MBR/VBR) and returning an invalid command through the SCSI command reply.
Hope this assists.
T Yorky.
(I have posted here as MChip forum would not accept my post after over an hour of trying!)
Re: Windows 8.1 Effect on FAT12

Posted:
Tue Nov 24, 2015 10:34 pm
by bmernax30
Hey guys,
I feel like I'm running into a similar problem as in this post. I ended up stumbling upon this searching for an answer. My original post in the microsoft forums is in the link here.
http://answers.microsoft.com/en-us/wind ... 928ef6ffb7The jist of the problem seems to be Windows 8.1 and its ineffectiveness at handling a Fat12 system. In my problem I'm creating a 64KB USB mass storage from a Nuc123 series microcontroller. The code works fine on Windows 7, but in Windows 8.1 and 10 there's a 1Kb space that is detected as used and it won't allow a 64KB bin file to go in there. What's weird is the problem resolves itself after I put the computer to sleep and wake it back up. The 1Kb used space disappears.
Can anyone help give me some more information on Windows 8.1 and its issues with FAT12?
I've looked into the code and I think the program revolves around reading the format data block and Windows trying to fix a problem in that which screws everything up.