New working systems

-------------------
Enterprise "S" [hap, Sean Riddle, Lord Nightmare]
This commit is contained in:
hap 2023-11-21 21:31:57 +01:00
parent 11b8f8af4c
commit 7641b01454
5 changed files with 675 additions and 27 deletions

View File

@ -1168,6 +1168,7 @@ void m6801_cpu_device::device_start()
m_timer_over.d = 0;
m_timer_next = 0;
save_item(NAME(m_nvram_battery));
save_item(NAME(m_port_ddr));
save_item(NAME(m_port_data));
save_item(NAME(m_p3csr));

View File

@ -61,7 +61,7 @@ public:
void nvram_set_battery(int state) { m_nvram_battery = bool(state); } // default is 1 (nvram_enable_backup needs to be true)
void nvram_set_default_value(uint8_t val) { m_nvram_defval = val; } // default is 0
auto standby_cb() { return m_standby_func.bind(); } // notifier (not an output pin)
bool standby() { return suspended(SUSPEND_REASON_CLOCK); }
int standby() { return suspended(SUSPEND_REASON_CLOCK) ? 1 : 0; }
void m6801_clock_serial();

View File

@ -0,0 +1,573 @@
<?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.1" green="0.01" blue="0.015" /></disk>
</element>
<element name="led2" 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="text_10">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="1" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_20">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="2" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_30">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="3" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_40">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="4" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_50">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="5" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_60">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="6" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_70">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="7" align="1"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_80">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="8" align="1"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_11">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="1" align="2"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_21">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="2" align="2"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_31">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="3" align="2"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_41">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="4" align="2"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_51">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="5" align="2"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_61">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="6" align="2"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_71">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="7" align="2"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_81">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="8" align="2"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_a0">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="A"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_b0">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="B"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_c0">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="C"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_d0">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="D"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_e0">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="E"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_f0">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="F"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_g0">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="G"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_h0">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="H"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_a1">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="A"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_b1">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="B"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_c1">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="C"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_d1">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="D"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_e1">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="E"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_f1">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="F"><color red="0.05" green="0.05" blue="0.05" /></text>
</element>
<element name="text_g1">
<rect><color red="0.41" green="0.4" blue="0.39" /></rect>
<text string="G"><color red="0.9" green="0.9" blue="0.9" /></text>
</element>
<element name="text_h1">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="H"><color red="0.05" green="0.05" blue="0.05" /></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">
<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>
<!-- coords -->
<element ref="text_80"><bounds x="0.25" y="4.3" width="2" height="1.4" /></element>
<element ref="text_70"><bounds x="0.25" y="14.3" width="2" height="1.4" /></element>
<element ref="text_60"><bounds x="0.25" y="24.3" width="2" height="1.4" /></element>
<element ref="text_50"><bounds x="0.25" y="34.3" width="2" height="1.4" /></element>
<element ref="text_40"><bounds x="0.25" y="44.3" width="2" height="1.4" /></element>
<element ref="text_30"><bounds x="0.25" y="54.3" width="2" height="1.4" /></element>
<element ref="text_20"><bounds x="0.25" y="64.3" width="2" height="1.4" /></element>
<element ref="text_10"><bounds x="0.25" y="74.3" width="2" height="1.4" /></element>
<element ref="text_81"><bounds x="77.75" y="4.3" width="2" height="1.4" /></element>
<element ref="text_71"><bounds x="77.75" y="14.3" width="2" height="1.4" /></element>
<element ref="text_61"><bounds x="77.75" y="24.3" width="2" height="1.4" /></element>
<element ref="text_51"><bounds x="77.75" y="34.3" width="2" height="1.4" /></element>
<element ref="text_41"><bounds x="77.75" y="44.3" width="2" height="1.4" /></element>
<element ref="text_31"><bounds x="77.75" y="54.3" width="2" height="1.4" /></element>
<element ref="text_21"><bounds x="77.75" y="64.3" width="2" height="1.4" /></element>
<element ref="text_11"><bounds x="77.75" y="74.3" width="2" height="1.4" /></element>
<element ref="text_a0"><bounds x="4" y="0" width="2" height="1.4" /></element>
<element ref="text_b0"><bounds x="14" y="0" width="2" height="1.4" /></element>
<element ref="text_c0"><bounds x="24" y="0" width="2" height="1.4" /></element>
<element ref="text_d0"><bounds x="34" y="0" width="2" height="1.4" /></element>
<element ref="text_e0"><bounds x="44" y="0" width="2" height="1.4" /></element>
<element ref="text_f0"><bounds x="54" y="0" width="2" height="1.4" /></element>
<element ref="text_g0"><bounds x="64" y="0" width="2" height="1.4" /></element>
<element ref="text_h0"><bounds x="74" y="0" width="2" height="1.4" /></element>
<element ref="text_a1"><bounds x="4" y="78.55" width="2" height="1.4" /></element>
<element ref="text_b1"><bounds x="14" y="78.55" width="2" height="1.4" /></element>
<element ref="text_c1"><bounds x="24" y="78.55" width="2" height="1.4" /></element>
<element ref="text_d1"><bounds x="34" y="78.55" width="2" height="1.4" /></element>
<element ref="text_e1"><bounds x="44" y="78.55" width="2" height="1.4" /></element>
<element ref="text_f1"><bounds x="54" y="78.55" width="2" height="1.4" /></element>
<element ref="text_g1"><bounds x="64" y="78.55" width="2" height="1.4" /></element>
<element ref="text_h1"><bounds x="74" y="78.55" width="2" height="1.4" /></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">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
</element>
<element name="text_uib3">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<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">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<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">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
</element>
<element name="text_uiu2b">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
</element>
<element name="text_uiu2c">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
</element>
<element name="text_uiu2d">
<rect><color red="0.81" green="0.8" blue="0.79" /></rect>
<text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></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_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></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>
<!-- buttons -->
<element name="whiter"><rect><color red="1" green="1" blue="1" /></rect></element>
<element name="butw" defstate="0">
<rect state="0"><color red="0.9" green="0.9" blue="0.92" /></rect>
<rect state="1"><color red="0.65" green="0.65" blue="0.66" /></rect>
</element>
<element name="text_l1"><text string="NEW GAME" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l2"><text string="TAKE BACK" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l3"><text string="ENTER POSITION" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l4"><text string="MULTI MOVE" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l5"><text string="HINT" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l6"><text string="SOUND/COLOR" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l7"><text string="LEVEL" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l8"><text string="MOVE" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l11"><text string="BLACK" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l12"><text string="WHITE" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l13"><text string="CHECK" align="2"><color red="1" green="1" blue="1" /></text></element>
<element name="text_l14"><text string="DRAW/MATE" align="2"><color red="1" green="1" blue="1" /></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>
<group name="panel">
<bounds x="0" y="0" width="50" height="100" />
<repeat count="8">
<param name="y" start="29.8" increment="5" />
<param name="i" start="1" increment="1" />
<element ref="text_l~i~"><bounds x="3.5" y="~y~" width="15" height="1.5" /></element>
</repeat>
<repeat count="6">
<param name="y" start="69.1" increment="5" />
<param name="i" start="1" increment="1" />
<element ref="text_p~i~"><bounds x="16.5" y="~y~" width="2.5" height="2.5" /></element>
</repeat>
<repeat count="4">
<param name="y" start="16" increment="2.9" />
<param name="i" start="11" increment="1" />
<element ref="text_l~i~"><bounds x="3.5" y="~y~" width="15" height="1.5" /></element>
</repeat>
<repeat count="5">
<param name="y" start="15.2" increment="2.9" />
<element ref="whiter"><bounds x="1" y="~y~" width="30" height="0.15" /></element>
</repeat>
<element ref="cwhite" blend="multiply"><bounds x="0" y="0" width="50" height="100" /></element>
<element name="1.a" ref="led2"><bounds x="3.5" yc="16.725" width="1.5" height="1.5" /></element>
<element name="0.a" ref="led2"><bounds x="3.5" yc="19.625" width="1.5" height="1.5" /></element>
<element name="3.a" ref="led2"><bounds x="3.5" yc="22.525" width="1.5" height="1.5" /></element>
<element name="4.a" ref="led2"><bounds x="3.5" yc="25.425" width="1.5" height="1.5" /></element>
<element name="2.a" ref="led2"><bounds x="3.5" yc="40.5" width="1.5" height="1.5" /></element>
<element ref="butw" inputtag="IN.1" inputmask="0x80"><bounds x="20" yc="30.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.1" inputmask="0x40"><bounds x="20" yc="35.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.0" inputmask="0x04"><bounds x="20" yc="40.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.1" inputmask="0x04"><bounds x="20" yc="45.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.0" inputmask="0x02"><bounds x="20" yc="50.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.1" inputmask="0x20"><bounds x="20" yc="55.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.1" inputmask="0x10"><bounds x="20" yc="60.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.1" inputmask="0x02"><bounds x="20" yc="65.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.0" inputmask="0x08"><bounds x="20" yc="70.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.1" inputmask="0x08"><bounds x="20" yc="75.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.0" inputmask="0x10"><bounds x="20" yc="80.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.0" inputmask="0x20"><bounds x="20" yc="85.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.0" inputmask="0x40"><bounds x="20" yc="90.5" width="8" height="1.15" /></element>
<element ref="butw" inputtag="IN.0" inputmask="0x80"><bounds x="20" yc="95.5" width="8" height="1.15" /></element>
</group>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-7" right="122" top="6" bottom="94" />
<group ref="panel"><bounds x="91" y="-5.6" width="50" height="100" /></group>
<element ref="cblack"><bounds x="6" y="9.5" width="84.5" height="84.5" /></element>
<element ref="cwhite"><bounds x="9.5" y="9.5" width="81" height="81" /></element>
<group ref="sb_board"><bounds x="10" y="10" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-5.5" y="10" width="10" height="80" /></group>
<!-- leds -->
<repeat count="8">
<param name="x" start="14.25" increment="10" />
<param name="i" start="7" increment="-1" />
<element name="6.~i~" ref="led"><bounds x="~x~" y="91.5" width="1.5" height="1.5" /></element>
</repeat>
<repeat count="8">
<param name="y" start="14.25" increment="10" />
<param name="i" start="0" increment="1" />
<element name="5.~i~" ref="led"><bounds x="7" y="~y~" width="1.5" height="1.5" /></element>
</repeat>
</view>
</mamelayout>

