New working systems

-------------------
Kasparov Turbo Advanced Trainer (1997 version) [hap, Berger]
This commit is contained in:
hap 2024-06-12 19:39:15 +02:00
parent 4fd79b3fc0
commit fba61e93be
6 changed files with 742 additions and 22 deletions

View File

@ -10,8 +10,8 @@ authors:hap
<element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element>
<element name="led" defstate="0">
<rect state="0"><color red="0.014" green="0.14" blue="0.02" /></rect>
<rect state="1"><color red="0.1" green="1.0" blue="0.15" /></rect>
<rect state="0"><color red="0.15" green="1.0" blue="0.1" alpha="0.13" /></rect>
<rect state="1"><color red="0.15" green="1.0" blue="0.1" /></rect>
</element>
<element name="ledo">

View File

@ -0,0 +1,478 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
authors:hap
-->
<mamelayout version="2">
<!-- define elements -->
<element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element>
<element name="cb_mask">
<rect>
<bounds xc="0" yc="0" width="100" height="100" />
<color red="0" green="0" blue="0" />
</rect>
<rect>
<bounds xc="0" yc="0" width="90.4" height="90.4" />
<color red="1" green="1" blue="1" />
</rect>
</element>
<element name="led" defstate="0">
<rect state="0"><color red="0.1" green="0.01" blue="0.015" /></rect>
<rect state="1"><color red="1.0" green="0.1" blue="0.15" /></rect>
</element>
<element name="led2" defstate="0">
<rect state="0"><color red="1.0" green="0.1" blue="0.15" alpha="0.17" /></rect>
<rect state="1"><color red="1.0" green="0.1" blue="0.15" /></rect>
</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>
<element name="text_1"><text string="1"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_2"><text string="2"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_3"><text string="3"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_4"><text string="4"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_5"><text string="5"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_6"><text string="6"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_7"><text string="7"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_8"><text string="8"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_a"><text string="A"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_b"><text string="B"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_c"><text string="C"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_d"><text string="D"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_e"><text string="E"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_f"><text string="F"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_g"><text string="G"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_h"><text string="H"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_l1"><text string="WHITE" align="2"></text></element>
<element name="text_l2"><text string="BLACK" align="2"></text></element>
<element name="text_l3"><text string="CHECK" align="2"></text></element>
<element name="text_l4"><text string="END" align="2"></text></element>
<element name="text_l5"><text string="SET UP" align="2"></text></element>
<element name="text_l6"><text string="NON AUTO" align="2"></text></element>
<element name="text_l7"><text string="COACH" align="2"></text></element>
<element name="text_l8"><text string="INFO" align="2"></text></element>
<element name="text_b1"><text string="GO"></text></element>
<element name="text_b2"><text string="STOP"></text></element>
<element name="text_b3"><text string="LEVEL"></text></element>
<element name="text_b4"><text string="NEW GAME"></text></element>
<element name="text_b5"><text string="PLAY"></text></element>
<element name="text_b6"><text string="COLOR"></text></element>
<element name="text_b7"><text string="INFO"></text></element>
<element name="text_b8"><text string="SET UP"></text></element>
<element name="text_b9"><text string="COACH"></text></element>
<element name="text_b10"><text string="NON AUTO"></text></element>
<element name="text_b11"><text string="TAKE BACK"></text></element>
<element name="text_p1"><image file="chess/wk.svg"/></element>
<element name="text_p2"><image file="chess/wq.svg"/></element>
<element name="text_p3"><image file="chess/wr.svg"/></element>
<element name="text_p4"><image file="chess/wb.svg"/></element>
<element name="text_p5"><image file="chess/wn.svg"/></element>
<element name="text_p6"><image file="chess/wp.svg"/></element>
<!-- sb board -->
<element name="cwhite"><rect><color red="0.81" green="0.8" blue="0.79" /></rect></element>
<element name="cblack"><rect><color red="0.41" green="0.4" blue="0.39" /></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>
<!-- status leds -->
<group name="leds1">
<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_l~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.0" ref="led2"><bounds x="8.5" yc="2" width="2" height="0.9" /></element>
<element name="2.1" ref="led2"><bounds x="8.5" yc="4" width="2" height="0.9" /></element>
<element name="2.5" ref="led2"><bounds x="8.5" yc="6" width="2" height="0.9" /></element>
<element name="2.4" ref="led2"><bounds x="8.5" yc="8" width="2" height="0.9" /></element>
<element name="2.6" ref="led2"><bounds x="8.5" yc="10" width="2" height="0.9" /></element>
<element name="2.3" ref="led2"><bounds x="8.5" yc="12" width="2" height="0.9" /></element>
<element name="2.7" ref="led2"><bounds x="8.5" yc="14" width="2" height="0.9" /></element>
<element name="2.2" ref="led2"><bounds x="8.5" yc="16" width="2" height="0.9" /></element>
</group>
<!-- button panel -->
<group name="buttons1">
<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_b~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="6" increment="1" />
<element ref="text_b~i~"><bounds xc="~x~" y="20.333" width="15" height="1.866" /></element>
</repeat>
<repeat count="6">
<param name="x" start="8" increment="9" />
<param name="i" start="1" increment="1" />
<element ref="text_p~i~"><bounds xc="~x~" y="32" width="4" height="4" /></element>
</repeat>
</group>
<group name="buttons2">
<bounds x="0" y="0" width="80" height="80" />
<element ref="but" inputtag="IN.2" inputmask="0x10"><bounds xc="9" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x40"><bounds xc="19.8" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x40"><bounds xc="30.6" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x20"><bounds xc="41.4" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x02"><bounds xc="52.2" y="10" width="9.3" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x80"><bounds xc="8" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x80"><bounds xc="17" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x20"><bounds xc="26" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x01"><bounds xc="35" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x01"><bounds xc="44" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x02"><bounds xc="53" y="23.333" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x04"><bounds xc="8" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x04"><bounds xc="17" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x10"><bounds xc="26" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x10"><bounds xc="35" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.1" inputmask="0x08"><bounds xc="44" y="36.666" width="7.5" height="2" /></element>
<element ref="but" inputtag="IN.0" inputmask="0x08"><bounds xc="53" y="36.666" width="7.5" height="2" /></element>
</group>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="2.8" right="148.6" top="-3.2" bottom="87.2" />
<element ref="cwhite"><bounds xc="61" yc="42" width="95" height="95" /></element>
<element ref="blackb"><bounds xc="61" yc="42" width="80.5" height="80.5" /></element>
<group ref="sb_board"><bounds x="21" y="2" width="80" height="80" /></group>
<!-- chessboard leds -->
<element name="0.7" ref="led"><bounds x="14.8" yc="7" width="3" height="0.9" /></element>
<element name="0.6" ref="led"><bounds x="14.8" yc="17" width="3" height="0.9" /></element>
<element name="0.5" ref="led"><bounds x="14.8" yc="27" width="3" height="0.9" /></element>
<element name="0.4" ref="led"><bounds x="14.8" yc="37" width="3" height="0.9" /></element>
<element name="0.3" ref="led"><bounds x="14.8" yc="47" width="3" height="0.9" /></element>
<element name="0.2" ref="led"><bounds x="14.8" yc="57" width="3" height="0.9" /></element>
<element name="0.1" ref="led"><bounds x="14.8" yc="67" width="3" height="0.9" /></element>
<element name="0.0" ref="led"><bounds x="14.8" yc="77" width="3" height="0.9" /></element>
<element name="1.0" ref="led"><bounds xc="26" y="85.2" width="0.9" height="3" /></element>
<element name="1.1" ref="led"><bounds xc="36" y="85.2" width="0.9" height="3" /></element>
<element name="1.2" ref="led"><bounds xc="46" y="85.2" width="0.9" height="3" /></element>
<element name="1.3" ref="led"><bounds xc="56" y="85.2" width="0.9" height="3" /></element>
<element name="1.4" ref="led"><bounds xc="66" y="85.2" width="0.9" height="3" /></element>
<element name="1.5" ref="led"><bounds xc="76" y="85.2" width="0.9" height="3" /></element>
<element name="1.6" ref="led"><bounds xc="86" y="85.2" width="0.9" height="3" /></element>
<element name="1.7" ref="led"><bounds xc="96" y="85.2" width="0.9" height="3" /></element>
<element ref="cb_mask" blend="multiply"><bounds xc="61" yc="42" width="100" height="100" /></element>
<group ref="sb_ui"><bounds x="4.3" y="2" width="10" height="80" /></group>
<!-- chessboard coords -->
<element ref="text_8"><bounds x="18.6" y="6" width="2" height="2" /></element>
<element ref="text_7"><bounds x="18.6" y="16" width="2" height="2" /></element>
<element ref="text_6"><bounds x="18.6" y="26" width="2" height="2" /></element>
<element ref="text_5"><bounds x="18.6" y="36" width="2" height="2" /></element>
<element ref="text_4"><bounds x="18.6" y="46" width="2" height="2" /></element>
<element ref="text_3"><bounds x="18.6" y="56" width="2" height="2" /></element>
<element ref="text_2"><bounds x="18.6" y="66" width="2" height="2" /></element>
<element ref="text_1"><bounds x="18.6" y="76" width="2" height="2" /></element>
<element ref="text_a"><bounds x="25" y="82.6" width="2" height="2" /></element>
<element ref="text_b"><bounds x="35" y="82.6" width="2" height="2" /></element>
<element ref="text_c"><bounds x="45" y="82.6" width="2" height="2" /></element>
<element ref="text_d"><bounds x="55" y="82.6" width="2" height="2" /></element>
<element ref="text_e"><bounds x="65" y="82.6" width="2" height="2" /></element>
<element ref="text_f"><bounds x="75" y="82.6" width="2" height="2" /></element>
<element ref="text_g"><bounds x="85" y="82.6" width="2" height="2" /></element>
<element ref="text_h"><bounds x="95" y="82.6" width="2" height="2" /></element>
<!-- right side -->
<group ref="leds1"><bounds x="106.2" y="10.5" width="20" height="30" /></group>
<group ref="buttons1"><bounds x="104.5" y="28.75" width="60" height="60" /></group>
<element ref="cwhite" blend="multiply"><bounds x="107" y="0" width="50" height="90" /></element>
<group ref="leds2"><bounds x="106.2" y="10.5" width="20" height="30" /></group>
<group ref="buttons2"><bounds x="104.5" y="28.75" width="60" height="60" /></group>
</view>
</mamelayout>

