New working systems

-------------------
Zircon II [hap, Berger, Sean Riddle]
This commit is contained in:
hap 2024-06-21 18:36:06 +02:00
parent a73abf0a4d
commit 6e0c964414
7 changed files with 896 additions and 5 deletions

View File

@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders:hap
// thanks-to:digshadow, segher
// thanks-to:digshadow, Segher
/*******************************************************************************
Bandai Tamagotchi generation 1 hardware
@ -11,6 +11,10 @@ Hardware notes:
- 32*16 LCD screen + 8 custom segments
- 1-bit sound
TODO:
- change to SVG screen
- add the Mothra version that was recently dumped (has a E0C6S48)
*******************************************************************************/
#include "emu.h"

View File

@ -10000,6 +10000,10 @@ ROM_END
BTANB: Energy and weapon power bars are the wrong way around. The manual does
show them correctly, but it appears to be a doctored picture.
There's also a newer version called Project Alien, presumed to be the same ROM.
The LCD is different (no Xenomorph aliens). The background inlay is different
too, and this time the weapon/energy labels are placed correctly.
*******************************************************************************/
class topaliens_state : public hh_sm510_state

View File

@ -0,0 +1,544 @@
<?xml version="1.0"?>
<!--
license:CC0-1.0
authors:hap
-->
<mamelayout version="2">
<!-- define elements -->
<element name="black"><rect><color red="0.17" green="0.15" blue="0.15" /></rect></element>
<element name="ledr" 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="ledg" defstate="0">
<disk state="1"><color red="0.15" green="1.0" blue="0.1" /></disk>
<disk state="0"><color red="0.015" green="0.1" blue="0.01" /></disk>
</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="Mate"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_l2"><text string="Stale"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_l3"><text string="Check"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_u1"><text string="Black" align="1"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_u2"><text string="White" align="1"><color red="0.01" green="0.01" blue="0.01" /></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>
<!-- 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>
<!-- buttons -->
<element name="blackd"><disk><color red="0.17" green="0.15" blue="0.15" /></disk></element>
<element name="redd"><disk><color red="0.8" green="0.2" blue="0.1" /></disk></element>
<element name="blackb"><rect><color red="0" green="0" blue="0" /></rect></element>
<element name="whitem"><rect><color red="0.64" green="0.65" blue="0.64" /></rect></element>
<element name="hlb" defstate="0">
<disk state="1"><color red="0.17" green="0.17" blue="0.17" /></disk>
</element>
<element name="text_b1a"><text string="Take"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b1b"><text string="Back"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b2a"><text string="Change"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b2b"><text string="Color"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b3a"><text string="NEW"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_b3b"><text string="GAME"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_b4"><text string="Clear"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b5a"><text string="Set"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b5b"><text string="Level"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b6"><text string="Hint"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b7"><text string="Training"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b8"><text string="Verify"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b9a"><text string="Trace"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b9b"><text string="Forward"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b10"><text string="Go"><color red="0.01" green="0.01" blue="0.01" /></text></element>
<element name="text_r1"><text string="Referee"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r2"><text string="Sound"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r3"><text string="Info"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r4"><text string="Restore"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r5"><text string="Random"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r6"><text string="Easy"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r7"><text string="Next Best"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r8"><text string="Clear Board"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r9"><text string="Set Up"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_r10"><text string="Autoplay"><color red="0.8" green="0.2" blue="0.1" /></text></element>
<element name="text_p1"><image file="chess/wp.svg"/></element>
<element name="text_p2"><image file="chess/wn.svg"/></element>
<element name="text_p3"><image file="chess/wb.svg"/></element>
<element name="text_p4"><image file="chess/wr.svg"/></element>
<element name="text_p5"><image file="chess/wq.svg"/></element>
<element name="text_p6"><image file="chess/wk.svg"/></element>
<group name="buttons">
<bounds left="0" right="30" top="-1" bottom="81" />
<repeat count="8">
<param name="y" start="5" increment="10" />
<element ref="blackd"><bounds xc="10" yc="~y~" width="6" height="6" /></element>
<element ref="blackd"><bounds xc="18" yc="~y~" width="6" height="6" /></element>
</repeat>
<repeat count="6">
<param name="y" start="4.9" increment="10" />
<param name="i" start="1" increment="1" />
<element ref="blackb"><bounds xc="10" yc="~y~" width="3.5" height="3.5" /></element>
<element ref="text_p~i~"><bounds xc="10" yc="~y~" width="3.5" height="3.5" /></element>
<element ref="whitem" blend="multiply"><bounds xc="10" yc="~y~" width="3.5" height="3.5" /></element>
<element ref="black" blend="add"><bounds xc="10" yc="~y~" width="3.5" height="3.5" /></element>
</repeat>
<element ref="cwhite"><bounds xc="18" yc="5" width="7" height="7" /></element>
<element ref="cwhite"><bounds xc="18" yc="75" width="7" height="7" /></element>
<element ref="redd"><bounds xc="18" yc="5" width="6" height="6" /></element>
<element ref="redd"><bounds xc="18" yc="75" width="6" height="6" /></element>
<element ref="text_b1a"><bounds xc="10" yc="64.25" width="4.5" height="1.6" /></element>
<element ref="text_b1b"><bounds xc="10" yc="65.75" width="4.5" height="1.6" /></element>
<element ref="text_b2a"><bounds xc="10" yc="74.25" width="4.5" height="1.6" /></element>
<element ref="text_b2b"><bounds xc="10" yc="75.75" width="4.5" height="1.6" /></element>
<element ref="text_b4"><bounds xc="18" yc="15" width="5" height="1.6" /></element>
<element ref="text_b5a"><bounds xc="18" yc="24.25" width="4.5" height="1.6" /></element>
<element ref="text_b5b"><bounds xc="18" yc="25.75" width="4.5" height="1.6" /></element>
<element ref="text_b6"><bounds xc="18" yc="35" width="5" height="1.6" /></element>
<element ref="text_b7"><bounds xc="18" yc="45" width="5" height="1.6" /></element>
<element ref="text_b8"><bounds xc="18" yc="55" width="5" height="1.6" /></element>
<element ref="text_b9a"><bounds xc="18" yc="64.25" width="4.5" height="1.6" /></element>
<element ref="text_b9b"><bounds xc="18" yc="65.75" width="4.5" height="1.6" /></element>
<element ref="text_b3a"><bounds xc="18" yc="4.25" width="4.5" height="1.6" /></element>
<element ref="text_b3b"><bounds xc="18" yc="5.75" width="4.5" height="1.6" /></element>
<element ref="text_b10"><bounds xc="18" yc="75" width="5" height="2.2" /></element>
<repeat count="7">
<param name="y" start="0.2" increment="10" />
<param name="i" start="1" increment="1" />
<element ref="text_r~i~"><bounds xc="10" y="~y~" width="8" height="1.6" /></element>
</repeat>
<element ref="text_r8"><bounds xc="18" y="10.2" width="8" height="1.6" /></element>
<element ref="text_r9"><bounds xc="18" y="50.2" width="8" height="1.6" /></element>
<element ref="text_r10"><bounds xc="18" y="60.2" width="8" height="1.6" /></element>
<repeat count="8">
<param name="y" start="5" increment="10" />
<param name="mask" start="0x80" rshift="1" />
<element ref="hlb" blend="add" inputtag="IN.0" inputmask="~mask~"><bounds xc="10" yc="~y~" width="6" height="6" /></element>
<element ref="hlb" blend="add" inputtag="IN.1" inputmask="~mask~"><bounds xc="18" yc="~y~" width="6" height="6" /></element>
</repeat>
</group>
<!-- lcd panels -->
<element name="lcd_bg"><rect><color red="0.54" green="0.57" blue="0.58" /></rect></element>
<element name="digit" defstate="0">
<led7seg><color red="0.2" green="0.16" blue="0.16" /></led7seg>
</element>
<element name="ldot" defstate="0">
<rect state="1"><color red="0.2" green="0.16" blue="0.16" /></rect>
<rect state="0"><color red="0.2" green="0.16" blue="0.16" alpha="0.125" /></rect>
</element>
<element name="text_white"><text string="White"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_black"><text string="Black"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<group name="lcd1">
<element ref="lcd_bg"><bounds xc="11" yc="3" width="21.5" height="9" /></element>
<element name="digit0" ref="digit"><bounds x="1.75" yc="3" width="4" height="6.25" /></element>
<element name="digit1" ref="digit"><bounds x="6" yc="3" width="4" height="6.25" /></element>
<element name="digit2" ref="digit"><bounds x="12" yc="3" width="4" height="6.25" /></element>
<element name="digit3" ref="digit"><bounds x="16.25" yc="3" width="4" height="6.25" /></element>
<element name="s1.7" ref="ldot"><bounds x="10.91" y="1.8" width="0.6" height="0.6" /></element>
<element name="s1.7" ref="ldot"><bounds x="10.69" y="3.65" width="0.6" height="0.6" /></element>
</group>
<group name="lcd2">
<element ref="lcd_bg"><bounds xc="11" yc="3" width="21.5" height="9" /></element>
<element name="digit4" ref="digit"><bounds x="1.75" yc="3" width="4" height="6.25" /></element>
<element name="digit5" ref="digit"><bounds x="6" yc="3" width="4" height="6.25" /></element>
<element name="digit6" ref="digit"><bounds x="12" yc="3" width="4" height="6.25" /></element>
<element name="digit7" ref="digit"><bounds x="16.25" yc="3" width="4" height="6.25" /></element>
<element name="s5.7" ref="ldot"><bounds x="10.91" y="1.8" width="0.6" height="0.6" /></element>
<element name="s5.7" ref="ldot"><bounds x="10.69" y="3.65" width="0.6" height="0.6" /></element>
</group>
<!-- common view -->
<group name="common">
<bounds left="-12.8" right="106.3" top="0" bottom="88" />
<element ref="cwhite"><bounds x="0" y="0" width="106.3" height="88" /></element>
<element ref="black"><bounds x="3.7" y="3.7" width="98.9" height="80.6" /></element>
<element ref="cwhite"><bounds x="84.3" y="4" width="18" height="80" /></element>
<group ref="buttons"><bounds x="79.3" y="3" width="30" height="82" /></group>
<group ref="sb_board"><bounds x="4" y="4" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-11.3" y="4" width="10" height="80" /></group>
<!-- chessboard coords -->
<element ref="text_8"><bounds xc="1.85" y="10.1" width="2" height="1.8" /></element>
<element ref="text_7"><bounds xc="1.85" y="20.1" width="2" height="1.8" /></element>
<element ref="text_6"><bounds xc="1.85" y="30.1" width="2" height="1.8" /></element>
<element ref="text_5"><bounds xc="1.85" y="40.1" width="2" height="1.8" /></element>
<element ref="text_4"><bounds xc="1.85" y="50.1" width="2" height="1.8" /></element>
<element ref="text_3"><bounds xc="1.85" y="60.1" width="2" height="1.8" /></element>
<element ref="text_2"><bounds xc="1.85" y="70.1" width="2" height="1.8" /></element>
<element ref="text_1"><bounds xc="1.85" y="80.1" width="2" height="1.8" /></element>
<element ref="text_l1"><bounds xc="1.85" y="76.25" width="5" height="1.4" /></element>
<element ref="text_l2"><bounds xc="1.85" y="66.25" width="5" height="1.4" /></element>
<element ref="text_l3"><bounds xc="1.85" y="56.25" width="5" height="1.4" /></element>
<element ref="text_a"><bounds x="9.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_b"><bounds x="19.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_c"><bounds x="29.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_d"><bounds x="39.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_e"><bounds x="49.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_f"><bounds x="59.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_g"><bounds x="69.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_h"><bounds x="79.8" y="85.2" width="2" height="1.8" /></element>
<element ref="text_u1"><bounds x="89.5" y="85.2" width="6" height="1.8" /></element>
<element ref="text_u2"><bounds x="98.5" y="85.2" width="6" height="1.8" /></element>
<!-- chessboard leds -->
<element name="0.7" ref="ledr"><bounds x="1.1" y="8.25" width="1.5" height="1.5" /></element>
<element name="0.6" ref="ledr"><bounds x="1.1" y="18.25" width="1.5" height="1.5" /></element>
<element name="0.5" ref="ledr"><bounds x="1.1" y="28.25" width="1.5" height="1.5" /></element>
<element name="0.4" ref="ledr"><bounds x="1.1" y="38.25" width="1.5" height="1.5" /></element>
<element name="0.3" ref="ledr"><bounds x="1.1" y="48.25" width="1.5" height="1.5" /></element>
<element name="0.2" ref="ledr"><bounds x="1.1" y="58.25" width="1.5" height="1.5" /></element>
<element name="0.1" ref="ledr"><bounds x="1.1" y="68.25" width="1.5" height="1.5" /></element>
<element name="0.0" ref="ledr"><bounds x="1.1" y="78.25" width="1.5" height="1.5" /></element>
<element name="1.0" ref="ledr"><bounds x="8.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="1.1" ref="ledr"><bounds x="18.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="1.2" ref="ledr"><bounds x="28.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="1.3" ref="ledr"><bounds x="38.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="1.4" ref="ledr"><bounds x="48.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="1.5" ref="ledr"><bounds x="58.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="1.6" ref="ledr"><bounds x="68.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="1.7" ref="ledr"><bounds x="78.25" y="85.4" width="1.5" height="1.5" /></element>
<element name="2.1" ref="ledg"><bounds xc="88.15" y="85.4" width="1.5" height="1.5" /></element>
<element name="2.0" ref="ledr"><bounds xc="97.15" y="85.4" width="1.5" height="1.5" /></element>
</group>
<!-- build screen -->
<view name="Internal Layout (LCD H)">
<bounds left="-12.8" right="106.3" top="0" bottom="94.14" />
<group ref="common"><bounds left="-12.8" right="106.3" top="0" bottom="88" /></group>
<!-- lcd panels (actually they're above eachother instead of side by side, but it looks better this way) -->
<group ref="lcd2"><bounds xc="90" y="89.5" width="7.5" height="3.14" /></group>
<group ref="lcd1"><bounds xc="99" y="89.5" width="7.5" height="3.14" /></group>
</view>
<view name="Internal Layout (LCD V)">
<bounds left="-12.8" right="106.3" top="0" bottom="102.75" />
<group ref="common"><bounds left="-12.8" right="106.3" top="0" bottom="88" /></group>
<!-- lcd panels -->
<element ref="text_black"><bounds xc="88.1" y="89.3" width="5" height="1.5" /></element>
<group ref="lcd2"><bounds xc="88.1" y="91.0" width="7.5" height="3.14" /></group>
<group ref="lcd1"><bounds xc="88.1" y="96.25" width="7.5" height="3.14" /></group>
<element ref="text_white"><bounds xc="88.1" y="99.6" width="5" height="1.5" /></element>
</view>
</mamelayout>

View File

@ -35058,6 +35058,9 @@ nsvipb
nsvipc
nvip
@source:novag/zircon2.cpp
zircon2
@source:novation/basssta.cpp
bassstr //
sbasssta //

View File

@ -65,8 +65,8 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(power_switch);
protected:
virtual void machine_reset() override { set_power(true); }
virtual void machine_start() override;
virtual void machine_reset() override { set_power(true); }
private:
// devices/pointers
@ -88,14 +88,14 @@ private:
void main_map(address_map &map);
// I/O handlers
void standby(int state);
void set_power(bool power);
void lcd_pwm_w(offs_t offset, u8 data);
void update_lcd();
void lcd_segs_w(u8 data);
void lcd_com_w(offs_t offset, u8 data, u8 mem_mask);
void standby(int state);
void set_power(bool power);
void p1_w(u8 data);
u8 p2_r();
u8 p4_r();

334
src/mame/novag/zircon2.cpp Normal file
View File

@ -0,0 +1,334 @@
// license:BSD-3-Clause
// copyright-holders:hap
// thanks-to:Berger
/*******************************************************************************
Novag Zircon II (model 9403)
Hardware notes (Aquamarine Risc II):
- PCB label: 100186 B
- Hitachi H8/325 MCU, 26.601712MHz XTAL
- 2*4-digit LCD panels (same as Mentor 16)
- piezo, 16+2 LEDs, 8*8 chessboard buttons
H8/325 B84 MCU is used in:
- Novag Zircon II
- Novag Jade II
- Novag Chess Wizard IQ V (Zircon II rebranded by Mitco Industries)
- Novag Aquamarine Risc II 26.6MHz (Siglo XXI version too)
Versions manufactured after around 1997 have a 16MHz H8/3214, it's a bit faster
than the ~26.6MHz H8/325 due to the latter /2 divider. Newer revisions of Chess
Wizard IQ V and Aquamarine Risc II have it, presumably others too.
TODO:
- dump/add H8/3214 version
- is the first Novag Zircon/Jade on similar hardware?
- 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/h8325.h"
#include "machine/sensorboard.h"
#include "sound/dac.h"
#include "video/pwm.h"
#include "speaker.h"
// internal artwork
#include "novag_zircon2.lh"
namespace {
class zircon2_state : public driver_device
{
public:
zircon2_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_led_pwm(*this, "led_pwm"),
m_lcd_pwm(*this, "lcd_pwm"),
m_dac(*this, "dac"),
m_inputs(*this, "IN.%u", 0),
m_out_lcd(*this, "s%u.%u", 0U, 0U),
m_out_digit(*this, "digit%u", 0U)
{ }
void zircon2(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(power_switch);
protected:
virtual void machine_start() override;
virtual void machine_reset() override { set_power(true); }
private:
// devices/pointers
required_device<h8325_device> m_maincpu;
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_led_pwm;
required_device<pwm_display_device> m_lcd_pwm;
required_device<dac_2bit_ones_complement_device> m_dac;
required_ioport_array<2> m_inputs;
output_finder<8, 8> m_out_lcd;
output_finder<8> m_out_digit;
bool m_power = false;
u8 m_inp_mux = 0;
u16 m_lcd_segs = 0;
u8 m_lcd_com = 0;
// I/O handlers
void standby(int state);
void set_power(bool power);
void lcd_pwm_raw_w(offs_t offset, u8 data);
void lcd_pwm_digit_w(offs_t offset, u64 data);
void update_lcd();
template <int N> void lcd_segs_w(u8 data);
void lcd_com_w(u8 data);
void p1_w(u8 data);
u8 p4_r();
u8 p5_r();
u8 p6_r();
void p6_w(u8 data);
};
void zircon2_state::machine_start()
{
m_out_lcd.resolve();
m_out_digit.resolve();
// register for savestates
save_item(NAME(m_power));
save_item(NAME(m_inp_mux));
save_item(NAME(m_lcd_segs));
save_item(NAME(m_lcd_com));
}
/*******************************************************************************
I/O
*******************************************************************************/
// power
void zircon2_state::standby(int state)
{
// clear display
if (state)
{
m_lcd_pwm->clear();
m_led_pwm->clear();
}
}
void zircon2_state::set_power(bool power)
{
// power switch is tied to IRQ0
m_maincpu->set_input_line(INPUT_LINE_IRQ0, power ? ASSERT_LINE : CLEAR_LINE);
m_power = power;
}
INPUT_CHANGED_MEMBER(zircon2_state::power_switch)
{
if (newval)
set_power(bool(param));
}
// LCD
void zircon2_state::lcd_pwm_raw_w(offs_t offset, u8 data)
{
m_out_lcd[offset & 0x3f][offset >> 6] = data;
}
void zircon2_state::lcd_pwm_digit_w(offs_t offset, u64 data)
{
m_out_digit[offset] = data;
}
void zircon2_state::update_lcd()
{
for (int digit = 0; digit < 8; digit++)
{
u8 data = 0;
for (int i = 0; i < 4; i++)
{
// 4 commons per digit, 2 output pins per common (analog voltage level)
const u8 com = population_count_32(m_lcd_com >> (i * 2) & 3);
const u16 segs = (com == 0) ? m_lcd_segs : (com == 2) ? ~m_lcd_segs : 0;
data = data << 2 | (segs >> (digit * 2) & 3);
}
m_lcd_pwm->write_row(digit, bitswap<8>(data,1,4,6,2,0,3,5,7));
}
}
template <int N>
void zircon2_state::lcd_segs_w(u8 data)
{
// P3x, P7x: LCD segments
const u8 shift = 8 * N;
m_lcd_segs = (m_lcd_segs & ~(0xff << shift)) | (data << shift);
update_lcd();
}
void zircon2_state::lcd_com_w(u8 data)
{
// P20-P27: LCD commons
m_lcd_com = data;
update_lcd();
}
// misc
void zircon2_state::p1_w(u8 data)
{
// P10-P17: input mux, LED data
m_inp_mux = ~data;
m_led_pwm->write_mx(~data);
}
u8 zircon2_state::p4_r()
{
u8 data = 0;
// P40-P47: read chessboard
for (int i = 0; i < 8; i++)
if (BIT(m_inp_mux, i))
data |= m_board->read_rank(i);
return ~data;
}
u8 zircon2_state::p5_r()
{
u8 data = 0;
// P50,P51: read buttons
for (int i = 0; i < 2; i++)
if (m_inp_mux & m_inputs[i]->read())
data |= 1 << i;
return ~data;
}
u8 zircon2_state::p6_r()
{
// P64: power switch (IRQ0)
return m_power ? 0xef : 0xff;
}
void zircon2_state::p6_w(u8 data)
{
// P61,P62: speaker out
m_dac->write(data >> 1 & 3);
// P63,P65,P66: LED select
m_led_pwm->write_my(bitswap<3>(~data,3,5,6));
}
/*******************************************************************************
Input Ports
*******************************************************************************/
static INPUT_PORTS_START( zircon2 )
PORT_START("IN.0")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Change Color")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Take Back / Next Best")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("King / Easy")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Queen / Random")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Rook / Restore")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Bishop / Info")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Knight / Sound")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Pawn / Referee")
PORT_START("IN.1")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Go")
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Trace Forward / Autoplay")
PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Verify / Set Up")
PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Training")
PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Hint")
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Set Level")
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Clear / Clear Board")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("New Game")
PORT_START("POWER")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_POWER_ON) PORT_CHANGED_MEMBER(DEVICE_SELF, zircon2_state, power_switch, 1)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_POWER_OFF) PORT_CHANGED_MEMBER(DEVICE_SELF, zircon2_state, power_switch, 0)
INPUT_PORTS_END
/*******************************************************************************
Machine Configs
*******************************************************************************/
void zircon2_state::zircon2(machine_config &config)
{
// basic machine hardware
H8325(config, m_maincpu, 26.601712_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().append(FUNC(zircon2_state::standby));
m_maincpu->write_port1().set(FUNC(zircon2_state::p1_w));
m_maincpu->write_port2().set(FUNC(zircon2_state::lcd_com_w));
m_maincpu->write_port3().set(FUNC(zircon2_state::lcd_segs_w<0>));
m_maincpu->read_port4().set(FUNC(zircon2_state::p4_r));
m_maincpu->read_port5().set(FUNC(zircon2_state::p5_r));
m_maincpu->read_port6().set(FUNC(zircon2_state::p6_r));
m_maincpu->write_port6().set(FUNC(zircon2_state::p6_w));
m_maincpu->write_port7().set(FUNC(zircon2_state::lcd_segs_w<1>));
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_lcd_pwm).set_size(8, 8);
m_lcd_pwm->set_segmask(0xff, 0xff);
m_lcd_pwm->output_x().set(FUNC(zircon2_state::lcd_pwm_raw_w));
m_lcd_pwm->output_digit().set(FUNC(zircon2_state::lcd_pwm_digit_w));
PWM_DISPLAY(config, m_led_pwm).set_size(3, 8);
config.set_default_layout(layout_novag_zircon2);
// sound hardware
SPEAKER(config, "speaker").front_center();
DAC_2BIT_ONES_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.125);
}
/*******************************************************************************
ROM Definitions
*******************************************************************************/
ROM_START( zircon2 )
ROM_REGION16_BE( 0x8000, "maincpu", 0 )
ROM_LOAD("novag_9403-010057-6433258b84f", 0x0000, 0x8000, CRC(bb0e817d) SHA1(328b3e01b4bb52400bcd5111ce674308b65f5b86) )
ROM_END
} // anonymous namespace
/*******************************************************************************
Drivers
*******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
SYST( 1995, zircon2, 0, 0, zircon2, zircon2, zircon2_state, empty_init, "Novag Industries", "Zircon II", MACHINE_SUPPORTS_SAVE )

View File

@ -31,6 +31,8 @@ H8/3212 V02 MCU is used in:
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.
Note that the H8/323 has an internal /2 clock divider, so even though the newer
version has a lower frequency XTAL, it runs at the same speed.
TODO:
- it does a cold boot at every reset, so nvram won't work properly unless MAME