Jump to content
LaunchBox Community Forums

Recommended Posts

Edit: (February 28, 2024) beta version 0.0.6. Fixed: Reimporting would sometimes change ROM names for existing games.

Edit: (August 6, 2023) beta version 0.0.5.  Parent game now included with its Additional Apps.

Edit: (August 10, 2022) beta version 0.04.  Fixed: Import clones as Additional Apps now works.

Edit: (August 26, 2021) beta version 0.03. Now strips (regions) and (notes) from game Titles.  Added notes [below] for downloading Metadata.

Edit: (June 28, 2021) beta version 0.02.  Now supported in LaunchBox Version 11.3 and up.

This plugin will import “Custom” made MAME xml files.

With this plugin, you can import games from a Custom xml file into any Platform (new or existing) and set the Emulator for the imported games to whatever you want, regardless of the Platforms default Emulator (if importing to an existing one).  If you import them into a new Platform, the “Scrape As” for the Platform will be set to “Arcade”.

The xml file MUST be laid out in a standard MAME Machines format.  MAME’s softlist xml files are formatted differently and WILL NOT work with this plugin.  (Use the other plugin)

This only imports the games into LaunchBox giving them their 'proper' game Name/Title as per MAME.  Use LaunchBox's built in Download Metadata and Media Wizard to get you game data, images and videos.  You'll also need to setup any required Custom Command Line Parameters for your Emulators (i.e. DEmul - for Naomi needs "-run=naomi -rom= ")

History

Years ago I imported a personally ‘curated’ set of MAME roms into LB/BB.   This left out a lot of games available in MAME Including clones and games (partially or otherwise) unplayable in MAME.  Including Sega Model 2/3, and Naomi.

I keep this “personally curated set” in my D:\LaunchBox\Games\Arcade folder.  I have also keep a Full (non-merged) set updated on my backup drive.  Thought being, keep the games available in LaunchBox, “inside” LaunchBox while maintaining my full set elsewhere.

As time went on and my Cab and I ‘matured’, I discovered SuperModel and DEmul.  Great!  But I can’t even create Playlists because these games aren’t ‘pre-existing’ in LB.  So now it’s just a matter of getting those roms from the full set into LB/BB.

That’s where this plugin comes into play.

 

Using the plugin

  • Download and unblock the zip. 
  • Copy the folder inside the zip into your ../LaunchBox/Plugins folder.
  •        i.e.   D:\LaunchBox\Plugins\ImportMAMExml\MAMExmlImporter.dll
  • Start LaunchBox.
  • Select Tools,  MAME xml Importer beta 0.03

 

The process should be fairly intuitive by just going through the Import Wizard. 

  • Select the folder where your Custom xml files are located.
  • Select an xml.
  • Choose a Platform (new or existing).
  • Select your Emulator.
  • Filter the clones (Import:  All, as additional apps, none).
  • Select the roms’ source folder (if copying them).
  • Select the roms’ destination folder (required to set the launch path for the games).
  • Select Copy & Import or Import Only.

Downloading Metadata

Right click on the new Platform and select “Edit”. Make sure the Scrape As: is set to “Arcade” and then click “OK”.

Click on one of the games, then press CTRL+A to select all games.  Now click Tools and select Download Metadata and Media and follow the prompts.  Be sure to check the box for:  Search for game information and media from the LaunchBox Games Database (recommended).

I recommend at this point to not download Media. [just to make sure all goes well with getting the metadata] Click on Select None when prompted (again if you have an EmuMovies account).

Click Yes, download and replace all existing metadata and media. Then click Finish.

 

Creating your own Custom xml

I imagine there are many different ways to do this and even places to download them.  Here’s 2 methods to create your own Custom xml.

In MAME itself:

You’ll need the “driver.ini” file which you can get from http://www.progettosnaps.net/renameset/.  Click on “category.ini (0.22x)” to download.  Inside the zip file, copy the “folders” folder into your D:\MAME\ini directory. 

D:\emulators\MAME\ini\folders\

You may need to add ;ini\folders to your “mame.ini”, “inipath” line. (?)

#
# CORE SEARCH PATH OPTIONS
#

homepath           .
rompath            roms
hashpath           hash
samplepath         samples
artpath            artwork
ctrlrpath          ctrlr
inipath            ini;ini/folders

 

Open MAME and click “Category” [on the left pane].

category.png.e67736f04197593355ee19148b5edfa8.png

 

Now select “File  <driver.ini>”.  Under “Group” select the driver you want to sort by and then “Return to Previous Menu”

