Confused about softwarelist CHD SHA1s
Posted: Mon Dec 27, 2021 3:38 pm
Hi,
I'm somewhat confused about the SHA1 checksums of softwarelist CHDs, they don't seem to match, respectively I don't seem to be able to generate a CHD with a matching SHA1 from a CD image.
For example let's take a look at https://raw.githubusercontent.com/mamed ... segacd.xml
The SHA1 of the chd given here (05fa6ae67687aacdf99fe939b0f04ce13b6d527b) is the same that -listsoftware puts out. I have all four of those input files listed in the comment (1 x .cue and 4 x .bin) with those exact sizes, CRCs, SHA1s and filenames.
Now I'm generating a CHD with chdman 0.238:
chdman's info output gives me the following:
I've also tried converting the cue/bins to a v4 CHD with chdman 0.140, then converting that CHD to v5 with chdman 0.170 and 0.238 - the Data SHA1 (respectively "Raw SHA1" in the older v4 versions) is consistently 28e2f7cf2e3972c54bff3826095084bd19e49fa9. Just for fun I checked all of the SHA1s of the CHD files themselves, none of those is 05fa6ae67687aacdf99fe939b0f04ce13b6d527b.
Where is 05fa6ae67687aacdf99fe939b0f04ce13b6d527b coming from? Is this SHA1 (or the checksums of the source files) just wrong or am I missing something?
I'm somewhat confused about the SHA1 checksums of softwarelist CHDs, they don't seem to match, respectively I don't seem to be able to generate a CHD with a matching SHA1 from a CD image.
For example let's take a look at https://raw.githubusercontent.com/mamed ... segacd.xml
Code: Select all
<software name="roadaven">
<!-- Source: redump.org - http://redump.org/disc/29313/
<rom name="Road Avenger (USA).cue" size="453" crc="9e7d5e08" md5="840ebb398cce8d27cf3a5d253d8b575d" sha1="cd2b55540b911786886f43aae99e228d9f85efc5"/>
<rom name="Road Avenger (USA) (Track 1).bin" size="317816352" crc="cf3bd177" md5="71e1578e091e0d5df4b07f4f26e4d2c9" sha1="9cf7095ab8f7a5aa5df046d0b665263f4f506f19"/>
<rom name="Road Avenger (USA) (Track 2).bin" size="2664816" crc="5ef6a4c1" md5="3c3aab85aca0bf19bf2dd24d98f4e0e2" sha1="13ff4a9ceaf86c8eaa2e9545debf93795f83178e"/>
<rom name="Road Avenger (USA) (Track 3).bin" size="2065056" crc="3234951b" md5="403fb20b63be8f4ca9e94efdc6ed5a20" sha1="cfbf3ec5d558150cea39be7ad4644da7b7e47680"/>
<rom name="Road Avenger (USA) (Track 4).bin" size="13707456" crc="60656878" md5="1fb43c548570fbd61016ed3d7730e8c4" sha1="e350748a37d80e93ad74132b78ec9cd96e44acb4"/>
-->
<description>Road Avenger (USA)</description>
<year>1993</year>
<publisher>Renovation</publisher>
<info name="serial" value="T-6207"/>
<info name="release" value="199303xx" />
<info name="ring_code" value="SEGA6207 R1D MFD BY JVC"/>
<part name="cdrom" interface="scd_cdrom">
<diskarea name="cdrom">
<disk name="road avenger (usa)" sha1="05fa6ae67687aacdf99fe939b0f04ce13b6d527b"/>
</diskarea>
</part>
</software>
Now I'm generating a CHD with chdman 0.238:
Code: Select all
chdman createcd -i "Road Avenger (USA).cue" -o "road avenger (usa).chd"
Code: Select all
chdman - MAME Compressed Hunks of Data (CHD) manager 0.238 (mame0238)
Input file: road avenger (usa).chd
File Version: 5
Logical size: 349,995,456 bytes
Hunk Size: 19,584 bytes
Total Hunks: 17,872
Unit Size: 2,448 bytes
Total Units: 142,972
Compression: cdlz (CD LZMA), cdzl (CD Deflate), cdfl (CD FLAC)
CHD size: 144,288,525 bytes
Ratio: 41.2%
SHA1: 2de47da786a49e07232662e6a33cb2fb17004280
Data SHA1: 28e2f7cf2e3972c54bff3826095084bd19e49fa9
Metadata: Tag='CHT2' Index=0 Length=93 bytes
TRACK:1 TYPE:MODE1_RAW SUBTYPE:NONE FRAMES:135126 PREGAP:0 P
Metadata: Tag='CHT2' Index=1 Length=90 bytes
TRACK:2 TYPE:AUDIO SUBTYPE:NONE FRAMES:1133 PREGAP:150 PGTYP
Metadata: Tag='CHT2' Index=2 Length=89 bytes
TRACK:3 TYPE:AUDIO SUBTYPE:NONE FRAMES:878 PREGAP:150 PGTYPE
Metadata: Tag='CHT2' Index=3 Length=90 bytes
TRACK:4 TYPE:AUDIO SUBTYPE:NONE FRAMES:5828 PREGAP:150 PGTYP
Where is 05fa6ae67687aacdf99fe939b0f04ce13b6d527b coming from? Is this SHA1 (or the checksums of the source files) just wrong or am I missing something?