View File

@ -8,8 +8,8 @@ authors:hap
<!-- define elements -->
<element name="led" defstate="0">
<rect state="0"><color red="0.014" green="0.14" blue="0.02" /></rect>
<rect state="1"><color red="0.1" green="1.0" blue="0.15" /></rect>
<rect state="0"><color red="0.15" green="1.0" blue="0.1" alpha="0.13" /></rect>
<rect state="1"><color red="0.15" green="1.0" blue="0.1" /></rect>
</element>
<element name="but" defstate="0">
@ -405,14 +405,14 @@ authors:hap
<bounds left="3" right="151.875" top="-0.25" bottom="89" />
<!-- chessboard coords -->
<element ref="text_8"><bounds x="18.7" y="6" width="2" height="2" /></element>
<element ref="text_7"><bounds x="18.7" y="16" width="2" height="2" /></element>
<element ref="text_6"><bounds x="18.7" y="26" width="2" height="2" /></element>
<element ref="text_5"><bounds x="18.7" y="36" width="2" height="2" /></element>
<element ref="text_4"><bounds x="18.7" y="46" width="2" height="2" /></element>
<element ref="text_3"><bounds x="18.7" y="56" width="2" height="2" /></element>
<element ref="text_2"><bounds x="18.7" y="66" width="2" height="2" /></element>
<element ref="text_1"><bounds x="18.7" y="76" width="2" height="2" /></element>
<element ref="text_8"><bounds x="18.6" y="6" width="2" height="2" /></element>
<element ref="text_7"><bounds x="18.6" y="16" width="2" height="2" /></element>
<element ref="text_6"><bounds x="18.6" y="26" width="2" height="2" /></element>
<element ref="text_5"><bounds x="18.6" y="36" width="2" height="2" /></element>
<element ref="text_4"><bounds x="18.6" y="46" width="2" height="2" /></element>
<element ref="text_3"><bounds x="18.6" y="56" width="2" height="2" /></element>
<element ref="text_2"><bounds x="18.6" y="66" width="2" height="2" /></element>
<element ref="text_1"><bounds x="18.6" y="76" width="2" height="2" /></element>
<element ref="text_a"><bounds x="25" y="82.6" width="2" height="2" /></element>
<element ref="text_b"><bounds x="35" y="82.6" width="2" height="2" /></element>
<element ref="text_c"><bounds x="45" y="82.6" width="2" height="2" /></element>
@ -432,14 +432,14 @@ authors:hap
<group ref="buttons2"><bounds x="103.675" y="28.75" width="60" height="60" /></group>
<!-- chessboard leds -->
<element name="0.0" ref="led"><bounds x="15.9" yc="7" width="2" height="0.9" /></element>
<element name="0.1" ref="led"><bounds x="15.9" yc="17" width="2" height="0.9" /></element>
<element name="0.2" ref="led"><bounds x="15.9" yc="27" width="2" height="0.9" /></element>
<element name="0.12" ref="led"><bounds x="15.9" yc="37" width="2" height="0.9" /></element>
<element name="0.11" ref="led"><bounds x="15.9" yc="47" width="2" height="0.9" /></element>
<element name="0.10" ref="led"><bounds x="15.9" yc="57" width="2" height="0.9" /></element>
<element name="0.9" ref="led"><bounds x="15.9" yc="67" width="2" height="0.9" /></element>
<element name="0.8" ref="led"><bounds x="15.9" yc="77" width="2" height="0.9" /></element>
<element name="0.0" ref="led"><bounds x="15.8" yc="7" width="2" height="0.9" /></element>
<element name="0.1" ref="led"><bounds x="15.8" yc="17" width="2" height="0.9" /></element>
<element name="0.2" ref="led"><bounds x="15.8" yc="27" width="2" height="0.9" /></element>
<element name="0.12" ref="led"><bounds x="15.8" yc="37" width="2" height="0.9" /></element>
<element name="0.11" ref="led"><bounds x="15.8" yc="47" width="2" height="0.9" /></element>
<element name="0.10" ref="led"><bounds x="15.8" yc="57" width="2" height="0.9" /></element>
<element name="0.9" ref="led"><bounds x="15.8" yc="67" width="2" height="0.9" /></element>
<element name="0.8" ref="led"><bounds x="15.8" yc="77" width="2" height="0.9" /></element>
<element name="0.7" ref="led"><bounds xc="26" y="85.2" width="0.9" height="2" /></element>
<element name="0.6" ref="led"><bounds xc="36" y="85.2" width="0.9" height="2" /></element>