2037938740_Selectcategory.png.290dbb9f7567f6b017298bb022dbc049.png

 

You’ll now see only the games (56 in this case) for this particular driver.

driver.thumb.png.d898cc3f0d45213e320bbc848569ac3f.png

 

Now click the yellow floppy disk at top [“Export displayed list to a file”] and double click “Export list in XML format (like –listxml, but exclude devices)”.

export.thumb.png.16a27f8805d2c73b0a813110bbfd0e5e.png

 

Your “Custom” xml will be saved to D:\emulators\MAME\ui\exported.xml.  If you do more than one, they will be named “exported_0000.xml”, “exported_0001.xml” and so on.

 

Tip:

If you want to expand you sort filters, instead of “Category” select “Custom Filter” (selecting the File and Group as one of your filters).

2147334586_customfilter.png.3e14f9f27ac71393aabe0c53a6c1a903.png

 

Using the Arcade Database website:  http://adb.arcadeitalia.net/default.php

Click      “Machines”
              “Additional Filters”
              “Driver” tab
Under “Source File”, type in the driver you want to filter by.

Click Search.

1584995764_selectsourcefile.png.04d466976195afb2b94af3e19558c173.png

You’ll now be seeing just the games for that driver/source file.

 

Now click “Options” and select “Export the results”.
Give it a Title.  Click “MAME (xml)” and click “Export”.

751240776_exportfile.thumb.png.514b8d5aacc366fcdd4f4d2336782376.png

Your file is now downloaded.

Tip:     Look through the other tabs for more filter options.

I don't know if this is practical or even useful for anyone else.  Or if there's already an easier way to do it.  But it was fun to make AND it works.  At least it does on my cab. :D

If you decide to try it and have any thoughts, suggestion or whatever (good, bad or indifferent), ... leave a post letting me know.

 

ImportMAMExml-beta-06a.zip

Edited by JoeViking245
update to beta-6a (for LB v13.3+)
  • Like 4
Link to comment
Share on other sites

  • 6 months later...
39 minutes ago, brettwolf said:

doesn't seem to load for me anymore after 11.8

I have no idea which version of LaunchBox I originally designed this under.  Based on when I released it, it "should" work in LB 11.8 and newer.

If it's now loading (Not showing up in the Tools Menu? Not popping up when you click it in the Tools Menu?) please check your Debug log (located in the "Logs" folder under LaunchBox).  You can turn on debugging under Tools, Options if it's not already on.  If it looks like gibberish to you, drag-and-drop your most recent Debug file into a Reply message here (v.s. copy and pasting the text inside) and I'll attempt to decipher it. ;) 

Another thought... 11.8 was several versions ago.  If you've [just] updated manually, make sure you're in the correct LaunchBox folder.  (A common, easy mistake to do [look for a "LaunchBox" folder under your regular "LaunchBox" folder]).  Also verify the plugin file is still in the Plugins folder.  (or  ../Plugins/ImportMAMExml/   folder)

I have uploaded a new version beta-0.02 (bottom of above the original post) which is now supported in LaunchBox version 11.3 and higher (so now I know for sure. lol).   Tested in LaunchBox version 11.13-beta-1.  Though there shouldn't be any reason the previous beta doesn't work for you.

Let me know what you find or if you need any more assistance.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
5 hours ago, wallmachine said:

what do you think of having it scan the MAME metadata like the MAME import wizard?

1) That would be more work for me. lol [jk]   2) That will all take place when you use  Tools Download Metadata and Media... to import your images and videos (and associate the game with the LaunchBox database).

 

5 hours ago, wallmachine said:

removing the (version) and (region) from the name or moving to the respect field?

I assumed that when you downloaded Metadata that it would "fix" the games Title, as-well-as populate the respective metadata fields.  "Fix", as in remove anything in, and including the parenthesis.

I ran a few different tests and found that the Download Metadata and Media... tool, even when selecting "...replace all existing metadata and media", will NOT rename the Title (remove parenthesis).  It will however fill in all the respective metadata fields and associate it to the LB database.

Test #2: From a fresh XML Import, I removed everything in and including the parenthesis from the games Title.  i.e.  "Scud Race (Export, Twin/DX)", "Scud Race (Australia, Twin/DX)" and "Scud Race (Export, Deluxe)" all became 3 separate games simply called "Scud Race".  Ran the Download M&M tool and it worked as expected (retrieved all respective metadata and LB-db ID#'s).

Test #3:  From another fresh XML Import, I renamed the above 3 to "S-Race".  [something arbitrary and unorthodox]  Ran the Download tool and again, all the metadata was properly populated.  BUT.... they did NOT get an associated LB ID#.

