Jump to content
LaunchBox Community Forums

Bulk Convert .cue/.bin (or files other than .bin) to .chd 1.02

   (5 reviews)

3 Screenshots

About This File

Bulk Convert .cue/.bin (or files other than .bin) to .chd

Using MAME’s chdman.exe (“Compressed Hunks of Data (CHD) Manager”, included with MAME), this plugin will convert CD based game files to a single .chd file in your selected Platform.  Example:

Before    Loom (USA).cue     Loom (USA).ccd     Loom (USA).img     Loom (USA).sub
After       Loom (USA).chd
Before    Arctic Thunder.cue     Arctic Thunder.bin
After       Arctic Thunder.chd

 

If you are looking to convert gdi or iso files (as well as cue) to CHD, see this plugin instead.

Bulk Convert cue/gdi/iso files to CHD - Third-party Apps and Plugins - LaunchBox Community Forums (launchbox-app.com)

 

Why convert?

 

  • You end up with just a single file per game
  • A CHD file is, well… compressed. Resulting in less storage space requirements
    • Arctic Thunder.cue + .bin = 601MB    Arctic Thunder.chd = 466MB
    • Spider-Man 2: Enter Electro = 684MB    CHD format = 318MB
  • Because we can and it's easy to do


Requirements

  • This plugin file
  • chdman.exe (included with MAME)
  • Game rom-sets that include a .cue file. (Loom (USA).cue, Arctic Thunder.cue etc.)

 

What happens after converting?
After successfully creating a CHD Image, the games application path will be changed to the new .chd file.

Also, after the files have been converted you have the option to 

  • Leave the old files in place (default)
  • Move the old files to a separate [backup] folder
  • Delete the old files
     

 

Installing the plugin

  1. Download the plugin
  2. Unblock “cue2chd (v1.00).zip” by right clicking the file and checking “Unblock” and clicking “OK”.
  3. Open the zip file and copy the contents (1 folder containing 1 file) into /LaunchBox/Plugins/
    • i.e. G:/LaunchBox/Plugins/cue2chd/cue2chd.dll

image.png.85087847d85ef26c747b022235f9e1a3.png

 

Using the plugin

  1. Start LaunchBox
  2. Select Tools, Convert cue to chd
  3. Select a Platform
  4. Click Convert
  5. (Optional)
    • Check Delete old files when complete 
      • This will permanently delete the old files (.cue, .bin, .img etc) after successfully converting them to .chd.
    • Check Move old files when complete
      • This will move the old files (.cue, .bin, .img etc) after successfully converting them to .chd to a folder you specify [for ‘backup’].
         

If you do not select Delete or Move, all files will remain in their current location along with the newly created .chd file. 

 

 If you opt to delete the old files and later want/need to convert the CHD files back to .cue etc., you can use chdman.exe to "reverse the process".  The command line is:

chdman.exe extractcd -i “file_name.chd” -o “file_name.cue”

 

 

Special thanks to @faeran for coming up with the idea for this plugin and his support and testing.

 As always, all comments and suggestions are welcome.


What's New in Version 1.02   See changelog

Released

Version 1.02 (April 23, 2022)

Fixed: Error not appearing if chd file was not created.

  • Like 15
  • Thanks 7
  • Unusual Gem 8

User Feedback

Recommended Comments



This is very useful tool! Would it be possible to add the option to covert .iso to .chd for PS2 games and for the new CHD to inherit the folders name? For example my game folder for Aeon Flux (USA) is named correctly but the game iso is called SLUS-21205 (1.03).iso , I would want the new CHD to be called Aeon Flux (USA).chd and not SLUS-21205 (1.03).chd 

  • Like 1
Link to comment
Share on other sites

8 hours ago, Gamer said:

This is very useful tool! Would it be possible to add the option to covert .iso to .chd for PS2 games and for the new CHD to inherit the folders name? For example my game folder for Aeon Flux (USA) is named correctly but the game iso is called SLUS-21205 (1.03).iso , I would want the new CHD to be called Aeon Flux (USA).chd and not SLUS-21205 (1.03).chd 

My iso's aren't in folders and named in the no-into format. Are you using PCSX2 for emulator? If so, does it support chd files?

Edited by The Papaw
Link to comment
Share on other sites

8 hours ago, Gamer said:

This is very useful tool!

Thank you!! Glad you like it.

8 hours ago, Gamer said:

Would it be possible to add the option to covert .iso to .chd

No.  Because then I'd have to change the name of the plugin.  lol

