New working systems

-------------------
Electronic Dames [hap, Sean Riddle]
This commit is contained in:
hap 2023-12-24 23:44:57 +01:00
parent d326423963
commit 0fb6670329
3 changed files with 1107 additions and 0 deletions

View File

@ -0,0 +1,803 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
-->
<mamelayout version="2">
<!-- define elements -->
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.14" green="0.014" blue="0.02" /></disk>
</element>
<element name="ledr" defstate="0">
<rect state="1"><color red="1.0" green="0.1" blue="0.15" /></rect>
<rect state="0"><color red="0.14" green="0.014" blue="0.02" /></rect>
</element>
<element name="text_e00"><text string="1" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e01"><text string="2" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e02"><text string="3" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e03"><text string="4" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e04"><text string="5" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o00"><text string="6" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o01"><text string="7" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o02"><text string="8" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o03"><text string="9" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o04"><text string="10" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e10"><text string="11" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e11"><text string="12" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e12"><text string="13" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e13"><text string="14" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e14"><text string="15" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o10"><text string="16" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o11"><text string="17" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o12"><text string="18" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o13"><text string="19" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o14"><text string="20" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e20"><text string="21" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e21"><text string="22" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e22"><text string="23" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e23"><text string="24" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e24"><text string="25" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o20"><text string="26" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o21"><text string="27" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o22"><text string="28" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o23"><text string="29" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o24"><text string="30" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e30"><text string="31" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e31"><text string="32" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e32"><text string="33" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e33"><text string="34" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e34"><text string="35" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o30"><text string="36" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o31"><text string="37" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o32"><text string="38" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o33"><text string="39" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o34"><text string="40" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e40"><text string="41" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e41"><text string="42" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e42"><text string="43" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e43"><text string="44" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_e44"><text string="45" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o40"><text string="46" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o41"><text string="47" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o42"><text string="48" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o43"><text string="49" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<element name="text_o44"><text string="50" align="1"><color red="0.86" green="0.85" blue="0.84" /></text></element>
<!-- sb board -->
<element name="cblack"><rect><color red="0.41" green="0.4" blue="0.39" /></rect></element>
<element name="cwhite"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
<element name="hlbb" defstate="0">
<rect><color alpha="0" /></rect> <!-- force unit square element bounds -->
<disk state="1">
<bounds x="0.12" y="0.12" width="0.76" height="0.76" />
<color red="0" green="0" blue="0" />
</disk>
</element>
<element name="piece" defstate="0">
<rect><color alpha="0" /></rect> <!-- force unit square element bounds -->
<disk state="1">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0" green="0" blue="0" />
</disk>
<disk state="1">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="1" green="1" blue="1" />
</disk>
<disk state="1">
<bounds xc="0.5" yc="0.5" width="0.64" height="0.64" />
<color red="0.81" green="0.81" blue="0.81" />
</disk>
<disk state="1">
<bounds xc="0.5" yc="0.5" width="0.6" height="0.6" />
<color red="1" green="1" blue="1" />
</disk>
<disk state="2">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0" green="0" blue="0" />
</disk>
<disk state="2">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="1" green="1" blue="1" />
</disk>
<disk state="2">
<bounds xc="0.5" yc="0.4" width="0.8" height="0.8" />
<color red="0" green="0" blue="0" />
</disk>
<disk state="2">
<bounds xc="0.5" yc="0.4" width="0.76" height="0.76" />
<color red="1" green="1" blue="1" />
</disk>
<disk state="2">
<bounds xc="0.5" yc="0.4" width="0.64" height="0.64" />
<color red="0.81" green="0.81" blue="0.81" />
</disk>
<disk state="2">
<bounds xc="0.5" yc="0.4" width="0.6" height="0.6" />
<color red="1" green="1" blue="1" />
</disk>
<disk state="3">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0" green="0" blue="0" />
</disk>
<disk state="3">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="0.5" green="0.05" blue="0.15" />
</disk>
<disk state="3">
<bounds xc="0.5" yc="0.5" width="0.64" height="0.64" />
<color red="0.67" green="0.07" blue="0.2" />
</disk>
<disk state="3">
<bounds xc="0.5" yc="0.5" width="0.6" height="0.6" />
<color red="0.5" green="0.05" blue="0.15" />
</disk>
<disk state="4">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0" green="0" blue="0" />
</disk>
<disk state="4">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="0.5" green="0.05" blue="0.15" />
</disk>
<disk state="4">
<bounds xc="0.5" yc="0.4" width="0.8" height="0.8" />
<color red="0" green="0" blue="0" />
</disk>
<disk state="4">
<bounds xc="0.5" yc="0.4" width="0.76" height="0.76" />
<color red="0.5" green="0.05" blue="0.15" />
</disk>
<disk state="4">
<bounds xc="0.5" yc="0.4" width="0.64" height="0.64" />
<color red="0.67" green="0.07" blue="0.2" />
</disk>
<disk state="4">
<bounds xc="0.5" yc="0.4" width="0.6" height="0.6" />
<color red="0.5" green="0.05" blue="0.15" />
</disk>
<!-- selected pieces -->
<disk state="5">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0.205" green="0.2" blue="0.195" />
</disk>
<disk state="5">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="0.705" green="0.7" blue="0.695" />
</disk>
<disk state="5">
<bounds xc="0.5" yc="0.5" width="0.64" height="0.64" />
<color red="0.61" green="0.605" blue="0.6" />
</disk>
<disk state="5">
<bounds xc="0.5" yc="0.5" width="0.6" height="0.6" />
<color red="0.705" green="0.7" blue="0.695" />
</disk>
<disk state="6">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0.205" green="0.2" blue="0.195" />
</disk>
<disk state="6">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="0.705" green="0.7" blue="0.695" />
</disk>
<disk state="6">
<bounds xc="0.5" yc="0.4" width="0.8" height="0.8" />
<color red="0.205" green="0.2" blue="0.195" />
</disk>
<disk state="6">
<bounds xc="0.5" yc="0.4" width="0.76" height="0.76" />
<color red="0.705" green="0.7" blue="0.695" />
</disk>
<disk state="6">
<bounds xc="0.5" yc="0.4" width="0.64" height="0.64" />
<color red="0.61" green="0.605" blue="0.6" />
</disk>
<disk state="6">
<bounds xc="0.5" yc="0.4" width="0.6" height="0.6" />
<color red="0.705" green="0.7" blue="0.695" />
</disk>
<disk state="7">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0.205" green="0.2" blue="0.195" />
</disk>
<disk state="7">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="0.455" green="0.225" blue="0.27" />
</disk>
<disk state="7">
<bounds xc="0.5" yc="0.5" width="0.64" height="0.64" />
<color red="0.54" green="0.235" blue="0.295" />
</disk>
<disk state="7">
<bounds xc="0.5" yc="0.5" width="0.6" height="0.6" />
<color red="0.455" green="0.225" blue="0.27" />
</disk>
<disk state="8">
<bounds xc="0.5" yc="0.5" width="0.8" height="0.8" />
<color red="0.205" green="0.2" blue="0.195" />
</disk>
<disk state="8">
<bounds xc="0.5" yc="0.5" width="0.76" height="0.76" />
<color red="0.455" green="0.225" blue="0.27" />
</disk>
<disk state="8">
<bounds xc="0.5" yc="0.4" width="0.8" height="0.8" />
<color red="0.205" green="0.2" blue="0.195" />
</disk>
<disk state="8">
<bounds xc="0.5" yc="0.4" width="0.76" height="0.76" />
<color red="0.455" green="0.225" blue="0.27" />
</disk>
<disk state="8">
<bounds xc="0.5" yc="0.4" width="0.64" height="0.64" />
<color red="0.54" green="0.235" blue="0.295" />
</disk>
<disk state="8">
<bounds xc="0.5" yc="0.4" width="0.6" height="0.6" />
<color red="0.455" green="0.225" blue="0.27" />
</disk>
</element>
<group name="sb_board">
<bounds x="0" y="0" width="100" height="100" />
<!-- squares, labels -->
<repeat count="5">
<param name="y" start="0" increment="20" />
<param name="yl" start="8.0" increment="20" />
<param name="yi" start="0" increment="1" />
<repeat count="5">
<param name="x" start="10" increment="20" />
<param name="xl" start="10.5" increment="20" />
<param name="xi" start="0" increment="1" />
<element ref="cblack"><bounds x="~x~" y="~y~" width="10" height="10" /></element>
<element ref="text_e~yi~~xi~"><bounds x="~xl~" y="~yl~" width="3" height="1.75" /></element>
</repeat>
</repeat>
<repeat count="5">
<param name="y" start="10" increment="20" />
<param name="yl" start="18.0" increment="20" />
<param name="yi" start="0" increment="1" />
<repeat count="5">
<param name="x" start="0" increment="20" />
<param name="xl" start="0.5" increment="20" />
<param name="xi" start="0" increment="1" />
<element ref="cblack"><bounds x="~x~" y="~y~" width="10" height="10" /></element>
<element ref="text_o~yi~~xi~"><bounds x="~xl~" y="~yl~" width="3" height="1.75" /></element>
</repeat>
</repeat>
<!-- sensors, pieces -->
<repeat count="5">
<param name="y" start="0" increment="20" />
<param name="i" start="10" increment="-2" />
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="90" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element name="piece_a~i~" ref="piece"><bounds x="10" y="~y~" width="10" height="10" /></element>
<element name="piece_b~i~" ref="piece"><bounds x="30" y="~y~" width="10" height="10" /></element>
<element name="piece_c~i~" ref="piece"><bounds x="50" y="~y~" width="10" height="10" /></element>
<element name="piece_d~i~" ref="piece"><bounds x="70" y="~y~" width="10" height="10" /></element>
<element name="piece_e~i~" ref="piece"><bounds x="90" y="~y~" width="10" height="10" /></element>
</repeat>
<repeat count="5">
<param name="y" start="10" increment="20" />
<param name="i" start="9" increment="-2" />
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="80" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element name="piece_a~i~" ref="piece"><bounds x="0" y="~y~" width="10" height="10" /></element>
<element name="piece_b~i~" ref="piece"><bounds x="20" y="~y~" width="10" height="10" /></element>
<element name="piece_c~i~" ref="piece"><bounds x="40" y="~y~" width="10" height="10" /></element>
<element name="piece_d~i~" ref="piece"><bounds x="60" y="~y~" width="10" height="10" /></element>
<element name="piece_e~i~" ref="piece"><bounds x="80" y="~y~" width="10" height="10" /></element>
</repeat>
</group>
<!-- sb ui -->
<element name="hlub" defstate="0">
<rect state="1"><color red="0" green="0" blue="0" /></rect>
</element>
<element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_uib2"><text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_uib3"><text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_uih2"><text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_uiu2a"><text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_uiu2b"><text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_uiu2c"><text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_uiu2d"><text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_uiu3a" defstate="0">
<simplecounter maxstate="999" digits="1" align="2">
<color red="0.81" green="0.8" blue="0.79" />
</simplecounter>
</element>
<element name="text_uiu3c" defstate="0">
<simplecounter maxstate="999" digits="1" align="1">
<color red="0.81" green="0.8" blue="0.79" />
</simplecounter>
</element>
<group name="sb_ui">
<bounds x="0" y="0" width="10" height="63" />
<element ref="cblack"><bounds x="0" y="0" width="10" height="1" /></element>
<element ref="cblack"><bounds x="0" y="7" width="10" height="1" /></element>
<element ref="cblack"><bounds x="0" y="62" width="10" height="1" /></element>
<element ref="text_uit1"><bounds x="0" y="2" width="10" height="2" /></element>
<element ref="text_uit2"><bounds x="0" y="4" width="10" height="2" /></element>
<!-- board -->
<element ref="text_uib1"><bounds x="0" y="9" width="10" height="2" /></element>
<element ref="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></element>
<element ref="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></element>
<element ref="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></element>
<element ref="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></element>
<!-- spawn -->
<element ref="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></element>
<element ref="cwhite"><bounds x="1" y="23" width="8" height="8" /></element>
<element name="piece_ui1" ref="piece"><bounds x="1" y="23" width="4" height="4" /></element>
<element name="piece_ui2" ref="piece"><bounds x="1" y="27" width="4" height="4" /></element>
<element name="piece_ui3" ref="piece"><bounds x="5" y="23" width="4" height="4" /></element>
<element name="piece_ui4" ref="piece"><bounds x="5" y="27" width="4" height="4" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0004"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></element>
<!-- hand -->
<element ref="text_uih1"><bounds x="0" y="34" width="10" height="2" /></element>
<element ref="cblack"><bounds x="1" y="36.5" width="8" height="6" /></element>
<element name="piece_ui0" ref="piece"><bounds x="2" y="36.5" width="6" height="6" /></element>
<element ref="cwhite"><bounds x="1" y="43.5" width="8" height="2.5" /></element>
<element ref="text_uih2"><bounds x="1.5" y="43.75" width="7" height="2" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="43.5" width="8" height="2.5" /><color alpha="0.25" /></element>
<!-- undo -->
<element ref="text_uiu1"><bounds x="0" y="49" width="10" height="2" /></element>
<element ref="cwhite"><bounds x="1" y="51.5" width="1.7" height="6" /></element>
<element ref="cwhite"><bounds x="3.1" y="51.5" width="1.7" height="6" /></element>
<element ref="cwhite"><bounds x="5.2" y="51.5" width="1.7" height="6" /></element>
<element ref="cwhite"><bounds x="7.3" y="51.5" width="1.7" height="6" /></element>
<element ref="text_uiu2a"><bounds x="1" y="52.5" width="1.7" height="4" /></element>
<element ref="text_uiu2b"><bounds x="3.1" y="52.5" width="1.7" height="4" /></element>
<element ref="text_uiu2c"><bounds x="5.2" y="52.5" width="1.7" height="4" /></element>
<element ref="text_uiu2d"><bounds x="7.3" y="52.5" width="1.7" height="4" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="51.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="51.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="51.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="51.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element name="count_ui0" ref="text_uiu3a"><bounds x="0" y="58" width="4" height="2" /></element>
<element name="count_ui1" ref="text_uiu3c"><bounds x="6" y="58" width="4" height="2" /></element>
<element ref="text_uiu3b"><bounds x="4" y="58" width="2" height="2" /></element>
</group>
<!-- status leds -->
<element name="text_le1"><text string="WHITE" align="2"></text></element>
<element name="text_le2"><text string="BLACK" align="2"></text></element>
<element name="text_le3"><text string="QUEEN" align="2"></text></element> <!-- sic -->
<element name="text_le4"><text string="MAN" align="2"></text></element>
<element name="text_le5"><text string="SET UP" align="2"></text></element>
<element name="text_le6"><text string="TAKE BACK" align="2"></text></element>
<element name="text_le7"><text string="NON AUTO" align="2"></text></element>
<element name="text_le8"><text string="INFO" align="2"></text></element>
<element name="text_lf1"><text string="BLANCS" align="2"></text></element>
<element name="text_lf2"><text string="NOIRS" align="2"></text></element>
<element name="text_lf3"><text string="DAME" align="2"></text></element>
<element name="text_lf4"><text string="PION" align="2"></text></element>
<element name="text_lf5"><text string="POS" align="2"></text></element>
<element name="text_lf6"><text string="RECULE" align="2"></text></element>
<element name="text_lf7"><text string="NON AUTO" align="2"></text></element>
<element name="text_lf8"><text string="INFO" align="2"></text></element>
<group name="leds1e">
<bounds x="0" y="0" width="20" height="30" />
<repeat count="8">
<param name="y" start="1.95" increment="2" />
<param name="i" start="1" increment="1" />
<element ref="text_le~i~"><bounds xc="0" yc="~y~" width="15" height="1.4" /></element>
</repeat>
</group>
<group name="leds1f">
<bounds x="0" y="0" width="20" height="30" />
<repeat count="8">
<param name="y" start="1.95" increment="2" />
<param name="i" start="1" increment="1" />
<element ref="text_lf~i~"><bounds xc="0" yc="~y~" width="15" height="1.4" /></element>
</repeat>
</group>
<group name="leds2">
<bounds x="0" y="0" width="20" height="30" />
<element name="2.1" ref="ledr"><bounds x="8.5" yc="2" width="2" height="0.9" /></element>
<element name="2.0" ref="ledr"><bounds x="8.5" yc="4" width="2" height="0.9" /></element>
<element name="2.4" ref="ledr"><bounds x="8.5" yc="6" width="2" height="0.9" /></element>
<element name="2.5" ref="ledr"><bounds x="8.5" yc="8" width="2" height="0.9" /></element>
<element name="2.3" ref="ledr"><bounds x="8.5" yc="10" width="2" height="0.9" /></element>
<element name="2.7" ref="ledr"><bounds x="8.5" yc="12" width="2" height="0.9" /></element>
<element name="2.2" ref="ledr"><bounds x="8.5" yc="14" width="2" height="0.9" /></element>
<element name="2.6" ref="ledr"><bounds x="8.5" yc="16" width="2" height="0.9" /></element>
</group>
<!-- button panel -->
<element name="white2"><rect><color red="0.85" green="0.85" blue="0.85" /></rect></element>
<element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element>
<element name="text_be1"><text string="GO"></text></element>
<element name="text_be2"><text string="STOP"></text></element>
<element name="text_be3"><text string="LEVEL"></text></element>
<element name="text_be4a"><text string="TAKE"></text></element>
<element name="text_be4"><text string="BACK"></text></element>
<element name="text_be5a"><text string="NEW"></text></element>
<element name="text_be5"><text string="GAME"></text></element>
<element name="text_be6a"><text string="SWAP"></text></element>
<element name="text_be6"><text string="SIDE"></text></element>
<element name="text_be7"><text string="SET UP"></text></element>
<element name="text_be8"><text string="MOVE"></text></element>
<element name="text_be9"><text string="EVALUATION"></text></element>
<element name="text_be10"><text string="DEPTH"></text></element>
<element name="text_be11"><text string="NON AUTO"></text></element>
<element name="text_be12"><text string="SOUND"></text></element>
<element name="text_be13"><text string="PLAY"></text></element>
<element name="text_be14"><text string="INFORMATION"></text></element>
<element name="text_bf1"><text string="GO"></text></element>
<element name="text_bf2"><text string="STOP"></text></element>
<element name="text_bf3"><text string="NIVEAU"></text></element>
<element name="text_bf4a"><text string="RECULE"></text></element>
<element name="text_bf4"><text string="1 COUP"></text></element>
<element name="text_bf5a"><text string="NOUVELLE"></text></element>
<element name="text_bf5"><text string="PARTIE"></text></element>
<element name="text_bf6a"><text string="TOURNE"></text></element>
<element name="text_bf6"><text string="DAMIER"></text></element>
<element name="text_bf7"><text string="POSITION"></text></element>
<element name="text_bf8"><text string="COUP"></text></element>
<element name="text_bf9"><text string="CALCUL"></text></element>
<element name="text_bf10"><text string="NOTE"></text></element>
<element name="text_bf11"><text string="NON AUTO"></text></element>
<element name="text_bf12"><text string="SON"></text></element>
<element name="text_bf13"><text string="JOUE"></text></element>
<element name="piece_b1">
<rect>
<bounds xc="0" y="0" width="1" height="2" />
<color alpha="0" />
</rect>
<disk>
<bounds xc="0" y="0" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<rect>
<bounds xc="0" y="0.17" width="1" height="0.4" />
<color red="1" green="1" blue="1" />
</rect>
<disk>
<bounds xc="0" yc="0.57" width="1" height="0.34" />
<color red="0" green="0" blue="0" />
</disk>
<rect>
<bounds xc="0" y="0.57" width="0.88" height="0.4" />
<color red="0" green="0" blue="0" />
</rect>
<disk>
<bounds xc="0" yc="0.63" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<rect>
<bounds xc="0" y="0.63" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</rect>
<disk>
<bounds xc="0" yc="0.97" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<disk>
<bounds xc="0" yc="0.97" width="0.88" height="0.22" />
<color red="0" green="0" blue="0" />
</disk>
</element>
<element name="piece_b2">
<rect>
<bounds xc="0" y="0" width="1" height="2" />
<color alpha="0" />
</rect>
<disk>
<bounds xc="0" y="0" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<rect>
<bounds xc="0" y="0.17" width="1" height="0.4" />
<color red="1" green="1" blue="1" />
</rect>
<disk>
<bounds xc="0" yc="0.57" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<disk>
<bounds xc="0" yc="0.57" width="0.88" height="0.22" />
<color red="0" green="0" blue="0" />
</disk>
</element>
<element name="piece_b3">
<rect>
<bounds xc="0" y="0" width="1" height="2" />
<color alpha="0" />
</rect>
<disk>
<bounds xc="0" y="0" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<disk>
<bounds xc="0" y="0.06" width="0.88" height="0.22" />
<color red="0" green="0" blue="0" />
</disk>
<rect>
<bounds xc="0" y="0.17" width="1" height="0.4" />
<color red="1" green="1" blue="1" />
</rect>
<rect>
<bounds xc="0" y="0.17" width="0.88" height="0.4" />
<color red="0" green="0" blue="0" />
</rect>
<disk>
<bounds xc="0" yc="0.57" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<disk>
<bounds xc="0" yc="0.57" width="0.88" height="0.22" />
<color red="0" green="0" blue="0" />
</disk>
<rect>
<bounds xc="0" y="0.57" width="1" height="0.4" />
<color red="1" green="1" blue="1" />
</rect>
<rect>
<bounds xc="0" y="0.57" width="0.88" height="0.4" />
<color red="0" green="0" blue="0" />
</rect>
<disk>
<bounds xc="0" yc="0.97" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<disk>
<bounds xc="0" yc="0.97" width="0.88" height="0.22" />
<color red="0" green="0" blue="0" />
</disk>
</element>
<element name="piece_b4">
<rect>
<bounds xc="0" y="0" width="1" height="2" />
<color alpha="0" />
</rect>
<disk>
<bounds xc="0" y="0" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<disk>
<bounds xc="0" y="0.06" width="0.88" height="0.22" />
<color red="0" green="0" blue="0" />
</disk>
<rect>
<bounds xc="0" y="0.17" width="1" height="0.4" />
<color red="1" green="1" blue="1" />
</rect>
<rect>
<bounds xc="0" y="0.17" width="0.88" height="0.4" />
<color red="0" green="0" blue="0" />
</rect>
<disk>
<bounds xc="0" yc="0.57" width="1" height="0.34" />
<color red="1" green="1" blue="1" />
</disk>
<disk>
<bounds xc="0" yc="0.57" width="0.88" height="0.22" />
<color red="0" green="0" blue="0" />
</disk>
</element>
<element name="but" defstate="0">
<rect state="0"><color red="0.2" green="0.2" blue="0.2" /></rect>
<rect state="1"><color red="0.35" green="0.35" blue="0.35" /></rect>
</element>
<group name="buttons1b">
<bounds x="0" y="0" width="80" height="80" />
<element ref="white2"><bounds xc="17" y="31.4" width="0.2" height="1.5" /></element>
<element ref="white2"><bounds xc="17" y="32.3" width="18.2" height="0.9" /></element>
<element ref="blackb"><bounds xc="17" y="32.5" width="17.8" height="0.9" /></element>
<element ref="text_be14"><bounds xc="17" y="29.0" width="17.8" height="1.866" /></element>
<repeat count="4">
<param name="x" start="8" increment="9" />
<param name="i" start="1" increment="1" />
<element ref="piece_b~i~"><bounds xc="~x~" y="15.7" width="3.2" height="6.4" /><orientation rotate="180" /></element>
</repeat>
</group>
<group name="buttons1e">
<bounds x="0" y="0" width="80" height="80" />
<repeat count="5">
<param name="x" start="9" increment="10.8" />
<param name="i" start="1" increment="1" />
<element ref="text_be~i~"><bounds xc="~x~" y="7" width="15" height="1.866" /></element>
</repeat>
<repeat count="6">
<param name="x" start="8" increment="9" />
<param name="i" start="8" increment="1" />
<element ref="text_be~i~"><bounds xc="~x~" y="33.666" width="15" height="1.866" /></element>
</repeat>
<element ref="text_be4a"><bounds xc="41.4" y="5.2" width="15" height="1.866" /></element>
<element ref="text_be5a"><bounds xc="52.2" y="5.2" width="15" height="1.866" /></element>
<element ref="text_be6a"><bounds xc="44" y="18.533" width="15" height="1.866" /></element>
<element ref="text_be6"><bounds xc="44" y="20.333" width="15" height="1.866" /></element>
<element ref="text_be7"><bounds xc="53" y="20.333" width="15" height="1.866" /></element>
</group>
<group name="buttons1f">
<bounds x="0" y="0" width="80" height="80" />
<repeat count="5">
<param name="x" start="9" increment="10.8" />
<param name="i" start="1" increment="1" />
<element ref="text_bf~i~"><bounds xc="~x~" y="7" width="15" height="1.866" /></element>
</repeat>
<repeat count="6">
<param name="x" start="8" increment="9" />
<param name="i" start="8" increment="1" />
<element ref="text_bf~i~"><bounds xc="~x~" y="33.666" width="15" height="1.866" /></element>
</repeat>
<element ref="text_bf4a"><bounds xc="41.4" y="5.2" width="15" height="1.866" /></element>
<element ref="text_bf5a"><bounds xc="52.2" y="5.2" width="15" height="1.866" /></element>
<element ref="text_bf6a"><bounds xc="44" y="18.533" width="15" height="1.866" /></element>
<element ref="text_bf6"><bounds xc="44" y="20.333" width="15" height="1.866" /></element>
<element ref="text_bf7"><bounds xc="53" y="20.333" width="15" height="1.866" /></element>
</group>
<group name="buttons2">
<bounds x="0" y="0" width="80" height="80" />
<element ref="but" inputtag="RESET" inputmask="0x01"><bounds xc="9" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.2" inputmask="0x10"><bounds xc="19.8" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x08"><bounds xc="30.6" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x10"><bounds xc="41.4" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x04"><bounds xc="52.2" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.2" inputmask="0x04"><bounds xc="8" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x10"><bounds xc="17" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.2" inputmask="0x08"><bounds xc="26" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x08"><bounds xc="35" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.3" inputmask="0x04"><bounds xc="44" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x01"><bounds xc="53" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x01"><bounds xc="8" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.2" inputmask="0x01"><bounds xc="17" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.2" inputmask="0x02"><bounds xc="26" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x02"><bounds xc="35" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x04"><bounds xc="44" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x02"><bounds xc="53" y="36.666" width="7.5" height="2" /></element>
</group>
<!-- shared view -->
<group name="shared">
<bounds left="3.75" right="151.875" top="-0.25" bottom="87.75" />
<element ref="cwhite"><bounds xc="61" yc="42" width="80.6" height="80.6" /></element>
<group ref="sb_board"><bounds x="21" y="2" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="5.25" yc="42" width="10" height="63" /></group>
<repeat count="10">
<param name="y" start="6" increment="8" />
<param name="i" start="9" increment="-1" />
<element name="0.~i~" ref="led"><bounds x="17.25" yc="~y~" width="1.5" height="1.5" /></element>
</repeat>
<repeat count="10">
<param name="x" start="25" increment="8" />
<param name="i" start="0" increment="1" />
<element name="1.~i~" ref="led"><bounds xc="~x~" y="84.25" width="1.5" height="1.5" /></element>
</repeat>
</group>
<!-- build screen -->
<view name="Internal Layout (English)">
<bounds left="3.75" right="151.875" top="-0.25" bottom="87.75" />
<group ref="shared"><bounds left="3.75" right="151.875" top="-0.25" bottom="87.75" /></group>
<!-- right side -->
<group ref="leds1e"><bounds x="105.375" y="9" width="20" height="30" /></group>
<group ref="buttons1b"><bounds x="103.675" y="27.75" width="60" height="60" /></group>
<group ref="buttons1e"><bounds x="103.675" y="27.75" width="60" height="60" /></group>
<element ref="cwhite" blend="multiply"><bounds x="103" y="0" width="70" height="90" /></element>
<group ref="leds2"><bounds x="105.375" y="9" width="20" height="30" /></group>
<group ref="buttons2"><bounds x="103.675" y="27.75" width="60" height="60" /></group>
</view>
<view name="Internal Layout (French)">
<bounds left="3.75" right="151.875" top="-0.25" bottom="87.75" />
<group ref="shared"><bounds left="3.75" right="151.875" top="-0.25" bottom="87.75" /></group>
<!-- right side -->
<group ref="leds1f"><bounds x="105.375" y="9" width="20" height="30" /></group>
<group ref="buttons1b"><bounds x="103.675" y="27.75" width="60" height="60" /></group>
<group ref="buttons1f"><bounds x="103.675" y="27.75" width="60" height="60" /></group>
<element ref="cwhite" blend="multiply"><bounds x="103" y="0" width="70" height="90" /></element>
<group ref="leds2"><bounds x="105.375" y="9" width="20" height="30" /></group>
<group ref="buttons2"><bounds x="103.675" y="27.75" width="60" height="60" /></group>
</view>
</mamelayout>

