Page 1 of 1
Multi-Disc CHD support?
Posted: Sat Oct 02, 2021 6:34 pm
by rockaholica
I was toying with the idea of converting all of my CD based roms to CHD format, for mister purposes and software based emulation. In testing the mister with multi-disc games I noticed that the standard way of handling multi-disc CHD's, m3u playlists, does not seem to be currently supported by the MegaCD core (and potentially the MiSTer?) as files with a m3u extension aren't selectable when loading a CD.
There aren't very many multi-disc games on the MegaCD but supporting multi-disc CHD's will likely be "in demand" for future cores, assuming PSX and Saturn cores are completed/released at some point. This may be a non-issue depending on how saves are handled by the core, or by a specific game, but if m3u files are something that is fairly easy to support it might be worth it to implement what seems to be the standard way of supporting multi-disc games with chd files.
I'm not sure if the level of effort to support this on MiSTer is feasible, or if any alternative solutions exist, but I wanted to ask the question and potentially start that discussion.
As a note/background information:
On various platforms that support CHD files, the way of handling multi-disc games is by creating a playlist file in the form of an m3u.
The m3u file is simply a text file, generally Unicode encoded, with a relative filename or absolute path to the chd files in for a given game.
One path per line, in disc order.
e.g. Contents of
Night Trap (USA).m3u
Code: Select all
Night Trap (USA) (Disc 1).chd
Night Trap (USA) (Disc 2).chd
Re: Multi-Disc CHD support?
Posted: Sat Oct 02, 2021 10:32 pm
by darksakul
Here, read this
viewtopic.php?t=379
CHD files work, you just need each game in the same sub-folder.
m3u files are not supported
The format should be as such
Example:
\games\MegaCD\Game A\Game A.cue
\games\MegaCD\Game A\Game A(track 1).bin
\games\MegaCD\Game A\Game A(track 2).bin
\games\MegaCD\Game B\Game B.cue
\games\MegaCD\Game B\Game B.(track 1).bin
\games\MegaCD\Game B\Game B.(track 2).bin
Re: Multi-Disc CHD support?
Posted: Sat Oct 02, 2021 11:45 pm
by rockaholica
Hey darksakul!
I have seen conflicting information on the need to have subfolders, specifically with CHD's. The post you are referring to was actually created before zakk4223 added CHD support to MiSTer, so I'm not certain it's a great source at this point. Ref:
viewtopic.php?p=15464#p15464
I completely understand and agree that m3u files aren't supported today, but my question is more about feasibility of supporting them.
Thanks again for engaging
Re: Multi-Disc CHD support?
Posted: Sun Oct 03, 2021 2:14 am
by zakk4223
For the megaCD just put the chds in a game specific directory. CUE or CHD files loaded from the same directory won't trigger a BIOS reload/core reset and the save file name for the backup RAM will be retained. This means it will always be named after the first disk in the set, but that's probably fine.
This logic doesn't look like it was transfered over to the PCE-CD core, but I'm not 100% sure if that is how it should also work there. Someone more familiar with how the PCE-CD handles disc swaps would have to weigh in here.
This probably means in general you should put even single CHDs in their own directory.
I can say that trying to implement m3us would be fairly awkward given how things work now. Probably not much motivation to do that when just putting the files in the same directory achieves pretty much the same thing.
I'll try to track someone down about the PCE-CD stuff, and if it can work the same way I'll make it work that way.
Re: Multi-Disc CHD support?
Posted: Sun Oct 03, 2021 2:40 am
by rockaholica
Awesome! Thanks for chiming in! I'll update my conversion scripts to create dirs for each game.
I'm not an expert, but I don't know if there are actually any multi-disc PC-CD games, so hopefully it's a non-issue there.
Re: Multi-Disc CHD support?
Posted: Mon Nov 15, 2021 12:48 pm
by seastalker
I debate the CHD format a lot and if it is right for my setup. For many systems, it would be a space saver in theory. If it is not fully compatible with flash carts, FPGA, best emulators etc., then I end up needing BIN/CUE anyway.
I think I have MAME CHDs and maybe Neo Geo CD. I also have Neo Geo CD Bin/Cue redumps because the set is small enough. If a Neo Geo CD core happens and it supports CHD, I'll probably go in that direction. I should look into PCE-CD as a potential CHD world since Mister is my way to play (too good to justify a Terraonion ODE for me personally).
Anyone have a great simple tool to convert back and forth between CHD and bin/cue/[and other formats]?
Re: Multi-Disc CHD support?
Posted: Mon Nov 15, 2021 3:18 pm
by rockaholica
chdman is the defacto tool and comes bundled with mame releases.
CLI options:
https://www.mankier.com/1/chdman
The createcd and extractcd options are mostly what you'll be looking for.
There are some bat files to easily convert a whole folder of images to chd. The powershell script I wrote can be found here
https://gist.github.com/revoice1/73e297 ... 16437013ac
It is primarily designed to convert 7z compressed bun/cue files to chd, but it should be fairly easy to edit for whatever purpose. You would just want to target cue files, rather than 7z and skip the 7z extract etc.. It also pulls a copy of chdman from archive.org for you if you don't have it.
Re: Multi-Disc CHD support?
Posted: Mon Nov 15, 2021 9:02 pm
by lamarax
rockaholica wrote: ↑Mon Nov 15, 2021 3:18 pm
chdman is the defacto tool and comes bundled with mame releases.
Right it is! Good luck making it work in our use case
Not everyone and his cat, has MAME installed
seastalker wrote: ↑Mon Nov 15, 2021 12:48 pm
Anyone have a great simple tool to convert back and forth between CHD and bin/cue/[and other formats]?
Here's your shortcut
...just drop your
unzipped folders into it, and run the
CUE to CHD.bat. There's also a .bat in there should you wish to revert.
Re: Multi-Disc CHD support?
Posted: Mon Nov 15, 2021 9:46 pm
by rockaholica
Yeah that's the bat file I was referring to, thanks. My reply this morning was done on my mobile and didn't feel like searching the link down on my phone.
I went about writing the more complex script because the library I had were all 7z'd and my script also places the CHD's in their own folder, (as was the result of my OP question), tries to account for multi-disc games and has the ability to create playlist files if you want them for other emulators etc... Also had different source and destinations dirs (and an optional working dir) to avoid disk thrashing if you have multiple disks for different purposes like I do. In the end the script is built for my specific needs but I figured I might as well put it out there for the community if anyone else wants to mess with it.
Re: Multi-Disc CHD support?
Posted: Tue Nov 30, 2021 2:12 am
by Bandit721
Thanks rockaholica! Your script is perfect for converting any of the redump collections to CHDs. I was using another script but it kept breaking when it hit multiple .cue files in the .7z file...was about to write my own, but yours works just as I would have written it. A great time-saver.
Re: Multi-Disc CHD support?
Posted: Tue Nov 30, 2021 2:16 am
by rockaholica
Awesome! Glad it was useful!