New working systems

-------------------
Accord [hap, Berger]
This commit is contained in:
hap 2024-01-19 23:27:08 +01:00
parent a3c9dd3762
commit 26e19ba0e5
11 changed files with 790 additions and 11 deletions

View File

@ -0,0 +1,541 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
-->
<mamelayout version="2">
<!-- define elements -->
<element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element>
<element name="black2"><rect><color red="0.2" green="0.2" blue="0.2" /></rect></element>
<element name="whitem"><rect><color red="0.61" green="0.6" blue="0.59" /></rect></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.17" green="0.015" blue="0.02" /></rect>
</element>
<element name="ledg" defstate="0">
<rect state="1"><color red="0.1" green="0.95" blue="0.05" /></rect>
<rect state="0"><color red="0.015" green="0.16" blue="0.01" /></rect>
</element>
<element name="but1" defstate="0">
<disk>
<bounds xc="3" yc="3" width="6" height="6" />
<color red="0.75" green="0.25" blue="0.05" />
</disk>
<disk>
<bounds xc="7" yc="3" width="6" height="6" />
<color red="0.75" green="0.25" blue="0.05" />
</disk>
<rect>
<bounds xc="5" yc="3" width="4" height="6" />
<color red="0.75" green="0.25" blue="0.05" />
</rect>
<disk>
<bounds xc="3" yc="3" width="5" height="5" />
<color red="0.2" green="0.2" blue="0.2" />
</disk>
<disk>
<bounds xc="7" yc="3" width="5" height="5" />
<color red="0.81" green="0.8" blue="0.79" />
</disk>
<rect>
<bounds x="3" yc="3" width="3" height="5" />
<color red="0.2" green="0.2" blue="0.2" />
</rect>
<rect>
<bounds x="5" yc="3" width="2" height="5" />
<color red="0.81" green="0.8" blue="0.79" />
</rect>
</element>
<element name="but8" defstate="0">
<rect>
<bounds x="0" y="0" width="10" height="6" />
<color alpha="0" />
</rect>
<disk>
<bounds xc="3" yc="3" width="5" height="5" />
<color red="0.75" green="0.25" blue="0.05" />
</disk>
<disk>
<bounds xc="7" yc="3" width="5" height="5" />
<color red="0.75" green="0.25" blue="0.05" />
</disk>
<rect>
<bounds xc="5" yc="3" width="4" height="5" />
<color red="0.75" green="0.25" blue="0.05" />
</rect>
</element>
<element name="butb" defstate="0">
<disk>
<bounds xc="3" yc="3" width="6" height="6" />
<color red="0.2" green="0.2" blue="0.2" />
</disk>
<disk>
<bounds xc="7" yc="3" width="6" height="6" />
<color red="0.2" green="0.2" blue="0.2" />
</disk>
<rect>
<bounds xc="5" yc="3" width="4" height="6" />
<color red="0.2" green="0.2" blue="0.2" />
</rect>
</element>
<element name="buta" defstate="0">
<disk state="1">
<bounds xc="3" yc="3" width="6" height="6" />
<color red="0.12" green="0.12" blue="0.12" />
</disk>
<disk state="1">
<bounds xc="7" yc="3" width="6" height="6" />
<color red="0.12" green="0.12" blue="0.12" />
</disk>
<rect state="1">
<bounds xc="5" yc="3" width="4" height="6" />
<color red="0.12" green="0.12" blue="0.12" />
</rect>
</element>
<element name="line30w">
<image><data><![CDATA[
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="40" height="10">
<rect width="24" height="2.2" x="-1" y="11" transform="rotate(330.0)" fill="#ceccc9" />
</svg>
]]></data></image>
</element>
<element name="line30b">
<image><data><![CDATA[
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="40" height="10">
<rect width="24" height="2.2" x="-1" y="11" transform="rotate(330.0)" fill="#333333" />
</svg>
]]></data></image>
</element>
<element name="text_1"><text string="1"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_2"><text string="2"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_3"><text string="3"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_4"><text string="4"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_5"><text string="5"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_6"><text string="6"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_7"><text string="7"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_8"><text string="8"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_a"><text string="A"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_b"><text string="B"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_c"><text string="C"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_d"><text string="D"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_e"><text string="E"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_f"><text string="F"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_g"><text string="G"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_h"><text string="H"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_l1"><text string="Mate" align="2"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_l2"><text string="Stale" align="2"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_l3"><text string="Check" align="2"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_l7"><text string="Error" align="2"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_b1"><text string="BLACK/WHITE"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_b2"><text string="VERIFY"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_b3"><text string="SET UP"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_b4"><text string="NEW GAME"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_b5"><text string="SET LEVEL"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_b6"><text string="SOUND"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_b7"><text string="TAKE BACK"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_b8"><text string="GO"><color red="0.1" green="0.1" blue="0.1" /></text></element>
<element name="text_r1"><text string="White"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_r2"><text string="Black"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_r3"><text string="Verify"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_r4"><text string="Setup"><color red="0.85" green="0.85" blue="0.85" /></text></element>
<element name="text_p1"><image file="chess/wk.svg"></image></element>
<element name="text_p2"><image file="chess/wq.svg"></image></element>
<element name="text_p3"><image file="chess/wb.svg"></image></element>
<element name="text_p4"><image file="chess/wn.svg"></image></element>
<element name="text_p5"><image file="chess/wr.svg"></image></element>
<element name="text_p6"><image file="chess/wp.svg"></image></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">
<text string=" "><bounds x="0" y="0" width="1" height="1" /></text>
<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">
<image file="chess/wp.svg" state="1"/>
<image file="chess/wn.svg" state="2"/>
<image file="chess/wb.svg" state="3"/>
<image file="chess/wr.svg" state="4"/>
<image file="chess/wq.svg" state="5"/>
<image file="chess/wk.svg" state="6"/>
<image file="chess/bp.svg" state="7"/>
<image file="chess/bn.svg" state="8"/>
<image file="chess/bb.svg" state="9"/>
<image file="chess/br.svg" state="10"/>
<image file="chess/bq.svg" state="11"/>
<image file="chess/bk.svg" state="12"/>
<!-- selected pieces -->
<image file="chess/wp.svg" state="13"><color alpha="0.5" /></image>
<image file="chess/wn.svg" state="14"><color alpha="0.5" /></image>
<image file="chess/wb.svg" state="15"><color alpha="0.5" /></image>
<image file="chess/wr.svg" state="16"><color alpha="0.5" /></image>
<image file="chess/wq.svg" state="17"><color alpha="0.5" /></image>
<image file="chess/wk.svg" state="18"><color alpha="0.5" /></image>
<image file="chess/bp.svg" state="19"><color alpha="0.5" /></image>
<image file="chess/bn.svg" state="20"><color alpha="0.5" /></image>
<image file="chess/bb.svg" state="21"><color alpha="0.5" /></image>
<image file="chess/br.svg" state="22"><color alpha="0.5" /></image>
<image file="chess/bq.svg" state="23"><color alpha="0.5" /></image>
<image file="chess/bk.svg" state="24"><color alpha="0.5" /></image>
</element>
<group name="sb_board">
<bounds x="0" y="0" width="80" height="80" />
<!-- squares (avoid seams) -->
<element ref="cwhite"><bounds x="0" y="0" width="11" height="11" /></element>
<element ref="cblack"><bounds x="10" y="0" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="20" y="0" width="11" height="11" /></element>
<element ref="cblack"><bounds x="30" y="0" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="40" y="0" width="11" height="11" /></element>
<element ref="cblack"><bounds x="50" y="0" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="60" y="0" width="11" height="11" /></element>
<element ref="cblack"><bounds x="70" y="0" width="10" height="11" /></element>
<element ref="cblack"><bounds x="0" y="10" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="10" y="10" width="11" height="11" /></element>
<element ref="cblack"><bounds x="20" y="10" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="30" y="10" width="11" height="11" /></element>
<element ref="cblack"><bounds x="40" y="10" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="50" y="10" width="11" height="11" /></element>
<element ref="cblack"><bounds x="60" y="10" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="70" y="10" width="10" height="11" /></element>
<element ref="cwhite"><bounds x="0" y="20" width="11" height="11" /></element>
<element ref="cblack"><bounds x="10" y="20" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="20" y="20" width="11" height="11" /></element>
<element ref="cblack"><bounds x="30" y="20" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="40" y="20" width="11" height="11" /></element>
<element ref="cblack"><bounds x="50" y="20" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="60" y="20" width="11" height="11" /></element>
<element ref="cblack"><bounds x="70" y="20" width="10" height="11" /></element>
<element ref="cblack"><bounds x="0" y="30" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="10" y="30" width="11" height="11" /></element>
<element ref="cblack"><bounds x="20" y="30" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="30" y="30" width="11" height="11" /></element>
<element ref="cblack"><bounds x="40" y="30" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="50" y="30" width="11" height="11" /></element>
<element ref="cblack"><bounds x="60" y="30" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="70" y="30" width="10" height="11" /></element>
<element ref="cwhite"><bounds x="0" y="40" width="11" height="11" /></element>
<element ref="cblack"><bounds x="10" y="40" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="20" y="40" width="11" height="11" /></element>
<element ref="cblack"><bounds x="30" y="40" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="40" y="40" width="11" height="11" /></element>
<element ref="cblack"><bounds x="50" y="40" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="60" y="40" width="11" height="11" /></element>
<element ref="cblack"><bounds x="70" y="40" width="10" height="11" /></element>
<element ref="cblack"><bounds x="0" y="50" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="10" y="50" width="11" height="11" /></element>
<element ref="cblack"><bounds x="20" y="50" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="30" y="50" width="11" height="11" /></element>
<element ref="cblack"><bounds x="40" y="50" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="50" y="50" width="11" height="11" /></element>
<element ref="cblack"><bounds x="60" y="50" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="70" y="50" width="10" height="11" /></element>
<element ref="cwhite"><bounds x="0" y="60" width="11" height="11" /></element>
<element ref="cblack"><bounds x="10" y="60" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="20" y="60" width="11" height="11" /></element>
<element ref="cblack"><bounds x="30" y="60" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="40" y="60" width="11" height="11" /></element>
<element ref="cblack"><bounds x="50" y="60" width="11" height="11" /></element>
<element ref="cwhite"><bounds x="60" y="60" width="11" height="11" /></element>
<element ref="cblack"><bounds x="70" y="60" width="10" height="11" /></element>
<element ref="cblack"><bounds x="0" y="70" width="11" height="10" /></element>
<element ref="cwhite"><bounds x="10" y="70" width="11" height="10" /></element>
<element ref="cblack"><bounds x="20" y="70" width="11" height="10" /></element>
<element ref="cwhite"><bounds x="30" y="70" width="11" height="10" /></element>
<element ref="cblack"><bounds x="40" y="70" width="11" height="10" /></element>
<element ref="cwhite"><bounds x="50" y="70" width="11" height="10" /></element>
<element ref="cblack"><bounds x="60" y="70" width="11" height="10" /></element>
<element ref="cwhite"><bounds x="70" y="70" width="10" height="10" /></element>
<!-- sensors, pieces -->
<repeat count="8">
<param name="y" start="0" increment="10" />
<param name="i" start="8" increment="-1" />
<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="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></element>
<element ref="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" 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="10" y="~y~" width="10" height="10" /></element>
<element name="piece_c~i~" ref="piece"><bounds x="20" y="~y~" width="10" height="10" /></element>
<element name="piece_d~i~" ref="piece"><bounds x="30" y="~y~" width="10" height="10" /></element>
<element name="piece_e~i~" ref="piece"><bounds x="40" y="~y~" width="10" height="10" /></element>
<element name="piece_f~i~" ref="piece"><bounds x="50" y="~y~" width="10" height="10" /></element>
<element name="piece_g~i~" ref="piece"><bounds x="60" y="~y~" width="10" height="10" /></element>
<element name="piece_h~i~" ref="piece"><bounds x="70" 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="80" />
<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="79" 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="12" /></element>
<element ref="cwhite"><bounds x="1" y="36" width="8" height="12" /></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="1" y="31" width="4" height="4" /></element>
<element name="piece_ui4" ref="piece"><bounds x="5" y="23" width="4" height="4" /></element>
<element name="piece_ui5" ref="piece"><bounds x="5" y="27" width="4" height="4" /></element>
<element name="piece_ui6" ref="piece"><bounds x="5" y="31" width="4" height="4" /></element>
<element name="piece_ui7" ref="piece"><bounds x="1" y="36" width="4" height="4" /></element>
<element name="piece_ui8" ref="piece"><bounds x="1" y="40" width="4" height="4" /></element>
<element name="piece_ui9" ref="piece"><bounds x="1" y="44" width="4" height="4" /></element>
<element name="piece_ui10" ref="piece"><bounds x="5" y="36" width="4" height="4" /></element>
<element name="piece_ui11" ref="piece"><bounds x="5" y="40" width="4" height="4" /></element>
<element name="piece_ui12" ref="piece"><bounds x="5" y="44" 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="1" y="31" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></element>
<!-- hand -->
<element ref="text_uih1"><bounds x="0" y="51" width="10" height="2" /></element>
<element ref="cblack"><bounds x="1" y="53.5" width="8" height="6" /></element>
<element name="piece_ui0" ref="piece"><bounds x="2" y="53.5" width="6" height="6" /></element>
<element ref="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></element>
<element ref="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></element>
<!-- undo -->
<element ref="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></element>
<element ref="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></element>
<element ref="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></element>
<element ref="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></element>
<element ref="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></element>
<element ref="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></element>
<element ref="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></element>
<element ref="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></element>
<element ref="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element ref="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></element>
<element name="count_ui0" ref="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></element>
<element name="count_ui1" ref="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></element>
<element ref="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></element>
</group>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-14" right="109.5" top="0" bottom="88" />
<element ref="cwhite"><bounds x="3.5" y="2.5" width="100" height="81" /></element>
<group ref="sb_board"><bounds x="4" y="3" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-12.5" y="3" width="10" height="80" /></group>
<!-- chessboard leds -->
<element name="1.7" ref="ledr"><bounds x="0.5" y="7.5" width="2" height="1" /></element>
<element name="1.6" ref="ledr"><bounds x="0.5" y="17.5" width="2" height="1" /></element>
<element name="1.5" ref="ledr"><bounds x="0.5" y="27.5" width="2" height="1" /></element>
<element name="1.4" ref="ledr"><bounds x="0.5" y="37.5" width="2" height="1" /></element>
<element name="1.3" ref="ledr"><bounds x="0.5" y="47.5" width="2" height="1" /></element>
<element name="1.2" ref="ledr"><bounds x="0.5" y="57.5" width="2" height="1" /></element>
<element name="1.1" ref="ledr"><bounds x="0.5" y="67.5" width="2" height="1" /></element>
<element name="1.0" ref="ledr"><bounds x="0.5" y="77.5" width="2" height="1" /></element>
<element name="2.0" ref="ledr"><bounds x="8.5" y="84.5" width="1" height="2" /></element>
<element name="2.1" ref="ledr"><bounds x="18.5" y="84.5" width="1" height="2" /></element>
<element name="2.2" ref="ledr"><bounds x="28.5" y="84.5" width="1" height="2" /></element>
<element name="2.3" ref="ledr"><bounds x="38.5" y="84.5" width="1" height="2" /></element>
<element name="2.4" ref="ledr"><bounds x="48.5" y="84.5" width="1" height="2" /></element>
<element name="2.5" ref="ledr"><bounds x="58.5" y="84.5" width="1" height="2" /></element>
<element name="2.6" ref="ledr"><bounds x="68.5" y="84.5" width="1" height="2" /></element>
<element name="2.7" ref="ledr"><bounds x="78.5" y="84.5" width="1" height="2" /></element>
<!-- chessboard coords -->
<element ref="text_8"><bounds x="0.5" y="5.5" width="2" height="1.5" /></element>
<element ref="text_7"><bounds x="0.5" y="15.5" width="2" height="1.5" /></element>
<element ref="text_6"><bounds x="0.5" y="25.5" width="2" height="1.5" /></element>
<element ref="text_5"><bounds x="0.5" y="35.5" width="2" height="1.5" /></element>
<element ref="text_4"><bounds x="0.5" y="45.5" width="2" height="1.5" /></element>
<element ref="text_3"><bounds x="0.5" y="55.5" width="2" height="1.5" /></element>
<element ref="text_2"><bounds x="0.5" y="65.5" width="2" height="1.5" /></element>
<element ref="text_1"><bounds x="0.5" y="75.5" width="2" height="1.5" /></element>
<element ref="text_a"><bounds x="6.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_b"><bounds x="16.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_c"><bounds x="26.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_d"><bounds x="36.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_e"><bounds x="46.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_f"><bounds x="56.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_g"><bounds x="66.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_h"><bounds x="76.4" y="84.3" width="2" height="1.5" /></element>
<element ref="text_l7"><bounds x="-3.5" y="18.9" width="6" height="1.5" /></element>
<element ref="text_l3"><bounds x="-3.5" y="58.9" width="6" height="1.5" /></element>
<element ref="text_l2"><bounds x="-3.5" y="68.9" width="6" height="1.5" /></element>
<element ref="text_l1"><bounds x="-3.5" y="78.9" width="6" height="1.5" /></element>
<!-- right side stripes -->
<repeat count="129">
<param name="y" start="3" increment="0.625" />
<element ref="black2"><bounds x="84.5" y="~y~" width="20" height="0.2" /></element>
</repeat>
<repeat count="8">
<param name="y" start="10.88" increment="10" />
<element ref="cwhite"><bounds x="84.5" y="~y~" width="7.5" height="1.5" /></element>
</repeat>
<repeat count="8">
<param name="y" start="4.5" increment="10" />
<element ref="line30b"><bounds x="85.2" y="~y~" width="32" height="8" /></element>
<element ref="line30w"><bounds x="84.5" y="~y~" width="32" height="8" /></element>
</repeat>
<repeat count="8">
<param name="y" start="12.2" increment="10" />
<element ref="black2"><bounds x="84.5" y="~y~" width="7.9" height="0.4" /></element>
</repeat>
<element ref="blackb"><bounds x="102.5" y="2" width="10" height="82" /></element>
<repeat count="8">
<param name="y" start="10.8" increment="10" />
<param name="i" start="8" increment="-1" />
<element ref="text_b~i~"><bounds x="84.5" y="~y~" width="8" height="1.3" /></element>
</repeat>
<!-- buttons -->
<repeat count="7">
<param name="y" start="8" increment="10" />
<element ref="butb"><bounds xc="88.5" yc="~y~" width="7" height="4.2" /></element>
</repeat>
<repeat count="6">
<param name="y" start="17.85" increment="10" />
<param name="i" start="1" increment="1" />
<element ref="blackb"><bounds xc="88.5" yc="~y~" width="3.8" height="3.8" /></element>
<element ref="text_p~i~"><bounds xc="88.5" yc="~y~" width="3.8" height="3.8" /></element>
<element ref="whitem" blend="multiply"><bounds xc="88.5" yc="~y~" width="3.8" height="3.8" /></element>
<element ref="black2" blend="add"><bounds xc="88.5" yc="~y~" width="3.8" height="3.8" /></element>
</repeat>
<element ref="but8"><bounds xc="88.5" yc="8" width="7" height="4.2" /></element>
<element ref="but1"><bounds xc="88.5" yc="78" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x01"><bounds xc="88.5" yc="8" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x02"><bounds xc="88.5" yc="18" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x04"><bounds xc="88.5" yc="28" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x08"><bounds xc="88.5" yc="38" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x10"><bounds xc="88.5" yc="48" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x20"><bounds xc="88.5" yc="58" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x40"><bounds xc="88.5" yc="68" width="7" height="4.2" /></element>
<element ref="buta" blend="add" inputtag="IN.0" inputmask="0x80"><bounds xc="88.5" yc="78" width="7" height="4.2" /></element>
<!-- right edge leds -->
<element name="0.3" ref="ledg"><bounds x="105" y="47.5" width="2" height="1" /></element>
<element name="0.2" ref="ledg"><bounds x="105" y="57.5" width="2" height="1" /></element>
<element name="0.1" ref="ledg"><bounds x="105" y="67.5" width="2" height="1" /></element>
<element name="0.0" ref="ledr"><bounds x="105" y="77.5" width="2" height="1" /></element>
<element ref="text_r4"><bounds xc="106" y="45.5" width="6" height="1.5" /></element>
<element ref="text_r3"><bounds xc="106" y="55.5" width="6" height="1.5" /></element>
<element ref="text_r2"><bounds xc="106" y="65.5" width="6" height="1.5" /></element>
<element ref="text_r1"><bounds xc="106" y="75.5" width="6" height="1.5" /></element>
</view>
</mamelayout>

