MAMEWorld >> News
View all threads Index   Threaded Mode Threaded  

Pages: 1

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


Attn frontend developers: machine flags in XML new
#368244 - 07/27/17 03:24 AM


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 [Re: Vas Crabb]
#368268 - 07/27/17 01:25 PM


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/21/03
Posts: 6211
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 01:45 PM


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
e-mail: ciroconsentino@gmail.com



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


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


> 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: 38
Send PM


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


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/13/05
Posts: 4454
Loc: Melbourne, Australia
Send PM


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


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: 38
Send PM


Re: Attn frontend developers: machine flags in XML new [Re: Vas Crabb]
#368283 - 07/27/17 06: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 06:28 PM)


Pages: 1

MAMEWorld >> News
View all threads Index   Threaded Mode Threaded  

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