View File

@ -38348,6 +38348,7 @@ compan
@source:saitek/companion2.cpp
compan2
enterp
expchess
@source:saitek/chesstrv.cpp

View File

@ -4,12 +4,12 @@
/*******************************************************************************
SciSys Chess Companion II family
CXG Enterprise "S" family
The chess engine is LogiChess (ported from Z80 to 6801), by Kaare Danielsen.
CXG Enterprise "S" / Star Chess is probably on similar hardware.
NOTE: It triggers an NMI when the power switch is changed from ON to MEMORY.
If this is not done, NVRAM may fail on the next boot.
If this is not done, NVRAM won't save properly.
TODO:
- if/when MAME supports an exit callback, hook up power-off NMI to that
@ -51,6 +51,26 @@ is either VCC or GND to distinguish between the two.
The Tandy clones run at a lower clock frequency, 3MHz and 6MHz respectively.
********************************************************************************
CXG Enterprise "S" / Star Chess is on very similar hardware, so it's emulated
in this driver too.
Hardware notes:
- Hitachi HD6301V1 (HD6301V1C42P), 7.15909MHz XTAL
- port 2 I/O is changed a bit, rest is same as compan2
HD6301V1C42P MCU is used in:
- CXG Enterprise "S" (black/brown/blue)
- CXG Star Chess (black/gray)
- CXG Computachess III
- CXG Super Computachess
- CXG Crown
- CXG Sphinx Galaxy 2 (suspected)
- Fidelity Genesis (Fidelity brand Computachess III)
- Mephisto Merlin 4K (H+G brand Computachess III)
- Multitech Enterprise (Multitech brand Super Computachess)
*******************************************************************************/
#include "emu.h"
@ -63,6 +83,7 @@ The Tandy clones run at a lower clock frequency, 3MHz and 6MHz respectively.
#include "speaker.h"
// internal artwork
#include "cxg_enterprise.lh"
#include "saitek_companion2.lh"
#include "saitek_expchess.lh"
@ -80,6 +101,7 @@ public:
m_inputs(*this, "IN.%u", 0)
{ }
void enterp(machine_config &config);
void expchess(machine_config &config);
void compan2(machine_config &config);
@ -101,6 +123,7 @@ private:
// I/O handlers
u8 input1_r();
u8 input2_r();
u8 input2c_r();
void mux_w(u8 data);
u8 power_r();
void led_w(u8 data);
@ -171,6 +194,8 @@ INPUT_CHANGED_MEMBER(compan2_state::power_off)
I/O
*******************************************************************************/
// common
u8 compan2_state::input1_r()
{
u8 data = 0;
@ -219,20 +244,62 @@ void compan2_state::led_w(u8 data)
}
// enterp-specific
u8 compan2_state::input2c_r()
{
// P20,P21: read buttons
u8 data = input2_r() >> 1 & 3;
// P24: power switch state
return data | (power_r() << 4) | 0xec;
}
/*******************************************************************************
Input Ports
*******************************************************************************/
static INPUT_PORTS_START( expchess )
static INPUT_PORTS_START( enterp )
PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_NAME("Hint")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Enter Position")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King")
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_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Knight")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn")
PORT_START("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Move")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Multi Move")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Sound/Color")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
PORT_START("IN.2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("POWER")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, compan2_state, power_off, 0) PORT_NAME("Power Off")
INPUT_PORTS_END
static INPUT_PORTS_START( expchess )
PORT_INCLUDE( enterp )
PORT_MODIFY("IN.0")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("White/Black")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game / Clear Board")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("2nd F")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King")
PORT_BIT(0x63, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("IN.1")
PORT_MODIFY("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Rook")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back")
@ -242,35 +309,21 @@ static INPUT_PORTS_START( expchess )
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen")
PORT_START("IN.2")
PORT_MODIFY("IN.2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM) // button config
PORT_START("POWER")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, compan2_state, power_off, 0) PORT_NAME("Power Off")
INPUT_PORTS_END
static INPUT_PORTS_START( compan2 )
PORT_INCLUDE( expchess )
PORT_INCLUDE( enterp )
PORT_MODIFY("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Sound")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("Color")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("King")
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_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Bishop")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Knight")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Pawn")
PORT_MODIFY("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Multi Move")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Queen")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Play")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Enter Position")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Take Back")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
PORT_MODIFY("IN.2")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) // button config
@ -287,18 +340,17 @@ INPUT_PORTS_END
Machine Configs
*******************************************************************************/
void compan2_state::expchess(machine_config &config)
void compan2_state::enterp(machine_config &config)
{
// basic machine hardware
HD6301V1(config, m_maincpu, 4000000); // approximation, no XTAL
HD6301V1(config, m_maincpu, 7.15909_MHz_XTAL);
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->in_p1_cb().set(FUNC(compan2_state::input1_r));
m_maincpu->in_p2_cb().set(FUNC(compan2_state::input2_r));
m_maincpu->out_p2_cb().set("dac", FUNC(dac_1bit_device::write)).bit(0);
m_maincpu->in_p2_cb().set(FUNC(compan2_state::input2c_r));
m_maincpu->out_p2_cb().set("dac", FUNC(dac_1bit_device::write)).bit(2);
m_maincpu->out_p3_cb().set(FUNC(compan2_state::mux_w));
m_maincpu->in_p4_cb().set(FUNC(compan2_state::power_r));
m_maincpu->out_p4_cb().set(FUNC(compan2_state::led_w));
SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS);
@ -308,17 +360,31 @@ void compan2_state::expchess(machine_config &config)
// video hardware
PWM_DISPLAY(config, m_display).set_size(5+2, 8);
config.set_default_layout(layout_saitek_expchess);
config.set_default_layout(layout_cxg_enterprise);
// sound hardware
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25);
}
void compan2_state::expchess(machine_config &config)
{
enterp(config);
// basic machine hardware
m_maincpu->set_clock(4000000); // approximation, no XTAL
m_maincpu->in_p2_cb().set(FUNC(compan2_state::input2_r));
m_maincpu->out_p2_cb().set("dac", FUNC(dac_1bit_device::write)).bit(0);
m_maincpu->in_p4_cb().set(FUNC(compan2_state::power_r));
config.set_default_layout(layout_saitek_expchess);
}
void compan2_state::compan2(machine_config &config)
{
expchess(config);
// basic machine hardware
MCFG_MACHINE_RESET_OVERRIDE(compan2_state, compan2)
config.set_default_layout(layout_saitek_companion2);
}
@ -339,6 +405,11 @@ ROM_START( expchess )
ROM_LOAD("1983_te-1_scisys-w_0609v171.u1", 0x0000, 0x1000, CRC(a26632fd) SHA1(fb83dc2476500acaabd949d749e58adca01012ea) )
ROM_END
ROM_START( enterp )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD("1984nc208_newcrest_hd6301v1c42p", 0x0000, 0x1000, CRC(b9cc7da7) SHA1(ca07ba072cc101aabeb0853f518053f48cc73a4d) )
ROM_END
} // anonymous namespace
@ -350,3 +421,5 @@ ROM_END
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
SYST( 1983, compan2, 0, 0, compan2, compan2, compan2_state, empty_init, "SciSys", "Chess Companion II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
SYST( 1983, expchess, compan2, 0, expchess, expchess, compan2_state, empty_init, "SciSys", "Explorer Chess", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
SYST( 1984, enterp, 0, 0, enterp, enterp, compan2_state, empty_init, "CXG Systems / Newcrest Technology", "Enterprise \"S\"", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )