Jump to content
LaunchBox Community Forums

MAME import version .0159 gives xml error - Mame.xml child node not named "machine" and fails import


sjvferris

Recommended Posts

I have everything up and running for all of my emulators, etc.

However, when I attempt to import mame rom set, the following error shows up and I am unable to proceed past this point.

Mame.xml child node not named "machine" and fails import

Is there a work around for this or a way to correct?  Is it that my ROM set is so old that is causing the issue?

 

Link to comment
Share on other sites

Yes, unfortunately it's probably because that version of MAME is so old. You could use a newer version of MAME with the same older ROM set, but of course that will run you into issues as well.

Older versions of LaunchBox in this situation would go ahead and run the import process, but it would have just imported games that won't always work with your ROM set and your version of MAME. So the best solution would be to download an updated ROM set and an updated version of MAME. Sorry I don't have better news.

Link to comment
Share on other sites

30 minutes ago, boxallw said:

Same issue. Not sure how new the ROM set needs to be. Back to retroarch....

Both the ROM set and the MAME version need to be a newer version. The command we use to identify the ROMs in the import process has been in MAME since 2008 as far as I can tell, so something newer than that.

Link to comment
Share on other sites

On 3/12/2021 at 3:11 PM, sjvferris said:

Mame.xml child node not named "machine" and fails import

When MAME and MESS became a single emulator (release 0.162  - May, 2015), they changed how they store the data.  But only for what they call the rom file. I assume this was to create a better distinction between softlists (MESS) and arcade (MAME). 

Prior to 0.162, individual [Arcade] rom information/data was stored under "game".  Starting with release 0.162 they are stored under "machine".  

So with 0.159, the Mame.xml would have its data listed under "game", and the importer is looking for "machine".

1 hour ago, boxallw said:

Not sure how new the ROM set needs to be.

Anything from MAME release 0.162 to current should work with LaunchBox's built in importing tools.

As always, be sure your version of the MAME executable and the romeset you are using, match.

  • Like 3
  • Unusual Gem 1
Link to comment
Share on other sites

3 hours ago, Jason Carr said:

@JoeViking245 Yes, much appreciated. It's good to know that 0.162 is the earliest version supported. I am curious if we could alter the code a tiny bit to support "game" as well; that might be worth doing if it's easy and it allows earlier versions to work without any other issues.

I'm thinking just add 5 lines right before parsing list.xml:

string listXML = @"D:\Emulators\MAME\ui\list.xml";
XDocument doc = XDocument.Load(listXML);
	
var machineORgame = (string) doc.Element("mame").Element("machine");  //1 Look for "machine"
if (!string.IsNullOrEmpty(machineORgame))                             //2 If it's there..
   machineORgame = "machine";                                         //3 We have a winner
else                                                                  //4
   machineORgame = "game";                                            //5 Otherwise it must be "game"
		
var allRoms = from r in doc.Descendants(machineORgame)                // And whatever it was, use it
    select new
    {
       Rom = r.Attribute("name").Value,
       Title = r.Element("description").Value
       //.....
       //....
    };

 

  • Like 1
Link to comment
Share on other sites

  • 10 months later...
On 3/17/2021 at 3:53 PM, JoeViking245 said:

I'm thinking just add 5 lines right before parsing list.xml:

string listXML = @"D:\Emulators\MAME\ui\list.xml";
XDocument doc = XDocument.Load(listXML);
	
var machineORgame = (string) doc.Element("mame").Element("machine");  //1 Look for "machine"
if (!string.IsNullOrEmpty(machineORgame))                             //2 If it's there..
   machineORgame = "machine";                                         //3 We have a winner
else                                                                  //4
   machineORgame = "game";                                            //5 Otherwise it must be "game"
		
var allRoms = from r in doc.Descendants(machineORgame)                // And whatever it was, use it
    select new
    {
       Rom = r.Attribute("name").Value,
       Title = r.Element("description").Value
       //.....
       //....
    };

 

Was this ever implemented?

Link to comment
Share on other sites

1 hour ago, JoeViking245 said:

I'm verifying with the developers.  Are you currently using a 7+ year old, pre- 0.162 release of MAME?

Yeah, I have a heavily curated a MAME 0.159 set from about ten years ago that I don't want to have to update if possible. I am downloading the entire 0.240 set at the moment, however, just in case.

Link to comment
Share on other sites

1 hour ago, Disco Lando said:

been getting the aforementioned error.

The developers are in meetings all week, so they're unavailable for now.  So I ran a test...

Using the Full Set Importer and selecting MAME 0.159 in the options, and using mame64.exe (v 0.159) I received the same message as well.  So no. It is not yet implemented.

 

In the meantime, what you should be able to is:

  • Get MAME's executable for v0.162 and unzip to a temporary folder.
  • Run the full set importer
    • tell it you're importing 0.162 and point to the temp 0.162 mame64.exe. 
    • Be sure to point to your 0.159 roms folder when asked.  (What files are actually in there won't matter. It's only needed for the setting up the roms' application path(s) [used in the next step]) 
    • You may need to add a [temp] new 'MAME162' emulator 1st.?.
    • Do not download any images during the import process. But do "Search for game information..." (metadata).
  • When importing is complete, run a Scan for Removed ROMs.  This will whittle the Platform to only your roms 
  • Change the default emulator for the Platform your original 0.159 emulator.

I suggested 0.162 because it's the closet to 0.159 that uses the "machine" nomenclature.  This should also get and maintain your heavily curated set.

This all assumes you're using MAME from the MAMEDev Team (vs a fork/offshoot) and your roms are the conventional 8.3 zip files, named accordingly for MAME.

Link to comment
Share on other sites

  • 1 month later...

Ran in to same issue when trying to import my 0.139 curated set.

I think some decent number of people could encounter this, depending on their emulation background... I have this set because it's suitable for some retro-gaming handhelds, raspberry pi, etc.

So, 5 lines of code seems like a quick fix :) That or the version list shouldn't allow the user to select such an old, unsupported version.

I'll grab an updated set now regardless. Maintaining arcade rom sets is quite the chore sometimes and keeping different sets for different purposes certainly eats up some disk space, haha.

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...
On 3/20/2022 at 1:09 AM, krisvek said:

Ran in to same issue when trying to import my 0.139 curated set.

I think some decent number of people could encounter this, depending on their emulation background... I have this set because it's suitable for some retro-gaming handhelds, raspberry pi, etc.

So, 5 lines of code seems like a quick fix :) That or the version list shouldn't allow the user to select such an old, unsupported version.

I also have a non-merged rom pack for 0.139 (for Retropie) and would like to compile/filter the pack via Launchbox. Where and in which file do I have to insert the code above, so that I don't get the error message? That's not clear to me.

Edited by 10vorne
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...