Jump to content
LaunchBox Community Forums

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


sjvferris
 Share

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

Awesome info!

Going with a newer ROM set and Mame version. Not sure why I stuck with such a legacy version. Probably a hangover from my handheld retro gaming.

Edited by boxallw
  • Game On 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
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.

 Share

×
×
  • Create New...