I understand why LB will not rename game Titles and respect that.  Test #3 was odd in that it retrieved the metadata but not the db ID. But hey, the test was an off-the-wall, arbitrary and unorthodox one at that. lol Probably never to see the light of day again.

 

Now that I've overexplained myself (as I tend to do. lol), my abbreviated response is:

Scanning MAME metadata is beyond the scope of this plugin and would duplicate a process innate to LaunchBox.  Use  Tools Download Metadata and Media... to retrieve MAME's metadata after using this plugin.  (you'll use it anyway to get images and videos ;))

I will update the plugin to remove anything in [and including] parenthesis in the game's Title to maintain a consistency with the LaunchBox database.

As always, thanks for the heads up.  After this next update, I might even be able to take this out of 'beta' and do an 'official' release.  That way all 6 of the people who downloaded this (well, probably 5 because I think I d/l'd  it when I was trying to figure out what I did before the June update. lol) can download one that says "version 1.0" without the word 'beta' in it.

  • Thanks 2
Link to comment
Share on other sites

  • 11 months later...

Thanks for this great plugin Joe. I was wondering if you might be able to help with a problem I am having when importing clones as additional apps through your plugin with the FBNeo romset. If I choose the "import everything" option, all the clones get listed perfectly and separately as they should. However, when I choose the "import clones as additional apps" option, it seems that quite a few don't end up showing after the process is completed. What is odd is that all the clones show up fine when selecting the xml file as you can see below, however once the process is completed, only 1 version of "Sunset Riders" is available. Another example is "1000 Miglia: Great 1000 Miles Rally", which has 6 versions I believe, but only 3 end up available.

After looking through the xml files I can't seem to figure out a pattern with regards to why some additional versions appear whilst others do not. So far my only theory is that it is maybe a problem with the romset being a split set, but I don't have a non-merged set yet to be able to test this. Most likely I'm missing something obvious but I can't figure it out so I thought I better ask the expert. Thanks again!

430659792_sunsetridersxml.thumb.jpg.0c685e88726d6e7b558298ae6f0c564f.jpgsunsetversion.thumb.jpg.ed461cf3ad0a5ff55230b0418502abe3.jpg

Link to comment
Share on other sites

You're welcome.

6 hours ago, LP64 said:

theory is that it is maybe a problem with the romset being a split set

Great theory.  However the Importer really doesn't care about you romset.  Well, I suppose it does if you ask it to copy your ROMs into a different folder.  But even then, it goes through the list (your above left photo) and attempts to copy the Rom (column 1) from the source to the destination folder you supply.  And then I believe, if it doesn't exist (say in the case of a clone in a merged set), it simply moves on to the next file.

If you are doing an Import Only (aka, phase 2 of Copy and Import), the plugin won't care if the ROMs exist or not.  It just needs to know the path to where they're 'supposed to be'.

 

6 hours ago, LP64 said:

Most likely I'm missing something obvious but I can't figure it out

No. It's the plugin.  I personally never import clones as addition apps.  Well, I never import clones at all for that matter. lol  At least not in bulk.  I've found it easier to add a few good ones, 1-by-1 then to remove a bunch of crap.

Anyway, I had in the back of head that the Import as Additional Apps wasn't 100% and that I was "going to fix it later".  And I did.  Back in January.  But appears I didn't share it.   Thank you for the reminder. 😊  I'll update the original post with version "beta-04. " 

  • Game On 1
Link to comment
Share on other sites

38 minutes ago, JoeViking245 said:

Anyway, I had in the back of head that the Import as Additional Apps wasn't 100% and that I was "going to fix it later".  And I did.  Back in January.  But appears I didn't share it.   Thank you for the reminder. 😊  I'll update the original post with version "beta-04. " 

I've tested "beta-04" and can confirm that you are indeed a legend and the "import clones as additional apps" is now showing the additional clones! Thank you very much Joe, this makes importing a breeze. 😄

  • Game On 1
Link to comment
Share on other sites

  • 11 months later...

Hi Joe. Still loving this plugin! I have a question about the additional apps importing option. Is there any way to also include the default rom/zip in the additional apps list when importing? It's just a small difference I have noticed between Launchbox's MAME importer and your plugin. It's not a big problem at all, I only noticed it because I changed the default app for a game and then sometime later decided to change it back to the original, but had to manually enter the launch path as it wasn't in the additional apps menu to re-select as the default.

Hopefully I've made sense here and it's absolutely no problem if it's not within the scope of this project, just thought I'd ask. 😀

 

Link to comment
Share on other sites

Thanks! Great to hear someone's still liking and using this plugin!

11 hours ago, LP64 said:

Is there any way to also include the default rom/zip in the additional apps list when importing?

Why would anyone want to select a game, then choose Play Version and then pick the game they originally selected.  OK, they wouldn't and that's why it never crossed my mind to put the Parent game as an Additional App.

 

11 hours ago, LP64 said:

I changed the default app for a game and then sometime later decided to change it back to the original, but had to manually enter the launch path as it wasn't in the additional apps menu to re-select as the default.

Hopefully I've made sense here

image.jpeg.02f8d283b27d41def4559609263076fb.jpeg

Yes, that makes perfect sense!  Thanks for feedback and an excellent reason why it falls within the scope of the plugin. ;)  

