Main > Software Forum
Calling any interested coders: rom management...and something more
Gray_Area:
Tonight while looking at my missing sets in current/recent MAME, I was thinking about rom managers. Then I came across the following:
--- Quote from: Howard_Casto on February 14, 2012, 12:18:45 am ---
Btw, 145 is causing all sorts of havoc with the rom managers as well. Samples are now available in flc flavor (again, more compression) and because of it romcenter is having a kiniption fit. Clrmampro seems to be having similar problems with some of the list xml changes due to recent EM additions.
I'm having to bounce back between the two to rebuild my set.
--- End quote ---
So, it really seems that a new........and much simpler......app needs to be created for this. Something like the following:
- you click on a button called 'exe' or 'target' or 'target exe'
- it automatically creates a profile
- you click another button called 'dir' or 'directory' or 'target directory'
- you press another button called 'fix'
And, hey, all your romz is correct!
What would be the icing on this cake, would be a feature that connects to your preferred source (you know, that T word!), and automagically adds the files you need, and only those!!
Now who thinks this can be done [relatively easily], and has the inclination to??
Howard_Casto:
MAME/MESS actually have built-in rom verification, but I don't think that any of the rom managers take advantage of it. It might be due to the excessive command-line launching, but to me, using the internal system ensures that the roms are what they say they are.
Run:
mame.exe sf2 -verifyroms
And if you've properly setup your paths in your mame.ini and your rom is correct you'll get the following message:
romset sf2 is good
1 romsets found, 1 were OK
Run it on a game with an issue (in my case a ddr game) like so:
mame.exe ddr2ml -verifyroms
And you'll get the following error messages:
ddr2ml : ge885jaa.u1 (548 bytes) - NEEDS REDUMP
ddr2ml : 885jab01 - NOT FOUND
romset ddr2ml [ddr2m] is bad
1 romsets found, 0 were OK.
This tells us that the romset is bad, that one of the files needs a redump (you can't do anything about that) and that the other is missing. So basically it tells you what is wrong and what file you need.
Now obviously that isn't practical for all 18,000+ roms but luckily if you omit the rom variable, mame will go ahead and verify EVERYTHING.
It'll spit out a list something like this:
romset fb2nd is good
romset fb2ndc2 [fb2nd] is good
romset fb2ndd1 [fb2nd] is good
romset fb2ndd2 [fb2nd] is good
romset fb2ndo [fb2nd] is good
romset fb2ndv1 [fb2nd] is good
romset fb2ndv2 [fb2nd] is good
romset fb3g is good
fb4 : fb4rom2.bin (262143 bytes) - NEEDS REDUMP
romset fb4 is best available
It bascially summarises the output messages.... if a romset is ok it tacks on a "is good" at the end. If it's bad it'll tack on a "not found" or "is bad" at the end.
If it runs across an improperly dumped set, it'll warn about needing a redump, listing all the offending files, but at the end it will give a "is best available" letting you know that there isn't anything wrong with that rom.
There is a similar command line switch for verifying samples btw....
So at least for determining what is wrong, MAME will do it for you. The problem is what to do after that..... You'll have to search for files via crc checksum, NOT names as mame roms constantly get re-named. Then you have to actually get the missing ones from somewhere and zip em up. Of course verify roms doesn't really check the names, so you'll have to do a second pass with listxml if you want everything named correctly.
Long story short, figuring out what is wrong has never been the issue... fixing it has. It's complex and slow to search through a bunch of zip files, check crcs and unzip/rezip stuff.
demeth:
--- Quote from: Howard_Casto on February 14, 2012, 03:04:46 pm ---MAME/MESS actually have built-in rom verification, but I don't think that any of the rom managers take advantage of it. It might be due to the excessive command-line launching, but to me, using the internal system ensures that the roms are what they say they are.
--- End quote ---
You don't even have to parse the output, mame will set the exit-code depending on if it was a success or not.
from <arcanfe/resources/scripts/importers/mame.rb>
--- Code: ---def checkrom(mamepath, rompath, romset)
a = IO.popen("#{mamepath} -rompath #{rompath} -verifyroms #{romset} 1> /dev/null 2>/dev/null")
a.readlines
a.close
return $?.exitstatus == 0
rescue => ex
false
end
--- End code ---
so something short (untested) like;
--- Code: ---Dir["rompath/*.zip"].each{|a| b = IO.popen("/where/is/my/mame -rompath #{rompath} -verifyroms #{a}")}.readlines
b.close
File.rename(a, "broken/#{a[a.index('/')+1..-1]") if $?.exitstatus == 0
}
--- End code ---
Would move all non-working romsets to a different dir. But that's, as howard said, the easy part. ;-)
spoot:
Current application I'm working on is slowly getting rom "fixing/auditing" features. It will crc32 audit 47k rom/zips over my network in about 10 minutes. It doesn't currently rename files, etc....but will shortly. SHA1 calc will slow it down a chunk I spose, but it's currently threaded to support multiple cores so hopefully won't be too bad.
Kinda funny I added a utility two weeks ago to convert 7z to zip as mame/mess don't support it . Then I find out that 7z is being added very soon so I'll have to add an option to batch convert zip to 7z. :D
Gray_Area:
Mainly, I'm interested in the automation feature of filling sets without having to be a pokerom. You wouldn't need to worry about re-naming, or missing files, or anything. You'd just hook up the feed bag, and wait. They have software doing it at Emumovies for everything....except, you guessed it.
Navigation
[0] Message Index
[#] Next page
Go to full version