How to find duplicated MAME roms (in different folders) ? (SOLVED)


PowerGod

Forum Addict!
Joined
Jun 20, 2011
Messages
4,419
I have this situation, different folders with roms for different MAME versions/forks, and so, most of them contains duplicated games. (I'm not referring about clones, but exactly the same game)

I want to be able to have a folder with all the games playable with my preferred MAME version, and remove those games from the other folders, so to leave to the other emulators only the games that doesn't work in the first one.

The problem is, I can't just compare file names... because the zipped files are different from a folder to another for different reasons:

1) for an emu the zip can contain only one game, for another the same named zip can contain also the clones, etc...

2) the same game rom can have different names from one MAME version/fork to another...

So, I suppose the only way to compare the folders is to use the XML files (with hashes) of the respective emulators, almost like a rom manager program does to audit them... and it's not a so straightforward thing to do by hand...

Do you know about some program that is able to do this ?

(By the way, with "forks" I mean emulators like FBA, GnGEO, etc... that uses the same kind of roms)
 
Last edited:
I've a similar problem with my NES collection which has been through various permutations over the years and now contains the same game under different names in different versions of the collection.

It should be possible to generate md5 sums of the roms and use them to compare more programatically. Even if the roms are zipped, a carefully crafted find command should be able to do it. I've just been lazy thus far, and not actually got round to doing much, so if anyone could help out I'd appreciate it also.
 
I'm having a look at "advdiff", from advmame project... it is able to compare the rom list of 2 emulators and to return a list with just the roms not present in one of them... so, while you can then use that resulting list to create a minimal set of roms, I'm not sure how the compare is really working for games present in both of the lists but playable only in one...

I'll have to do some testing...
 
Ok, seems working, it is not so straight to do but here what I've done:

1) Get the data list from the main emulator (for MAME "mame -listxml > filenamemain.lst")

2) Get the data list from the other emulator (for GnGEO "gngeo -l > filenameother.lst")

3) Compare the 2 lists with advdiff (it's an utility of AdvanceSCAN) to obtain a third list with the roms that are only present in the second emulator (advdiff filenamemain.lst filenameother.lst > onlyintheother.lst)

4) Now, you can delete (or just move out) every rom from the roms-folder of the other emulator and refill it with your preferred rom-manager using the last list (you can change the extension to .dat if the program complains)
 
Back
Top