Previous Thread
Next Thread
Print Thread
New device configurator WIP #111531
12/07/17 03:33 PM
12/07/17 03:33 PM
Joined: May 2008
Posts: 4,892
Germany
Q
qmc2 Offline OP
Very Senior Member
qmc2  Offline OP
Very Senior Member
Q
Joined: May 2008
Posts: 4,892
Germany
I'm currently working on a new implementation of QMC2's device configurator which now needs to gather the required info from XML directly... while this first progressed nicely, I'm now hitting a point where I could need some help from the MAME devs.

I found some inspiration using Vas' minimaws python script, and it helped a lot for testing out my own stuff, and changing slots / slot-options on-the-fly is (mostly) working in my implementation as well now. However, what it doesn't demonstrate is how to find out which device instances are actually available for an arbitrary (slot) setup.

Now, what I would like to do is traverse the device tree and get the information from the relevant device node itself. However, the XML for many devices doesn't provide that info, while it does for many others.

Example of a device that I can work with, because it has a <device> entity:

Code
rene@marvin:~/src/mame-git> ./mame64 -nodtd -lx idehd
<mame build="0.192 (mame0192-55-g1826aa157e)" debug="no" mameconfig="10">
        <machine name="idehd" sourcefile="src/devices/machine/idehd.cpp" isdevice="yes" runnable="no">
                <description>IDE Hard Disk</description>
                <device_ref name="harddisk_image"/>
                <device type="harddisk" tag=":image">
                        <instance name="harddisk" briefname="hard"/>
                        <extension name="chd"/>
                        <extension name="hd"/>
                </device>
        </machine>
</mame>

Example of a device where I'm unable to figure out the actual device instance, because it has no <device> entity:

Code
rene@marvin:~/src/mame-git> ./mame64 -nodtd -lx c1541
<mame build="0.192 (mame0192-55-g1826aa157e)" debug="no" mameconfig="10">
        <machine name="c1541" sourcefile="src/devices/bus/cbmiec/c1541.cpp" isdevice="yes" runnable="no">
                <description>C1541 Disk Drive</description>
                <biosset name="r1" description="Revision 1"/>
                <biosset name="r2" description="Revision 2"/>
                <biosset name="r3" description="Revision 3"/>
                <biosset name="r4" description="Revision 4"/>
                <biosset name="r5" description="Revision 5"/>
                <biosset name="r6" description="Revision 6" default="yes"/>
                <biosset name="jiffydos" description="JiffyDOS v6.01"/>
                <biosset name="speeddos" description="SpeedDOS-Plus+"/>
                <biosset name="rolo27" description="Rolo DOS v2.7"/>
                <biosset name="tt34" description="TurboTrans v3.4"/>
                <biosset name="digidos" description="DigiDOS"/>
                <rom name="901229-01.uab5" bios="r1" size="8192" crc="9a48d3f0" sha1="7a1054c6156b51c25410caec0f609efb079d3a77" region="ucd5" offset="2000"/>
                <rom name="901229-02.uab5" bios="r2" size="8192" crc="b29bab75" sha1="91321142e226168b1139c30c83896933f317d000" region="ucd5" offset="2000"/>
                <rom name="901229-03.uab5" bios="r3" size="8192" crc="9126e74a" sha1="03d17bd745066f1ead801c5183ac1d3af7809744" region="ucd5" offset="2000"/>
                <rom name="901229-04.uab5" bios="r4" size="8192" status="nodump" region="ucd5" offset="2000"/>
                <rom name="901229-05 ae.uab5" bios="r5" size="8192" crc="361c9f37" sha1="f5d60777440829e46dc91285e662ba072acd2d8b" region="ucd5" offset="2000"/>
                <rom name="901229-06 aa.uab5" bios="r6" size="8192" crc="3a235039" sha1="c7f94f4f51d6de4cdc21ecbb7e57bb209f0530c0" region="ucd5" offset="2000"/>
                <rom name="jiffydos 1541.uab5" bios="jiffydos" size="8192" crc="bc7e4aeb" sha1="db6cfaa6d9b78d58746c811de29f3b1f44d99ddf" region="ucd5" offset="2000"/>
                <rom name="speed-dosplus.uab5" bios="speeddos" size="16384" crc="f9db1eac" sha1="95407e59a9c1d26a0e4bcf2c244cfe8942576e2c" region="ucd5" offset="0"/>
                <rom name="rolo27.uab5" bios="rolo27" size="8192" crc="171c7962" sha1="04c892c4b3d7c74750576521fa081f07d8ca8557" region="ucd5" offset="0"/>
                <rom name="ttd34.uab5" bios="tt34" size="32768" crc="518d34a1" sha1="4d6ffdce6ab122e9627b0a839861687bcd4e03ec" region="ucd5" offset="0"/>
                <rom name="digidos.uab5" bios="digidos" size="8192" crc="b3f05ea3" sha1="99d3d848344c68410b686cda812f3788b41fead3" region="ucd5" offset="0"/>
                <rom name="325302-01.uab4" size="8192" crc="29ae9752" sha1="8e0547430135ba462525c224e76356bd3d430f11" region="ucd5" offset="0"/>
                <device_ref name="m6502"/>
                <device_ref name="via6522"/>
                <device_ref name="via6522"/>
                <device_ref name="c64h156"/>
                <device_ref name="floppy_connector"/>
                <chip type="cpu" tag=":ucd5" name="M6502" clock="1000000"/>
                <dipswitch name="Device Address" tag=":ADDRESS" mask="3">
                        <dipvalue name="8" value="0" default="yes"/>
                        <dipvalue name="9" value="1"/>
                        <dipvalue name="10" value="2"/>
                        <dipvalue name="11" value="3"/>
                </dipswitch>
        </machine>
</mame>

What should I do about this? Are the XML infos missing on MAME's end, or am I missing something?


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!
Re: New device configurator WIP [Re: qmc2] #111548
12/08/17 08:24 AM
12/08/17 08:24 AM
Joined: Feb 2004
Posts: 1,968
Sydney, Australia
Vas Crabb Offline
Very Senior Member
Vas Crabb  Offline
Very Senior Member
Joined: Feb 2004
Posts: 1,968
Sydney, Australia
Do you mean image devices for loading media? The information isn't exposed properly at the moment, sorry. Fixing it properly requires a pretty serious overhaul of how some stuff works.

Re: New device configurator WIP [Re: Vas Crabb] #111549
12/08/17 08:49 AM
12/08/17 08:49 AM
Joined: May 2008
Posts: 4,892
Germany
Q
qmc2 Offline OP
Very Senior Member
qmc2  Offline OP
Very Senior Member
Q
Joined: May 2008
Posts: 4,892
Germany
Yes, I mean the devices where one can actually "mount" some image on. OK, I see. Then my understanding isn't all that wrong at least. Well, I can still continue my work but it will not function properly for those cases until this is fixed... thanks for the info!


A mind is like a parachute. It doesn't work unless it's open. [Frank Zappa]

We're searching for QMC2 translators and support for existing translations. Interested? See here!

Moderated by  qmc2 

Who's Online Now
1 registered members (Stiletto), 32 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,555
Posts111,753
Members4,801
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.062s Queries: 15 (0.037s) Memory: 5.6016 MB (Peak: 5.7654 MB) Zlib enabled. Server Time: 2018-07-21 01:52:09 UTC