View File

@ -370,7 +370,7 @@ license:CC0-1.0
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-2.5" right="119" top="-1" bottom="88" />
<bounds left="-2.5" right="119" top="0" bottom="88" />
<group ref="sb_board"><bounds x="13" y="3" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-1" y="3" width="10" height="80" /></group>

View File

@ -371,7 +371,7 @@ license:CC0-1.0
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-12.5" right="111" top="-1" bottom="88" />
<bounds left="-12.5" right="111" top="0" bottom="88" />
<group ref="sb_board"><bounds x="4" y="3" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-11" y="3" width="10" height="80" /></group>

View File

@ -326,7 +326,7 @@ license:CC0-1.0
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-16" right="99.5" top="-1" bottom="88" />
<bounds left="-16" right="99.5" top="0" bottom="88" />
<element ref="cblack"><bounds x="3" y="3" width="90" height="80" /></element>
<group ref="sb_board"><bounds x="3" y="3" width="80" height="80" /></group>

View File

@ -344,7 +344,7 @@ license:CC0-1.0
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-12.5" right="109.5" top="-1" bottom="88" />
<bounds left="-12.5" right="109.5" top="0" bottom="88" />
<group ref="sb_board"><bounds x="4" y="3" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-11" y="3" width="10" height="80" /></group>

