> Thanks for the details. Complex stuff. I think I'll start a new file to list all
> these things about MESS until I understand things better. Yes I'm new to MESS, much
> more complex than MAME.
yeah, it's a lot of stuff one has to learn...
and partially it's also my fault, since I tried to jump to some complex example without a gentle introduction to the bases
let me try to amend this now
running "mame system __options__ -lx" is your best friend here. whenever you parse the output of this command, you will have a series of <machine> entries where the first one represents the actual running system and the latter ones (if any) represents all the possible entities that can be attached to the running system
since the amount of attachable entities varies with the selected __options__ you might probably want to focus your parsing effort on the first <machine> block
in such <machine> block, in addition to the options you're used to parse for the "classic" MAME (I guess roms and chds, plus maybe the number of controls and/or dipswitches and confsettings) you shall focus your attention on the <slot> and <device> nodes which represent respectively the available slot options and the available media switches. The former are used to configure hardware of the running system (making possible to greatly extend the standard emulated configuration), the latter are used to mount software on the running system. You need to consider them at once because specific slot options can create new media switches and new slot options (think to a c1541 floppy drive attached to a C64 expansion slot, which in turn has a serial port to attach additional floppy drives), and specific images mounted in media switches can create new slot options and add new media switches (think to a passthru cart, like a Game Genie, which has a slot to insert additional piggyback carts)
therefore, let us examine the structure of the <slot> and <device> nodes.
we start from "device" which is simpler. a standard occurrence of such a node in the -lx output is like the following one taken from a2600
<device type="cartridge" tag="cartslot" mandatory="1" interface="a2600_cart">
<instance name="cartridge" briefname="cart"/>
the device attribute (type, tag, mandatory, interface) are of internal use so you can skip them for the moment. what it really matters are instance and extension. the former tells you how to form the command line to mount a game image in this media: you can use either "-cartridge XXXX" or "-cart XXXX", with XXXX being either a shortname from softlist or the fullpath to a file image. the latter gives you a list of admissible extensions if you load an image from fullpath (from softlist, the extension is not checked because we often use the label markings as rom names and we get extension like .ic1, .u4, etc. which are not really enforceable). if your frontend does not filter files by extensions, the emulator will simply give a message of unrecognized file format
concerning the "slot" options, instead, let's take a look to one of the ISA options, i.e. let's analyze (part of) the first occurrence of <slot> in the output of "mame ibm5150 -lx"
<slotoption name="mda" devname="isa_ibm_mda"/>
<slotoption name="cga" devname="cga" default="yes"/>
<slotoption name="com" devname="isa_com"/>
<slotoption name="fdc" devname="isa8_fdc_superio"/>
<slotoption name="fdc_xt" devname="isa8_fdc_xt"/>
<slotoption name="sblaster1_0" devname="isa_sblaster1_0"/>
<slotoption name="sblaster1_5" devname="isa_sblaster1_5"/>
the name of the slot is the first important object to read, because it means that the emulator will accept an option "-isa1" at command line. the possible valued of this option are listed in the name attribute of the <slotoption> fields: so for instance, MAME will accept "-isa1 mda", "-isa1 com", "-isa1 fdc" attaching in each case a different piece of hardware to the running machine (a MDA graphic card in the first case, a serial COM adapter in the second, a floppy drive in the third).
The default value for the option, if nothing is provided at command line, is the option with the default="yes" attribute so that in this case the option defaulted to "-isa1 cga" (mounting a CGA chipset).
If you would like to explain to the users what each option corresponds to, you can get the devname attribute of each <slotoption> and search the rest of the <machine> entries for the corresponding description. E.g. if you want to know what is added by "-isa1 fdc_xt" you can search the rest of the -lx output for a <machine name="isa8_fdc_xt"> entry to find out that in fact with this option you are adding an "ISA 8bits XT FDC hookup".
There are a few more advanced features, like the fact that you can use
mame ibm5150 -isa1 ""
to launch emulation with empty ISA1 slot, or the fact that some slot options are not displayed because are not user-configurable (and thus internal only) and they could lead to <slot> entries without *any* slot options, but I think that getting accustomed to the above is more than enough for start