View File

@ -38453,6 +38453,9 @@ cp2000
@source:saitek/delta1.cpp
ccdelta1
@source:saitek/edames.cpp
edames
@source:saitek/exechess.cpp
exechess

301
src/mame/saitek/edames.cpp Normal file
View File

@ -0,0 +1,301 @@
// license:BSD-3-Clause
// copyright-holders:hap
// thanks-to:Sean Riddle
/*******************************************************************************
Saitek Electronic Dames
Electronic draughts (checkers) game, international rules apply (10*10 board,
flying kings, backward captures allowed).
NOTE: Before exiting MAME, press the STOP button to turn the power off. Otherwise,
NVRAM won't save properly.
MAME sensorboard handling is similar to Fidelity Dame Sensory Challenger, see
fidelity/dames.cpp. It will give an error beep if the user removes a captured
piece from the board, but it doesn't matter.
Two versions were sold, each should have the same MCU and ROM: a tabletop model
(Electronic Dames, 8MHz or 12MHz), and a portable model (Compact Dames Computer,
8MHz). As with SciSys/Saitek chess computers, they were also licensed to Tandy.
According to the second hand market, the tabletop French version is much more
common than the English one. The manual and a LED label incorrectly call crowned
men queens instead of kings, perhaps due to a translation from French (dame).
Hardware notes (Compact Dames Computer):
- PCB label: DH1-PE-009 REV.1
- Hitachi HD6301Y0P MCU, 8MHz or 12MHz (LC osc, no XTAL)
- 20+8 LEDs, buttons sensor board, piezo
*******************************************************************************/
#include "emu.h"
#include "cpu/m6800/m6801.h"
#include "machine/sensorboard.h"
#include "sound/dac.h"
#include "video/pwm.h"
#include "speaker.h"
// internal artwork
#include "saitek_edames.lh"
namespace {
class edames_state : public driver_device
{
public:
edames_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
m_board(*this, "board"),
m_display(*this, "display"),
m_dac(*this, "dac"),
m_inputs(*this, "IN.%u", 0)
{ }
void edames(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(go_button);
DECLARE_INPUT_CHANGED_MEMBER(change_cpu_freq);
protected:
virtual void machine_start() override;
private:
// devices/pointers
required_device<hd6301y0_cpu_device> m_maincpu;
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_bit_interface> m_dac;
required_ioport_array<4> m_inputs;
u16 m_inp_mux = 0;
u8 m_led_select = 0;
u16 m_led_data[2] = { };
bool m_enable_reset = false;
void init_board(int state);
// I/O handlers
void update_display();
void p1_w(u8 data);
void p3_w(u8 data);
void p4_w(u8 data);
u8 p5_r();
void p6_w(u8 data);
void p7_w(u8 data);
};
/*******************************************************************************
Initialization
*******************************************************************************/
void edames_state::machine_start()
{
// register for savestates
save_item(NAME(m_inp_mux));
save_item(NAME(m_led_select));
save_item(NAME(m_led_data));
save_item(NAME(m_enable_reset));
}
void edames_state::init_board(int state)
{
for (int i = 0; i < 20; i++)
{
m_board->write_piece(i % 5, i / 5, 1); // white
m_board->write_piece(i % 5, i / 5 + 6, 3); // black
}
}
INPUT_CHANGED_MEMBER(edames_state::change_cpu_freq)
{
// 8MHz and 12MHz versions were sold
m_maincpu->set_unscaled_clock((newval & 2) ? 8'000'000 : 12'000'000);
}
/*******************************************************************************
I/O
*******************************************************************************/
INPUT_CHANGED_MEMBER(edames_state::go_button)
{
if (newval && m_enable_reset)
m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
void edames_state::update_display()
{
m_display->matrix_partial(0, 2, m_led_select, m_led_data[0]);
m_display->write_row(2, m_led_data[1]);
}
void edames_state::p1_w(u8 data)
{
// P10-P17: board leds data part
m_led_data[0] = (m_led_data[0] & 0x300) | (data ^ 0xff);
update_display();
}
void edames_state::p3_w(u8 data)
{
// P30-P36: status leds part
m_led_data[1] = (m_led_data[1] & 0x80) | (~data & 0x7f);
update_display();
// P37: enable reset button
m_enable_reset = bool(BIT(data, 7));
}
void edames_state::p4_w(u8 data)
{
// P40-P45: input mux part
m_inp_mux = (m_inp_mux & 0x7f) | (~data << 7);
// P47: status leds part
m_led_data[1] = (m_led_data[1] & 0x7f) | (~data & 0x80);
update_display();
}
u8 edames_state::p5_r()
{
// P50-P54: multiplexed inputs
u8 data = 0;
// read checkerboard
for (int i = 0; i < 10; i++)
if (BIT(m_inp_mux, i))
data |= m_board->read_rank(i, true);
// read buttons
for (int i = 0; i < 3; i++)
if (BIT(m_inp_mux, i + 10))
data |= m_inputs[i]->read();
// P55-P57: freq sel and one more button
return (~data & 0x1f) | (m_inputs[3]->read() << 5);
}
void edames_state::p6_w(u8 data)
{
// P60-P67: input mux part
m_inp_mux = (m_inp_mux & ~0x7f) | (~data & 0x7f);
}
void edames_state::p7_w(u8 data)
{
// P70,P71: board leds select
m_led_select = ~data & 3;
// P72-P73: board leds data part
m_led_data[0] = (m_led_data[0] & 0xff) | (~data << 6 & 0x300);
update_display();
// P74: speaker out
m_dac->write(BIT(data, 4));
}
/*******************************************************************************
Input Ports
*******************************************************************************/
static INPUT_PORTS_START( edames ) // see comments for French version labels
PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Set Up") // Position
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Play") // Joue
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") // Nouvelle Partie
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_L) PORT_NAME("Level") // Niveau
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Take Back") // Recule 1 Coup
PORT_START("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Move") // Coup
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("Non Auto") // Non Auto
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("Sound") // Son
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Black Man")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("White Man")
PORT_START("IN.2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Evaluation") // Calcul
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("Depth") // Note
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("White King")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Black King")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Stop") // Stop
PORT_START("IN.3")
PORT_CONFNAME( 0x03, 0x02, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, edames_state, change_cpu_freq, 0) // factory set
PORT_CONFSETTING( 0x02, "8MHz" )
PORT_CONFSETTING( 0x00, "12MHz" )
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Swap Side") // Tourne Damier
PORT_START("RESET")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CHANGED_MEMBER(DEVICE_SELF, edames_state, go_button, 0) PORT_NAME("Go") // Go
INPUT_PORTS_END
/*******************************************************************************
Machine Configs
*******************************************************************************/
void edames_state::edames(machine_config &config)
{
// basic machine hardware
HD6301Y0(config, m_maincpu, 8'000'000); // approximation, no XTAL
m_maincpu->nvram_enable_backup(true);
m_maincpu->standby_cb().set(m_maincpu, FUNC(hd6301y0_cpu_device::nvram_set_battery));
m_maincpu->standby_cb().append([this](int state) { if (state) m_display->clear(); });
m_maincpu->out_p1_cb().set(FUNC(edames_state::p1_w));
m_maincpu->out_p3_cb().set(FUNC(edames_state::p3_w));
m_maincpu->out_p4_cb().set(FUNC(edames_state::p4_w));
m_maincpu->in_p5_cb().set(FUNC(edames_state::p5_r));
m_maincpu->out_p6_cb().set(FUNC(edames_state::p6_w));
m_maincpu->out_p7_cb().set(FUNC(edames_state::p7_w));
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
m_board->init_cb().set(FUNC(edames_state::init_board));
m_board->set_size(5, 10); // 2 columns per x (eg. square 1 & 6 are same x)
m_board->set_spawnpoints(4);
m_board->set_delay(attotime::from_msec(150));
m_board->set_nvram_enable(true);
// video hardware
PWM_DISPLAY(config, m_display).set_size(2+1, 10);
config.set_default_layout(layout_saitek_edames);
// sound hardware
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
}
/*******************************************************************************
ROM Definitions
*******************************************************************************/
ROM_START( edames )
ROM_REGION( 0x4000, "maincpu", 0 )
ROM_LOAD("1988_d1_saitek_6301y0h04p.u1", 0x0000, 0x4000, CRC(a23e2114) SHA1(85b7685ec612221d2ffdd2df4550ffad22acef81) )
ROM_END
} // anonymous namespace
/*******************************************************************************
Drivers
*******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
SYST( 1988, edames, 0, 0, edames, edames, edames_state, empty_init, "Saitek", "Electronic Dames", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )