Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow clone CHDs to use parent CHDs as parents.
* util/chd.cpp: Allow caller to provide a helper for finding parent CHDs and expose (recursive) missing parent status. * emu/romload.cpp: Search parent systems/devices/software for parent CHDs on encountering a delta CHD. * emu/romload.cpp: Report error on delta CHDs when parent can't be found. * emu/romload.cpp: Check parents for matching CHDs with different names for devices as well as systems and software.
- Loading branch information
d1172bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been requested several times. There’s probably an open issue for it, but I haven’t looked. It allows substantial space savings for a full media set in cases where a clone system/device/software item has a CHD that can share a lot of hunks with a CHD in its parent.
Using
sf2049tea
andsf2049te
as an example, you can create a delta CHD like:You’ll now have a delta CHD that’s about 50 MB that can be used in place of the regular CHD that’s over 1 GB, provided MAME can find
sf2049te.chd
from the parent.Of course, there are cases where few blocks can be shared – if you try this with
fmtowns_cd:4ddrivinm
you’ll only save about 2 MB.d1172bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this potentially save a lot of space for parent / clone CHD sets that have the same audio track data?
d1172bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends. You have to try it and find out. The data must be identical and at identical block offsets, or it won’t help.
d1172bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this comment here for posterity: No, it does not, at least not on my limited testing on NeoGeo CD. :)
d1172bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I take it back, I actually managed to create a delta of
fatfury3
for the NeoGeo CD that was less than 200kb. It didn't work with the game I tried first (Double Dragon) because the parent has damaged tracks 1 and 2, so everything was out of whack - but for CDs that are properly dumped, it should work.d1172bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cuavas
Thanks very much !