emmercm / igir

🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
https://igir.io/
GNU General Public License v3.0
356 stars 18 forks source link

nes roms being changed/corrupted #1346

Open w33ble opened 1 day ago

w33ble commented 1 day ago

Paste the command

igir copy --dat "No-Intro/Nintendo - Nintendo Entertainment System.dat" --input "/roms/.nes" --output "/output" --dir-dat-name --temp-dir "/output/tmp" --cache-path "/output/cache" --single --filter-language EN --filter-region USA,WORLD,EUR,JPN --prefer-region USA,WORLD,EUR --prefer-verified --prefer-good --prefer-retail --prefer-revision newer --reader-threads 10 --writer-threads 6 -v

Describe the bug

I tried a lot of incantations of this command. I also tried it both with extracted .nes files and with the GoodMerge 7z sources. The results are always the same, the output roms are modified and do not load in retroarch. Here is one example, but this happens with all my NES ROMs.

Input SHA1: 2e9897846e54a4a9865e87de7517c6710bdec255 roms/Excitebike (JU) [!].nes Output SHA1: ba8d9227a0d02b62ee6cb9e691fa5a5134c303a8 output/Nintendo - Nintendo Entertainment System (Headerless)/Excitebike (Japan, USA) (En).nes

The output of the file command in linux also indicates that the ouput is no longer an NES ROM.

$ file roms/'Excitebike (JU) [!].nes'
Excitebike (JU) [!].nes: NES ROM image (iNES): 1x16k PRG, 1x8k CHR [V-mirror]
$ file 'output/Nintendo - Nintendo Entertainment System (Headerless)/Excitebike (Japan, USA) (En).nes'
output/Nintendo - Nintendo Entertainment System (Headerless)/Excitebike (Japan, USA) (En).nes: data

I originally thought it was related to an issue with 7z extraction, which is why I extracted the files myself, but the result was the same. This also only seems to be happening with NES roms, all the other system ROMs I tried worked as expected.

Of note I think; while I was writing up this issue, I noticed that while the output does not match the source, the SHA1 of the output does match what's in the "Headerless" DAT file (neither match what's in the "Headered" DAT file). Maybe there is some change taking place because of the DAT file?

Expected behavior

copy should just copy the ROM without changing it. That's what the docs seem to indicate too.

Debug logs

 ______   ______   ______  _______
|      \ /      \ |      \|       \
 \$$$$$$|  $$$$$$\ \$$$$$$| $$$$$$$\
  | $$  | $$|    \  | $$  | $$    $$   ROM collection manager
  | $$  | $$|    \  | $$  | $$    $$   https://igir.io/
  | $$  | $$ \$$$$  | $$  | $$$$$$$\
 _| $$_ | $$__| $$ _| $$_ | $$  | $$   v3.0.0
|   $$ \ \$$    $$|   $$ \| $$  | $$
 \$$$$$$  \$$$$$$  \$$$$$$ \$$   \$$

