Let's be realists in 2023 chances are if you buy an FDS disk you're going to get a used disk (unless you're willing to pay a huge amount of money) that could have been rewritten multiple times so goodbye verification.
Don't get me wrong I think it's absolutely a good idea to dat sealed dumps, however, I am wondering if two sets could be created for FDS (2 different dat files)
- Set 1: Sealed FDS dump: The cream of the crop unmodified disks.
- Set 2: Normalized FDS dump: Used disks, the dump is post processed through a tool to "Normalize" it essentially nullifying variable fields in the header and resetting/removing save files.
I think there should be an automated way to verify dumps without involving the actions of a human being. Plus I don't think anyone likes to dive into hex dump to verify a thousand dumps manually. So that's were my idea of set 2 comes in.Verification with FDS games is difficult because the hashes never match up due to the way FDS files work and are created. FDS headers contain a large amount of information that can be different from dump to dump despite the game being identical. Rewrite dates, or dates they were created along with the fact that disks get modified when read for the first time in some cases can make verification quite a chore. However to be sure it's best to submit them via the No-Intro forums and see if someone there can take a closer look at the actual game files to ensure they look correct.
Personally I want to verify two things:
- Is the actual game data/program correct? (no corruption) I don't really care about the metadata in the headers unless it affects the way the game is played or loaded
- Will the game run in an emulator. If it can run in an emulator then I'm fine with it.
- FDS file header: This is 16 bytes added to the top of the FDS file by the dump tool (FDSStick) it's similar to the iNES header for NES dumps. It's much simpler tho since the only information it adds is the number of sides on the disk: https://www.nesdev.org/wiki/FDS_file_format
- FDS Disk Format: This is the actual format on the disk created by Nintendo. It contains a large amount of information that can vary from disks to disks and thus mess up verification: https://www.nesdev.org/wiki/FDS_disk_format
- The FDS header can safely be removed if it is present in the first 16 bytes of the dump. The rom in the DoM right now are headerless
- Manufacturing date (3 bytes): Can be different from disk to disk, reset to 0
- Offset $27 of block 1 (5 bytes): This is listed as "Unknown Speculative: some kind of game information representation?" In some pages of the DoM in the comments I've seen these bytes labelled "Disk ID" these seem to be different from disk to disk so I suggest resetting to 0
- Rewritten Disk Date (3 bytes): This is the date the disk was last rewritten at a Nintendo kiosk. If never rewritten it should be the same ad manufacturing date. This can obviously change and should be reset to 0
- Disk Writer serial number (2 bytes): When a disk is rewritten at a kiosk the writer puts its id number here. When never rewritten it's equal to 0xFFFF. I think it should be reset to 0xFFFF
- Disk rewrite count (1 byte): The number of time a disk was rewritten at a kiosk. Incremented by one each time it is rewritten. Should be reset to 0
- All the above is perfectly fine for game that don't keep a save file on disk but some games keep a save file.
- Unfortunately there's no standard file name for save file, although they are often a variation of SAVE, SAV, SAVEDATA, etc.
- From the FDS files I observed, it seems like the save file is always the last file on SIDE A and/or SIDE B of the disk
- The data area of the save file can be reset to all 0's or all 0xFF's
- The save file can be deleted altogether. That means the File amount block (block 2) must be decremented by one, the area where the save data is stored (block 4) must be reset to all 0's or all 0xFF's and the File header block (block 3) that contains file name and size must be deleted for the save file
It seems like sometimes at the end of side A and/or B there are garbage bytes that looks like this
Code: Select all
DB B6 6D DB B6 6D DB B6 6D DB B6 6D DB B6 6D DB B6
I have already written code to parse FDS file that can be found here https://gitlab.com/VincentEmond/readfds. I can modify this code to provide an easy way to normalize an FDS dump but I'd like to have the input of FDS savvy people and other FDS dumper/datters before doing anything.
I can also provide help in updating the FDS dumping guide in the wiki.
So the discussion is open what do you think?
PS: The only reliable way I've found to validate my disks right now is this website: https://pony.velvet.jp/fcdisk/fdsstdylst.html (in japanese) it contains the internal listing of files with CRC32. Unfortunately the dats were not helpful to me at all.