You could try looking at application notes, or device driver libraries,
for embedded processors that have USB mass storage device drivers.
There should/may be one that implements a proper FAT system.
An example of this would be the STM32 USB device library (mass
storage device example), although I suspect that this particular
example may emulate rather than implement a FAT system.
(it's called STM32_USB-FS-Device_Lib)