Reimport bin file to chd file

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
terry336
Posts: 12
Joined: Mon Jun 20, 2022 4:54 pm

Reimport bin file to chd file

Post by terry336 »

Hello, I modified a bin file extracted from a chd file, I would like to re-import this file back into the chd. Is there a script to reimport bin files to a chd file ?
BloodRaynare
Posts: 367
Joined: Fri Mar 10, 2017 7:23 am

Re: Reimport bin file to chd file

Post by BloodRaynare »

By BIN files, I assume it was the game's images or the files inside that image? If it's the image itself, just use the same chdman tool to recompress it back to chd (You can find the tool included on the latest MAME release). Just make sure the modified bin images has the same name as it was referenced in the GDI/CUE file.

Code: Select all

chdman createcd -i game.gdi -o game.chd


or

Code: Select all

chdman createcd -i game.cue -o game.chd


But if it's the file inside the image, then you need to reinsert that file back to the images or even rebuild the image with the modified files inside. Then recompress it with chdman with the command line above.