The NEW Build Your Own Arcade Controls

Front End Support => MaLa Frontend => Topic started by: VWBusman on June 15, 2015, 11:53:21 am

Title: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: VWBusman on June 15, 2015, 11:53:21 am
***update this has also worked for me on MAME 163, 164 & 165***

Hi,

I am not sure if this tip has already been given/shared (sorry if it has), but I would like to share the solution to the problem that I was having using Mala with MAME 162.

(http://i59.tinypic.com/66kobt.jpg)

I was having the above error (No games were added! Review collection options and ensure using XML file (produced by Mame) is >.84) due to the new mame.xml formatting.

Here a some examples of the changes in the mame.xml file:

old xml naming:

<!ELEMENT mame (game+)>
<!ATTLIST game
<game name="005"
.
.

new xml naming:

<!ELEMENT mame (machine+)>
<!ATTLIST machine
<machine name="005"
.
.

I fixed this using an xml editor (I used Notepad++ https://notepad-plus-plus.org/ (https://notepad-plus-plus.org/)).

I used the "replace" function to replace the majority of the occurrences of "machine" with "game" in the mame.xml file in five steps:

Replace:

machine+

with

game+

Replace:

<!ELEMENT machine

with

<!ELEMENT game

Replace:

<!ATTLIST machine

with

<!ATTLIST game

Replace:

<machine

with

<game

And finally replace:

</machine

with

</game

Make sure to save the changes to mame.xml & then you should now be able to successfully refresh the main game list in Mala.

(http://i58.tinypic.com/120rzo9.jpg)

I hope this information helps,

VWBusman
[Updated title to reflect that this workaround is not limited to 0.162 - 0.165.  Will update title again if it stops working. -- Scott]
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: Vigo on June 15, 2015, 12:02:58 pm
Good workaround! Thanks for helping keep Mala alive!  :cheers:
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: VWBusman on June 15, 2015, 12:24:58 pm
Anything I can do to help. My family & I really enjoy using Mala on my arcade cabinet.

I forgot to mention that this workaround works for both the current beta (1.820) & official version (1.74) of Mala.

A big thanks to everyone working on Mala!

VWBusman
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: yotsuya on June 15, 2015, 12:31:16 pm
I don't use Mala, but good for you, brother, for figuring this out!
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: NOP on June 15, 2015, 08:00:59 pm
I think that a lot of FE's are likely going to fail due to this change, and if the FE isn't supported anymore, they may be stuck at 161 for eternity.

Not to hijack this thread, but I'm running into this with ROMLister, and am wondering how I'm going to code around it to maintain compatibility with previous XML versions.
I was thinking that when creating a merged XML file, if it detects a 162 (machine+) xml file, that will ask you if you want to convert it back to <161's formatting or keep it as is.  RL would then do the exact same steps outlined here with a simple search/replace, which would in effect allow all FE's to work as normal if used with romlister.  As usual, I save the day. <jk>

No ETA on this yet- I think there will be other headaches with this change I haven't run into yet.
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: VWBusman on June 16, 2015, 01:29:03 am
I think that a lot of FE's are likely going to fail due to this change, and if the FE isn't supported anymore, they may be stuck at 161 for eternity.

Not to hijack this thread, but I'm running into this with ROMLister, and am wondering how I'm going to code around it to maintain compatibility with previous XML versions.
I was thinking that when creating a merged XML file, if it detects a 162 (machine+) xml file, that will ask you if you want to convert it back to <161's formatting or keep it as is.  RL would then do the exact same steps outlined here with a simple search/replace, which would in effect allow all FE's to work as normal if used with romlister.  As usual, I save the day. <jk>

No ETA on this yet- I think there will be other headaches with this change I haven't run into yet.

That is exactly what I was hoping that someone was going to eventually create (with the >=162 XML detection). I look forward to trying your solution to this issue.

VWBusman
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: jazzycian on June 16, 2015, 08:24:05 am
Hi,

I am not sure if this tip has already been given/shared (sorry if it has), but I would like to share the solution to the problem that I was having using Mala with MAME 162.

(http://i59.tinypic.com/66kobt.jpg)

I was having the above error (No games were added! Review collection options and ensure using XML file (produced by Mame) is >.84) due to the new mame.xml formatting.

Here a some examples of the changes in the mame.xml file:

old xml naming:

<!ELEMENT mame (game+)>
<!ATTLIST game
<game name="005"
.
.

new xml naming:

<!ELEMENT mame (machine+)>
<!ATTLIST machine
<machine name="005"
.
.

I fixed this using an xml editor (I used Notepad++ https://notepad-plus-plus.org/ (https://notepad-plus-plus.org/)).

I used the "replace" function to replace all occurrences of "machine" with "game" in the mame.xml file.

(http://i58.tinypic.com/11jxls3.jpg)

Make sure to save the changes to mame.xml & then you should now be able to successfully refresh the main game list in Mala.

(http://i58.tinypic.com/120rzo9.jpg)

I hope this information helps,

VWBusman

Thanks for this. I put mala on my laptop so i could fix everything up with ease before putting the folders on to my XP machine and was getting this exact error. Will try it later!
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: Malenko on June 16, 2015, 10:21:01 am
Id give you rep but it doesnt exist.  :applaud:
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: jazzycian on June 17, 2015, 05:54:45 am


I fixed this using an xml editor (I used Notepad++

I used the "replace" function to replace all occurrences of "machine" with "game" in the mame.xml file.



I tried this, on a backed up XML. After doing a Find and Replace of machine for game the gamelist throws up 33,000 odd items in the games list. I only have 1600 Mame titles in my list so there must be other instances of machine here that do not need changing, maybe I just did it wrong.
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: VWBusman on June 17, 2015, 07:59:41 am


I fixed this using an xml editor (I used Notepad++

I used the "replace" function to replace all occurrences of "machine" with "game" in the mame.xml file.




I tried this, on a backed up XML. After doing a Find and Replace of machine for game the gamelist throws up 33,000 odd items in the games list. I only have 1600 Mame titles in my list so there must be other instances of machine here that do not need changing, maybe I just did it wrong.

Hi jazzycian,

I have 25,592 instances of machine in my original file & I changed all of the without any issues. I also have far less roms that the number of instances in the xml file.

If you would like proceed with more caution (understandably so) you can do the same find and replace in several different steps:

machine+

with

game+

<!ELEMENT machine

with

<!ELEMENT game

<!ATTLIST machine

with

<!ATTLIST game

<machine

with

<game

</machine

with

</game

Using this method I did replace 349 less instances of "machine." I will revise my initial post to reflect this more cautious method that does still work (for me).

Please let me know if this works for you.

VWBusman
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: VWBusman on June 17, 2015, 08:13:37 am
Just out of curiosity has anyone else here tried using this "workaround" & has success?  I have tested it my two PCs & my MAME cabinet & it worked for me.

Thanks,

VWBusman
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: Malenko on June 17, 2015, 09:19:46 am
Just out of curiosity has anyone else here tried using this "workaround" & has success?  I have tested it my two PCs & my MAME cabinet & it worked for me.

Thanks,

VWBusman

worked for me in a test environment...... I didnt actually upgrade my MAME or Roms to the latest but the list populated.
Title: Re: A 0 games found workaround for MAME v.162 with Mala.
Post by: VWBusman on June 17, 2015, 09:49:30 am
worked for me in a test environment...... I didnt actually upgrade my MAME or Roms to the latest but the list populated.

Awesome!

Thank you Malenko.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: mike boss on December 20, 2015, 09:15:51 pm
Can you post the revised XML ?
Would it be universal ?
Title: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: Zipper on December 21, 2015, 03:51:28 am
I only use an older mame (.158 ), but the xml file is huge (hundreds of mb), so hard to post.
Are you having trouble generating the xml file, or doing the steps to search/replace 'machine' with 'game'?
If you generate the xml with a mame <162, you don't need to do any text replacing. I think there's a button in mala 'generate xml' that creates it alongside the mame.exe (it takes a few minutes) - and generates an 'All games.mgl' file in your mala directory. I think that's how it works.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: NOP on December 21, 2015, 01:57:24 pm
FWIW, romlister is now able to use mame 162+ files and generate all the gamelists your heart desires.
http://www.waste.org/~winkles/ROMLister/ (http://www.waste.org/~winkles/ROMLister/)
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: Slavefett on January 28, 2016, 10:39:20 am
This worked great for me, thank you!!  I am using Maximus Arcade and was having the Invalid Media Location error.  This is very easy to do and cleared the issue completely up.

Appreciate it

Steve
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: Gotprops on April 10, 2016, 01:31:18 pm
Worked great. Thanks for the help. I was banging my head against the wall.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: dmckean on April 10, 2016, 02:40:59 pm
This post should be sticky.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: MajorRexHavoc on July 18, 2016, 02:22:28 pm
FWIW, romlister is now able to use mame 162+ files and generate all the gamelists your heart desires.
http://www.waste.org/~winkles/ROMLister/ (http://www.waste.org/~winkles/ROMLister/)
So to be clear, I just run my XML file from Mame (above 162) through Romlister, and run Mala as normal with this new xml file it creates, and all is well?  Trying that now. Thank you.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: NOP on July 21, 2016, 08:56:46 am
Not quite.
What I was saying is that you can create .mlg files with romlister with MAME 162+ that will work fine in mala.
If mala is reading in its own copy of the XML file, perhaps to display an all roms list, then you will still have problems.   You could have romlister create an all roms list too, as an .mlg file, and that should work.

Hopefully that didn't just muddy the waters further...
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: DaredevilDave on September 05, 2016, 12:01:24 am
Notepad kept hanging up when trying to open mame.xml, so I copied the XML file from an older version (149) that I have and that worked for me! Copied it to my MAME 173. Thank you!
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: motoschifo on September 05, 2016, 03:31:16 pm
Hi,
I don't know Mala front-end, but if you need a Mame xml file I have written a program to do this: ADB-Tools. See download section of my web site if you are interested on it.

There is a function on Mame Conversion form to generate an xml file of any release of Mame and then make it compatible with front-end that do not manage node "machine".
Simply select starting file (exe or xml), destination format (xml, txt, csv, etc) and target release compatibility level (with Mala is up to 0.161).

I can also add export feature on my web site if this can be useful. Now there are already 12 formats supported (csv, txt, xml, dat, scripts win/linux, hyperspin, mamewah, attract-mode, etc). The new "Mala" output type could use the Mame xml and replace the node name "machine" with "game" (of course xml content inside will be the same).

Let me know about it.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: jmelan on September 05, 2016, 03:42:20 pm
Just wanted to say this worked just fine with mame 176 and notepad++

thanks!!

will check out romlister as well as that seems like a great way to remove all of the unnecessary games
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: Well Fed Games on September 05, 2016, 08:11:10 pm
Thank you for this... I beat my head against this problem for most of today and was at a complete loss before seeing this post. Without this fix, MALA is pretty much obsolete with any newer version of MAME. So glad you posted your solution.  :cheers:
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: shredso on November 13, 2016, 05:34:24 pm
Worked in .179.  Thanks!
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: wcndave on November 14, 2016, 03:19:01 pm
Hey, thanks from me also, I was stuck with this.

Out of curiosity, what creates mame.xml and what is it used for?

If I modify the file for use in Mala, does this mean mame itself will not have new features enabled because the file is the wrong format?

If I use something like clrmamepro, will that also use that list? will it not work if I make the changes from this post?
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: KapnKerfuffle on November 23, 2016, 11:14:32 pm
Hey, thanks from me also, I was stuck with this.

Out of curiosity, what creates mame.xml and what is it used for?

Mame itself creates this file.  You can create it by going to a cmd prompt, and changing the directory to where Mame is installed.  Then if you run the command 'mame -cc' it creates the mame.xml file.  The problem it seems is Mala is coded to recognize the file with the references to 'machine' and not 'game'.  The frontend coders are at the mercy of the Mame project.  If the Mame devs make a change, the frontends have to adapt.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: Shadolf on November 27, 2016, 01:06:21 pm
I have changed my mame.xml as stated in the first post, but MaLa always freezes when I check/read the game list. What can I do? This is really frustrating  :banghead: :cry:
I use GroovyMAME v.171 and tested MaLa v1.74 and v1.82.

Answer:
Just let the PC on for a long while at the last freez and then it worked.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: atreides on December 17, 2016, 03:51:41 pm
Damn it, was about to delete everything related to MaLa, because of this fix :). Was stuck on 0 games loaded for few good hours. Thank you.
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: Fishinfiend on January 01, 2017, 12:02:41 am
It works with MAME v.0.181.
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: PL1 on January 01, 2017, 12:18:18 am
It works with MAME v.0.181.
Updated title of OP to reflect that this workaround is not limited to 0.162 - 0.165.

Will update the title again if it stops working.


Scott
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: loadman on March 04, 2019, 01:54:20 am
This has been fixed in next version:

 _GAME = 'game';
 _MACHINE = 'machine';

if (TagName = _GAME) or (TagName = _MACHINE) then begin
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: Mr. Peabody on October 02, 2019, 09:52:55 pm
For me with .204, baseline (64) and Arcade64:

- open in notepad++

- select 'replace' feature

- type "machine" in [find what]

- type "game" in [replace with]

- press [replace all] button at right

done

(I suspect it may be similarly easy to change in Mala, if one can read Swedish and knows where to look....)
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: retrometro on March 03, 2020, 09:37:10 am
For me with .204, baseline (64) and Arcade64:

- open in notepad++

- select 'replace' feature

- type "machine" in [find what]

- type "game" in [replace with]

- press [replace all] button at right

done

(I suspect it may be similarly easy to change in Mala, if one can read Swedish and knows where to look....)

The problem with your shortcut method instead of OP's is that you'll replace the regular usage of the word "machine" with "game" instead of just the new XML labels changed after 0.162.    While I would like to have history change the maker of my favorite computer from

<manufacturer>Commodore Business Machines</manufacturer>
     to
<manufacturer>Commodore Business Game</manufacturer>

This may not be the desired result.   :cheers:
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: retrometro on March 03, 2020, 10:07:19 am
Reporting in for 0.219 here in 2020 and this update of the mame.xml still works!

Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: MomoneDk on March 05, 2020, 03:34:21 am
Yeh !! Still works, i always use Mala 174, the best cabinet frontend !!!
Title: Re: A 0 games found workaround for MAME v.162 - v.165 with Mala.
Post by: dmckean on March 08, 2020, 12:57:48 am
This post should be sticky.

This post still needs to be stickied.
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: Wzrd0803 on March 08, 2020, 08:25:47 pm
I had to do the same change with Maximus Arcade
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: ChurchOfSolipsism on April 24, 2020, 12:56:17 pm
Just wanted to say that the OP's method worked perfectly for me as well. I'm using Groovymame 0.215 on an old Win7 32bit PC.  Thanks mate!  :cheers:
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: SGT on January 05, 2021, 09:37:40 pm
... and the method still works for Mame 0.227.   Someone should write a utility to make the job a little quicker?  ;D
Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: Cakemeister on March 28, 2021, 05:41:42 pm
A PowerShell script could do it.

https://mcpmag.com/articles/2018/08/08/replace-text-with-powershell.aspx

Title: Re: A 0 games found workaround for MAME v.162 and later with Mala.
Post by: 1upmegaman on December 19, 2021, 12:33:30 pm
Well i have to thank the person who came up with this strategy it works but not all the way if u let mala pull the xml or even let cmd pull it and then use this strategy it does not change the exe u have to tell mala not to create xml then point mala to changed xml then u only have 3 times to start mala before it recognizes the change and locks then u must start process over agian. so the goal is to find a program that can turn exe scribble to normal xml format notepad++ must have this feature but iam a noob at at of this just like to play old games. IF ANYONE KNOWS HOW TO CHANGE THE EXE PLEASE POST.