View File

@ -377,7 +377,7 @@ license:CC0-1.0
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-11.5" right="114" top="-1" bottom="88" />
<bounds left="-11.5" right="114" top="0" bottom="88" />
<group ref="sb_board"><bounds x="4" y="3" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-10" y="3" width="10" height="80" /></group>

View File

@ -404,10 +404,10 @@ license:CC0-1.0
<element name="0.8" ref="ledr"><bounds x="78" y="84" width="2" height="1" /></element>
<!-- lcd panel -->
<element ref="lcdw"><bounds x="47.75" y="89.5" width="25.25" height="5" /></element>
<screen tag="screen"><bounds x="48.25" y="90.5" width="24.25" height="3" /></screen>
<element ref="lcdm" blend="multiply"><bounds x="47.75" y="89.5" width="25.25" height="5" /></element>
<element ref="lcda" blend="add"><bounds x="47.75" y="89.5" width="25.25" height="5" /></element>
<element ref="lcdw"><bounds x="47.75" y="89" width="25.25" height="5" /></element>
<screen tag="screen"><bounds x="48.25" y="90" width="24.25" height="3" /></screen>
<element ref="lcdm" blend="multiply"><bounds x="47.75" y="89" width="25.25" height="5" /></element>
<element ref="lcda" blend="add"><bounds x="47.75" y="89" width="25.25" height="5" /></element>
<!-- right side buttons -->
<element ref="text_p1"><bounds x="95.4" y="18.00" width="1.6" height="1.6" /></element>