TRACE: Parsing CLI arguments: copy --dat "/app/dat/No-Intro/Nintendo - Nintendo Entertainment System*.dat" --input /roms/*.nes --output /output --dir-dat-name --temp-dir /output/tmp --cache-path /output/cache --single --filter-language EN --filter-region USA,WORLD,EUR,JPN --prefer-region USA,WORLD,EUR --prefer-verified --prefer-good --prefer-retail --prefer-revision newer --reader-threads 10 --writer-threads 6 -vvv
TRACE: Parsed CLI options: {"_":["copy"],"input":["/roms/*.nes"],"inputExclude":[],"inputChecksumQuick":false,"inputChecksumMin":"CRC32","inputChecksumArchives":"auto","dat":["/app/dat/No-Intro/Nintendo - Nintendo Entertainment System*.dat"],"datExclude":[],"datNameRegex":"","datNameRegexExclude":"","datDescriptionRegex":"","datDescriptionRegexExclude":"","datCombine":false,"datIgnoreParentClone":false,"patch":[],"patchExclude":[],"output":"/output","dirMirror":false,"dirDatName":true,"dirDatDescription":false,"dirLetter":false,"dirLetterCount":1,"dirLetterLimit":0,"dirLetterGroup":false,"dirGameSubdir":"multiple","fixExtension":"auto","overwrite":false,"overwriteInvalid":false,"cleanExclude":[],"cleanDryRun":false,"zipExclude":"","zipDatName":false,"symlink":false,"symlinkRelative":false,"header":"","mergeRoms":"fullnonmerged","excludeDisks":false,"allowExcessSets":false,"allowIncompleteSets":false,"filterRegex":"","filterRegexExclude":"","filterLanguage":["EN"],"filterRegion":["USA","WORLD","EUR","JPN"],"noBios":false,"onlyBios":false,"noDevice":false,"onlyDevice":false,"noUnlicensed":false,"onlyUnlicensed":false,"onlyRetail":false,"noDebug":false,"onlyDebug":false,"noDemo":false,"onlyDemo":false,"noBeta":false,"onlyBeta":false,"noSample":false,"onlySample":false,"noPrototype":false,"onlyPrototype":false,"noProgram":false,"onlyProgram":false,"noAftermarket":false,"onlyAftermarket":false,"noHomebrew":false,"onlyHomebrew":false,"noUnverified":false,"onlyUnverified":false,"noBad":false,"onlyBad":false,"single":true,"preferGameRegex":"","preferRomRegex":"","preferVerified":true,"preferGood":true,"preferLanguage":[],"preferRegion":["USA","WORLD","EUR"],"preferRevision":"newer","preferRetail":true,"preferParent":false,"reportOutput":"./igir_%YYYY-%MM-%DDT%HH:%mm:%ss.csv","datThreads":3,"readerThreads":10,"writerThreads":6,"writeRetry":2,"tempDir":"/output/tmp","disableCache":false,"cachePath":"/output/cache","verbose":3,"help":false,"d":["/app/dat/No-Intro/Nintendo - Nintendo Entertainment System*.dat"],"i":["/roms/*.nes"],"o":"/output","dir-dat-name":true,"D":true,"temp-dir":"/output/tmp","cache-path":"/output/cache","s":true,"filter-language":["EN"],"L":["EN"],"filter-region":["USA","WORLD","EUR","JPN"],"R":["USA","WORLD","EUR","JPN"],"prefer-region":["USA","WORLD","EUR"],"r":["USA","WORLD","EUR"],"prefer-verified":true,"prefer-good":true,"prefer-retail":true,"prefer-revision":"newer","reader-threads":10,"writer-threads":6,"v":3,"input-checksum-min":"CRC32","input-checksum-archives":"auto","dir-letter-count":1,"dir-game-subdir":"multiple","fix-extension":"auto","merge-roms":"fullnonmerged","report-output":"./igir_%YYYY-%MM-%DDT%HH:%mm:%ss.csv","dat-threads":3,"write-retry":2,"$0":"igir"}
TRACE: loading the file cache at '/output/cache'
TRACE: DATScanner: scanning DAT files
TRACE: DATScanner: found 2 DAT files
TRACE: DATScanner: enumerating DAT archives
TRACE: DATScanner: parsing 2 DAT files
TRACE: DATScanner: /app/dat/No-Intro/Nintendo - Nintendo Entertainment System (Headerless) (20240913-053249).dat: attempting to parse 1.6MB of XML
TRACE: DATScanner: /app/dat/No-Intro/Nintendo - Nintendo Entertainment System (Headerless) (20240913-053249).dat: parsed XML, deserializing to DAT
TRACE: DATScanner: /app/dat/No-Intro/Nintendo - Nintendo Entertainment System (Headerless) (20240913-053249).dat: 1GB of 4,170 games, 4,170 parents parsed
TRACE: DATScanner: /app/dat/No-Intro/Nintendo - Nintendo Entertainment System (Headered) (20240913-053249).dat: attempting to parse 1.9MB of XML
TRACE: DATScanner: /app/dat/No-Intro/Nintendo - Nintendo Entertainment System (Headered) (20240913-053249).dat: parsed XML, deserializing to DAT
TRACE: DATScanner: /app/dat/No-Intro/Nintendo - Nintendo Entertainment System (Headered) (20240913-053249).dat: 1GB of 4,165 games, 4,165 parents parsed
TRACE: DATScanner: done scanning DAT files
Scanning for DATs ... 2 DATs found
TRACE: ROMScanner: scanning ROM files
TRACE: ROMScanner: found 4 ROM files
TRACE: ROMScanner: done scanning ROM files
TRACE: ROMHeaderProcessor: processing headers in 4 ROMs
TRACE: ROMHeaderProcessor: /roms/Contra (U) [!].nes: reading potentially headered file by file contents
TRACE: ROMHeaderProcessor: /roms/Excitebike (U) [!].nes: reading potentially headered file by file contents
TRACE: ROMHeaderProcessor: /roms/Metroid (U) (PRG0) [!].nes: reading potentially headered file by file contents
TRACE: ROMHeaderProcessor: /roms/Super Mario Bros. 3 (U) (PRG1) [!].nes: reading potentially headered file by file contents
TRACE: ROMHeaderProcessor: /roms/Contra (U) [!].nes: found header by file contents: .nes
TRACE: ROMHeaderProcessor: /roms/Excitebike (U) [!].nes: found header by file contents: .nes
TRACE: ROMHeaderProcessor: /roms/Metroid (U) (PRG0) [!].nes: found header by file contents: .nes
TRACE: ROMHeaderProcessor: /roms/Super Mario Bros. 3 (U) (PRG1) [!].nes: found header by file contents: .nes
TRACE: ROMHeaderProcessor: found headers in 4 ROMs
TRACE: ROMHeaderProcessor: done processing file headers
TRACE: ROMIndexer: indexing 4 files
TRACE: ROMIndexer: found 4 unique files
TRACE: ROMIndexer: done indexing files
Scanning for ROMs ... 4 files found
TRACE: processing 2 DATs
TRACE: DATParentInferrer: Nintendo - Nintendo Entertainment System (Headered): inferring parents for 4,165 games
TRACE: DATParentInferrer: Nintendo - Nintendo Entertainment System (Headered): grouped to 3,225 parents
TRACE: DATParentInferrer: done inferring parents
TRACE: DATMergerSplitter: Nintendo - Nintendo Entertainment System (Headered): merging & splitting 4,165 games
TRACE: DATMergerSplitter: Nintendo - Nintendo Entertainment System (Headered): merged/split to 4,165 games
TRACE: DATMergerSplitter: Nintendo - Nintendo Entertainment System (Headered): done merging & splitting
TRACE: DATFilter: Nintendo - Nintendo Entertainment System (Headered): filtering DAT
TRACE: DATFilter: Nintendo - Nintendo Entertainment System (Headered): filtered to 1,759/4,165 games (363.9MB)
TRACE: DATFilter: Nintendo - Nintendo Entertainment System (Headered): done filtering DAT
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): generating candidates
TRACE: DATParentInferrer: Nintendo - Nintendo Entertainment System (Headerless): inferring parents for 4,170 games
TRACE: DATParentInferrer: Nintendo - Nintendo Entertainment System (Headerless): grouped to 3,230 parents
TRACE: DATParentInferrer: done inferring parents
TRACE: DATMergerSplitter: Nintendo - Nintendo Entertainment System (Headerless): merging & splitting 4,170 games
TRACE: DATMergerSplitter: Nintendo - Nintendo Entertainment System (Headerless): merged/split to 4,170 games
TRACE: DATMergerSplitter: Nintendo - Nintendo Entertainment System (Headerless): done merging & splitting
TRACE: DATFilter: Nintendo - Nintendo Entertainment System (Headerless): filtering DAT
TRACE: DATFilter: Nintendo - Nintendo Entertainment System (Headerless): filtered to 1,760/4,170 games (363.9MB)
TRACE: DATFilter: Nintendo - Nintendo Entertainment System (Headerless): done filtering DAT
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): generating candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): [BIOS] Demo Vision (USA) (Rev 2) (Program): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): [BIOS] Demo Vision (USA) (Rev 2) (Program) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): [BIOS] Wide Boy (World) (Rev 1): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): [BIOS] Wide Boy (World) (Rev 1) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): 10-Yard Fight (USA, Europe): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): 10-Yard Fight (USA, Europe) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): 10-Yard Fight (USA) (Retro-Bit Generations): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): 10-Yard Fight (USA) (Retro-Bit Generations) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): 1942 (Japan, USA) (En): found 0 candidates
< ...snip... no candidates found >
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zombie Nation (USA): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zombie Nation (USA) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zelda II - The Adventure of Link (Europe) (Rev 2) (Virtual Console): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zelda II - The Adventure of Link (USA) (Virtual Console) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zunou Senkan Galg (Japan) (En): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zen - Intergalactic Ninja (USA): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zen - Intergalactic Ninja (Europe) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): [BIOS] Demo Vision (USA) (Rev 2) (Program): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): [BIOS] Demo Vision (USA) (Rev 2) (Program) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zelda II - The Adventure of Link (Europe) (Rev 2): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): [BIOS] Game Genie (USA, Europe) (Unl): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): [BIOS] Game Genie (USA, Europe) (Unl) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): [BIOS] Wide Boy (World) (Rev 1): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): [BIOS] Wide Boy (World) (Rev 1) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 10-Yard Fight (USA, Europe): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 10-Yard Fight (USA, Europe) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zunou Senkan Galg (Japan) (En) (Beta): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zunou Senkan Galg (Japan) (En) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 10-Yard Fight (USA) (Retro-Bit Generations): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 10-Yard Fight (USA) (Retro-Bit Generations) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 1942 (Japan, USA) (En): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 1942 (Japan, USA) (En) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zelda II - The Adventure of Link (USA): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headered): Zelda II - The Adventure of Link (Europe) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 1943 - The Battle of Midway (USA): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 1943 - The Battle of Midway (USA) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 1943 - The Battle of Midway (USA) (Retro-Bit Generations): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): 1943 - The Battle of Midway (USA) (Retro-Bit Generations) (parent): found 0 candidates
< ...snip ... >
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Zunou Senkan Galg (Japan) (En) (Beta): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Zunou Senkan Galg (Japan) (En) (parent): found 0 candidates
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA) (parent): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Japan, USA) (En): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Europe) (parent): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Metroid (USA): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Metroid (Europe) (parent): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (USA) (Rev 1): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (Europe) (parent): found 1 candidate
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): generated 664KB of 4 candidates for 1,220 parents
TRACE: CandidateGenerator: Nintendo - Nintendo Entertainment System (Headerless): done generating candidates
TRACE: CandidatePatchGenerator: Nintendo - Nintendo Entertainment System (Headerless): generating patched candidates
TRACE: CandidatePatchGenerator: Nintendo - Nintendo Entertainment System (Headerless): 0 unique patches found
TRACE: CandidatePatchGenerator: Nintendo - Nintendo Entertainment System (Headerless): done generating patched candidates
TRACE: CandidatePreferer: Nintendo - Nintendo Entertainment System (Headerless): preferring candidates
TRACE: CandidatePreferer: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA): preferred Contra (USA)
TRACE: CandidatePreferer: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Europe): preferred Excitebike (Japan, USA) (En)
TRACE: CandidatePreferer: Nintendo - Nintendo Entertainment System (Headerless): Metroid (Europe): preferred Metroid (USA)
TRACE: CandidatePreferer: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (Europe): preferred Super Mario Bros. 3 (USA) (Rev 1)
TRACE: CandidatePreferer: Nintendo - Nintendo Entertainment System (Headerless): filtered to 664KB of 4 candidates for 1,220 parents
TRACE: CandidatePreferer: Nintendo - Nintendo Entertainment System (Headerless): done preferring candidates
TRACE: CandidateExtensionCorrector: Nintendo - Nintendo Entertainment System (Headerless): no output files need their extension corrected
TRACE: CandidateArchiveFileHasher: Nintendo - Nintendo Entertainment System (Headerless): not testing or overwriting invalid files, no need
TRACE: CandidatePostProcessor: Nintendo - Nintendo Entertainment System (Headerless): processing candidates
TRACE: CandidatePostProcessor: Nintendo - Nintendo Entertainment System (Headerless): done processing candidates
TRACE: CandidateValidator: Nintendo - Nintendo Entertainment System (Headerless): validating candidates
TRACE: CandidateValidator: Nintendo - Nintendo Entertainment System (Headerless): done validating candidates
TRACE: CandidateMergeSplitValidator: Nintendo - Nintendo Entertainment System (Headerless): validating merged & split ROM sets
TRACE: CandidateMergeSplitValidator: Nintendo - Nintendo Entertainment System (Headerless): done validating merged & split ROM sets
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): writing 4 candidates
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA) (parent): writing 1 candidate
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Europe) (parent): writing 1 candidate
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Metroid (Europe) (parent): writing 1 candidate
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (Europe) (parent): writing 1 candidate
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA): no zip archives to write
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Japan, USA) (En): no zip archives to write
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Metroid (USA): no zip archives to write
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (USA) (Rev 1): no zip archives to write
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA): writing 128KB of 1 file
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Japan, USA) (En): writing 24KB of 1 file
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Metroid (USA): writing 128KB of 1 file
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (USA) (Rev 1): writing 384KB of 1 file
DEBUG: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA): /output/Nintendo - Nintendo Entertainment System (Headerless)/Contra (USA).nes: not overwriting existing file
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Contra (USA) (parent): done writing 1 candidate
DEBUG: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Japan, USA) (En): /output/Nintendo - Nintendo Entertainment System (Headerless)/Excitebike (Japan, USA) (En).nes: not overwriting existing file
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Excitebike (Europe) (parent): done writing 1 candidate
DEBUG: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Metroid (USA): /output/Nintendo - Nintendo Entertainment System (Headerless)/Metroid (USA).nes: not overwriting existing file
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Metroid (Europe) (parent): done writing 1 candidate
DEBUG: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (USA) (Rev 1): /output/Nintendo - Nintendo Entertainment System (Headerless)/Super Mario Bros. 3 (USA) (Rev 1).nes: not overwriting existing file
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): Super Mario Bros. 3 (Europe) (parent): done writing 1 candidate
TRACE: CandidateWriter: Nintendo - Nintendo Entertainment System (Headerless): done writing 4 candidates
TRACE: StatusGenerator: Nintendo - Nintendo Entertainment System (Headerless): generating ROM statuses
TRACE: StatusGenerator: Nintendo - Nintendo Entertainment System (Headerless): done generating ROM statuses
Nintendo - Nintendo Entertainment System (Headerless) ... 4/1,220 games, 0/3 BIOSes, 4/1,121 retail releases written
TRACE: done processing 2 DATs

DAT(s) used

igir version

tried 3.0.0 and 2.11.0

Node.js version

N/A

Operating system

ubuntu 24.10

Additional context

I tried running this with just one of the DAT files at a time, only the Headerless one matches the ROMs.

emmercm commented 7 hours ago

You are providing a DAT that catalogs headerless ROMs, so Igir is removing the header from files before writing. If you don't want headerless ROMs, you should exclude the DAT with --dat-name-regex-exclude "/headerless/i".

This may happen with any of the ROM headers that Igir supports, though No-Intro only separates headered/headerless Lynx and NES DATs right now.

copy should just copy the ROM without changing it.

Please let me know what page(s) might be confusing, I can update them. Other options such as ROM patching can also cause changes to ROMs during writing.