MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

cricri_pingouin
Reged: 10/17/03
Posts: 247
Send PM


Trying to parse the MAME XML file
#380579 - 01/06/19 11:47 PM


I'm trying to parse the XML file, and I'd need some help figuring out the structure.

If I want to get a list of CHD games, should I look for this:
<device type="harddisk">

What about this:
<device type="cdrom">

I presume that's not right, because grabbing the list of those 2 does not get me the whole CHD list that MAMEUI gives.

Likewise, if I want to find multi-monitor ROMs, should I count instances of this:
<device_ref name="screen"/>

And if I don't find any instances, does it mean it's a mechanical game?

Thanks!

Edited by cricri_pingouin (01/08/19 12:13 AM)



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


Re: Trying to parse the MAME XML file new [Re: cricri_pingouin]
#380580 - 01/07/19 01:41 AM


You need to stop UBB from trying to treat XML as HTML. Change the option from "using HTML and UBBCode" to "using UBBCode" and wrap XML fragments in [code] and [/code] next time. Since I can't see the XML fragments, I'm not entirely sure what you're asking.

In any case, there's no such thing as a "multi-screen ROM" as such. Many systems gain or lose screens depending on slot options (including arcade systems like Microprose 3D). You can count the number of screens in the default configuration by counting the number of <display> elements inside the <machine> element. Look at e.g. gnw_dkong (two screens), darius (three screens), miexchng (one screen), and whousetc (no screens).

Machines without screens are not necessarily mechanical. They may use multi-segment LED/LCD/VFD displays (e.g. whousetc, aim65), or some other kind of non-video interface. A significant number of these are fully usable in MAME.



cricri_pingouin
Reged: 10/17/03
Posts: 247
Send PM


Re: Trying to parse the MAME XML file new [Re: Vas Crabb]
#380601 - 01/08/19 12:15 AM


> You need to stop UBB from trying to treat XML as HTML. Change the option from "using
> HTML and UBBCode" to "using UBBCode" and wrap XML fragments in and next time. Since I
> can't see the XML fragments, I'm not entirely sure what you're asking.

Sorry, now changed the original message to UBBCode.

> In any case, there's no such thing as a "multi-screen ROM" as such. Many systems gain
> or lose screens depending on slot options (including arcade systems like Microprose
> 3D). You can count the number of screens in the default configuration by counting the
> number of elements inside the element. Look at e.g. gnw_dkong (two screens), darius
> (three screens), miexchng (one screen), and whousetc (no screens).

Do you mean counting the <device_ref name="screen"/> rather than <display>?

> Machines without screens are not necessarily mechanical. They may use multi-segment
> LED/LCD/VFD displays (e.g. whousetc, aim65), or some other kind of non-video
> interface. A significant number of these are fully usable in MAME.

Yes, sorry, you're right, I was thinking arcade games only.



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


Re: Trying to parse the MAME XML file new [Re: cricri_pingouin]
#380602 - 01/08/19 01:51 AM


> Do you mean counting the <device_ref name="screen"/> rather than <display>?

No, I meant what I said. There will be one <display> element for each thing that's treated as a screen by the render stack.

> Yes, sorry, you're right, I was thinking arcade games only.

MAME is a lot more than arcade games Even just for games, there are all the tabletop and handheld games to consider, many of which don't don't use screens.



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


Re: Trying to parse the MAME XML file new [Re: cricri_pingouin]
#380603 - 01/08/19 01:58 AM


> If I want to get a list of CHD games, should I look for this:
> <device type="harddisk">
>
> What about this:
> <device type="cdrom">
>
> I presume that's not right, because grabbing the list of those 2 does not get me the
> whole CHD list that MAMEUI gives.

