mame icon indicating copy to clipboard operation
mame copied to clipboard

chdman extractcd output is not the same as input on multiple audio bins

Open luke-70it opened this issue 5 years ago • 13 comments

It would be nice to obtain same cue+bin files used to convert to CHD, when extracting it. Original CD dump consisting in multiple bins are converted back in a single bin file.

luke-70it avatar Nov 06 '19 10:11 luke-70it

I too would like to see the output the same as the input, instead of having a merged single BIN file.

EDIT: Right now the only way you can break up the BIN file into multiple BINs is if you use a third party tool called binmerge: https://github.com/putnam/binmerge

Zenjir0 avatar Nov 29 '20 02:11 Zenjir0

Would it be acceptable to add a switch for the extractcd command to specify if you want multi-track images as separate bins or not?

oblivioncth avatar Mar 23 '21 15:03 oblivioncth

I think this is a rather important feature to have. If my input is split bin files, I'd expect to get the same files after extraction, without using other tools. It is also very important for the checksums to match the original split bins.

Since redump only recognizes split bins, IMO extracting to a merged bin file by default is not ideal at all.

Split bin could be the default, and merged bin an option.

eddmanx avatar Nov 06 '21 10:11 eddmanx

I was really surprised when I noticed that, not only split BIN files were not the default behavior of extractcd, but there was no option to make it so in chdman at all! Mame devs being so zealots about preservation, this was quite shocking.

Does chdman stores the original filenames, or does the CHD format even supports this?

MestreLion avatar Sep 08 '23 10:09 MestreLion

MAME is preserving the actual CD data, not the intermediate rip format. You can import an ISO or CDRDAO bin/toc rip and export it as bin/cue and vice-versa. The data is what's important, not the cue file.

rb6502 avatar Sep 08 '23 12:09 rb6502

I'll advise to use https://github.com/alucryd/oxyromon to convert chds to the original format

Immersion95 avatar Sep 12 '23 13:09 Immersion95

MAME is preserving the actual CD data, not the intermediate rip format. You can import an ISO or CDRDAO bin/toc rip and export it as bin/cue and vice-versa. The data is what's important, not the cue file.

You're correct that the data is preserved, and if you split the extracted bin into multiple ones their checksum would match the originals.

It's just that it's less user friendly, when the input was originally multiple bins.

eddmanx avatar Sep 12 '23 14:09 eddmanx

MAME is preserving the actual CD data, not the intermediate rip format. You can import an ISO or CDRDAO bin/toc rip and export it as bin/cue and vice-versa. The data is what's important, not the cue file.

You're correct that the data is preserved, and if you split the extracted bin into multiple ones their checksum would match the originals.

It's just that it's less user friendly, when the input was originally multiple bins.

Binmerge can do : Multiple bin/cue <-----> Single bin/cue Oxyromon can do : chd <-----> Multiple bin/cue

Immersion95 avatar Sep 12 '23 14:09 Immersion95

Binmerge can do : Multiple bin/cue <-----> Single bin/cue Oxyromon can do : chd <-----> Multiple bin/cue

I'm well aware.

eddmanx avatar Sep 12 '23 14:09 eddmanx

Yes, a lot of tools can handle chd and cue/bin (with varying degrees of usability, I've already reported 2 issues/requests in binmerge).

So what?

chdman itself is still unable to do a perfect round-trip conversion of its input data. True, all actual data is preserved, but chdman being the reference implementation of the CHD format, whose "losslessness" was one of its major "selling points", it is a bit surprising one would have to resort to third-party tools to fully restore the original data in its original format.

MestreLion avatar Sep 19 '23 08:09 MestreLion

The original format is a set of pits and lands on a polycarbonate support. Not bin/cue files.

galibert avatar Sep 19 '23 09:09 galibert

I too would like to see the output the same as the input, instead of having a merged single BIN file.

EDIT: Right now the only way you can break up the BIN file into multiple BINs is if you use a third party tool called binmerge: https://github.com/putnam/binmerge

How do I use it? Is a python install required? Do I decompress the chd back to bin/cue then run the bin/cue in binmerge? I'm not sure how to use binmerge? Man I wish CHDMAN could just do this on it's own. I did not know going in that it couldn't return all the bin files separately when decompressed. I like having the option to revert them back to the original format matching redump database.

Never mind I figured it out. Found a useful reddit post with a split and merge .bat file that can be used for binmerge https://www.reddit.com/r/Roms/comments/kh5eyx/extracting_chd_files_for_use_with_nonmame/

BParks21 avatar Oct 16 '23 09:10 BParks21

Would it be acceptable to add a switch for the extractcd command to specify if you want multi-track images as separate bins or not?

I just made a PR for this :) #11727

landfillbaby avatar Nov 12 '23 14:11 landfillbaby

This should be addressed by PR #12191 (merged as 79c1ae350d07b2c7516e4d2652453cb955067814).

cuavas avatar Mar 30 '24 18:03 cuavas