MAMEWorld Central >> EmuChat
View all threads Index   Flat Mode Flat  

etabeta
Reged: 08/25/04
Posts: 2035
Send PM
Re: Mame 162 -listxml
06/02/15 11:52 PM


> The one thing that's tricky about this is that slot devices can have their own slot
> connectors on them (e.g. the Sonic and Knuckles cartridge for the Sega
> Genesis/Megadrive famously has "lock-on"), so once you've added a card to a slot, you
> must call MAME with -listslots again to see if anything new has happened. We don't
> know in advance when something is going to add a card (this is equally a problem for
> the built-in GUI).

for Genesis/MegaDrive, though, the slot options are not user-configurable and are setup internally when you load the appropriate file in the first cartslot.
in this case you can detect the new subslot which appears when you load the Sonic & Knuckles cart or the Game Genie cart, by parsing the output of -listmedia (base console has only -cart, while console with sk or ggenie mounted also has a -cart2)

basically anytime you select an option or a media you have to re-parse -listslots and -listmedia to update the configurations
or, even better, parse the -lx output in search of <device> and <slot> entries (stopping at the end of the first <machine> block, otherwise you would also parse the optional device and you'd get several unneeded entries).

an example: compare the following snippet of the output of "mame genesis -lx"

Code:

<device type="cartridge" tag="mdslot" mandatory="1" interface="megadriv_cart">
<instance name="cartridge" briefname="cart"/>
<extension name="smd"/>
<extension name="bin"/>
<extension name="md"/>
<extension name="gen"/>
</device>


with the output of "mame genesis -cart sk -lx"

Code:

<device type="cartridge" tag="mdslot" mandatory="1" interface="megadriv_cart">
<instance name="cartridge1" briefname="cart1"/>
<extension name="smd"/>
<extension name="bin"/>
<extension name="md"/>
<extension name="gen"/>
</device>
<device type="cartridge" tag="mdslot:rom_sk:subslot" interface="megadriv_cart">
<instance name="cartridge2" briefname="cart2"/>
<extension name="smd"/>
<extension name="bin"/>
<extension name="md"/>
<extension name="gen"/>
</device>


you see that the presence of the specific "sk" cart has made appear a second cart slot.
of course the "instance" parameters are the command line option that are available for that specific configuration (-cart1 and -cart2 in the second case, but emulation acknowledge also -cart and -cart2)

another example: compare the following small piece of output for "mame ibm5150 -lx"

Code:

<slot name="isa1">
<slotoption name="mda" devname="isa_ibm_mda"/>
[...]
<slotoption name="sblaster1_0" devname="isa_sblaster1_0"/>
<slotoption name="sblaster1_5" devname="isa_sblaster1_5"/>
[...]
<slotoption name="pds" devname="isa_pds"/>
</slot>
<slot name="isa2">
[...]


with the following one corresponding to "mame ibm5150 -isa1 sblaster1_0 -lx"

Code:

<slot name="isa1">
<slotoption name="mda" devname="isa_ibm_mda"/>
[...]
<slotoption name="sblaster1_0" devname="isa_sblaster1_0"/>
<slotoption name="sblaster1_5" devname="isa_sblaster1_5"/>
[...]
<slotoption name="pds" devname="isa_pds"/>
</slot>
<slot name="isa1:sblaster1_0:pc_joy">
<slotoption name="basic_joy" devname="basic_joy" default="yes"/>
<slotoption name="mssw_pad" devname="mssw_pad"/>
</slot>
<slot name="isa1:sblaster1_0:mdin">
<slotoption name="midiin" devname="midiin_port" default="yes"/>
</slot>
<slot name="isa1:sblaster1_0:mdout">
<slotoption name="midiout" devname="midiout_port" default="yes"/>
</slot>
<slot name="isa2">
[...]


as you can see, having selected a soundblaster card in -isa1, you now have a MIDI In port, a MIDI out port and a new "-isa1:sblaster1_0:pc_joy" slot option that accepts the values "" (for empty port), "basic_joy" (for a basic joystick) and "mssw_pad" (for a MS Sidewinder joy). none of these were available in the original configuration because there was nothing mounted in the ISA1 slot

feel free to ask for further info if you need them







Entire thread
Subject Posted by Posted on
* Mame 162 -listxml Cyberonix 05/27/15 05:19 PM
. * Re: Mame 162 -listxml Traso  06/03/15 11:01 PM
. * Re: Mame 162 -listxml TafoidAdministrator  05/27/15 06:11 PM
. * Re: Mame 162 -listxml Master O  05/31/15 10:35 PM
. * Re: Mame 162 -listxml Robbbert  06/01/15 12:49 AM
. * Re: Mame 162 -listxml CiroConsentino  05/27/15 08:17 PM
. * Re: Mame 162 -listxml Mr Ric  05/30/15 06:57 PM
. * Re: Mame 162 -listxml Shoegazr  05/30/15 07:25 PM
. * Re: Mame 162 -listxml TafoidAdministrator  05/30/15 07:35 PM
. * Re: Mame 162 -listxml Shoegazr  05/30/15 08:08 PM
. * Re: Mame 162 -listxml Mr Ric  05/30/15 07:56 PM
. * Re: Mame 162 -listxml CiroConsentino  05/30/15 09:31 PM
. * Re: Mame 162 -listxml TafoidAdministrator  05/30/15 10:17 PM
. * Re: Mame 162 -listxml CiroConsentino  05/31/15 01:02 AM
. * Re: Mame 162 -listxml TafoidAdministrator  05/31/15 01:44 AM
. * Re: Mame 162 -listxml uman  05/31/15 12:59 PM
. * Re: Mame 162 -listxml R. Belmont  05/31/15 05:52 PM
. * Re: Mame 162 -listxml uman  05/31/15 07:07 PM
. * Re: Mame 162 -listxml Shoegazr  06/01/15 01:18 AM
. * Re: Mame 162 -listxml uman  06/02/15 12:16 PM
. * Re: Mame 162 -listxml Shoegazr  06/03/15 02:39 AM
. * Re: Mame 162 -listxml R. Belmont  06/02/15 05:26 PM
. * Re: Mame 162 -listxml CiroConsentino  06/02/15 07:53 PM
. * Re: Mame 162 -listxml R. Belmont  06/02/15 08:24 PM
. * Re: Mame 162 -listxml CiroConsentino  06/03/15 02:39 AM
. * Re: Mame 162 -listxml etabeta  06/03/15 07:20 AM
. * Re: Mame 162 -listxml CiroConsentino  06/03/15 01:52 PM
. * Re: Mame 162 -listxml etabeta  06/02/15 11:52 PM
. * Re: Mame 162 -listxml CiroConsentino  06/03/15 02:44 AM
. * Re: Mame 162 -listxml etabeta  06/03/15 05:34 PM
. * Re: Mame 162 -listxml CiroConsentino  06/03/15 06:48 PM
. * Re: Mame 162 -listxml CiroConsentino  06/10/15 01:13 AM
. * Re: Mame 162 -listxml etabeta  06/03/15 07:27 PM
. * Re: Mame 162 -listxml CiroConsentino  06/03/15 07:33 PM
. * Re: Mame 162 -listxml etabeta  06/03/15 08:34 PM
. * Re: Mame 162 -listxml MooglyGuy  06/02/15 06:15 PM
. * Re: Mame 162 -listxml CiroConsentino  05/31/15 02:43 PM
. * Re: Mame 162 -listxml uman  05/31/15 02:56 PM
. * Re: Mame 162 -listxml BIOS-D  06/02/15 05:41 AM
. * Re: Mame 162 -listxml Mr Ric  05/30/15 11:58 PM
. * Re: Mame 162 -listxml R. Belmont  05/31/15 12:45 PM
. * Re: Mame 162 -listxml CiroConsentino  05/31/15 05:05 PM
. * Re: Mame 162 -listxml Shoegazr  05/31/15 04:36 PM
. * Re: Mame 162 -listxml CiroConsentino  05/31/15 02:51 PM
. * Re: Mame 162 -listxml Vas Crabb  06/01/15 01:14 AM
. * Re: Mame 162 -listxml CiroConsentino  06/01/15 02:32 AM
. * Re: Mame 162 -listxml Tom Speirs  06/01/15 07:12 PM
. * Re: Mame 162 -listxml Tom Speirs  06/01/15 07:38 PM
. * Re: Mame 162 -listxml CiroConsentino  06/01/15 10:01 PM
. * Re: Mame 162 -listxml Tom Speirs  06/01/15 10:39 PM
. * Re: Mame 162 -listxml CiroConsentino  06/01/15 11:34 PM
. * Re: Mame 162 -listxml Tom Speirs  06/01/15 11:48 PM
. * Re: Mame 162 -listxml Tom Speirs  06/01/15 11:59 PM
. * Re: Mame 162 -listxml CiroConsentino  06/02/15 12:54 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 12:58 AM
. * Re: Mame 162 -listxml CiroConsentino  06/02/15 01:40 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 02:47 AM
. * Re: Mame 162 -listxml R. Belmont  06/02/15 05:50 PM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 09:44 PM
. * Re: Mame 162 -listxml B2K24  06/02/15 09:54 PM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 10:17 PM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 10:50 PM
. * Re: Mame 162 -listxml Tom Speirs  06/03/15 06:28 AM
. * Re: Mame 162 -listxml Vas Crabb  06/02/15 12:12 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 12:18 AM
. * Re: Mame 162 -listxml Vas Crabb  06/02/15 01:32 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 01:39 AM
. * Re: Mame 162 -listxml R. Belmont  06/02/15 05:44 PM
. * Re: Mame 162 -listxml Vas Crabb  06/02/15 02:33 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 02:53 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 03:55 AM
. * Re: Mame 162 -listxml B2K24  06/02/15 04:08 AM
. * Re: Mame 162 -listxml joey35car  06/02/15 04:45 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 05:04 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 04:17 AM
. * Re: Mame 162 -listxml Tom Speirs  06/02/15 04:31 AM
. * Re: Mame 162 -listxml uman  05/31/15 01:07 PM
. * Re: Mame 162 -listxml MooglyGuy  06/02/15 08:38 AM
. * Re: Mame 162 -listxml R. Belmont  05/31/15 05:45 PM
. * Re: Mame 162 -listxml Tom Speirs  05/31/15 12:54 PM
. * Re: Mame 162 -listxml TafoidAdministrator  05/31/15 12:14 AM
. * Re: Mame 162 -listxml Tom Speirs  05/31/15 01:12 PM
. * Re: Mame 162 -listxml CiroConsentino  05/30/15 07:52 PM
. * Re: Mame 162 -listxml AntoPISA  05/28/15 08:57 AM
. * Re: Mame 162 -listxml Vas Crabb  05/28/15 02:52 PM
. * Re: Mame 162 -listxml Mr Ric  05/27/15 11:24 PM
. * Re: Mame 162 -listxml Cyberonix  05/27/15 08:39 PM
. * Re: Mame 162 -listxml Cyberonix  05/27/15 07:11 PM
. * Re: Mame 162 -listxml DamienD  05/27/15 07:11 PM
. * Re: Mame 162 -listxml Roman  05/27/15 07:58 PM
. * Re: Mame 162 -listxml DamienD  05/27/15 08:49 PM
. * Re: Mame 162 -listxml Dullaron  05/27/15 08:16 PM

Extra information Permissions
Moderator:  redk9258, URherenow, Tafoid 
2 registered and 18 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 7753