Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHD Version Compatibility #146

Open
Gitweazle opened this issue Feb 10, 2014 · 7 comments
Open

CHD Version Compatibility #146

Gitweazle opened this issue Feb 10, 2014 · 7 comments

Comments

@Gitweazle
Copy link
Contributor

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
Copy link
Owner

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

On Monday, February 10, 2014, Gitweazle [email protected] 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//issues/146
.

@Gitweazle
Copy link
Contributor Author

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. 😿

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
Copy link
Contributor Author

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

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
Copy link
Contributor Author

🔒

@Gitweazle
Copy link
Contributor Author

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.

@Gitweazle Gitweazle reopened this Oct 6, 2014
@MisterTea
Copy link
Owner

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

@Gitweazle
Copy link
Contributor Author

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

mamedev/mame#2517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants