User avatar
spludlow
Posts: 16
Joined: Thu Jan 24, 2019 2:15 pm
Contact: Website

Duplicate Machine Disk (CHD) and romof, merge

I was messing around with some code to export and validate machine disks.

There are 787 unique machine disks (0.217). I wanted to see if I can work from a disk set that included no duplicates.

It would appear that MAME requires some disks to be duplicated.

Here is an example.

Parent: "area51"
Children: "area51t" and "area51ta"
Both these children use the disk "area51t" "d2865cc7b1bb08a4393a72013a90e18d8a8f9860".

I can run "area51t" just fine.
If I try to run "area51ta" I get "Required files are missing".
If I copy "area51t/area51t.chd" to "area51ta/area51t.chd" it works.

So this means I need to duplicate disk files in the set.

Is this something that could be fixed in the driver XML? Maybe change area51ta's machine.romof from "area51" to "area51ta" and set disk.merge to "area51t"?

I can see a few of these, that was just the first example I hit.

Cheers

User avatar
spludlow
Posts: 16
Joined: Thu Jan 24, 2019 2:15 pm
Contact: Website

Re: Duplicate Machine Disk (CHD) and romof, merge

I've attached a list of all of them, tab delimited.
Attachments
MachineDiskNoMergeDups217.txt
(2.89 KiB) Downloaded 54 times

User avatar
Stiletto
Posts: 64
Joined: Thu Nov 06, 2014 4:11 pm

Re: Duplicate Machine Disk (CHD) and romof, merge

I cast this over to my fellow devs on IRC (you should swing by sometime!) and they had this to say:

area51t is a clone of area51, area51ta is a clone of area51, area51ta can't be a clone of a clone.

You're looking at some technical debt due to old grandfathered-in schemes, aka the parent-clone relationships, which are more about establishing relationships and less about finding ROMs. Still, if we had "sibling groups" instead of 1 parent and x clones, this could maybe be solved.

Or maybe if MAME were smarter, searching for ROMs in other clones as well as the parent, by hash instead of by name. MAME is able to find ROMs by hash but not CHDs.

Maybe the easiest solution for now is to add support for 'clone of clone' but that would break with decades of tradition.

In a perfect world, maybe, we could make it so there was no duplication anywhere.

In the meantime, until this is solved, maybe use a filesystem link.
- Stiletto

User avatar
spludlow
Posts: 16
Joined: Thu Jan 24, 2019 2:15 pm
Contact: Website

Re: Duplicate Machine Disk (CHD) and romof, merge

Thanks for the detailed answer.

Indeed a perfect world would be nice, but I recon I can live with this.

Cheers

Return to “MAME Discussion”