View File

@ -38823,6 +38823,9 @@ tstar432
tstar432a
tstar432b
@source:saitek/tatrain.cpp
tatrain
@source:saitek/turbo16k.cpp
compan3
conquist

View File

@ -5,7 +5,7 @@
Saitek Kasparov GK 2000
the chess engine is by Frans Morsch. According to schematics, GK 2100 is on the
The chess engine is by Frans Morsch. According to schematics, GK 2100 is on the
same hardware.
Hardware notes:
@ -16,6 +16,7 @@ Hardware notes:
A13 MCU is used in:
- Saitek GK 2000 (86071220X12)
- Saitek Travel Champion 2080 (86071220X12)
- Saitek Barracuda (suspected)
- Saitek Mephisto Champion (suspected)
- Saitek Mephisto Mythos (86142221X34)
- Tandy (Radio Shack) Mega 2050X (86071221X12)
@ -259,7 +260,7 @@ void gk2000_state::gk2000(machine_config &config)
// basic machine hardware
H8323(config, m_maincpu, 20_MHz_XTAL);
m_maincpu->nvram_enable_backup(true);
m_maincpu->standby_cb().set(m_maincpu, FUNC(h8325_device::nvram_set_battery));
m_maincpu->standby_cb().set(m_maincpu, FUNC(h8323_device::nvram_set_battery));
m_maincpu->standby_cb().append(FUNC(gk2000_state::standby));
m_maincpu->write_port1().set(FUNC(gk2000_state::lcd_segs_w<0>));
m_maincpu->write_port2().set(FUNC(gk2000_state::p2_w));