But that's not a bad idea for another plugin. ;)  I'll talk to my team about it.  Depending on how willing they are to do this, we could have the option to A) use the same file name, B) use the parent folders name (your choice) or C) use the games' Title as listed in LaunchBox.

 

@The Papaw PCSX2 does support chd's.

  • Like 2
Link to comment
Share on other sites

1 hour ago, JoeViking245 said:

Thank you!! Glad you like it.

No.  Because then I'd have to change the name of the plugin.  lol

But that's not a bad idea for another plugin. ;)  I'll talk to my team about it.  Depending on how willing they are to do this, we could have the option to A) use the same file name, B) use the parent folders name (your choice) or C) use the games' Title as listed in LaunchBox.

 

@The Papaw PCSX2 does support chd's.

That was my point (@Gamer)....lol

Link to comment
Share on other sites

A huge thank you to the developer(s) / wizards that created this tool. Shrunk my files from 1.13 TB to 683 GB. 🤯

  • Like 1
Link to comment
Share on other sites

On 4/2/2022 at 10:33 PM, Rlad said:

624123671_Screenshot2022-04-03033239.thumb.png.883e3202e05f98ae06f421f6c57f8786.png

Edit- I see you just edited your post 👍

Excellent tool! I will add that Picodrive recently added support for .chd as well (I was the one who did the pull request to update their docs on GitHub). So for anyone who was holding out because of this obscure corner case (a whopping grand total of six games), that means Sega CD 32X games are finally playable in .chd format. 

Edited by Hifihedgehog
  • Like 2
Link to comment
Share on other sites

do I strictly need to have a MAME ROMset? to use chdman im kinda low on storage.

The plugin supports sega saturn?.

Edited by N0ble
Link to comment
Share on other sites

2 hours ago, N0ble said:

do I strictly need to have a MAME ROMset? to use chdman im kinda low on storage.

The plugin supports sega saturn?.

No, you don't need to have a MAME romset.  You only need to have MAME installed as an emulator, which will have chdman.exe with it.  

