Well I have been working on a method for using USB flash to load ROM information onto a NES. To take care of the filesystem writing I have decide to just use an image file, instead of wasting time learning FAT. Here is the initial super beta specsheet!
NesFS Spec V.00000000001
This "file system" is designed for use with USB flash media.
NESFS is simply an image file inside another type of file system. This removes the need to implement handlers for Fat12, Fat16, Fat32, NTFS, Reiserfs, etc. For it to work with a particular file system, it must be a contiguous file and the file system must not do any type of error checking. It seems to work fine with Fat16 with the testing I have done.
The image file must be at least X bytes big. (Ok I am not done with the overhead, but since this is designed with usb flash in mind this shouldn't be a problem anyway)
In order to eliminate the need for any real knowledge of the used file system, the nes (or some other hardware) will search out a unique header shown in the header memory map.
0 1 2 3 4 5
N E S F S 02h
4E 45 53 46 53 02
The next 4 bytes is the size of the image in 512 byte increments. Here's an example.
6 7 8 9
C8 EF 01 00 - 126920 512 byte sectors
After the header is the rom information. This will be found by cutting off the rom header, calculating the CRC, then checking it against an internal list. If found the board name and other information needed for running on the NES will be inserted into the NESFS. If not found the user will be prompted to enter this info manually. If the string "DISKDUDE" is found, a rocket punch will be initiated. All this information plus the actual filesize will be provided in a yet to be devised manner.
Final NESFS structure