238
src/mame/saitek/tatrain.cpp Normal file
View File

@ -0,0 +1,238 @@
// license:BSD-3-Clause
// copyright-holders:hap
// thanks-to:Berger
/*******************************************************************************
Saitek Kasparov Turbo Advanced Trainer
The chess engine is by Frans Morsch, it is the same as the one in GK 2000.
Hardware notes (1997 version):
- PCB label: ST14B-PE 003, PN/N 512090-00312, REV.2
- Hitachi H8/3212 MCU, 10MHz XTAL
- piezo, 24 LEDs, button sensors chessboard
H8/323 A14 MCU is used in:
- Saitek Turbo Advanced Trainer (1992 version)
- Saitek Champion Advanced Trainer (suspected)
- Saitek Virtuoso
- Hegener + Glaser Schach-Trainer (H+G brand Turbo Advanced Trainer)
H8/3212 V02 MCU is used in:
- Saitek Turbo Advanced Trainer (1997 version)
- Saitek Capella
Turbo Advanced Trainer looks similar to Saitek Team-Mate. Virtuoso and Capella
are in the same housing as SciSys Astral, they lack the coach LED and button.
TODO:
- dump/add 1992 version
- it does a cold boot at every reset, so nvram won't work properly unless MAME
adds some kind of auxillary autosave state feature at power-off
*******************************************************************************/
#include "emu.h"
#include "cpu/h8/h83217.h"
#include "machine/sensorboard.h"
#include "sound/dac.h"
#include "video/pwm.h"
#include "speaker.h"
// internal artwork
#include "saitek_tatrain.lh"
namespace {
class tatrain_state : public driver_device
{
public:
tatrain_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, "led_pwm"),
m_dac(*this, "dac"),
m_inputs(*this, "IN.%u", 0)
{ }
void tatrain(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(go_button);
protected:
virtual void machine_start() override;
private:
// devices/pointers
required_device<h83212_device> m_maincpu;
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_display;
required_device<dac_1bit_device> m_dac;
required_ioport_array<3> m_inputs;
u16 m_inp_mux = 0;
// I/O handlers
template<int N> void leds_w(u8 data);
u8 p4_r();
void p5_w(u8 data);
void p6_w(u8 data);
void p7_w(u8 data);
};
void tatrain_state::machine_start()
{
// register for savestates
save_item(NAME(m_inp_mux));
}
/*******************************************************************************
I/O
*******************************************************************************/
INPUT_CHANGED_MEMBER(tatrain_state::go_button)
{
m_maincpu->set_input_line(INPUT_LINE_IRQ0, newval ? ASSERT_LINE : CLEAR_LINE);
}
template <int N>
void tatrain_state::leds_w(u8 data)
{
// P1x, P2x, P3x: leds (direct)
m_display->write_row(N, ~data);
}
u8 tatrain_state::p4_r()
{
// P40-P47: multiplexed inputs
u8 data = 0;
// read buttons
for (int i = 0; i < 2; i++)
if (BIT(m_inp_mux, i + 8))
data |= m_inputs[i]->read();
// read chessboard
for (int i = 0; i < 8; i++)
if (BIT(m_inp_mux, i))
data |= m_board->read_rank(i ^ 7);
return ~data;
}
void tatrain_state::p5_w(u8 data)
{
// P52,P53: input mux (buttons)
m_inp_mux = (m_inp_mux & 0xff) | (~data << 6 & 0x300);
}
void tatrain_state::p6_w(u8 data)
{
// P60: speaker out
m_dac->write(data & 1);
// P61-P63: N/C (appears to be compatible with Turbo 16K LCDs)
}
void tatrain_state::p7_w(u8 data)
{
// P70-P77: input mux (chessboard)
m_inp_mux = (m_inp_mux & 0x300) | (data ^ 0xff);
}
/*******************************************************************************
Input Ports
*******************************************************************************/
static INPUT_PORTS_START( tatrain )
PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("Non Auto")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_P) PORT_NAME("Play")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Set Up")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Stop")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Info")
PORT_START("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Coach")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Knight")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Rook")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Color")
PORT_START("IN.2")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CHANGED_MEMBER(DEVICE_SELF, tatrain_state, go_button, 0) PORT_NAME("Go / Stop")
PORT_BIT(0xef, IP_ACTIVE_HIGH, IPT_UNUSED)
INPUT_PORTS_END
/*******************************************************************************
Machine Configs
*******************************************************************************/
void tatrain_state::tatrain(machine_config &config)
{
// basic machine hardware
H83212(config, m_maincpu, 10_MHz_XTAL);
m_maincpu->nvram_enable_backup(true);
m_maincpu->standby_cb().set(m_maincpu, FUNC(h83212_device::nvram_set_battery));
m_maincpu->standby_cb().append([this](int state) { if (state) m_display->clear(); });
m_maincpu->write_port1().set(FUNC(tatrain_state::leds_w<0>));
m_maincpu->write_port2().set(FUNC(tatrain_state::leds_w<1>));
m_maincpu->write_port3().set(FUNC(tatrain_state::leds_w<2>));
m_maincpu->read_port4().set(FUNC(tatrain_state::p4_r));
m_maincpu->read_port5().set_constant(0xff);
m_maincpu->write_port5().set(FUNC(tatrain_state::p5_w));
m_maincpu->read_port6().set_ioport("IN.2").invert();
m_maincpu->write_port6().set(FUNC(tatrain_state::p6_w));
m_maincpu->write_port7().set(FUNC(tatrain_state::p7_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_saitek_tatrain);
// sound hardware
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
}
/*******************************************************************************
ROM Definitions
*******************************************************************************/
ROM_START( tatrain )
ROM_REGION( 0x4000, "maincpu", 0 )
ROM_LOAD("97_saitek_86158430421_hd6433212v02p.u1", 0x0000, 0x4000, CRC(73f9abb6) SHA1(3a4c3a8ad668327fe9f61c4b054e31ec6af9c48d) )
ROM_END
} // anonymous namespace
/*******************************************************************************
Drivers
*******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
SYST( 1997, tatrain, 0, 0, tatrain, tatrain, tatrain_state, empty_init, "Saitek", "Kasparov Turbo Advanced Trainer (1997 version)", MACHINE_SUPPORTS_SAVE )