Why make life hard? Machines that have a CHD in their ROM definitions will have a <disk> element inside the <machine> element. (Unless you're looking for any machine that can potentially load a CHD, which is a different question.)

But I'd question the usefulness of this - presence or absence of CHD media is not really a good indication of space or performance requirements. There are CHDs that are smaller than many ROM sets (e.g. Wedding Rhapsody is smaller than a lot of later Neo-Geo games), and many ROM-based games are more demanding than the PlayStation-based CD-ROM games.



cricri_pingouin
Reged: 10/17/03
Posts: 247
Send PM


Re: Trying to parse the MAME XML file new [Re: Vas Crabb]
#380616 - 01/08/19 11:23 PM


> No, I meant what I said. There will be one element for each thing that's treated as a
> screen by the render stack.

Yerp, I checked the XML, and you're right I'll use this to filter from now on.

> MAME is a lot more than arcade games Even just for games, there are all the tabletop
> and handheld games to consider, many of which don't don't use screens.

I barely have time to play the arcade games that I actually care about, so there is no chance I'll ever sacrifice my free time emulating Simon says or what's not.
But I also use this filter to remove anything that has 2 or more screens. In fact, that was my original intent, removing anything without a screen came as a second thought.

Thanks!



cricri_pingouin
Reged: 10/17/03
Posts: 247
Send PM


Re: Trying to parse the MAME XML file new [Re: Vas Crabb]
#380617 - 01/08/19 11:40 PM


> Why make life hard? Machines that have a CHD in their ROM definitions will have a
> element inside the element. (Unless you're looking for any machine that can
> potentially load a CHD, which is a different question.)

Oh yeah, I didn't notice this tag the first time around, I'll use that to build a CHD list then, thanks!

> But I'd question the usefulness of this - presence or absence of CHD media is not
> really a good indication of space or performance requirements. There are CHDs that
> are smaller than many ROM sets (e.g. Wedding Rhapsody is smaller than a lot of later
> Neo-Geo games), and many ROM-based games are more demanding than the
> PlayStation-based CD-ROM games.

It's just that I don't have much time to play (employed, married and a nipper), and when I do, I'd much rather play stuff I'm fond of, such as SNES or the arcade games that I played as a kid, such as CPS1/2, Sega System 16/18, stuff like that.
I used to collect and hog every possible ROM under the sun, but I did some massive pruning over the last few years. My MAME "complete" set as far as I'm concerned is 8069 arcade only roms, 11.9GB, and that already includes thousand of games I never even tried. I also got rid of some big NeoGeo games, HNG64, Naomi, Model1/2/3, CPS3, Triforce, etc. My biggest zipped romset is Metal Slug 5. If I wanted to play anything like a CHD game, I'd fire up the Wii (which hasn't been played in years) or buy another XBOX360 or something. And I can't ever remember a day in the years since I took this decision when I ever thought "dang, I could do with playing X today, I wish I didn't delete the rom". Apart from Nintendo and Sega ROMs, I pretty much only have some PC Engine ROMs and that's about it. I still have some Atari ST and MSX ROMs, but I think those will go soon too!

Anyway, thanks for the help, now I'll be able to build my exclude list with CHDs and multi-monitors on top of the system I don't care for (that's the easy bit, I'm just checking the sourcefile attribute of the machine elements).



cricri_pingouin
Reged: 10/17/03
Posts: 247
Send PM


Re: Trying to parse the MAME XML file new [Re: Vas Crabb]
#380618 - 01/09/19 12:17 AM


Done! Thanks for your help!

Filtering <disks> on arcade64 gets me 694 matches, and more than 1 <displays> 287 matches.
However, if I also include 0 displays I get 2090 matches, so I might not do that! That also includes a lot of systems that were not in ARCADE64, e.g.
serial_printer
null_modem
rs232_loopback
dec_rs232_loopback
serial_keyboard




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


Re: Trying to parse the MAME XML file new [Re: cricri_pingouin]
#380620 - 01/09/19 12:55 AM


> I barely have time to play the arcade games that I actually care about, so there is
> no chance I'll ever sacrifice my free time emulating Simon says or what's not.
> But I also use this filter to remove anything that has 2 or more screens. In fact,
> that was my original intent, removing anything without a screen came as a second
> thought.

Why would you do that? Many multi-screen games are quote playable on a single host display, especially if you have a widescreen monitor. For example the 6-player X-Men game with two screens side-by-side will end up letterboxed, but it's still fully playable. Same for the Darius games with three screens side-by-side - you'll end up with more black above/below but they play fine. Other machines may have options to run with just one screen, like the PlayChoice 10 games and the Taisen Hot Gimmick series.



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


Re: Trying to parse the MAME XML file new [Re: cricri_pingouin]
#380621 - 01/09/19 12:59 AM


> Done! Thanks for your help!
>
> Filtering on arcade64 gets me 694 matches, and more than 1 287 matches.
> However, if I also include 0 displays I get 2090 matches, so I might not do that!
> That also includes a lot of systems that were not in ARCADE64, e.g.
> serial_printer
> null_modem
> rs232_loopback
> dec_rs232_loopback
> serial_keyboard

Those devices work, but they're not runnable directly, only as components of other systems. You can see that easily - the <machine> element has an attribute runnable="no" if a machine can't be launched directly.

Also, you should use official MAME - ARCADE64 just adds playability hacks. MAME already includes most of the useful functionality.



cricri_pingouin
Reged: 10/17/03
Posts: 247
Send PM


Re: Trying to parse the MAME XML file new [Re: Vas Crabb]
#380630 - 01/09/19 11:18 PM


> Those devices work, but they're not runnable directly, only as components of other
> systems. You can see that easily - the element has an attribute runnable="no" if a
> machine can't be launched directly.

Ah, I see. Thanks again!


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 335 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 673