summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author hap <happppp@users.noreply.github.com>2019-07-16 22:46:48 +0200
committer hap <happppp@users.noreply.github.com>2019-07-16 22:47:04 +0200
commitf1eb546264e578a0a7ab5c81247213fe223ac93d (patch)
treee34ebf0b9da8b8a367ca49a7903cbbb1fe285948
parent3b7fdf1d6cead69b52be0ed1d6e80256fe513d94 (diff)
saitek_stratos: added leds and chessboard (nw)
-rw-r--r--src/mame/drivers/saitek_stratos.cpp175
-rw-r--r--src/mame/layout/saitek_stratos.lay395
2 files changed, 539 insertions, 31 deletions
diff --git a/src/mame/drivers/saitek_stratos.cpp b/src/mame/drivers/saitek_stratos.cpp
index d77f9859ce5..5b260413d1c 100644
--- a/src/mame/drivers/saitek_stratos.cpp
+++ b/src/mame/drivers/saitek_stratos.cpp
@@ -1,27 +1,46 @@
// license:BSD-3-Clause
-// copyright-holders:Olivier Galibert
+// copyright-holders:Olivier Galibert, hap
/***************************************************************************
- Saitek/Scisys Kasparov Stratos Chess Computer
+Scisys Kasparov Stratos Chess Computer
+
+TODO:
+- add LCD (7x7 screen + 6 7segs)
+- add Turbo King/Corona (same hardware family)
+- add endgame rom (softwarelist?)
+- clean up driver
+- does nvram work? maybe both ram chips battery-backed
+- add soft power off with STOP button(writes 0 to control_w), power-on with GO button
***************************************************************************/
#include "emu.h"
#include "cpu/m6502/m65c02.h"
#include "machine/nvram.h"
-#include "machine/timer.h"
+#include "machine/sensorboard.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
+#include "speaker.h"
+#include "video/pwm.h"
#include "screen.h"
+// internal artwork
+#include "saitek_stratos.lh" // clickable
+
class stratos_state : public driver_device
{
public:
- stratos_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag)
- , maincpu(*this, "maincpu")
- , nvram(*this, "nvram")
- , bank_8000(*this, "bank_8000")
- , bank_4000(*this, "bank_4000")
- , nvram_bank(*this, "nvram_bank")
+ stratos_state(const machine_config &mconfig, device_type type, const char *tag) :
+ driver_device(mconfig, type, tag),
+ maincpu(*this, "maincpu"),
+ nvram(*this, "nvram"),
+ bank_8000(*this, "bank_8000"),
+ bank_4000(*this, "bank_4000"),
+ nvram_bank(*this, "nvram_bank"),
+ m_board(*this, "board"),
+ m_display(*this, "display"),
+ m_dac(*this, "dac"),
+ m_inputs(*this, "IN.%u", 0)
{ }
void stratos(machine_config &config);
@@ -38,14 +57,13 @@ private:
DECLARE_READ8_MEMBER(lcd_r);
DECLARE_WRITE8_MEMBER(lcd_w);
- TIMER_DEVICE_CALLBACK_MEMBER(irq_timer);
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void stratos_mem(address_map &map);
std::unique_ptr<uint8_t[]> nvram_data;
uint8_t control, led_latch_control;
- uint32_t individual_leds;
+ uint32_t individual_leds, ind_leds;
uint8_t latch_AH_red, latch_AH_green, latch_18_red, latch_18_green;
void show_leds();
virtual void machine_reset() override;
@@ -55,6 +73,12 @@ private:
required_memory_bank bank_8000;
required_memory_bank bank_4000;
required_memory_bank nvram_bank;
+ required_device<sensorboard_device> m_board;
+ required_device<pwm_display_device> m_display;
+ required_device<dac_bit_interface> m_dac;
+ required_ioport_array<8> m_inputs;
+
+ bool m_lcd_busy;
};
void stratos_state::init_stratos()
@@ -62,8 +86,8 @@ void stratos_state::init_stratos()
nvram_data = std::make_unique<uint8_t[]>(0x2000);
nvram->set_base(nvram_data.get(), 0x2000);
- bank_8000 ->configure_entries(0, 4, memregion("roms_8000")->base(), 0x8000);
- bank_4000 ->configure_entries(0, 4, memregion("roms_4000")->base(), 0x4000);
+ bank_8000 ->configure_entries(0, 2, memregion("roms_8000")->base(), 0x8000);
+ bank_4000 ->configure_entries(0, 2, memregion("roms_4000")->base(), 0x4000);
nvram_bank->configure_entries(0, 2, nvram_data.get(), 0x1000);
}
@@ -112,18 +136,17 @@ void stratos_state::show_leds()
}
logerror("leds R:%s -- G:%s (%s)\n", str_red, str_green, machine().describe_context());
-}
-TIMER_DEVICE_CALLBACK_MEMBER(stratos_state::irq_timer)
-{
- maincpu->set_input_line(M65C02_IRQ_LINE, HOLD_LINE);
+
+ m_display->matrix_partial(0, 4, ~led_latch_control >> 4 & 0xf, 1 << (led_latch_control & 0xf), false);
+ m_display->matrix_partial(4, 2, 1 << (control >> 5 & 1), (~ind_leds & 0xff) | (~control << 6 & 0x100));
}
uint32_t stratos_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
static bool nmi=false;
- if(machine().input().code_pressed(KEYCODE_W)) {
+ if(machine().input().code_pressed(KEYCODE_F1)) {
if(!nmi) {
maincpu->pulse_input_line(M65C02_NMI_LINE, attotime::zero);
nmi = true;
@@ -137,6 +160,7 @@ uint32_t stratos_state::screen_update(screen_device &screen, bitmap_rgb32 &bitma
WRITE8_MEMBER(stratos_state::p2000_w)
{
+ m_dac->write(0);
led_latch_control = data;
if(!(data & 0x10))
@@ -154,16 +178,24 @@ WRITE8_MEMBER(stratos_state::p2000_w)
READ8_MEMBER(stratos_state::p2200_r)
{
logerror("p2200_r (%s)\n", machine().describe_context());
+
+ //printf("%X ",led_latch_control&0xf);
+
+ return ~m_board->read_file(led_latch_control & 0xf);
return machine().rand();
+ return 0;
}
WRITE8_MEMBER(stratos_state::p2200_w)
{
+ m_dac->write(1);
logerror("p2200_w %02x -> %02x (%s)\n", data, data^0xff, machine().describe_context());
}
WRITE8_MEMBER(stratos_state::p2400_w)
{
+ ind_leds = data;
+
if(control & 0x20) {
individual_leds = individual_leds & 0x100ff;
individual_leds |= (data ^ 0xff) << 8;
@@ -175,6 +207,8 @@ WRITE8_MEMBER(stratos_state::p2400_w)
if(!(control & 0x04))
individual_leds |= 0x10000;
}
+
+ show_leds();
}
READ8_MEMBER(stratos_state::control_r)
@@ -287,7 +321,29 @@ READ8_MEMBER(stratos_state::control_r)
// (20) = difficulty level
logerror("control_r (%s)\n", machine().describe_context());
- return xx ? 0x20 : 0x00;
+
+ u8 data = 0;
+
+ //printf("%X ",led_latch_control&0xf);
+
+//printf("%X ",ind_leds);
+
+ u8 sel = led_latch_control & 0xf;
+
+ if (sel == 8)
+ {
+ // lcd busy flag?
+ data = m_lcd_busy ? 0x20: 0;
+ m_lcd_busy = false;
+ }
+
+ if (sel < 8)
+ data |= m_inputs[sel]->read() << 5;
+
+ return data;
+ //return xx ? 0x20 : 0x00;
+ //return 0;
+ //return 0xe0;
}
WRITE8_MEMBER(stratos_state::control_w)
@@ -295,19 +351,22 @@ WRITE8_MEMBER(stratos_state::control_w)
logerror("control_w %02x bank %d (%s)\n", data, data & 3, machine().describe_context());
control = data;
- bank_8000->set_entry(data & 3);
- bank_4000->set_entry(data & 3);
+ bank_8000->set_entry(data & 1);
+ bank_4000->set_entry(data >> 1 & 1); // ?
nvram_bank->set_entry((data >> 1) & 1);
+
+ show_leds();
}
READ8_MEMBER(stratos_state::lcd_r)
{
- return 0x00;
+ return 0;
}
WRITE8_MEMBER(stratos_state::lcd_w)
{
+ m_lcd_busy = true;
// 08 0b - 00?
// 04 06 - 05
// 02 0d - 07
@@ -347,33 +406,87 @@ void stratos_state::stratos_mem(address_map &map)
}
static INPUT_PORTS_START( stratos )
+ PORT_START("IN.0")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) // level
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3)
+
+ PORT_START("IN.1")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) // sound
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) // stop?
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) // new game?
+
+ PORT_START("IN.2")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) // rook
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) // pawn
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) // bishop
+
+ PORT_START("IN.3")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) // queen
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) // knight
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) // king
+
+ PORT_START("IN.4")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) // play
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) // tab/color
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) // -
+
+ PORT_START("IN.5")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) // +
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O)
+
+ PORT_START("IN.6")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) // info
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D)
+
+ PORT_START("IN.7")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F)
+ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G)
+ PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) // normal
INPUT_PORTS_END
void stratos_state::stratos(machine_config &config)
{
- M65C02(config, maincpu, 5670000);
+ /* basic machine hardware */
+ M65C02(config, maincpu, 5.67_MHz_XTAL);
maincpu->set_addrmap(AS_PROGRAM, &stratos_state::stratos_mem);
+ maincpu->set_periodic_int(FUNC(stratos_state::irq0_line_hold), attotime::from_hz(1024));
+
+ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+ 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(100));
+
+ /* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
screen.set_refresh_hz(50);
- screen.set_size(240, 64);
- screen.set_visarea(0, 239, 0, 63);
+ screen.set_size(7, 7);
+ screen.set_visarea_full();
screen.set_screen_update(FUNC(stratos_state::screen_update));
- TIMER(config, "irq").configure_periodic(FUNC(stratos_state::irq_timer), attotime::from_hz(1000));
+ PWM_DISPLAY(config, m_display).set_size(4+2, 8+1);
+ m_display->set_bri_levels(0.05);
+ m_display->set_bri_maximum(0.5);
- NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
+ config.set_default_layout(layout_saitek_stratos);
+
+ /* sound hardware */
+ SPEAKER(config, "speaker").front_center();
+ DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}
ROM_START( stratos )
- ROM_REGION(0x20000, "roms_8000", 0)
+ ROM_REGION(0x10000, "roms_8000", 0)
ROM_LOAD("w1_728m_u3.u3", 0x0000, 0x8000, CRC(b58a7256) SHA1(75b3a3a65f4ca8d52aa5b17a06319bff59d9014f))
ROM_LOAD("bw1_918n_u4.u4", 0x8000, 0x8000, CRC(cb0de631) SHA1(f78d40213be21775966cbc832d64acd9b73de632))
- ROM_FILL(0x10000, 0x10000, 0xff)
ROM_REGION(0x10000, "roms_4000", 0)
ROM_FILL(0x00000, 0x10000, 0xff)
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */
-CONS( 1986, stratos, 0, 0, stratos, stratos, stratos_state, init_stratos, "SciSys", "Kasparov Stratos", MACHINE_NOT_WORKING | MACHINE_NO_SOUND)
+CONS( 1986, stratos, 0, 0, stratos, stratos, stratos_state, init_stratos, "SciSys", "Kasparov Stratos", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK )
diff --git a/src/mame/layout/saitek_stratos.lay b/src/mame/layout/saitek_stratos.lay
new file mode 100644
index 00000000000..cc9e4f07874
--- /dev/null
+++ b/src/mame/layout/saitek_stratos.lay
@@ -0,0 +1,395 @@
+<?xml version="1.0"?>
+<mamelayout version="2">
+
+<!-- define elements -->
+
+ <element name="ledo">
+ <rect><color red="0.1" green="0.1" blue="0.1" /></rect>
+ </element>
+ <element name="ledr" defstate="0">
+ <rect state="0"><color red="0" green="0" blue="0" /></rect>
+ <rect state="1"><color red="1" green="0" blue="0" /></rect>
+ </element>
+ <element name="ledg" defstate="0">
+ <rect state="0"><color red="0" green="0" blue="0" /></rect>
+ <rect state="1"><color red="0" green="1" blue="0" /></rect>
+ </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.png" state="1"/>
+ <image file="chess/wn.png" state="2"/>
+ <image file="chess/wb.png" state="3"/>
+ <image file="chess/wr.png" state="4"/>
+ <image file="chess/wq.png" state="5"/>
+ <image file="chess/wk.png" state="6"/>
+
+ <image file="chess/bp.png" state="7"/>
+ <image file="chess/bn.png" state="8"/>
+ <image file="chess/bb.png" state="9"/>
+ <image file="chess/br.png" state="10"/>
+ <image file="chess/bq.png" state="11"/>
+ <image file="chess/bk.png" state="12"/>
+
+ <!-- selected pieces -->
+ <image file="chess/wp.png" state="13"><color alpha="0.5" /></image>
+ <image file="chess/wn.png" state="14"><color alpha="0.5" /></image>
+ <image file="chess/wb.png" state="15"><color alpha="0.5" /></image>
+ <image file="chess/wr.png" state="16"><color alpha="0.5" /></image>
+ <image file="chess/wq.png" state="17"><color alpha="0.5" /></image>
+ <image file="chess/wk.png" state="18"><color alpha="0.5" /></image>
+
+ <image file="chess/bp.png" state="19"><color alpha="0.5" /></image>
+ <image file="chess/bn.png" state="20"><color alpha="0.5" /></image>
+ <image file="chess/bb.png" state="21"><color alpha="0.5" /></image>
+ <image file="chess/br.png" state="22"><color alpha="0.5" /></image>
+ <image file="chess/bq.png" state="23"><color alpha="0.5" /></image>
+ <image file="chess/bk.png" state="24"><color alpha="0.5" /></image>
+ </element>
+
+ <group name="sb_board">
+ <bounds x="0" y="0" width="80" height="80" />
+
+ <!-- squares (avoid seams) -->
+ <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel>
+
+ <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel>
+ <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel>
+ <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel>
+
+ <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel>
+ <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel>
+ <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel>
+
+ <!-- sensors, pieces -->
+ <repeat count="8">
+ <param name="y" start="0" increment="10" />
+ <param name="i" start="8" increment="-1" />
+
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+ <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel>
+
+ <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel>
+ <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel>
+ </repeat>
+ </group>
+
+
+<!-- sb ui -->
+
+ <element name="hlub" defstate="0">
+ <rect state="1"><color red="0" green="0" blue="0" /></rect>
+ </element>
+
+ <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uib2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uib3">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uih2">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu2a">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt;&lt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2b">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &lt; "><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2c">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu2d">
+ <rect><color red="0.81" green="0.8" blue="0.79" /></rect>
+ <text string=" &gt;&gt;"><color red="0.01" green="0.01" blue="0.01" /></text>
+ </element>
+ <element name="text_uiu3a" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="2">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+ <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element>
+ <element name="text_uiu3c" defstate="0">
+ <simplecounter maxstate="999" digits="1" align="1">
+ <color red="0.81" green="0.8" blue="0.79" />
+ </simplecounter>
+ </element>
+
+ <group name="sb_ui">
+ <bounds x="0" y="0" width="10" height="80" />
+ <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel>
+ <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel>
+ <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel>
+ <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel>
+
+ <!-- board -->
+ <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel>
+
+ <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel>
+ <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- spawn -->
+ <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel>
+
+ <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel>
+ <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel>
+ <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel>
+ <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel>
+ <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel>
+ <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel>
+ <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel>
+
+ <!-- hand -->
+ <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel>
+ <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel>
+ <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel>
+
+ <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel>
+ <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel>
+
+ <!-- undo -->
+ <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel>
+ <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel>
+ <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel>
+ <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel>
+
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+ <bezel element="hlub" inputtag="board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel>
+
+ <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel>
+ <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel>
+ <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel>
+ </group>
+
+
+<!-- build screen -->
+
+ <view name="Internal Layout">
+ <bounds left="-5" right="110" top="5" bottom="95" />
+
+ <screen tag="screen"><bounds x="0" y="0" width="10" height="10" /></screen>
+
+ <element ref="ledo"><bounds x="8" y="14" width="1" height="2" /></element>
+ <element ref="ledo"><bounds x="8" y="24" width="1" height="2" /></element>
+ <element ref="ledo"><bounds x="8" y="34" width="1" height="2" /></element>
+ <element ref="ledo"><bounds x="8" y="44" width="1" height="2" /></element>
+ <element ref="ledo"><bounds x="8" y="54" width="1" height="2" /></element>
+ <element ref="ledo"><bounds x="8" y="64" width="1" height="2" /></element>
+ <element ref="ledo"><bounds x="8" y="74" width="1" height="2" /></element>
+ <element ref="ledo"><bounds x="8" y="84" width="1" height="2" /></element>
+
+ <element ref="ledr" name="0.7" blend="add"><bounds x="8" y="14" width="1" height="2" /></element>
+ <element ref="ledr" name="0.6" blend="add"><bounds x="8" y="24" width="1" height="2" /></element>
+ <element ref="ledr" name="0.5" blend="add"><bounds x="8" y="34" width="1" height="2" /></element>
+ <element ref="ledr" name="0.4" blend="add"><bounds x="8" y="44" width="1" height="2" /></element>
+ <element ref="ledr" name="0.3" blend="add"><bounds x="8" y="54" width="1" height="2" /></element>
+ <element ref="ledr" name="0.2" blend="add"><bounds x="8" y="64" width="1" height="2" /></element>
+ <element ref="ledr" name="0.1" blend="add"><bounds x="8" y="74" width="1" height="2" /></element>
+ <element ref="ledr" name="0.0" blend="add"><bounds x="8" y="84" width="1" height="2" /></element>
+ <element ref="ledg" name="1.7" blend="add"><bounds x="8" y="14" width="1" height="2" /></element>
+ <element ref="ledg" name="1.6" blend="add"><bounds x="8" y="24" width="1" height="2" /></element>
+ <element ref="ledg" name="1.5" blend="add"><bounds x="8" y="34" width="1" height="2" /></element>
+ <element ref="ledg" name="1.4" blend="add"><bounds x="8" y="44" width="1" height="2" /></element>
+ <element ref="ledg" name="1.3" blend="add"><bounds x="8" y="54" width="1" height="2" /></element>
+ <element ref="ledg" name="1.2" blend="add"><bounds x="8" y="64" width="1" height="2" /></element>
+ <element ref="ledg" name="1.1" blend="add"><bounds x="8" y="74" width="1" height="2" /></element>
+ <element ref="ledg" name="1.0" blend="add"><bounds x="8" y="84" width="1" height="2" /></element>
+
+ <element ref="ledo"><bounds x="14" y="91" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="24" y="91" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="34" y="91" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="44" y="91" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="54" y="91" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="64" y="91" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="74" y="91" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="84" y="91" width="2" height="1" /></element>
+
+ <element ref="ledr" name="2.0" blend="add"><bounds x="14" y="91" width="2" height="1" /></element>
+ <element ref="ledr" name="2.1" blend="add"><bounds x="24" y="91" width="2" height="1" /></element>
+ <element ref="ledr" name="2.2" blend="add"><bounds x="34" y="91" width="2" height="1" /></element>
+ <element ref="ledr" name="2.3" blend="add"><bounds x="44" y="91" width="2" height="1" /></element>
+ <element ref="ledr" name="2.4" blend="add"><bounds x="54" y="91" width="2" height="1" /></element>
+ <element ref="ledr" name="2.5" blend="add"><bounds x="64" y="91" width="2" height="1" /></element>
+ <element ref="ledr" name="2.6" blend="add"><bounds x="74" y="91" width="2" height="1" /></element>
+ <element ref="ledr" name="2.7" blend="add"><bounds x="84" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.0" blend="add"><bounds x="14" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.1" blend="add"><bounds x="24" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.2" blend="add"><bounds x="34" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.3" blend="add"><bounds x="44" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.4" blend="add"><bounds x="54" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.5" blend="add"><bounds x="64" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.6" blend="add"><bounds x="74" y="91" width="2" height="1" /></element>
+ <element ref="ledg" name="3.7" blend="add"><bounds x="84" y="91" width="2" height="1" /></element>
+
+ <element ref="ledo"><bounds x="94" y="10" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="15" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="20" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="25" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="30" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="35" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="40" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="45" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="50" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="55" width="2" height="1" /></element>
+ <element ref="ledo"><bounds x="94" y="60" width="2" height="1" /></element>
+
+ <element ref="ledg" name="5.7" blend="add"><bounds x="94" y="10" width="2" height="1" /></element>
+ <element ref="ledg" name="5.6" blend="add"><bounds x="94" y="15" width="2" height="1" /></element>
+ <element ref="ledg" name="5.5" blend="add"><bounds x="94" y="20" width="2" height="1" /></element>
+ <element ref="ledg" name="5.4" blend="add"><bounds x="94" y="25" width="2" height="1" /></element>
+ <element ref="ledg" name="5.3" blend="add"><bounds x="94" y="30" width="2" height="1" /></element>
+ <element ref="ledg" name="5.2" blend="add"><bounds x="94" y="35" width="2" height="1" /></element>
+
+ <element ref="ledr" name="4.7" blend="add"><bounds x="94" y="10" width="2" height="1" /></element>
+ <element ref="ledr" name="4.6" blend="add"><bounds x="94" y="15" width="2" height="1" /></element>
+ <element ref="ledr" name="4.5" blend="add"><bounds x="94" y="20" width="2" height="1" /></element>
+ <element ref="ledr" name="4.4" blend="add"><bounds x="94" y="25" width="2" height="1" /></element>
+ <element ref="ledr" name="4.3" blend="add"><bounds x="94" y="30" width="2" height="1" /></element>
+ <element ref="ledr" name="4.2" blend="add"><bounds x="94" y="35" width="2" height="1" /></element>
+
+ <element ref="ledr" name="4.1" blend="add"><bounds x="94" y="40" width="2" height="1" /></element>
+ <element ref="ledr" name="5.1" blend="add"><bounds x="94" y="45" width="2" height="1" /></element>
+ <element ref="ledr" name="4.0" blend="add"><bounds x="94" y="50" width="2" height="1" /></element>
+ <element ref="ledr" name="5.0" blend="add"><bounds x="94" y="55" width="2" height="1" /></element>
+
+ <element ref="ledg" name="5.8" blend="add"><bounds x="94" y="60" width="2" height="1" /></element>
+ <element ref="ledr" name="4.8" blend="add"><bounds x="94" y="60" width="2" height="1" /></element>
+
+ <group ref="sb_board"><bounds x="10" y="10" width="80" height="80" /></group>
+ <group ref="sb_ui"><bounds x="-4" y="10" width="10" height="80" /></group>
+
+ </view>
+</mamelayout>