MAME Library Builder v1.1
Intro:
I have an Arcade Cabinet in my living room running MAME with Maximus Arcade and for obvious reasons I prefer to keep it setup with a subset of ROM's rather then the ridiculous full library. I just moved from MAME 0.156 to GroovyMAME 0.212 so rather then hand pick my roms from my updated master list I decided to script it.
Description:
This is a simple PowerShell script to make creating SubLibraries easier.
The idea is if you keep a master library of MAME ROMs and Artwork you can use this script with a
ROMs_List.txt listing all the ROM's and a
Folder_List.txt listing which Full Directories to Copy to your Sublibrary.
Then if and or when you update your MAME Library you can quickly copy out your preferred games for Mobile, Handhelds, Cabinets or anywhere else you run MAME.
The script will parse a
ROMs_List.txt and copy all matching files to the new SubLibrary.
It will then parse a
Folder_List.txt used to decide which Full Directories to Copy.
For the script to work it must be placed just outside your MAME Root Folder with a
ROMs_List.txt &
Folder_List.txtNote: If you have multiple versions of mame in the same folder it will try to search everyone for the requested files. If some files are only available in certain Builds this will combine them in one folder but it will not overwrite previously copied files so don't expect it to as the final SubLibrary will contain the first copy of each file it found. As such I suggest temporarily renaming other MAME versions even just by removing a letter "MAM", "AMA" etc.
Example Folder Structure/ Script Location:
Right Click on the
"Build MAME SubLibrary.ps1" and choose
"Run with PowerShell"The Script will search for any folder with MAME in the name (MAME 0.212, MAMEUI, GroovyMAME etc.) ignoring capitalization and spaces.
Once it finds your MAME folder it will Create a New Folder named
"Building MAME SubLibrary... (*DATE & TIME*)" (Note: MAME is left out of the final name to avoid being read during your next SubLibrary Build but it is used at the beginning as an error check incase your Build is missing some of the EXTRAs Folders)
When it is done the PowerShell window will say
"SubLibrary Creation Complete!" rename the SubLibrary
"Arcade Library (*DATE & TIME*)" and Close automatically after 10 seconds.
Example of Script Running:
Folders Scrapped By Script:
ROMs
Artwork
Cabinets
CPanel
Flyers
Icons
Manuals
Marquees
PCB
Samples
Snap
Soundtrack
Titles
VideoSnapsThese are the Folders the script searches for matching files from your
ROMs_List.
I think this Covers all the important stuff but I could add a few more EXTRA's folders upon request.
CHDs Support: CHDs or any folder you would prefer full Copies of (Every file not just ones matching
ROMs_List) are supported through the use of a
Folder_List.txtYour
ROMs_List.txt should be extremely simple just one line per ROM or BIOS file name with a
* wildcard for the extension.
ROMs_List.txt Example:
1941u.*
1941.*
arkanoid.*
mslug.*
mslug2.*
mslug3.*
pacman.*
puckman.*
Your
Folder_List.txt should be just as simple but can contain Directories within Directories as shown.
Folder_List.txt Example:
ROMs\CHDs\area51
Bosses
Ends
Marquees
I mainly made this for personal use but I realized when I was half done I might as well post it for other as it did take a little time. But it took far less then it would have to hand picking my ROMs from my updated library and It will save you even more!