Been looking at this for a couple of days brought on by an audit in the MAME UI (F1) and the available filter. Shows 14 damaged delta CHDs that can't be -verify or -info'ed with chdman. Before I posted at mametesters I was hoping for a confirmation here, note that clrmame doesn't flag these w/ default settings. Possible commonality? CHDs marked as 'Bad Dump'.
Current tip of tree chdman.exe (or release .262) is producing some delta chds that will error on run with 'CHD ERROR: Decompression error'. Resulting in machine placement into unavailable filter folder in MAME UI.
One such example is the child/clone photoply_sprt_xt_2004_sp_u.chd in Photo Play Spirit Xtreme (Spanish) / photopsxsp
Steps to repro:
1. Use full merged storage method.
2. Place the two Photo Play Spirit Xtreme (Spanish) CHDs into their appropriate directory:
"C:\MAME\Roms\photopsxsp\photoply_sprt_xt_2004_sp_u.chd"
"C:\MAME\Roms\photopsxsp\photoply_sprt_xt_2004_sp.chd"
7,283,106,173 photoply_sprt_xt_2004_sp.chd
3,427,733,716 photoply_sprt_xt_2004_sp_u.chd
3. Launch MAME.exe and do an audit with F1 from the UI.
4. Confirm Photo Play Spirit Xtreme (Spanish) is not present in the Unavailable filter/folder.
5. Convert the child CHD to a delta w/ clrmamepro or manually.
6. New child CHD gets cut down to size to:
1,977,511,281 photoply_sprt_xt_2004_sp_u.chd
7. Attempt to verify this chd:
\MAME\ROMs\photopsxsp>chdman verify -i photoply_sprt_xt_2004_sp_u.chd -ip photoply_sprt_xt_2004_sp.chd
chdman - MAME Compressed Hunks of Data (CHD) manager 0.262 (mame0262-152-g0636e54bb60)
Error opening CHD file (photoply_sprt_xt_2004_sp_u.chd): Decompression error
Fatal error occurred: 1
8. Run audit in MAME's UI with F1.
9. Observe Photo Play is now in the unavailable filter/folder due to the error.
10. A normal run with clrmamepro does not find this.
---
c:\O\Games\MAME\ROMs\photopsxsp>chdman info -v -i photoply_sprt_xt_2004_sp_u.chd
chdman - MAME Compressed Hunks of Data (CHD) manager 0.262 (mame0262-152-g0636e54bb60)
Error opening CHD file (photoply_sprt_xt_2004_sp_u.chd): Decompression error
Fatal error occurred: 1
Before delta creation, child CHD is ok:
c:\Users\jhard\Desktop\ROMs\MAME 0.262 CHDs (merged)\photopsxsp>chdman info -i photoply_sprt_xt_2004_sp_u.chd
chdman - MAME Compressed Hunks of Data (CHD) manager 0.262 (mame0262)
Input file: photoply_sprt_xt_2004_sp_u.chd
File Version: 5
Logical size: 160,041,885,696 bytes
Hunk Size: 4,096 bytes
Total Hunks: 39,072,726
Unit Size: 512 bytes
Total Units: 312,581,808
Compression: lzma (LZMA), zlib (Deflate), huff (Huffman), flac (FLAC)
CHD size: 3,427,733,716 bytes
Ratio: 2.1%
SHA1: dac230cae6efaa24362260101d39b421d5fccd45
Data SHA1: 5c60dcfee2c635e4c20fa733aad37c60c003b600
Metadata: Tag='GDDD' Index=0 Length=37 bytes
CYLS:310101,HEADS:16,SECS:63,BPS:512.
c:\Users\jhard\Desktop\ROMs\MAME 0.262 CHDs (merged)\photopsxsp>chdman verify -i photoply_sprt_xt_2004_sp_u.ch
chdman - MAME Compressed Hunks of Data (CHD) manager 0.262 (mame0262)
Raw SHA1 verification successful!
Overall SHA1 verification successful!
Actual delta CHD creation goes through 100%:
c:\O\Games\MAME\ROMs\photopsxsp>chdman copy -i photoply_sprt_xt_2004_sp_u.chd -op photoply_sprt_xt_2004_sp.chd -o newchild.chd
chdman - MAME Compressed Hunks of Data (CHD) manager 0.262 (mame0262)
Output CHD: newchild.chd
Parent CHD: photoply_sprt_xt_2004_sp.chd
Input CHD: photoply_sprt_xt_2004_sp_u.chd
Compression: lzma (LZMA), zlib (Deflate), huff (Huffman), flac (FLAC)
Hunk size: 4,096
Logical size: 160,041,885,696
Compression complete ... final ratio = 1.2%
02/22/2024 12:18 PM 1,977,511,281 newchild.chd
Info and verify of new delta CHD fails and goes to unavailable upon audit.
c:\O\Games\MAME\ROMs\photopsxsp>chdman info -i newchild.chd
chdman - MAME Compressed Hunks of Data (CHD) manager 0.262 (mame0262)
Error opening CHD file (newchild.chd): Decompression error
Fatal error occurred: 1