(Top secret Pro Tip:  If you don't have MAME installed but you do have a viable copy of chdman.exe, you can place it (chdman.exe) in the same folder as the plugin)

The plugin will only support (convert, actually) games you have installed in LaunchBox AND that their ROMs application path points to a .cue file.  It is not prejudice against any one console or another.  Just needs to meet the above 2 requirements.

You will however need to verify that the emulator you will be using to run your Sega Saturn games is not prejudice against running .chd files.

Link to comment
Share on other sites

I just used this a couple times with Philips CD-I bin and cue files. Each time, the plugin indicated that everything converted successfully, but no CHDs were created.  The plugin moved my files, but did not generate a CHD.  I'm trying to figure out what might have gone wrong.  Any thoughts?  Thanks.

Link to comment
Share on other sites

12 hours ago, Good_King_Applesauce said:

I just used this a couple times with Philips CD-I bin and cue files. Each time, the plugin indicated that everything converted successfully, but no CHDs were created.  The plugin moved my files, but did not generate a CHD.  I'm trying to figure out what might have gone wrong.  Any thoughts?  Thanks.

If the chd file wasn't created, you would have (should have?) seen a message

Quote

Error converting "full_path_to _the_original_cue_file.cue". 

Edit one of your CD-I games in question and look at the application path for the rom.  (it'll be in Launching and under ROM File.  Since you attempted it a couple times, the file will probably end in .chd.  Anyway, look at the full path and make sure it's the same path where you believe your [new] chd files should be.

Although as I think about it, it should be the same because it knew where to move the file from.

 

Process of elimination...

You could test to see if chdman can actually convert your files (the apparent step that failed?).  Open the command prompt where your CD-I cue/bin files are located and run the command

"d:\Mame\chdman.exe" createcd -i "filename.cue" -o "filename.chd"

Change (inside, and keeping the quotes) the full path to where your chdman.exe file is located.  also change (again... inside, and keeping the quotes) "filename" (2 locations) of the cue file you're converting.

Example:

"D:\LaunchBox\Emulators\MAME 0.242\chdman.exe" createcd -i "hotel mario (1994)(philips)(us)[!].cue" -o "hotel mario (1994)(philips)(us)[!].chd"

EDIT:

I just ran some tests and it seems a chd will not be created if the .bin file doesn't exist or if the bin file is zero bytes.  But if (for some odd reason) the bin file 'bad', but is still larger than 0 bytes, a chd (though probably not usable) will still be created.  

So not sure why the error message didn't appear when no chd file was created. 

  • Like 1
Link to comment
Share on other sites

Thank you for this thorough response.  Your plugin is awesome and the problem is obviously somewhere on my end.

12 hours ago, JoeViking245 said:

If the chd file wasn't created, you would have (should have?) seen a message

Quote

That's what I assumed, but that didn't happen.  The plugin appeared to operate correctly.

12 hours ago, JoeViking245 said:

Edit one of your CD-I games in question and look at the application path for the rom.  (it'll be in Launching and under ROM File.  Since you attempted it a couple times, the file will probably end in .chd.  Anyway, look at the full path and make sure it's the same path where you believe your [new] chd files should be.

Although as I think about it, it should be the same because it knew where to move the file from.

That was my first impulse as well.  I was working with a ton of files, so when they weren't in the expected folder, I figured they might have been automatically nested within a newly created folder.  But, no CHDs were created anywhere.

12 hours ago, JoeViking245 said:

Process of elimination...

You could test to see if chdman can actually convert your files (the apparent step that failed?).  Open the command prompt where your CD-I cue/bin files are located and run the command

"d:\Mame\chdman.exe" createcd -i "filename.cue" -o "filename.chd"

Change (inside, and keeping the quotes) the full path to where your chdman.exe file is located.  also change (again... inside, and keeping the quotes) "filename" (2 locations) of the cue file you're converting.

Example:

"D:\LaunchBox\Emulators\MAME 0.242\chdman.exe" createcd -i "hotel mario (1994)(philips)(us)[!].cue" -o "hotel mario (1994)(philips)(us)[!].chd"

I ran through this process.  I'm pretty sure I did it correctly.  Here is the error I got:

1402405102_Screenshot2022-04-23105918.thumb.jpg.1dfccd85e9d2e03f1c080377b769d684.jpg

 

 

 

 

 

 

 

 

Is this the result of having corrupted files?  Should I replace all my .cues?

12 hours ago, JoeViking245 said:

I just ran some tests and it seems a chd will not be created if the .bin file doesn't exist or if the bin file is zero bytes.  But if (for some odd reason) the bin file 'bad', but is still larger than 0 bytes, a chd (though probably not usable) will still be created.  

So not sure why the error message didn't appear when no chd file was created. 

This makes it sound like I should be getting some results, even if my bins are bad.  How about the cues? 

 

Thanks for your help!

  • Like 1
Link to comment
Share on other sites

2 minutes ago, Good_King_Applesauce said:

How about the cues? 

The error looks like it's in the cue file.  Which would also lead me to believe that if you tried to run the game via the cue file, it won't.

But it may also be that the older chdman.exe you're using is 'the one with issues'.  Maybe try - downloading the latest MAME release and extract it to a temp folder and then attempt the command line test again pointing to the 'new' chdman.exe.

If that doesn't work, you may need to try to find different cue files (or different cue/bin roms?).?.?.?

 

I just uploaded an updated cue2chd v1.02 that will now (actually) catch the error 'the chd file was not created'.  It will also not move the files if/when this error is reached.  It still won't tell you why something messed up, but you'll at least know something went wrong. ;) 

  • Like 1
Link to comment
Share on other sites

That is super helpful.  I will continue to mess around with it.  Half the fun of this hobby is the tinkering and troubleshooting.  It's not like I want to actually play any of these CDI games.  Lol.  Keep up the great work.  If I get it going, I'll update my progress here.

  • Thanks 1
Link to comment
Share on other sites

Pretty awesome plugin, however, I've already converted all my CD images for every system to CHD already (Saturn, TG16, Sega CD PS2, PS1, Dreamcast, NeoGeo CD, etc.)

I would suggest adding ISO and GDI support. It should be quite easy (yeah, you might need to create iso2chd and gdi2chd plugins). I keep a copy of the latest CHDMAN from MAME and a batch file with the command:

for /r %%i in (*.cue, *.gdi, *.iso) do chdman createcd -i "%%i" -o "%%~ni.chd"

and put it in and folder with CUE, GDI or ISO files to convert when I need to.

Edited by GiSWiG
  • Like 1
Link to comment
Share on other sites

3 hours ago, GiSWiG said:

I've already converted all my CD images for every system to CHD already

1st off, thanks so much for the compliment.  Ya, I was in the same boat.  In fact I had to convert a few chd's to bin/cue just for testing. lol

I had thought about doing the others you mentioned, but figured cue/bins were the one most in need of 'a little clean up'.  ;) 

Thanks for the suggestion.  I may see if my team has time for it and also see if I can scrounge up some gdi/iso's as I'm pretty sure I don't have any of those either. 😁

Link to comment
Share on other sites

On 5/5/2022 at 5:44 PM, GiSWiG said:

I would suggest adding ISO and GDI support.

I did some playing around and created a Bulk Convert (cue/gdi/iso) to CHD plugin.  You can select cue, gdi or iso files to have converted to chd.  I don't have any .gdi or .iso files to test this with. But I know the cue part of it works. :D

This unofficial beta release also includes options for saving the chd file(s) as the same name as the games Title (as listed in LaunchBox) or as the parent folders' name for when your games are each in their own subfolder.  (That last one's for you @Gamer ;))

