MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

Reged: 01/01/07
Posts: 76
Send PM
Re: Converting new (0.185) v4 -> v5 CHDs
04/15/17 09:06 PM Attachment: convert.7z 19 KB (20 downloads)

Spotted over on RR a few days ago:


Here is a batch file to process these conversions.

They converted easily, except for radirgyo\gdl-0032. The problem with it seems to be that the first .bin file unpacked from the v4 CHD isn't correct. The correct .bin file compresses down pretty well, so I have included it in this distribution. The batch file will automatically replace the incorrect .bin file with the correct one.

This distribution contains the batch files and two command line utilities to truncate and byteswap files, plus the correct gdl-0032 first .bin file. Also included is the C# source code for trunc.exe and byteswap.exe (in the src folder). You don't need to compile them, they are only there for reference.

What you have to do to prep:

Place a copy of all the .chd files that need to be converted into a single folder and unpack the distribution (convert.7z) there as well. Also place a copy of chdman.exe into that folder. I used v0,184, but any recent version of chdman.exe ought to work.

Here is a list of the .chd files that can be converted:

radirgyo\gdl-0032.chd (may be in the radirgy folder)
initdv3jb\gds-0032b.chd (may be in the initdv3j folder)
mj2\gdx-0006c.chd (may be in the mj2 folder)
wangmid2j\gdx-0015.chd (may be in the wangmid2 folder)
mj3d\gdx-0017d.chd (may be in the mj3 folder)

Run the doAll.bat batch file to convert everything. It will call the doOne.bat batch file for each conversion. If you don't want to convert everything at once, you can remove lines from the doAll.bat file. Each CHD file conversion will take a few minutes, spending most of the time compressing the new .chd file. The converted CHDs will appear in a subfolder named "new" under the folder you are working from. The SHA1: hash will appear for each .chd file as it completes. If the batch file finds the CHD it is about to process is already in the "new" folder, it will skip it. If the batch file does not find the specified .chd file, it will skip it. You can interrupt the batch file with Ctrl-C, but it might leave a partial CHD in the "new" folder, so you might have to delete that partial ,chd file afterwards. If you are in any doubt about the .chd files in the "new" folder, you can run the chdman "verify" command on them.

Entire thread
Subject Posted by Posted on
* Converting new (0.185) v4 -> v5 CHDs mw 04/09/17 06:42 PM
. * Re: Converting new (0.185) v4 -> v5 CHDs mw  04/15/17 09:06 PM
. * Re: Converting new (0.185) v4 -> v5 CHDs R. Belmont  04/19/17 01:58 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 4 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1925