MAMEWorld >> News
View all threads Index   Threaded Mode Threaded  

Pages: 1

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


Attn frontend developers: machine flags in XML
#368244 - 07/26/17 10:24 PM


We're hitting the limitations of the driver element and its attributes in MAME's -listxml output. To allow for inheritance, better deal with systems with configurable slots, and make handling of machines and devices more uniform, this element is being deemphasised, and some of its attributes are deprecated, to be removed in a future release.

The following attributes of the driver element are deprecated and will be removed in a future release (they will be maintained for at least two releases before being removed): color, sound, graphic, protection. The other attributes are not scheduled for removal at this point.

A new feature element is being introduced to provide more detailed information on unemulated and imperfectly emulated features. This element is applicable to both systems and devices, unlike the driver element that is only applicable to systems. The feature element has three attributes:

  • type - required, indicates the feature of the system/device that has emulation issues; possible values at present: protection, palette, graphics, sound, controls, keyboard, mouse, microphone, camera, disk, printer, lan, wan
  • status - implied, indicates the emulation status of the feature for the device itself; possible values: unemulated, imperfect
  • overall - implied, indicates the emulation status of the feature inherited from subdevices; possible values: unemulated, imperfect


The status attribute only be present if the device itself indicates emulation issues for a feature. The overall attribute will only be present if more severe emulation issues are indicated by subdevices than by the device itself. For example

Code:

<feature type="keyboard" status="imperfect"/> <!-- device indicates that its keyboard emulation is imperfect -->
<feature type="mouse" status="unemulated"/> <!-- device indicates that mouse is unemulated -->
<feature type="graphics" overall="imperfect"/> <!-- at least one subdevice indicates that graphics emulation is imperfect -->
<feature type="palette" overall="unemulated"/> <!-- at least one subdevice indicates that colour palette is unemulated -->
<feature type="sound" status="imperfect" overall="unemulated"/> <!-- device indicates that its sound emulation is imperfect, at least one subdevice indicates that sound is unemulated -->



Right now you can see this with the votrax device. The aussieby system inherits imperfect sound from its votrax device. The c64_speakeasy slot card inherits imperfect sound from its votrax device. If you launch a c64 with a c64_speakeasy card in a compatible slot, MAME will warn about imperfect sound.

If you provide a UI for slot device selection, you may want to provide indication of emulation issues declared by slot devices.

Right now, there is no equivalent for the emulation and savestate attributes for devices (NOT_WORKING and SUPPORTS_SAVE flags). This will come at some point in the future.



haynor666
Reged: 05/06/06
Posts: 101
Loc: Tarnobrzeg/Poland
Send PM


Re: Attn frontend developers: machine flags in XML new [Re: Vas Crabb]
#368268 - 07/27/17 08:25 AM


One question - unemulated protection is still treated as imperfect or critical flag? Up to 187 games with unemulated protection were treated as not working even without not_working flag. Many games however are working fine (Salamander 2 for example).



CiroConsentino
Frontend freak!
Reged: 09/20/03
Posts: 5974
Loc: Alien from Terra Prime... and Brazil
Send PM


Re: Attn frontend developers: machine flags in XML new [Re: Vas Crabb]
#368269 - 07/27/17 08:45 AM


WOW! Thanks for the warning and detailed info about it. My frontend uses all these "soon to be" deprecated tags.



Emu Loader
Ciro Alfredo Consentino
home: http://emuloader.mameworld.info
EmuCon Home: http://emuloader.mameworld.info/emucon
MCM Plus: http://mcm.mameworld.info
e-mail: emuloader@gmail.com



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


Re: Attn frontend developers: machine flags in XML new [Re: haynor666]
#368272 - 07/27/17 09:26 AM


> One question - unemulated protection is still treated as imperfect or critical flag?
> Up to 187 games with unemulated protection were treated as not working even without
> not_working flag. Many games however are working fine (Salamander 2 for example).

Imperfect or unemulated protection is still a red warning in the internal UI, and still causes status="preliminary" in the driver element. The status attribute is build up from a combination of flags. It's supposed to give a kind of crude confidence level.

You can tell whether a machine is marked not working from the emulation attribute. It will be emulation="preliminary" if flagged with MACHINE_NOT_WORKING or emulation="good" otherwise.



soviet
MAME Fan
Reged: 02/18/09
Posts: 36
Send PM


Re: Attn frontend developers: machine flags in XML new [Re: Vas Crabb]
#368275 - 07/27/17 10:53 AM


This design, with feature elements only present if the feature is unemulated or imperfect, doesn't account for feature relevance: both machines that don't support, for example, a mouse and machines that use a well emulated mouse don't mention the mouse feature.

Currently, machines that support a mouse cannot be reliably distinguished: some have a reference to certain devices such as "a2mouse" or "mouse_systems_mouse" containing a control type="mouse" element, but many machines (e.g. various Amiga models) directly have control type="mouse" inputs; many others (e.g. "pv7") only have ports and dipswitches referring to the mouse; and it must be assumed that there are even less perspicuous other cases.

A feature name="mouse" element (without status or with a "good" status value) in a machine with a working mouse would therefore provide useful information at a very modest cost.
Note that among the listed initial set of feature types, all are conceivably optional and suitable for being treated like peripheral-like features such as mouse.



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


Re: Attn frontend developers: machine flags in XML new [Re: soviet]
#368276 - 07/27/17 11:01 AM


You can always discover a mouse by walking inputs and looking for mouse X and Y types, e.g. things like this:
<control type="mouse" player="1" minimum="0" maximum="255" sensitivity="100" keydelta="5"/>

You can find these elements in both machines and slot devices.



soviet
MAME Fan
Reged: 02/18/09
Posts: 36
Send PM


Re: Attn frontend developers: machine flags in XML new [Re: Vas Crabb]
#368283 - 07/27/17 01:27 PM



Quote:


You can always discover a mouse by walking inputs and looking for mouse X and Y types



Not always, as cases like machine "pv7" (mouse as alternate mode of joystick) show clearly.

The mouse feature is a bit exceptional as an example because it has obvious impact on other listxml content. Features like palette or protection are basically invisible unless flagged and reported explicitly.

Edited by soviet (07/27/17 01:28 PM)


Pages: 1

MAMEWorld >> News
View all threads Index   Threaded Mode Threaded  

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