darksoul Posted February 4 Posted February 4 I don't want to import all mame roms but it seems like the ones I want are the complicated ones (nfl blitz). I have struggled to get those games to work directly through launchbox/mame but they seem to get setup perfectly in mame-ao. I really like the way mame-ao allows me to easily search for and install specific games and the install always seems to work. I can launch them through the mame-ao interface or through the games section of MameAO\0274\Mame.exe. My question is if I can use the mame and games from the mame-ao setup through the launchbox interface. I have tried importing the MameAO\0274\roms folder with little success. One thing i noticed is that each game is a sub-folder in the MameAO\0274\roms folder. I am hoping someone can point me in the right direction in how to get it to work. P.S. Hopefully this is the right forum, feel free to delete this post if it is inappropriate Quote
Solution JoeViking245 Posted February 4 Solution Posted February 4 2 hours ago, darksoul said: My question is if I can use the mame and games from the mame-ao setup through the launchbox interface. Yes. For the MAME emulator, just add a new emulator and point it to your mame.exe file. For the ROMs, that's a little tricky, but it can be done. For some [valid, I'm sure] reason, Ludlow saves the ROMs into folders named after each games ROM archive name. So, to add one of those games to LaunchBox, in your Arcade platform, Press Ctrl+N to manually add a file Give the game its Title Go to the Launching section Under ROM File, type or paste in the path to the "roms" folder then add a forward slash and type in the name of the games folder i.e. D:\MAME-AO\0274\roms\flagrall Click OK to save and close wash, rinse and repeat for other games For the emulator's Command-line Parameters, you will need to add in -rompath %romlocation%. As for automagically importing all the games, you won't be able to do that with way he had saved them. To import, LaunchBox looks for files (vs folders). And specifically for MAME/Arcade, it looks for .zip or .7z files. You'd get to get more creative than what I mentioned above to be able to LaunchBox's Bulk Import Tools. Quote
darksoul Posted February 6 Author Posted February 6 Thanks a ton. the ability to integrate with mame-ao would be really awesome. Looks like you might be able to watch the roms directory and create games automatically based on the folders instead of .zips. I might take a crack at updating the arcade.xml file to handle that but i would be doing some reverse engineering. Quote
JoeViking245 Posted February 6 Posted February 6 46 minutes ago, darksoul said: I might take a crack at updating the arcade.xml file to handle that but i would be doing some reverse engineering. As another option, you could create a batch file that will loop through all the folders and create a file named the same as the folder(s) with the file extension .zip. It'll be an empty file (zero bytes). So using the example above, you'd have your existing /roms/flagrall/ folder and then then a new /roms/flagrall.zip file. Let the batch file do all the wash, rinse and repeating for you. Then just import the [empty] zip files. This should work because you're just passing to MAME the name flagrall. (as well as, with the above command-line parameter, the path to it.) I believe in the order of precedence that MAME uses, it'll look for a folder name 1st and then a filename.zip. And even if it's the other way around, it'll keep looking until it finds what it's looking for: the actual files (well, symlinks in the AO case) that will be in the folder. It'll look ugly in the folder because you'll have a bazillion "duplicate" looking folder and file names. But won't take up any (notable) additional HDD space. As you add more games, re-run the batch file. (it won't create a 2nd flagrall.zip file). Then reimport the zip files. By default, LaunchBox won't import duplicate games. So import all the .zip's, and only the 'new' ones will be added. Quote
darksoul Posted February 7 Author Posted February 7 That is a really good idea and it works perfectly!. Below is a .bat file i wrote that will create a {folder}.zip file for every subfolder. If you create a text file and copy the code below into is and then rename it to buildZips.bat file. Then when you add games through mame-ao it will add the game in a sub folder. Simply rerun the buildZips.bat and it will create a matching .zip If you set that folder as a rom source in launchbox then it will automatically recognize the new game. It is exactly what i was hoping for buildZips.bat Quote @echo off setlocal enabledelayedexpansion :: Change to the directory where the script is located cd /d "%~dp0" :: Loop through all subfolders in the current directory for /d %%F in (*) do ( if not exist "%%F.zip" ( echo Creating empty archive %%F.zip... powershell -NoProfile -ExecutionPolicy Bypass -Command "$zipHeader = [byte[]](0x50,0x4B,0x05,0x06,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); [System.IO.File]::WriteAllBytes('%%F.zip', $zipHeader)" ) else ( echo Archive %%F.zip already exists, skipping... ) ) echo Done! pause I might make a windows service to automate it, but as of now this works great. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.