I've updated the original post with version "beta-05". 

Note: this will only work with new parent game (with additional apps) imports.

  • Like 2
Link to comment
Share on other sites

  • 6 months later...

Hi Joe 😀

I'm having a little problem when updating a romset (MAME) using the xml importer.

So the problem seems to be that when an xml file is imported to a romset that has already been imported using your plugin, a game that has the same name as another game, but is not a clone, will sometimes inherit the launch file of the game it shares the name with. I have saved some images that hopefully explain this better.

EDIT: I should have mentioned that I have only tested this problem when using the "import clones as additional apps" feature.

tmntduplicate.thumb.png.51ef00f586040a6f127602d4f99d290e.png

As you can see, the "Teenage Mutant Ninja Turtles (World 4 Players, version X)" is incorrectly launching using the same file as "Teenage Mutant Ninja Turtles (USA 1.04, display A1.04)", "tmnt_104.zip". However, if I go into the additional apps menu for (World 4 Players, version X), the correct file shows as "tmnt.zip" as you can see below. So it is only the launch command that is inheriting the incorrect value.

additionalapps.thumb.png.19b4f3a70e7b554ac88cbb8ff77e1402.png

I tested this with both an updated xml and also just using a duplicate xml of the original and both displayed this problem, which indicates that it's not a problem with there being changes to the xml file, but rather repeat uses of the xml importer for the same romset cause this issue. I was also able to observe the same problem when updating an FBNEO romset as well. The workaround to the problem is to just delete the rom entries from launchbox and run your importer from scratch to update a romset, but I thought I'd check with you in case there is any easy fix 😀

Hopefully I've made sense here and thanks again Joe, this plugin is my favourite.

Edited by LP64
Link to comment
Share on other sites

8 hours ago, LP64 said:

So the problem seems to be that when an xml file is imported to a romset that has already been imported using your plugin, a game that has the same name as another game, but is not a clone, will sometimes inherit the launch file of the game it shares the name with.

What you say makes sense.  I'd have to scour this 4-year-old code to see what and how I did what I did. 

What doesn't make sense is why you'd import tmnt_104.  What is the source of your xml file(s)?  May want to look at filtering and remove mechanical games or select MAME Cab Only (in the case of adb.arcadeitalia).  What I'm getting at is tmnt_104 is the DMD for the pinball machine.  It'll "run". You can add coins. But not much more (unless you use it alongside Visual Pinball and a corresponding table). ;)

8 hours ago, LP64 said:

The workaround to the problem is to just delete the rom entries from launchbox and run your importer from scratch to update a romset, but I thought I'd check with you in case there is any easy fix

There's an easy fix for you, but not for me. lol  For now, go the 'workaround' route.  I'll add it to my to-do list.  When I actually get to it is a different story.  :)

 

Thanks for letting me know!  If you happen to do subsequent tests and the issue keeps popping it's head up, do let me know and I'll 'bump it up' on the list.

  • Like 1
Link to comment
Share on other sites

Thanks for the reply Joe and no problem for the report!

4 hours ago, JoeViking245 said:

What doesn't make sense is why you'd import tmnt_104.  What is the source of your xml file(s)?

The xml was exported from within MAME using the  “Export list in XML format (like –listxml, but exclude devices)”. I don't usually use MAME in Launchbox, just FBNEO, but I wanted to test if the problem still occurred with a MAME xml and make sure I wasn't introducing any other variables by using a different xml file from FBNEO. Seems I picked a poor example! 😅 Thank you for the advice on filtering and removing mechanical games for MAME though, I'm definitely going to have a play around with this. That's the main reason that I use FBNEO, because it's already trimmed down quite a bit.

I'll do some further testing and see if I can identify any kind of pattern to why some games are inheriting the wrong launch file. And I'm going to use a trimmed down MAME xml to do it rather than importing every machine known to man 😅

  • Like 1
