Chdman - Question about converting game with multiple bin files

  • Thread starter Thread starter tmnr1992
  • Start date Start date
  • Views Views 18,612
  • Replies Replies 15

tmnr1992

Well-Known Member
Member
Joined
Oct 22, 2016
Messages
641
Reaction score
361
Trophies
0
XP
2,869
Country
United States
I noticed that Chdman can convert games in .bin format that have multiple tracks, but when I extract that game from .chd back to .bin the game comes out as a single .bin file. The game still works, but my question is: does the the game lose any kind of information when this process happens?
 
Nope, you can even merge the bins if you want less files.

I see, in the case of dreamcast the games break after converting to chd, if I convert those chd back to bin they still don't work, unless i replace the .cue file with a .gdi file befoce converting to chd, but then turning those chd back to bin give me some .raw files instead, so is there a way to convert dreamcast games to chd but being able toaconvert them back to working bin files?
 
I use chds for dreamcast and everything else (where supported), maybe you are using an old chdman or your bins are not valid.
Chd is lossless, you get what you had, so something is wrong in your bins or chdman.
Latest version is v5.
 
Last edited by lucks,
I use chds for dreamcast and everything else (where supported), maybe you are using an old chdman or your bins are not valid.
Chd is lossless, you get what you had, so something is wrong in your bins or chdman.
Latest version is v5.

I'm using Chdman v5 and the bin is from redump, I've searched a bit and it seems this is a common issue for dreamcast games, I still find it strange that the game breaks after compressing to chd and reconverting to bin when the process is lossles.
 
Is the bin the same as the original bin?
If not, maybe chdman is skipping some parts.
I know that redump dumps are using a new dump method since last year that needs to be supported, maybe chdman has no support for this yet.
In this case you should convert them to an "old" format and use that with chdman or open an issue in their git.
 
You should be able to extract the tracks from the bin using the program called cdmage, atleast for ps1 games with multitrack it works, sadly I don't have any dreamcast games to test it on.
 
This is actually a known flaw with chdman. The program does this with all cd images with multiple tracks separated into their own bin files. When it extracts the data, it keeps the tracks in the same file. To resolve this, you'll have to get a third party program to split the files. I've recently tested a python 3 script that seems to work perfectly.

I've gone as far as ripped one of my PSX games, confirmed it was redump identical, then using chdman, compressed and then decompressed the files, and using the script I'll link at the bottom of this post, was able to create identical track files that matched with MD5, SHA1, and SHA256 checksums to the original dump. I even used it to merge them back together, and the result was identical to the chdman extracted output.

https://github.com/putnam/binmerge
 
This is actually a known flaw with chdman. The program does this with all cd images with multiple tracks separated into their own bin files. When it extracts the data, it keeps the tracks in the same file. To resolve this, you'll have to get a third party program to split the files. I've recently tested a python 3 script that seems to work perfectly.

I've gone as far as ripped one of my PSX games, confirmed it was redump identical, then using chdman, compressed and then decompressed the files, and using the script I'll link at the bottom of this post, was able to create identical track files that matched with MD5, SHA1, and SHA256 checksums to the original dump. I even used it to merge them back together, and the result was identical to the chdman extracted output.

https://github.com/putnam/binmerge

Sorry for the bump but this works great for PS1 and PS2, unfortunately it doesn't work for Dreamcast even using the latest versions.

Redump verified bin/cue > cue2chd > chd2cue > binmerge -outdir "./gamename" "gamename.cue" "gamename" > Redump non-verified

It's a shame too because for archiving these libraries on an external drive, chd saves a ton of space and being able to convert back (for use on ODE hardware), it saves a ton of time.
 
Sorry for the bump but this works great for PS1 and PS2, unfortunately it doesn't work for Dreamcast even using the latest versions.

Redump verified bin/cue > cue2chd > chd2cue > binmerge -outdir "./gamename" "gamename.cue" "gamename" > Redump non-verified

It's a shame too because for archiving these libraries on an external drive, chd saves a ton of space and being able to convert back (for use on ODE hardware), it saves a ton of time.

CHDMAN is messing with the files somehow. I tested the latest version a couple months ago and encountered the exact same issue as before:
converting bin to chd works, but converting that chd file back to bin breaks it in some way, as it won't work with emulators anymore.

But what I found is that if you convert bin to chd, you can then convert that chd file to gdi, which will work with both emulators and ODEs, and assuming you used chd v5, there should be no data loss.
 
Basically I'm just wanting to use chd for archiving games because the compression beats using 7zip LZMA/2, and then being able to convert back for whatever use later would be super convenient.

I made a post over on the mame reddit about this: https://www.reddit.com/r/MAME/comments/1m8czs1/dreamcast_chdbincue_conversion_and_redump/

And yeah, it messes up the cue sheet when you convert back. There's also this: https://github.com/AwfulBear/RedumpCUE2GDI

Which will automatically do CUE to GDI to CHD (good for getting GDI for GDemu at least), but yeah once you've converted it to chd its basically unrecoverable to its redump state sadly.
 
But… why reddit though? Reddit is super cringe. mameworld.info forums is watched by many of the devs and many more really helpful folk.
 
  • Haha
Reactions: tmnr1992
Dunno, honestly don't care about using mame / emulators so it was the first place I figured I would ask. Either way it looks like its not possible to do what I was hoping for so I'll just have to be content with zip folders.

EDIT: Sasori95 over on reddit came through, turns out you can restore a perfect redump, but the cue sheet won't match, which is fine, can easily download and keep the cuesheet zip file handy from redumps download section. Anyway turns out I was using an old chdman build and there is a -sb command (split bins) in the later versions.

Wrong, you need to use the correct command though (--splitbin / -sb ), see detailed information here : https://docs.mamedev.org/tools/chdman.html

You're complicating it. You only need chdman to extract it, use my batch archive here : https://gofile.io/d/QYVbri

The command is here if you don't want to use my file https://textup.fr/859297gA

It will correctly extract bins, the only problem is the cue file which will be wrong. Not a problem as you can download it from Redump easily http://redump.org/downloads/

Haven't tried PS1/PS2 yet but I imagine we no longer need binmerge at all anymore.

EDIT 2: Yeah no longer need binmerge now, cue sheets also match (only messes up with Dreamcast images):

Code:
chdman createcd -i "Alien Trilogy (USA).cue" -o "Alien Trilogy (USA).chd"

and then

Code:
chdman extractcd -i "Alien Trilogy (USA).chd" -o "Alien Trilogy (USA).cue" -sb

1753483295658.png
 
Last edited by AaronZ,
  • Like
Reactions: warquezho
Bro literally I am on the same boat this time thinking why my dreamcast games extract only 1 bin, then I see you need binmerge or cdmage. Now we can extract using only chdman. Good stuff :)
 
I used CHDMan to compress my audio CDs into .chd files for my MiSTer to play back in the PS1 core's BIOS. It somehow converts the audio to FLAC during the compression. It still sounds flawless and playback is still smooth, giving me about half my space back from using raw .bin and .cue files.
 
Yeah when you convert in chdman it mentions its using FLAC for audio and LZMA for other bits here and there. Clever stuff and much better at compressing overall than just zipping the game itself.

Interestingly there was discussion regarding the upcoming MStation (XStation Successor) possibly being able to use CHD due to having a much more powerful FPGA with more RAM, but only discussions so far. A GDemu successor with the same FPGA and CHD capabilities would be amazing.
 

Site & Scene News

Popular threads in this forum