Any testing and feedback by anyone would be greatly appreciated.

image.thumb.png.e7ffd0c26b7edabdcac485beda633260.png

The zip file contains just 1 file that you can unzip directly into the Plugins folder or you can create a subfolder under Plugins and put it there.

As with all other plugins, download, unblock, unzip, start LaunchBox and try it out  (Tools - Bulk Convert To chd).

Bulk Convert to chd (beta).zip

Disclaimer:  It should work.  But it might not.

  • Like 1
Link to comment
Share on other sites

2 hours ago, Biogark said:

Hey @JoeViking245 great plugin, very usefull !!

A little thing I've noticed, files .ccd and .sub won't move in the process.

Thanks

Thanks! 

Hmmm... it should move those files.  The plugin parses the .cue file which lists all the files needed for that game ("ROM") and then "moves" those it finds.  Though I've only tested ones that had a single .bin file associated with the .cue.

Is it at least moving the .cue (and .img?) file(s)? 

Where there any error messages like "Error moving:" and then an explanation like "Can't move because the file already exists"?

Are the .ccd and .sub files listed in the .cue file (for the game(s) in question)?

 

If none of the above shed any light on things, can you share what one of these .cue files look like?  If it's relatively small, you can copy and paste the contents (open it with any text editor) here, or just attach the file?  Just the .cue file.  Thanks.

Link to comment
Share on other sites

Hey I keep getting "error converting continue to next game" for every game and I'm not sure why. I'm trying to convert .bin & .cue PS1 files.

Link to comment
Share on other sites

36 minutes ago, Supersilver said:

Hey I keep getting "error converting continue to next game" for every game and I'm not sure why. I'm trying to convert .bin & .cue PS1 files.

From what I've seen, this usually happens when using an older version of chdman.exe.

You can either update your MAME setup to the most recent release or, if you're using an older MAME release for a specific reason, download the latest release and "install" it to a temporary location.  From that temporary location, copy chdman.exe and replace the one that's in your existing install location.  You can then delete the temp install.  Run the plugin again.

 

If that doesn't work, go 'old school' and manually run chdman on one your games that error.

Open the Windows command prompt in the location where your game cue/bin files are located and run the command:

"d:\Mame\chdman.exe" createcd -i "filename.cue" -o "filename.chd"

Change (inside, and keeping the quotes) the full path to where your chdman.exe file is located.  Also change (again... inside, and keeping the quotes) filename (2 locations) of the cue file you're converting.

Example:

"D:\LaunchBox\Emulators\MAME 0.242\chdman.exe" createcd -i "The Legend of Dragoon.cue" -o "The Legend of Dragoon.chd"

In the command prompt windows' output, you'll be able to see exactly what the error is.

Link to comment
Share on other sites

Thank you, I've tried the old school method and I think I'm doing something wrong I keep getting this error:

At line:1 char:42
+ "C:\LaunchBox\Emulators\MAME\chdman.exe" createcd -i "Legend of Drago ...
+                                          ~~~~~~~~
Unexpected token 'createcd' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

 

Link to comment
Share on other sites

38 minutes ago, Supersilver said:

Thank you, I've tried the old school method and I think I'm doing something wrong I keep getting this error:

At line:1 char:42
+ "C:\LaunchBox\Emulators\MAME\chdman.exe" createcd -i "Legend of Drago ...
+                                          ~~~~~~~~
Unexpected token 'createcd' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

 

Run the ol' school method from Windows Command Prompt and not PowerShell. 

I presume that you're actually trying to convert "The Legend of Dragoon" and that it's a coincidence that my example used the same game. ;) 

Link to comment
Share on other sites

7 hours ago, mush said:

Getting error (chdman.exe can not be found). 

You need to have an emulator setup in LaunchBox that uses standalone MAME and in your MAMEs emulator folder (the same folder where it finds mame.exe) needs to be "chdman.exe".

Alternately, you can place a copy "chdman.exe" into the same folder as this plugin.  i.e. G:/LaunchBox/Plugins/cue2chd/chdman.exe

  • Thanks 1
Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...