Link to comment
Share on other sites

I did some testing to see if I could isolate the issue and I may have found something. I created an XML file with just four games which I had observed the issue with to see if there was anything in particular that stood out. It turns out that the order in which they are listed after importing (when sorted by title) would determine whether or not a subsequent import would function correctly, or if one of the games would inherit the launch file of the other.

From the testing I have done so far, it seems that if the games' filenames are ordered in alphabetical order, the problem will occur. If they are in reverse-alphabetical order, the problem will not occur. I've attached an example of what I mean below. Whether the game files are in alphabetical order or not seems to be random, and will sometimes change at random just by closing and reopening LaunchBox even after they have already been imported.

example.thumb.png.c231931d69dc94f90ee06f7ead0b3659.png

As you can see, the Boulder Dash files (alphabetical order) end up with the error after the second import, whereas the Jumping Pop files (reverse alphabetical) do not. If the Jumping Pop games were the other way around, they would display the same behaviour as the Boulder Dash games.

I tested across all 3 import options (import everything, clones as additional apps, no clones) and the issue was consistent across all 3.

I attached the XML file I have been testing with in case that is of any use. No problem if you don't get around to checking this out, I just enjoy helping to troubleshoot 😀

importer boulder dash.xml

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, LP64 said:

I tested across all 3 import options (import everything, clones as additional apps, no clones) and the issue was consistent across all 3.

I attached the XML file I have been testing with in case that is of any use. No problem if you don't get around to checking this out, I just enjoy helping to troubleshoot

Appreciate the troubleshooting!  And for the short and sweet xml file. :)   That'll (hopefully) make debugging easier. 

  • Like 1
Link to comment
Share on other sites

11 hours ago, LP64 said:

I tested across all 3 import options (import everything, clones as additional apps, no clones) and the issue was consistent across all 3.

The issue came down to: it was only comparing the game's Title & ROM name and not taking into account the games Version.

Fixed in beta-6.  

Also (not mentioned in the description), the plugin will now add the Version data when importing regular games (vs. just additional apps).

Which bring us to: you may still have an issue with your imported game Boulder Dash [cbdash.zip].  The "Version" of that game per your xml file is "(Zombie Cassette) (US)".  In the MAME official builds (since release 0.179), the version is "(DECO Cassette) (US)".   So if when getting metadata from LaunchBox and it updates the version field, reimporting via that xml file (or source of the file) may make for unexpected results.  (or maybe they will be 'expected' because of what I just mentioned. ;))

  • Thanks 1
Link to comment
Share on other sites

Thanks for looking into it and fixing it so quick Joe! Unfortunately the updated plugin isn't showing after I add it to the Plugins folder and start LaunchBox. I've made sure to unblock the zip file after downloading it and am using the correct file structure, but no luck. If I revert back to 0.0.5 it shows in the Tools menu again. I tried a fresh installation of LaunchBox too. Might be a problem on my end I have to figure out.

4 hours ago, JoeViking245 said:

Which bring us to: you may still have an issue with your imported game Boulder Dash [cbdash.zip].  The "Version" of that game per your xml file is "(Zombie Cassette) (US)".

Whoops! I was testing changing the version name to see if that had any impact on the issue and forgot to change it back. 🙃

I changed Jumping Pop to "Jumping Pop (Aladdin 1)" too. Sorry about that!

Link to comment
Share on other sites

25 minutes ago, LP64 said:

Unfortunately the updated plugin isn't showing after I add it to the Plugins folder and start LaunchBox.

Guessing you're not on LaunchBox 13.12-beta-3. 😊  This was actually my fault for not rolling back the dependencies. 

Version beta-6a will work with LB v13.3 and newer.

 

32 minutes ago, LP64 said:

Whoops! I was testing changing the version name to see if that had any impact on the issue and forgot to change it back. 🙃

lol.  Good.  Was about to question the integrity of your xml sources. ;) 

  • Thanks 1
Link to comment
Share on other sites

14 hours ago, JoeViking245 said:

Guessing you're not on LaunchBox 13.12-beta-3. 

Correct! I am on 13.11 and can confirm that it is working perfectly with version beta-6a. This is a very nifty tool.

Thank you for all the work and time you have put into this plugin. Being able to import custom xmls makes arcade gaming so much better!

My current use for the plugin is importing an FBNeo romset using the xml importer, and then using LaunchBox to gather the metadata, generate arcade playlists and mark games as favourites. It's the best way for me to have an easily managed arcade romset. This tool is a 5 star, would highly recommend from me!

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...