Mr Tool - a MAME zip file tool for Windows ------------------------------------------ Copyright (c) 2001-2005 by THI http://www.zedbogey.com/ thi@zedbogey.com Introduction ------------ How many times have you downloaded a new version of MAME, only to realise that your ROM collection is now out of date? You need to get hold of a load of new files, some of your existing files are now no longer needed, and others are just plain unusable due to the fact that they have been redumped and there are better ones available. In earlier versions of MAME this wasn't really an issue, but recently MAME hit the 3000 game barrier, and managing zip files is a complete pain in the ass, especially if you skip a couple of versions before upgrading. This is where MrTool comes in, it does the jobs you hate. There are three distinct things that need to be done with a set of ROM zips upon upgrading to a newer version of MAME: 1) Identify the files that are no longer necessary, and remove them 2) Identify the files that no longer work, and remove them 3) Identify the files that are now needed, and download them I realise that a simple rename is all that is needed in the majority of cases where 1) applies, but this entails trawling through the bundled documentation - something which is even more of a pain in the ass, I know, but keep reading ;-) I initially wrote a series of batch files to help me perform this monumental task (soon after the release of version 0.34, when I realised that paper and pen would no longer cut it) - MrTool is a reworking of these batch files into a Win32 application. Oh, and the name comes from "Mame Rom Tool", shortened to "MRTool", or even "Mr.T" for even shorter ;-) Installation ------------ Theoretically, MrTool can be installed into any directory, but it works "out of the box" when you put it into a directory of its own inside the directory where the MAME executable is. e.g. if your MAME installation is "C:\MAME\", then unzip the installation file to here and you'll end up with "C:\MAME\MrTool\" - just run the "MrTool.exe" file you find in this directory. You will need the Visual Basic 5 runtime files - I'm looking into porting it to Delphi so that there are no external requirements. It was developed and tested on Windows NT 4.0 SP5 and Windows 2000 SP2, your mileage may vary on other x86 Win32 platforms. Do yourself a favour and upgrade to an NT kernel-based Windows, you won't regret it. Your ROM files must live in a single directory, and must not be fully "merged" - i.e. there must be a zip file per game. Configuration ------------- MrTool needs to be aware of the locations of various files and directories in order to do its job: 1) Location of MAME executable Any Win32 MAME should work (ie MAME or MAME32), DOS MAME probably won't (Certainly won't if you're using Win95/98/ME, due to bugs in the O/S) Note that the naming conventions of the MAME executables have changed recently, so the correct executable will depend on which version you have installed. 2) Location of ROMs directory As stated above, MrTool only supports one ROM directory at the moment, as this is how I use MAME - I'll maybe add support for multiple directories in a later version. 3) Location of Mass Download tool This is the interesting one. MrTool gives you the ability to call an external program for each of the zip files that have been identified as needed. I have bundled a "do-nothing" placemarker file called "MAMERom.bat" in order to show what is required. I'll repeat that: =============================================================== The "MAMERom.bat" File Which Comes With MrTool Does Nothing!!!! =============================================================== I don't want to be hounded by the various ROM websites etc. for enabling loads of people to suck all their bandwidth. Besides, if I released a tool like this, then they'd rework their websites, & it'd stop working pretty quickly. Therefore you have to do some work on MAMERom.bat in order to get it to work, & out of the box, MrTool will list the needed zip files, but it won't get them for you. Whatever Mass Download tool you end up writing/acquiring, it needs to support the following usage: MDTool nameofgame destinationdirectory e.g. MAMERom.bat pacman C:\MAME\ROMS\ Of course, it doesn't even have to be a batch file, a Win32 application should also do the trick. 4) ROM exclusions This is basically a list of the various "BIOS" type zip files that may live in your ROMs directory, but aren't games in their own right. I used to keep these in the MAME directory rather than ROMs, but that recently stopped working with some beta or other, & I had to resort to placing them in the ROMs directory, therefore the existence of an exclusions list. These files will be ignored by the "Clean Current ROMs" button. The four that I know about are inserted by default, but keep an eye out for more in future releases of MAME, & add them here. The MrTool configuration will save out to a "MrTool.ini" file in the MrTool directory upon exiting the application. I hate the registry. Usage ----- There are three buttons which do the various functions that have been described: 1) Clean Current ROMs This calls MAME with the "-verifysets" parameter, then blows away any zip file which reports back as "bad" - note that the files go nowhere near the Recycle Bin, and you aren't asked for confirmation, they'll just disappear! Every zip file in your ROMs directory is then checked against the results of the "-verifysets" command, and any file which doesn't show up there gets deleted. This takes care of any zip files you have lying around that are not valid because they have the wrong name, as well as the zip files you may have that now contain entirely the wrong set of files. Note that files on the exclusion list are left alone. 2) List Needed ROMs This evaluates every supported game against the list of zips in the ROMs directory, and builds up a list of the files you do not have. You are then asked if you want to view the list. Either way, the list is saved into the MrTool directory as "NeededRoms.txt". Note that this file is deleted every time that MrTool is started, thus ensuring that you're not working off old files for the mass download. 3) Get Needed ROMs This takes the "NeededRoms.txt" file and creates a "NeededRoms.bat" file, which, when ran, will call your Mass Download tool for each item in the list. This batch file is then spawned (once it is running, you can close MrTool). If the MrTool configuration is not correct (ie. if any of the paths do not exist) then the buttons will be greyed out. "Get Needed ROMs" will only be available when the "NeededRoms.txt" file exists. Not Helpful FAQ --------------- Q: Do you have a MAMERom.bat file that actually works? A: Yes. Q: Can I have a copy of it? A: No. Q: Well, where can I get ROMs then? A: I'm not telling you. Disclaimer ---------- This program is free, & you get what you pay for. It works for me, but if it trashes your system, then I have no responsibility whatsoever (I'd like some sort of bug report though :-). Playing arcade games that you don't own is illegal, therefore there is absolutely no market for this tool whatsoever - theoretically - as no-one legally owns all the games that MAME will run. Therefore, what are you doing reading this?!?!?!?!?!