Kazinsal wrote:
DMF does not use a different filesystem. A regular FAT12 driver can read a DMF-formatted floppy with a FAT12 filesystem on it provided the FAT12 driver isn't so daft as to presume there are 18 sectors per track on the floppy and instead reads the BPB, and so long as the floppy driver recognizes that there are 21 sectors per track on the floppy and adjusts its LBA-to-CHS calculations accordingly.
I never said the filesystem was
different, just that it's specified along with the physical format. DMF uses FAT12 with 16 root directory entries and larger clusters (I think 1 KiB but I don't have any disks I can check at the moment). You can use different parameters, but then it's not DMF anymore.
Kazinsal wrote:
XDF is a specification for modifying the sector layout of floppy disk tracks, not for the filesystem on top of it. In fact, IBM floppies that were XDF-formatted can be read by a plain FAT12 driver so long as the underlying floppy driver also recognizes the layout of the tracks and the sector interleaving and adjusts its LBA-to-CHS accordingly.
This is true, but only because a plain FAT12 driver will not try to read the second FAT and will not try to read sectors that are marked bad. The physical-to-logical mapping for XDF has two holes in it, where logical sectors don't correspond to any physical sectors. One hole is located in the second FAT, and the other is located at the start of the data area in clusters that are marked bad. According to fdutils and mtools, the mapping changes depending on the filesystem parameters, which means the disk must be formatted as FAT12 for those utilities to read the disk properly.
XDF also has an 8-sector compatibility area, which can be read on systems without XDF support. This compatibility area contains another FAT12 filesystem in order to alert the user that the disk is formatted as XDF. These sectors are mapped to the first 8 sectors of the second FAT when the disk is read using an XDF driver. If you want to use them for their intended purpose, the main filesystem must avoid them.
Kazinsal wrote:
Nothing about the filesystem on DMF and XDF formatted floppies changes outside of the information block that informs the driver of the parameters of the media itself, which is entirely within the base FAT12 specifications. Hell, you can even read a FAT12 filesystem on an image of an XDF-formatted floppy with a plain FAT12 image reader because FAT12 uses logical cluster numbering and it's all just a linear stream of ones and zeroes if the "floppy disk" is just a block of RAM.
You can write a DMF disk with an ordinary FAT12 driver, but not an XDF disk.