New working systems

-------------------
Sphinx Junior [hap, Sean Riddle]
This commit is contained in:
hap 2024-12-19 16:38:09 +01:00
parent 63433978e0
commit 4130a7c57d
8 changed files with 782 additions and 53 deletions

246
src/mame/cxg/junior.cpp Normal file
View File

@ -0,0 +1,246 @@
// license:BSD-3-Clause
// copyright-holders:hap
// thanks-to:Sean Riddle
/*******************************************************************************
CXG Sphinx Junior
NOTE: Before exiting MAME, press the OFF button to turn the power off. Otherwise,
NVRAM won't save properly.
Together with CXG Sphinx Chess Card (and not counting the 1992 rereleases of the
Sphinx Granada family), this is probably the last chess computer with Intelligent
Chess Software's involvement.
TODO:
- verify sound pitch, it's twice higher on a Fidelity MCC, or maybe that one
was designed for 4MHz? (on CXG Sphinx Chess Card, sound pitch matches MAME)
Hardware notes:
Sphinx Junior:
- PCB label: CXG 237 600-002
- Hitachi HD614140H, 8MHz XTAL
- LCD with 4 7segs and custom segments (same as the one in CXG Pocket Chess)
- embedded non-electronic chessboard, piezo
Fidelity Micro Chess Challenger (16 buttons):
- PCB label: CXG 249 600-001
- rest is similar to Sphinx Junior
Fidelity MCC 12-button version has a HD44820 MCU instead.
HD614140HA27 MCU is used in:
- CXG Sphinx Junior
- Fidelity Chess Pal Challenger (Fidelity brand Sphinx Junior)
- Fidelity Micro Chess Challenger (16 buttons)
*******************************************************************************/
#include "emu.h"
#include "cpu/hmcs400/hmcs400.h"
#include "machine/sensorboard.h"
#include "sound/dac.h"
#include "video/pwm.h"
#include "screen.h"
#include "speaker.h"
// internal artwork
#include "cxg_junior.lh"
namespace {
class junior_state : public driver_device
{
public:
junior_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_lcd_pwm(*this, "lcd_pwm"),
m_dac(*this, "dac"),
m_inputs(*this, "IN.0")
{ }
void junior(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(on_button);
protected:
virtual void machine_start() override ATTR_COLD;
private:
// devices/pointers
required_device<hmcs400_cpu_device> m_maincpu;
required_device<sensorboard_device> m_board;
required_device<pwm_display_device> m_lcd_pwm;
required_device<dac_1bit_device> m_dac;
required_ioport m_inputs;
u32 m_lcd_segs = 0;
u8 m_lcd_com = 0;
// I/O handlers
void update_lcd();
template<int N> void lcd_segs_w(u8 data);
void control_w(u16 data);
u16 input_r();
};
void junior_state::machine_start()
{
// register for savestates
save_item(NAME(m_lcd_segs));
save_item(NAME(m_lcd_com));
}
/*******************************************************************************
I/O
*******************************************************************************/
INPUT_CHANGED_MEMBER(junior_state::on_button)
{
if (newval && m_maincpu->stop_mode())
m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
void junior_state::update_lcd()
{
m_lcd_pwm->write_row(0, m_lcd_com ? ~m_lcd_segs : m_lcd_segs);
}
template<int N>
void junior_state::lcd_segs_w(u8 data)
{
// R0x-R4x: LCD segment data, input mux
const u8 shift = N * 4 + 10;
m_lcd_segs = (m_lcd_segs & ~(0xf << shift)) | (data << shift);
update_lcd();
}
void junior_state::control_w(u16 data)
{
// D0: LCD common
m_lcd_com = data & 1;
// D4-D13: LCD segment data
m_lcd_segs = (m_lcd_segs & ~0x3ff) | (data >> 4 & 0x3ff);
update_lcd();
// D14: speaker out
m_dac->write(BIT(data, 14));
}
u16 junior_state::input_r()
{
u16 data = 0;
// D1: read buttons from R03-R43
if ((m_lcd_segs >> 13 & 0x1ffff) & m_inputs->read())
data |= 2;
// D2: R30 (freq sel)
data |= BIT(m_lcd_segs, 23) << 2;
return data | 9;
}
/*******************************************************************************
Input Ports
*******************************************************************************/
static INPUT_PORTS_START( junior )
PORT_START("IN.0")
PORT_BIT(0x00001, IP_ACTIVE_HIGH, IPT_POWER_OFF)
PORT_BIT(0x00002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D / 4 / Rook")
PORT_BIT(0x00004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C / 3 / Bishop")
PORT_BIT(0x00008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B / 2 / Knight")
PORT_BIT(0x00010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A / 1 / Pawn")
PORT_BIT(0x00020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H / 8 / Black")
PORT_BIT(0x00040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G / 7 / White")
PORT_BIT(0x00080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F / 6 / King")
PORT_BIT(0x00100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E / 5 / Queen")
PORT_BIT(0x00200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Setup Position")
PORT_BIT(0x00400, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Verify Position")
PORT_BIT(0x00800, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Clear Entry")
PORT_BIT(0x01000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter")
PORT_BIT(0x02000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Sound")
PORT_BIT(0x04000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("New Game")
PORT_BIT(0x08000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("Move")
PORT_BIT(0x10000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level")
PORT_START("RESET")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_POWER_ON) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(junior_state::on_button), 0)
INPUT_PORTS_END
/*******************************************************************************
Machine Configs
*******************************************************************************/
void junior_state::junior(machine_config &config)
{
// basic machine hardware
HD614140(config, m_maincpu, 8_MHz_XTAL);
m_maincpu->nvram_enable_backup(true);
m_maincpu->stop_cb().set(m_maincpu, FUNC(hmcs400_cpu_device::nvram_set_battery));
m_maincpu->stop_cb().append([this](int state) { if (state) m_lcd_pwm->clear(); });
m_maincpu->write_r<0x0>().set(FUNC(junior_state::lcd_segs_w<0>));
m_maincpu->write_r<0x1>().set(FUNC(junior_state::lcd_segs_w<1>));
m_maincpu->write_r<0x2>().set(FUNC(junior_state::lcd_segs_w<2>));
m_maincpu->write_r<0x3>().set(FUNC(junior_state::lcd_segs_w<3>));
m_maincpu->write_r<0x4>().set(FUNC(junior_state::lcd_segs_w<4>));
m_maincpu->write_d().set(FUNC(junior_state::control_w));
m_maincpu->read_d().set(FUNC(junior_state::input_r));
SENSORBOARD(config, m_board).set_type(sensorboard_device::NOSENSORS);
m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess));
m_board->set_nvram_enable(true);
// video hardware
PWM_DISPLAY(config, m_lcd_pwm).set_size(1, 30);
m_lcd_pwm->set_bri_levels(0.25);
config.set_default_layout(layout_cxg_junior);
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
screen.set_refresh_hz(60);
screen.set_size(1920/5, 914/5);
screen.set_visarea_full();
// sound hardware
SPEAKER(config, "speaker").front_center();
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
}
/*******************************************************************************
ROM Definitions
*******************************************************************************/
ROM_START( sjunior )
ROM_REGION( 0x2000, "maincpu", 0 )
ROM_LOAD("1988_newcrest_614140ha27", 0x0000, 0x2000, CRC(9eb77d94) SHA1(84306ee39986847f9ae82a1117dc6fb8bd309bab) )
ROM_REGION( 57384, "screen", 0 )
ROM_LOAD("sjunior.svg", 0, 57384, CRC(1b3d450f) SHA1(1b55bb2fe23d2e719258be196663ea117158cd35) )
ROM_END
} // anonymous namespace
/*******************************************************************************
Drivers
*******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
SYST( 1988, sjunior, 0, 0, junior, junior, junior_state, empty_init, "CXG Systems / Newcrest Technology / Intelligent Chess Software", "Sphinx Junior", MACHINE_SUPPORTS_SAVE )

View File

@ -13,7 +13,7 @@ TODO:
- if/when MAME supports an exit callback, hook up power-off switch/button to that
Hardware notes:
- HD614042S, 4MHz XTAL
- Hitachi HD614042S, 4MHz XTAL
- optional LCD panel(s), see below
- chessboard buttons, 16+4 LEDs, piezo

View File

@ -0,0 +1,480 @@
<?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="lcdm"><rect><color red="0.7" green="0.71" blue="0.72" /></rect></element>
<element name="text_h1"><text string="A"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_h2"><text string="B"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_h3"><text string="C"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_h4"><text string="D"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_h5"><text string="E"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_h6"><text string="F"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_h7"><text string="G"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_h8"><text string="H"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v1"><text string="1"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v2"><text string="2"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v3"><text string="3"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v4"><text string="4"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v5"><text string="5"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v6"><text string="6"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v7"><text string="7"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_v8"><text string="8"><color red="0.81" green="0.8" blue="0.79" /></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>
<!-- button panel -->
<element name="text_b0a"><text string="ON"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b0b"><text string="OFF"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b0c"><text string="SAVE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b1a"><text string="NEW"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b1b"><text string="GAME"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b1c"><text string=" "></text></element>
<element name="text_b1d"><text string="LEVEL"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b2a"><text string="SETUP"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b2b"><text string="POSITION"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b2c"><text string="CLEAR"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b2d"><text string="ENTRY"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b3a"><text string="VERIFY"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b3b"><text string="POSITION"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b3c"><text string=" "></text></element>
<element name="text_b3d"><text string="MOVE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b4a"><text string=" "></text></element>
<element name="text_b4b"><text string="SOUND"><color red="0.81" green="0.8" blue="0.79" /></text></element>
<element name="text_b4c"><text string=" "></text></element>
<element name="text_b4d"><text string="ENTER"><color red="0.81" green="0.8" blue="0.79" /></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>
<element name="blackw">
<rect>
<bounds xc="0" yc="0" width="1" height="1" />
<color red="0.81" green="0.8" blue="0.79" />
</rect>
<rect>
<bounds xc="0" yc="0" width="0.8" height="0.8" />
<color red="0" green="0" blue="0" />
</rect>
</element>
<element name="butdb">
<disk>
<bounds xc="0" yc="0" width="1" height="1" />
<color red="0.81" green="0.8" blue="0.79" />
</disk>
<disk>
<bounds xc="0" yc="0" width="0.9" height="0.9" />
<color red="0" green="0" blue="0" />
</disk>
</element>
<element name="butdr">
<disk>
<bounds xc="0" yc="0" width="1" height="1" />
<color red="0.81" green="0.8" blue="0.79" />
</disk>
<disk>
<bounds xc="0" yc="0" width="0.9" height="0.9" />
<color red="0.8" green="0.1" blue="0.15" />
</disk>
</element>
<element name="butr">
<rect>
<bounds xc="0" yc="0" width="4.2" height="2.6" />
<color red="0.81" green="0.8" blue="0.79" />
</rect>
<rect>
<bounds xc="0" yc="0" width="3.8" height="2.2" />
<color red="0.8" green="0.1" blue="0.15" />
</rect>
</element>
<element name="hlb" defstate="0">
<rect state="1"><color red="1" green="1" blue="1" /></rect>
</element>
<element name="hlbd" defstate="0">
<disk state="1"><color red="1" green="1" blue="1" /></disk>
</element>
<group name="buttons">
<bounds x="0" y="0" width="100" height="40" />
<repeat count="6">
<param name="x" start="20" increment="5" />
<param name="i" start="1" increment="1" />
<element ref="text_p~i~"><bounds xc="~x~" yc="23.9" width="2.8" height="2.8" /></element>
</repeat>
<element ref="cwhite" blend="multiply"><bounds x="15" yc="23.9" width="35" height="4" /></element>
<element ref="cwhite"><bounds xc="50" yc="24.2" width="1.6" height="1.6" /></element>
<element ref="blackw"><bounds xc="55" yc="24.2" width="1.6" height="1.6" /></element>
<element ref="butdb"><bounds xc="13.6" yc="17.5" width="4.2" height="4.2" /></element>
<element ref="butdr"><bounds xc="13.6" yc="22.5" width="4.2" height="4.2" /></element>
<element ref="text_b0a"><bounds xc="13.6" yc="17.5" width="5" height="1.4" /></element>
<element ref="text_b0b"><bounds xc="13.6" yc="21.75" width="5" height="1.4" /></element>
<element ref="text_b0c"><bounds xc="13.6" yc="23.25" width="5" height="1.4" /></element>
<element ref="cwhite"><bounds xc="13.6" yc="22.5" width="2" height="0.1" /></element>
<element ref="hlbd" inputtag="RESET" inputmask="0x01"><bounds xc="13.6" yc="17.5" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x01"><bounds xc="13.6" yc="22.5" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<repeat count="8">
<param name="x" start="20" increment="5" />
<param name="i" start="1" increment="1" />
<element ref="butdb"><bounds xc="~x~" yc="20" width="4.2" height="4.2" /></element>
<element ref="text_v~i~"><bounds xc="~x~" yc="16.3" width="4" height="2.5" /></element>
<element ref="text_h~i~"><bounds xc="~x~" yc="19.95" width="4" height="2.5" /></element>
</repeat>
<element ref="hlbd" inputtag="IN.0" inputmask="0x10"><bounds xc="20" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x08"><bounds xc="25" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x04"><bounds xc="30" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x02"><bounds xc="35" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x100"><bounds xc="40" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x80"><bounds xc="45" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x40"><bounds xc="50" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<element ref="hlbd" inputtag="IN.0" inputmask="0x20"><bounds xc="55" yc="20" width="4.2" height="4.2" /><color alpha="0.25" /></element>
<repeat count="4">
<param name="x" start="60" increment="5" />
<param name="i" start="1" increment="1" />
<element ref="butr"><bounds xc="~x~" yc="16.9" width="4.2" height="2.6" /></element>
<element ref="butr"><bounds xc="~x~" yc="23.1" width="4.2" height="2.6" /></element>
<element ref="text_b~i~a"><bounds xc="~x~" y="18.3" width="4.85" height="1.4" /></element>
<element ref="text_b~i~b"><bounds xc="~x~" y="19.6" width="4.85" height="1.4" /></element>
<element ref="text_b~i~c"><bounds xc="~x~" y="24.5" width="4.85" height="1.4" /></element>
<element ref="text_b~i~d"><bounds xc="~x~" y="25.8" width="4.85" height="1.4" /></element>
</repeat>
<element ref="hlb" inputtag="IN.0" inputmask="0x4000"><bounds xc="60" yc="16.9" width="4.2" height="2.6" /><color alpha="0.25" /></element>
<element ref="hlb" inputtag="IN.0" inputmask="0x0200"><bounds xc="65" yc="16.9" width="4.2" height="2.6" /><color alpha="0.25" /></element>
<element ref="hlb" inputtag="IN.0" inputmask="0x0400"><bounds xc="70" yc="16.9" width="4.2" height="2.6" /><color alpha="0.25" /></element>
<element ref="hlb" inputtag="IN.0" inputmask="0x2000"><bounds xc="75" yc="16.9" width="4.2" height="2.6" /><color alpha="0.25" /></element>
<element ref="hlb" inputtag="IN.0" inputmask="0x10000"><bounds xc="60" yc="23.1" width="4.2" height="2.6" /><color alpha="0.25" /></element>
<element ref="hlb" inputtag="IN.0" inputmask="0x0800"><bounds xc="65" yc="23.1" width="4.2" height="2.6" /><color alpha="0.25" /></element>
<element ref="hlb" inputtag="IN.0" inputmask="0x8000"><bounds xc="70" yc="23.1" width="4.2" height="2.6" /><color alpha="0.25" /></element>
<element ref="hlb" inputtag="IN.0" inputmask="0x1000"><bounds xc="75" yc="23.1" width="4.2" height="2.6" /><color alpha="0.25" /></element>
</group>
<!-- build screen -->
<view name="Internal Layout (Full)">
<bounds left="-6.5" right="94" top="6" bottom="107.5" />
<group ref="buttons"><bounds x="20.5" y="81.75" width="91" height="36.4" /></group>
<element ref="cwhite"><bounds xc="19" yc="100.0" width="20" height="10.093" /></element>
<element ref="blackb"><bounds xc="19" yc="100.0" width="19.5" height="9.593" /></element>
<screen index="0"><bounds xc="19" yc="100.0" width="17" height="8.093" /></screen>
<element ref="lcdm" blend="multiply"><bounds xc="19" yc="100.0" width="19" height="9.593" /></element>
<element ref="cwhite"><bounds x="9" y="9" width="82" height="82" /></element>
<group ref="sb_board"><bounds x="10" y="10" width="80" height="80" /></group>
<group ref="sb_ui"><bounds x="-5" y="10" width="10" height="80" /></group>
<!-- chessboard coords -->
<repeat count="8">
<param name="y" start="15" increment="10" />
<param name="i" start="8" increment="-1" />
<element ref="text_v~i~"><bounds x="6.55" yc="~y~" width="2" height="2" /></element>
<element ref="text_v~i~"><bounds x="91.6" yc="~y~" width="2" height="2" /></element>
</repeat>
<repeat count="8">
<param name="x" start="15" increment="10" />
<param name="i" start="1" increment="1" />
<element ref="text_h~i~"><bounds xc="~x~" y="6.5" width="2" height="2" /></element>
<element ref="text_h~i~"><bounds xc="~x~" y="91.4" width="2" height="2" /></element>
</repeat>
</view>
<view name="Internal Layout (Control Panel)">
<bounds left="7.5" right="92" top="92.5" bottom="107.5" />
<group ref="buttons"><bounds x="20.5" y="81.75" width="91" height="36.4" /></group>
<element ref="cwhite"><bounds xc="19" yc="100.0" width="20" height="10.093" /></element>
<element ref="blackb"><bounds xc="19" yc="100.0" width="19.5" height="9.593" /></element>
<screen index="0"><bounds xc="19" yc="100.0" width="17" height="8.093" /></screen>
<element ref="lcdm" blend="multiply"><bounds xc="19" yc="100.0" width="19" height="9.593" /></element>
</view>
</mamelayout>

View File

@ -150,7 +150,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="1" string="兵">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.9" green="0.05" blue="0.05" />
</text>
@ -163,7 +163,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="2" string="炮">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -176,7 +176,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="3" string="車">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -189,7 +189,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="4" string="馬">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -202,7 +202,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="5" string="相">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -215,7 +215,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="6" string="仕">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -228,7 +228,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="7" string="帥">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -242,7 +242,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="8" string="卒">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -255,7 +255,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="9" string="砲">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -268,7 +268,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="10" string="車">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -281,7 +281,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="11" string="馬">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -294,7 +294,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="12" string="象">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -307,7 +307,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="13" string="士">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -320,7 +320,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="14" string="將">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
</element>
@ -339,7 +339,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="15" string="兵">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -352,7 +352,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="16" string="炮">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -365,7 +365,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="17" string="車">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -378,7 +378,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="18" string="馬">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -391,7 +391,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="19" string="相">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -404,7 +404,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="20" string="仕">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -417,7 +417,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="21" string="帥">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0.85" green="0.05" blue="0.05" />
</text>
@ -431,7 +431,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="22" string="卒">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -444,7 +444,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="23" string="砲">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -457,7 +457,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="24" string="車">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -470,7 +470,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="25" string="馬">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -483,7 +483,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="26" string="象">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -496,7 +496,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="27" string="士">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
@ -509,7 +509,7 @@ authors:hap
<color red="1" green="1" blue="1" />
</disk>
<text state="28" string="將">
<bounds xc="0.5" yc="0.47" width="0.6" height="0.6" />
<bounds xc="0.51" yc="0.48" width="0.6" height="0.6" />
<color red="0" green="0.25" blue="0" />
</text>
</element>

View File

@ -520,7 +520,7 @@ authors:Sandro Ronco, hap
<group ref="sb_ui"><bounds x="1" y="4.4" width="10" height="80" /></group>
</view>
<view name="Internal Layout (CPanel)">
<view name="Internal Layout (Control Panel)">
<group ref="control_panel"><bounds x="0" y="0" width="305.226" height="207.613" /></group>
</view>
</mamelayout>

View File

@ -16704,6 +16704,9 @@ supra
senterp
senterpc
@source:cxg/junior.cpp
sjunior
@source:cxg/sphinx40.cpp
sphinx40

View File

@ -16,10 +16,8 @@ TODO:
This worked fine in an older version of MAME since maincpu was twice slower.
- diggerc loses speech sound effects (walking, digging) after killing an enemy.
- Emulate protection properly in later games (reads area 0x73fx).
- The board has discrete sound circuits, see sh_trigger_w: 0x1884 enables an
8038CCJD, 0x1885 connects to it too. 0x1886 produces a high-pitched whistle,
and 0x1887 produces a low thud sound. The current implementation with the
beeper devices is wrong, but better than nothing.
- The board has discrete sound circuits, see sh_trigger_w, current implementation
with the beeper devices is wrong, but better than nothing.
- Improve starfield: density, blink rate, x repeat of 240, and the checkerboard
pattern (fast forward MAME to see) are all correct, the RNG is not right?
@ -677,12 +675,13 @@ void cvs_state::_4_bit_dac_data_w(offs_t offset, u8 data)
void cvs_state::sh_trigger_w(offs_t offset, u8 data)
{
// offset 0 is used in darkwar, spacefrt, logger, dazzler, wallst, raiders
// offset 1 is used in logger, wallst
// offset 2 is used in darkwar, spacefrt, 8ball, dazzler, superbik, raiders
// offset 3 is used in cosmos, darkwar, superbik, raiders
/* Discrete sound hardware triggers:
offset 0 is used in darkwar, spacefrt, logger, dazzler, wallst, raiders
offset 1 is used in logger, wallst
offset 2 is used in darkwar, spacefrt, 8ball, dazzler, superbik, raiders
offset 3 is used in cosmos, darkwar, superbik, raiders
/**********
Additional notes from poking the CVS sound hardware with an
In Circuit Emulator from PrSwan (Paul Swan).
I have recordings available.
@ -695,11 +694,10 @@ void cvs_state::sh_trigger_w(offs_t offset, u8 data)
0x55,0xAA,0xFF - increasing value has higher frequency
- 0x1885 - A scope showed this halving the XP8038 amplitude with a little decay.
Causes 4016 pin 11 to rise (on) and decay-fall (off)
- 0x1886 - Mikes comment above about a high pitched whistle didn't match my PCBs. His was faulty?
Outputs a complete Galaxia-style ship fire sound, with attack-to-on and decay-to-off.
- 0x1886 - Outputs a complete Galaxia-style ship fire sound, with attack-to-on and decay-to-off.
- 0x1887 - Reflected on an LM380.
Causes an envelope-like operation on the XP8038 tone with attack (on) and decay (off).
***********/
*/
data &= 1;

View File

@ -4,8 +4,8 @@
Driver by Zsolt Vasvari
Notes
-----
Notes / TODO:
-------------
Route 16:
- Route 16 doesn't have the SN76477 chip. There is space on the PCB
@ -27,6 +27,14 @@ Stratovox:
pots on the PCB. One for music, one for speech and a master volume.
Space Echo:
- Speech doesn't work at all, is it an old regression?
- Interrupts per frame for cpu2 is a best guess based on how stratvox uses the DAC,
writing up to 195 times per frame with each byte from the ROM written 4 times.
spacecho writes one byte per interrupt so 195/4 or 48 is used. a lower number
increases the chance of a sound interrupting itself, which for most sounds
is buggy and causes the game to freeze until the first sound completes.
- When all astronauts are taken the game over tune ends with 5 bad notes,
this appears to be a bug in the ROM from a changed instruction at 2EB3.
@ -38,12 +46,6 @@ Space Echo:
rather than patching out the test. code for the same test is in stratvox but
isn't called, speakres has a very similar test but doesn't care about the result.
- Interrupts per frame for cpu1 is a best guess based on how stratvox uses the DAC,
writing up to 195 times per frame with each byte from the ROM written 4 times.
spacecho writes one byte per interrupt so 195/4 or 48 is used. a lower number
increases the chance of a sound interrupting itself, which for most sounds
is buggy and causes the game to freeze until the first sound completes.
vscompmj:
- Stuck notes (constant tone) in-game after the mahjong tiles are laid down.
@ -1681,10 +1683,10 @@ GAME( 1980, speakresb, speakres, speakres, speakres, speakres_state, empty_init,
GAME( 1980, stratvox, speakres, stratvox, stratvox, speakres_state, empty_init, ROT270, "Sun Electronics (Taito license)", "Stratovox (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, stratvoxa, speakres, stratvox, stratvox, speakres_state, empty_init, ROT270, "Sun Electronics (Taito license)", "Stratovox (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, stratvoxb, speakres, stratvox, stratvox, speakres_state, empty_init, ROT270, "bootleg", "Stratovox (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, spacecho, speakres, spacecho, spacecho, speakres_state, empty_init, ROT270, "bootleg (Gayton Games)", "Space Echo (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, spacecho2, speakres, spacecho, spacecho, speakres_state, empty_init, ROT270, "bootleg (Gayton Games)", "Space Echo (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 1980, spacecho, speakres, spacecho, spacecho, speakres_state, empty_init, ROT270, "bootleg (Gayton Games)", "Space Echo (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
GAME( 1980, spacecho2, speakres, spacecho, spacecho, speakres_state, empty_init, ROT270, "bootleg (Gayton Games)", "Space Echo (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
GAME( 1980, speakhlp, speakres, spacecho, spacecho, speakres_state, empty_init, ROT270, "bootleg", "Speak & Help", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
GAME( 1981, jongpute, 0, jongpute, jongpute, jongpute_state, empty_init, ROT0, "Alpha Denshi Co.", "Jongputer", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING ) // sampling voice is not emulated, bug with colors makes tile recognition difficult
GAME( 1981, jongpute, 0, jongpute, jongpute, jongpute_state, empty_init, ROT0, "Alpha Denshi Co.", "Jongputer", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING ) // sampling voice is not emulated, bug with colors makes tile recognition difficult
GAME( 1981, ttmahjng, jongpute, jongpute, jongpute, jongpute_state, empty_init, ROT0, "Alpha Denshi Co. (Taito license)", "T.T Mahjong", MACHINE_SUPPORTS_SAVE )
GAME( 1981, vscompmj, jongpute, vscompmj, jongpute, jongpute_state, init_vscompmj, ROT0, "Nichibutsu", "VS Computer Mahjong", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_COLORS | MACHINE_NOT_WORKING ) // decryption might be incomplete (attract resets), inputs seem read differently