MisterTea / MAMEHub

Netplay-capable multi-machine emulator
http://www.mamehub.com
118 stars 29 forks source link

CHD Version Compatibility #146

Open Gitweazle opened 10 years ago

Gitweazle commented 10 years ago

My problems with CHD not being detected in #139 made me think. A MAMEHub user (BBB) put a lot of time into converting ISOs to CHDs for us. They are all Version 4 though and the SHA1 will not be properly detected unless converted. The TOSEC lists that most people will have are also older CHDs.

It would be annoying to have to constantly convert them whenever MAME/MESS team decides to change the location of the SHA1 in the header again. You can however read the version from the header itself, its location has remained constant (Bytes 12-15).

                Checksum location/type Version 1: 44-59 [16 bytes; MD5] Version 2: 44-59 [16 bytes; MD5] Version 3: 80-99 [20 bytes; SHA1] Version 4: 48-67 [20 bytes; SHA1] Version 5: 84-103 [20 bytes; SHA1]

You can find this information here. I am not sure what the advantages are of the newer CHDs.

MisterTea commented 10 years ago

Can you change the code to read both versions of chd and send me a pull request?

On Monday, February 10, 2014, Gitweazle notifications@github.com wrote:

My problems with CHD not being detected in #139https://github.com/MisterTea/MAMEHub/issues/139made me think. A MAMEHub user (BBB) put a lot of time into converting ISOs to CHDs for us. They are all Version 4 though and will not be detected unless converted.

It would be annoying to have to constantly convert them whenever MAME/MESS team decides to change the location of the SHA1 in the header again. You can however read the version from the header itself, its location has remained constant (Bytes 12-15).

           Checksum location/type

Version 1: 44-59 [16 bytes; MD5] Version 2: 44-59 [16 bytes; MD5] Version 3: 80-99 [20 bytes; SHA1] Version 4: 48-67 [20 bytes; SHA1] Version 5: 84-103 [20 bytes; SHA1]

You can find this information herehttp://mamedev.org/source/src/lib/util/chd.h.html. I am not sure what the advantages are of the newer CHDs.

Reply to this email directly or view it on GitHubhttps://github.com/MisterTea/MAMEHub/issues/146 .

Gitweazle commented 10 years ago

Really I would love to help, but unfortunately I am not a coder. I can kinda follow what is going on when I look at it, but I simply do not know what most of the classes/objects do. Sorry. :crying_cat_face:

I will however try to edit the XMLs so that the missing systems and the ROMs from the old HSIs work again.

EDIT: Making good progress on XMLs. Finally made a macro to comment out the double entries when combining the old HSI ROMs with the new ones in the XML. This means MH will support both new&old, as long as the ZIP file only contains only 1 file.

EDIT2: Done so far: snes, snespal, genesis, megadriv, megadrij, nes, sms. I want to test it with somebody first.

Gitweazle commented 10 years ago

This is no longer necessary as I found a way to let MAMEHub audit CUE files :chicken:

Also I read that V5 CHDs are more compatible, have better file support and better compression, so it's best to just stick to those.

I'll close this thread soon.

Gitweazle commented 10 years ago

:lock:

Gitweazle commented 10 years ago

Reopening due to a new issue.

I could not get Red Earth to audit in MAMEHub. Eventually I found out that the CHD used by the official MESS team (cap-wzd-5.chd) is still Version 4. I tried to re-encode it to V5, but then the SHA1 does no longer match.

EDIT: I managed to get the game detected by MAMEHub. I edited the Arcade XML with the correct SHA1 and re-encoded the CHD to Version 5. This is probably too cumbersome for normal users to do.

MisterTea commented 9 years ago

changing the chd version shouldn't change the SHA-1, are you sure you did the v4-v5 correctly?

Gitweazle commented 6 years ago

Old issue that keeps reoccurring. MAMEDev keeps changing the Metadata / Header of CHDs resulting in (older) softlists becoming invalid. Stumbled upon this thread:

https://github.com/mamedev/mame/issues/2517