MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Pages: 1

stranskydesign
MAME Fan
Reged: 12/14/20
Posts: 4
Send PM


Mame Front End Developer Guide
#389016 - 12/15/20 07:47 AM


Hi all!
I'm a seasoned developer but new to mame dev. I'm building yet another front end in electron and have a ton of questions.

If there are better places to ask or tutorials please let me know.

My main issue at the moment is querying for lists. I'd like to duplicate the same selections as mame for now ie. Available, Unavailable etc. None of the cli options seem to be what I want. Thanks ahead of time.



stranskydesign
MAME Fan
Reged: 12/14/20
Posts: 4
Send PM


Re: Mame Front End Developer Guide new [Re: stranskydesign]
#389022 - 12/16/20 08:07 AM


There doesn't appear to be a command for those lists. The closest thing I could find is mame64 -listxml > listXML.xml which creates a 250 mg xml file so I know that's not right. How does MameUI pull those lists?

Edited by stranskydesign (12/16/20 08:08 AM)



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4462
Loc: Melbourne, Australia
Send PM


Re: Mame Front End Developer Guide new [Re: stranskydesign]
#389035 - 12/17/20 05:41 AM


> My main issue at the moment is querying for lists. I'd like to duplicate the same
> selections as mame for now ie. Available, Unavailable etc. None of the cli options
> seem to be what I want. Thanks ahead of time.

You’re not supposed to shell out to MAME for every operation like that. You’re supposed to store the -listxml output in a database so you can query it with good performance and build the lists from that.

See the minimaws sample code for an example of how you can store the data in a relational database: https://github.com/mamedev/mame/tree/master/scripts/minimaws/



stranskydesign
MAME Fan
Reged: 12/14/20
Posts: 4
Send PM


Re: Mame Front End Developer Guide new [Re: Vas Crabb]
#389069 - 12/20/20 10:11 AM


Thank you so much for the link. I'll dig through it but it looks exactly like what I've been looking for. I've never had a harder time finding some example code.
When I dump listxml to a file it's 242mb. And it takes a while. I'm developing on a mac but my mame runs mameui64. I don't remember it taking long at all to install or start up the first time. Do you happen to know if it handles this differently?
Either way, thanks again.



Robbbert
Sir
Reged: 08/21/04
Posts: 3200
Loc: A long way from you
Send PM


Re: Mame Front End Developer Guide new [Re: stranskydesign]
#389071 - 12/20/20 11:52 AM


>



stranskydesign
MAME Fan
Reged: 12/14/20
Posts: 4
Send PM


Re: Mame Front End Developer Guide new [Re: Robbbert]
#389079 - 12/21/20 04:22 AM


Man thanks sooo much!
I has suspected from searching through mameui source that it was encapsulating mame.exe. I assume they are essentially using the mame source as a lib? Anyways, thanks for confirming. Again, I'd suspected as well that, being a thin client, I'd have to generate my own db. I just really didn't want to find out later there was some awesome REST api.

I have plenty of DB options, it's just great knowing that "this is the way".

Great tip on the version id.

I'm kinda surprised that there isn't a more efficient interface like being able to query for just categories, and then roms filtered by category and page number etc. Json data would be nice too.


Pages: 1

MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 32 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 662