| name | rom-bin-cue-chd-conversion |
| description | Convert disc-based ROM images from BIN/CUE to CHD and back with chdman from MAME or rom-tools. Use when the user needs to shrink, organize, verify, or round-trip CD-based game images on macOS or Windows, especially for RetroArch, DuckStation, PS1/PSX, Sega CD, TurboGrafx-CD, Neo Geo CD, or when they mention BIN/CUE, cue sheets, CHD, chdman, or rom-tools. |
| license | MIT |
| compatibility | Requires chdman from MAME or rom-tools. Works on macOS and Windows. Needs terminal access and read/write access to the ROM folder. |
| metadata | {"author":"Ashref-dev","version":"1.0.0"} |
BIN/CUE to CHD Conversion
Use this skill when converting CD-based disc images between BIN/CUE and CHD format. Prefer CHD for storage and emulator workflows when the target emulator supports it, and preserve the original BIN/CUE set until the CHD has been validated.
What this skill does
- Converts disc-based ROM sets from
.cue + .bin to .chd
- Extracts CHD files back to
.cue + .bin
- Verifies CHD integrity
- Handles multi-track CD images correctly when the
.cue sheet is accurate
- Gives commands for macOS and Windows
Use the right tool
chdman createcd for BIN/CUE -> CHD
chdman extractcd for CHD -> BIN/CUE
chdman info for format and compression details
chdman verify for CHD integrity checks
Do not use archive tools or ad-hoc compression to make CHD files. The CHD format needs chdman so the sector layout and metadata are preserved correctly.
Before you convert
- Find the
.cue file for the game.
- Confirm every referenced
.bin file exists and the names match exactly.
- Keep the source files untouched until the CHD has been verified.
- Preserve the original basename unless the user asks for a different naming scheme.
- For multi-disc games, convert each disc separately and keep the disc number in the filename.
If there is only a loose .bin file and no valid .cue, stop and ask for the cue sheet or a proper disc manifest. createcd is meant to read the cue sheet and the tracks it references.
macOS workflow
Install chdman
Prefer the system package that provides chdman:
- Homebrew:
brew install rom-tools
- If the user already has MAME installed, use the
chdman binary from that installation instead of reinstalling
Confirm availability:
which chdman
chdman --version
Convert BIN/CUE to CHD
chdman createcd -i "Game Name.cue" -o "Game Name.chd"
Useful options:
-f overwrite an existing output file
-v print verbose progress
-np <count> limit or increase worker threads
-c <compression list> only when you have a reason to change the default compression
For most CD images, the default compression choices are fine. Change them only if the user specifically wants different tradeoffs.
Verify the CHD
chdman info -i "Game Name.chd"
chdman verify -i "Game Name.chd"
info shows the compression, hunk size, size, and hashes. verify checks the file integrity.
Extract CHD back to BIN/CUE
chdman extractcd -i "Game Name.chd" -o "Game Name.cue" -ob "Game Name.bin"
If the user wants one binary file per track instead of one combined BIN, add -sb:
chdman extractcd -i "Game Name.chd" -o "Game Name.cue" -sb
Windows workflow
Install chdman
Install MAME or a rom-tools package that includes chdman.exe, then make sure it is on PATH.
Verify it in PowerShell:
Get-Command chdman.exe
chdman.exe --version
If chdman.exe is not on PATH, call it with a full path.
Convert BIN/CUE to CHD
PowerShell:
& "C:\MAME\chdman.exe" createcd -i "Game Name.cue" -o "Game Name.chd"
Command Prompt:
chdman.exe createcd -i "Game Name.cue" -o "Game Name.chd"
Verify the CHD
& "C:\MAME\chdman.exe" info -i "Game Name.chd"
& "C:\MAME\chdman.exe" verify -i "Game Name.chd"
Extract CHD back to BIN/CUE
& "C:\MAME\chdman.exe" extractcd -i "Game Name.chd" -o "Game Name.cue" -ob "Game Name.bin"
Use -sb when the user wants one BIN per track:
& "C:\MAME\chdman.exe" extractcd -i "Game Name.chd" -o "Game Name.cue" -sb
Multi-disc and emulator notes
- Convert each disc separately.
- Keep disc numbers in the filenames, such as
Game Name (Disc 1).chd.
- If the user wants convenient disc swapping, create an
.m3u playlist that points at the per-disc CHD files.
- For RetroArch, DuckStation, and similar emulators, CHD is usually the cleaner long-term format for CD-based games.
Troubleshooting
- If
chdman cannot find tracks, the .cue file probably has a filename mismatch. Fix the cue or rename the referenced files so they match exactly.
- If the command fails because the output already exists, rerun with
-f only when overwriting is intentional.
- If the user is on Windows and the command is not found, use the full path to
chdman.exe or fix PATH before trying again.
- If the conversion succeeds but the emulator does not load the CHD, verify the CHD with
chdman info and chdman verify, then keep the original BIN/CUE as a fallback.
Good handoff behavior
- Explain the conversion result in plain language.
- Tell the user where the CHD file was written.
- Mention whether the source BIN/CUE was left untouched.
- If extraction was requested, tell the user whether the output is a single BIN or split BIN tracks.