Saturday, 6 October 2018

Reading Long File Names on FAT formatted SD cards

FAT drivers have been embedded in smsq/e for some time. Initially FAT12 for DOS formatted floppy disks and now FAT16 for the Q68. One frustrating thing about the drivers is that they only support the DOS short file name naming convention of 11 characters. This truncates names and makes it difficult to identify files in a list of similarly named files as shown.


The conventions for constructing LFNs can be found on the internet so after a bit of SBASIC work here is a first iteration of a menu system to manage files via their LFN on FAT 16 formatted disks.

The interface still needs a bit of work.

Multiple files can now be copied, moved or deleted from the FAT16 formatted SDHC card using their LFNs.

2 comments:

  1. Good work. It's amazing that the current patent status for LFN is still very much unclear, I guess they must have expired by now but couldn't find any confirmation. Still sooner or later it could be part of the OS.

    By the way, it's FAT32, not FAT16.

    ReplyDelete
  2. I was unaware that the LFN structure was patented as the info is easily found on the web. To clarify I was using FAT16 to indicate that the SDHC card was formatted less than 2GB so was in the MS FAT(16) structure (16bit pointers) rather than FAT32 with 32 bit pointers. FAT32 formatted disk LFNs is an obvious next step.

    ReplyDelete