View File

@ -377,7 +377,7 @@ license:CC0-1.0
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-11.5" right="114" top="-1" bottom="88" />
<bounds left="-11.5" right="114" top="0" bottom="88" />
<group ref="sb_board"><bounds x="4" y="3" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-10" y="3" width="10" height="80" /></group>

View File

@ -358,7 +358,7 @@ license:CC0-1.0
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-12.5" right="114" top="-1" bottom="88" />
<bounds left="-12.5" right="114" top="0" bottom="88" />
<group ref="sb_board"><bounds x="4" y="3" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-11" y="3" width="10" height="80" /></group>

View File

@ -34782,6 +34782,9 @@ unkfr004c
@source:novadesitec/novadesitec_fr009.cpp
unkfr009
@source:novag/accord.cpp
accord
@source:novag/cexpert.cpp
cexpert

235
src/mame/novag/accord.cpp Normal file
View File

@ -0,0 +1,235 @@
// license:BSD-3-Clause
// copyright-holders:hap
// thanks-to:Berger
/*******************************************************************************
Novag Accord
NOTE: It triggers an NMI at power-off (or power-failure). If this isn't done,
NVRAM won't work properly.
Hardware notes (Alto):
- PCB label: 100088/100089
- Hitachi HD6301X0P @ ~8MHz (LC oscillator)
- 8*8 chessboard buttons, 16+4 leds, piezo
The I/O is almost the same as on Constellation Junior, just using other pins.
But since the MCU is different, it's awkward to put in the same driver (can't
use the standard cpu_device here).
Accord and Alto have the same MCU ROM.
TODO:
- if/when MAME supports an exit callback, hook up power-off switch to that
*******************************************************************************/
#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 "novag_accord.lh"
namespace {
class accord_state : public driver_device
{
public:
accord_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.0")
{ }
DECLARE_INPUT_CHANGED_MEMBER(power_off);
void accord(machine_config &config);
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
private:
// devices/pointers
required_device<hd6301x0_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 m_inputs;
emu_timer *m_standbytimer;
u16 m_inp_mux = 0;
// I/O handlers
void control_w(u8 data);
u8 input_r();
void board_w(u8 data);
void ledsel_w(u8 data);
TIMER_CALLBACK_MEMBER(set_standby);
};
void accord_state::machine_start()
{
m_standbytimer = timer_alloc(FUNC(accord_state::set_standby), this);
// register for savestates
save_item(NAME(m_inp_mux));
}
/*******************************************************************************
Power
*******************************************************************************/
void accord_state::machine_reset()
{
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
m_maincpu->set_input_line(M6801_STBY_LINE, CLEAR_LINE);
}
TIMER_CALLBACK_MEMBER(accord_state::set_standby)
{
m_maincpu->set_input_line(M6801_STBY_LINE, ASSERT_LINE);
}
INPUT_CHANGED_MEMBER(accord_state::power_off)
{
if (newval && !m_maincpu->standby())
{
// NMI when power goes off, followed by STBY after a short delay
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
m_standbytimer->adjust(attotime::from_msec(50), M6801_STBY_LINE);
}
}
/*******************************************************************************
I/O
*******************************************************************************/
void accord_state::control_w(u8 data)
{
// P26: speaker out
m_dac->write(BIT(~data, 6));
// P27: input mux (buttons)
m_inp_mux = (m_inp_mux & 0xff) | (~data << 1 & 0x100);
}
u8 accord_state::input_r()
{
// P30-P37: multiplexed inputs
u8 data = 0;
// read buttons
if (m_inp_mux & 0x100)
data |= m_inputs->read();
// read chessboard
for (int i = 0; i < 8; i++)
if (BIT(m_inp_mux, i))
data |= m_board->read_rank(i, true);
return ~data;
}
void accord_state::board_w(u8 data)
{
// P60-P67: input mux (chessboard), led data
m_inp_mux = (m_inp_mux & 0x100) | (data ^ 0xff);
m_display->write_mx(~data);
}
void accord_state::ledsel_w(u8 data)
{
// P70-P72: led select
m_display->write_my(~data & 7);
}
/*******************************************************************************
Input Ports
*******************************************************************************/
static INPUT_PORTS_START( accord )
PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_G) PORT_NAME("Go")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back / King")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_S) PORT_NAME("Sound / Queen")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CODE(KEYCODE_L) PORT_NAME("Set Level / Bishop")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game / Knight")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CODE(KEYCODE_U) PORT_NAME("Set Up / Rook")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_V) PORT_NAME("Verify / Pawn")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_B) PORT_NAME("Black/White")
PORT_START("POWER") // needs to be triggered for nvram to work
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, accord_state, power_off, 0) PORT_NAME("Power Off")
INPUT_PORTS_END
/*******************************************************************************
Machine Configs
*******************************************************************************/
void accord_state::accord(machine_config &config)
{
// basic machine hardware
HD6301X0(config, m_maincpu, 8'000'000);
m_maincpu->nvram_enable_backup(true);
m_maincpu->standby_cb().set(m_maincpu, FUNC(hd6301v1_cpu_device::nvram_set_battery));
m_maincpu->standby_cb().append([this](int state) { if (state) m_display->clear(); });
m_maincpu->out_p2_cb().set(FUNC(accord_state::control_w));
m_maincpu->in_p3_cb().set(FUNC(accord_state::input_r));
m_maincpu->out_p6_cb().set(FUNC(accord_state::board_w));
m_maincpu->out_p7_cb().set(FUNC(accord_state::ledsel_w));
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
m_board->set_delay(attotime::from_msec(150));
m_board->set_nvram_enable(true);
// video hardware
PWM_DISPLAY(config, m_display).set_size(3, 8);
config.set_default_layout(layout_novag_accord);
// sound hardware
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
}
/*******************************************************************************
ROM Definitions
*******************************************************************************/
ROM_START( accord )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD("novag_875_31x0b87p", 0x0000, 0x1000, CRC(4d77b7db) SHA1(21b38448fcf08aed8acc1b6e3bee2164ee638c9b) )
ROM_END
} // anonymous namespace
/*******************************************************************************
Drivers
*******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
SYST( 1987, accord, 0, 0, accord, accord, accord_state, empty_init, "Novag", "Accord", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )