diff options
-rw-r--r-- | hash/chessmstdm.xml | 27 | ||||
-rw-r--r-- | src/mame/drivers/chessmst.cpp | 322 | ||||
-rw-r--r-- | src/mame/layout/chessmst.lay | 932 | ||||
-rw-r--r-- | src/mame/layout/chessmstdm.lay | 589 | ||||
-rw-r--r-- | src/mame/mame.lst | 1 |
5 files changed, 1439 insertions, 432 deletions
diff --git a/hash/chessmstdm.xml b/hash/chessmstdm.xml new file mode 100644 index 00000000000..124e926d6a8 --- /dev/null +++ b/hash/chessmstdm.xml @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd"> +<softwarelist name="chessmstdm" description="Chess-Master Diamond Modules"> + + <software name="pm10"> + <description>PM10 Openings</description> + <year>1987</year> + <publisher>VEB Mikroelektronik Erfurt</publisher> + <part name="cart" interface="chessmstdm_cart"> + <dataarea name="rom" size="0x2000"> + <rom name="PM10_bm400.bin" size="0x2000" crc="aa784d7a" sha1="fd2d6cac9805a5aaf4f51b7c974d0314a402c186" offset="0" /> + </dataarea> + </part> + </software> + + <software name="pm11"> + <description>PM11 Endings</description> + <year>1987</year> + <publisher>VEB Mikroelektronik Erfurt</publisher> + <part name="cart" interface="chessmstdm_cart"> + <dataarea name="rom" size="0x4000"> + <rom name="PM11_bm403_bm607.bin" size="0x4000" crc="5af4f3e2" sha1="7c9befc6182d65ca0c7d53820a0f84a3a55b9c78" offset="0" /> + </dataarea> + </part> + </software> + +</softwarelist> diff --git a/src/mame/drivers/chessmst.cpp b/src/mame/drivers/chessmst.cpp index d55e2ffdc14..e0194657ddc 100644 --- a/src/mame/drivers/chessmst.cpp +++ b/src/mame/drivers/chessmst.cpp @@ -6,7 +6,6 @@ TODO: - figure out why chessmsta won't work, for starters it assume z80 carry flag is set at poweron? - - a better artwork ****************************************************************************/ @@ -14,8 +13,15 @@ #include "emu.h" #include "cpu/z80/z80.h" #include "machine/z80pio.h" +#include "machine/clock.h" #include "sound/speaker.h" +#include "sound/beep.h" #include "chessmst.lh" +#include "chessmstdm.lh" + +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" + class chessmst_state : public driver_device { @@ -23,24 +29,40 @@ public: chessmst_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker") + m_pia2(*this, "z80pio2"), + m_speaker(*this, "speaker"), + m_beeper(*this, "beeper"), + m_extra(*this, "EXTRA") { } required_device<cpu_device> m_maincpu; - required_device<speaker_sound_device> m_speaker; + required_device<z80pio_device> m_pia2; + optional_device<speaker_sound_device> m_speaker; + optional_device<beep_device> m_beeper; + required_ioport m_extra; UINT16 m_matrix; UINT16 m_led_sel; UINT8 m_sensor[64]; + UINT8 m_digit_matrix; + int m_digit_dot; + UINT16 m_digit; virtual void machine_reset() override; + DECLARE_WRITE8_MEMBER( digits_w ); DECLARE_WRITE8_MEMBER( pio1_port_a_w ); DECLARE_WRITE8_MEMBER( pio1_port_b_w ); + DECLARE_WRITE8_MEMBER( pio1_port_b_dm_w ); DECLARE_READ8_MEMBER( pio2_port_a_r ); DECLARE_WRITE8_MEMBER( pio2_port_b_w ); DECLARE_INPUT_CHANGED_MEMBER(chessmst_sensor); DECLARE_INPUT_CHANGED_MEMBER(reset_button); + DECLARE_INPUT_CHANGED_MEMBER(view_monitor_button); + DECLARE_WRITE_LINE_MEMBER( timer_555_w ); + +private: + void update_display(); }; @@ -51,6 +73,13 @@ static ADDRESS_MAP_START(chessmst_mem, AS_PROGRAM, 8, chessmst_state) AM_RANGE( 0x3400, 0x3bff ) AM_RAM ADDRESS_MAP_END +static ADDRESS_MAP_START(chessmstdm, AS_PROGRAM, 8, chessmst_state) + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE( 0x0000, 0x3fff ) AM_ROM + AM_RANGE( 0x4000, 0x7fff ) AM_DEVREAD("cartslot", generic_slot_device, read_rom) + AM_RANGE( 0x8000, 0x8bff ) AM_RAM +ADDRESS_MAP_END + static ADDRESS_MAP_START( chessmst_io , AS_IO, 8, chessmst_state) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) @@ -59,9 +88,31 @@ static ADDRESS_MAP_START( chessmst_io , AS_IO, 8, chessmst_state) AM_RANGE(0x08, 0x0b) AM_MIRROR(0xf0) AM_DEVREADWRITE("z80pio2", z80pio_device, read, write) ADDRESS_MAP_END +static ADDRESS_MAP_START( chessmstdm_io , AS_IO, 8, chessmst_state) + AM_IMPORT_FROM(chessmst_io) + AM_RANGE(0x4c, 0x4c) AM_WRITE(digits_w) +ADDRESS_MAP_END + +WRITE_LINE_MEMBER( chessmst_state::timer_555_w ) +{ + m_pia2->strobe_b(state); + m_pia2->data_b_write(m_matrix); +} + INPUT_CHANGED_MEMBER(chessmst_state::reset_button) { m_maincpu->set_input_line(INPUT_LINE_RESET, newval ? ASSERT_LINE : CLEAR_LINE); + machine_reset(); +} + +INPUT_CHANGED_MEMBER(chessmst_state::view_monitor_button) +{ + // pressing both VIEW and MONITOR buttons causes a reset + if ((m_extra->read() & 0x03) == 0x03) + { + m_maincpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); + machine_reset(); + } } INPUT_CHANGED_MEMBER(chessmst_state::chessmst_sensor) @@ -77,93 +128,112 @@ INPUT_CHANGED_MEMBER(chessmst_state::chessmst_sensor) /* Input ports */ static INPUT_PORTS_START( chessmst ) PORT_START("COL_A") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 0) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 1) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 2) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 3) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 4) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 5) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 6) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 7) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 1) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 2) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 3) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 4) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 5) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 6) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 7) PORT_START("COL_B") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 8) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 9) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 10) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 11) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 12) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 13) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 14) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 15) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 8) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 9) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 10) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 11) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 12) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 13) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 14) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 15) PORT_START("COL_C") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 16) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 17) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 18) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 19) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 20) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 21) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 22) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 23) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 16) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 17) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 18) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 19) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 20) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 21) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 22) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 23) PORT_START("COL_D") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 24) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 25) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 26) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 27) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 28) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 29) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 30) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 31) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 24) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 25) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 26) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 27) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 28) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 29) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 30) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 31) PORT_START("COL_E") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 32) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 33) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 34) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 35) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 36) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 37) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 38) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 39) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 32) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 33) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 34) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 35) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 36) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 37) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 38) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 39) PORT_START("COL_F") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 40) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 41) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 42) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 43) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 44) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 45) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 46) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 47) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 40) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 41) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 42) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 43) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 44) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 45) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 46) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 47) PORT_START("COL_G") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 48) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 49) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 50) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 51) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 52) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 53) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 54) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 55) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 48) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 49) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 50) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 51) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 52) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 53) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 54) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 55) PORT_START("COL_H") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 56) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 57) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 58) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 59) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 60) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 61) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 62) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 63) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 56) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 57) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 58) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 59) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 60) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 61) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 62) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, chessmst_sensor, 63) PORT_START("BUTTONS") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Hint [7]") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_H) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Random [6]") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_R) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Referee [5]") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_F) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Selfplay [4]") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_S) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Board [3]") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_B) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Color [2]") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_C) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Level [1]") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_L) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("New Game [0]") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Hint [7]") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_H) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Random [6]") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_R) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Referee [5]") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_F) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Selfplay [4]") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_S) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Board [3]") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_B) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Color [2]") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_C) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Level [1]") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_L) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("New Game [0]") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_ENTER) PORT_START("EXTRA") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Halt") PORT_CODE(KEYCODE_F2) PORT_WRITE_LINE_DEVICE_MEMBER("z80pio1", z80pio_device, strobe_a) // -> PIO(1) ASTB pin PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_NAME("Reset") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, reset_button, 0) // -> Z80 RESET pin INPUT_PORTS_END +static INPUT_PORTS_START( chessmstdm ) + PORT_INCLUDE(chessmst) + + PORT_MODIFY("BUTTONS") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Move Fore") PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Move Back") PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Board") PORT_CODE(KEYCODE_B) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Match / Time") PORT_CODE(KEYCODE_M) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Parameter / Information") PORT_CODE(KEYCODE_I) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Selection / Dialogue") PORT_CODE(KEYCODE_S) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Function / Notation") PORT_CODE(KEYCODE_F) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) + + PORT_MODIFY("EXTRA") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Monitor") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, view_monitor_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("View") PORT_CODE(KEYCODE_F2) PORT_CHANGED_MEMBER(DEVICE_SELF, chessmst_state, view_monitor_button, 0) +INPUT_PORTS_END + + void chessmst_state::machine_reset() { //reset all sensors @@ -174,6 +244,23 @@ void chessmst_state::machine_reset() m_sensor[i+0] = m_sensor[i+1] = m_sensor[i+6] = m_sensor[i+7] = 0; } +void chessmst_state::update_display() +{ + for(int i=0; i<4; i++) + { + if (BIT(m_digit_matrix, i)) + output().set_indexed_value("digit", i, BITSWAP16(m_digit, 3,5,12,10,14,1,2,13,8,6,11,15,7,9,4,0) | (m_digit_dot << 16)); + } +} + +WRITE8_MEMBER( chessmst_state::digits_w ) +{ + m_digit = (m_digit << 4) | (data & 0x0f); + m_digit_matrix = (data >> 4) & 0x0f; + + update_display(); +} + WRITE8_MEMBER( chessmst_state::pio1_port_a_w ) { for (int row=1; row<=8; row++) @@ -211,6 +298,20 @@ WRITE8_MEMBER( chessmst_state::pio1_port_b_w ) m_speaker->level_w(BIT(data, 6)); } +WRITE8_MEMBER( chessmst_state::pio1_port_b_dm_w ) +{ + m_matrix = (m_matrix & 0xff) | ((data & 0x04)<<6); + + m_digit_dot = BIT(data, 4); + if (m_digit_dot) + update_display(); + + m_beeper->set_state(BIT(data, 3)); + + output().set_value("monitor_led", !BIT(data, 5)); + output().set_value("playmode_led", !BIT(data, 6)); +} + READ8_MEMBER( chessmst_state::pio2_port_a_r ) { UINT8 data = 0x00; @@ -218,24 +319,11 @@ READ8_MEMBER( chessmst_state::pio2_port_a_r ) // The pieces position on the chessboard is identified by 64 Hall // sensors, which are in a 8x8 matrix with the corresponding LEDs. for (int i=0; i<8; i++) - { - if (m_matrix & 0x01) - data |= (m_sensor[0+i] ? (1<<i) : 0); - if (m_matrix & 0x02) - data |= (m_sensor[8+i] ? (1<<i) : 0); - if (m_matrix & 0x04) - data |= (m_sensor[16+i] ? (1<<i) : 0); - if (m_matrix & 0x08) - data |= (m_sensor[24+i] ? (1<<i) : 0); - if (m_matrix & 0x10) - data |= (m_sensor[32+i] ? (1<<i) : 0); - if (m_matrix & 0x20) - data |= (m_sensor[40+i] ? (1<<i) : 0); - if (m_matrix & 0x40) - data |= (m_sensor[48+i] ? (1<<i) : 0); - if (m_matrix & 0x80) - data |= (m_sensor[56+i] ? (1<<i) : 0); - } + for (int j=0; j<8; j++) + { + if (m_matrix & (1 << j)) + data |= (m_sensor[j * 8 + i] ? (1 << i) : 0); + } if (m_matrix & 0x100) data |= ioport("BUTTONS")->read(); @@ -255,6 +343,12 @@ static const z80_daisy_config chessmst_daisy_chain[] = { nullptr } }; +static const z80_daisy_config chessmstdm_daisy_chain[] = +{ + { "z80pio2" }, + { nullptr } +}; + static MACHINE_CONFIG_START( chessmst, chessmst_state ) /* basic machine hardware */ @@ -305,10 +399,42 @@ static MACHINE_CONFIG_START( chessmsta, chessmst_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) MACHINE_CONFIG_END +static MACHINE_CONFIG_START( chessmstdm, chessmst_state ) + + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", Z80, XTAL_8MHz/2) // U880 Z80 clone + MCFG_CPU_PROGRAM_MAP(chessmstdm) + MCFG_CPU_IO_MAP(chessmstdm_io) + MCFG_Z80_DAISY_CHAIN(chessmstdm_daisy_chain) + + MCFG_DEVICE_ADD("z80pio1", Z80PIO, XTAL_8MHz/4) + MCFG_Z80PIO_OUT_PA_CB(WRITE8(chessmst_state, pio1_port_a_w)) + MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio1_port_b_dm_w)) + MCFG_Z80PIO_IN_PB_CB(IOPORT("EXTRA")) + + MCFG_DEVICE_ADD("z80pio2", Z80PIO, XTAL_8MHz/4) + MCFG_Z80PIO_OUT_INT_CB(INPUTLINE("maincpu", INPUT_LINE_IRQ0)) + MCFG_Z80PIO_IN_PA_CB(READ8(chessmst_state, pio2_port_a_r)) + MCFG_Z80PIO_OUT_PB_CB(WRITE8(chessmst_state, pio2_port_b_w)) + + MCFG_DEFAULT_LAYOUT(layout_chessmstdm) + + MCFG_DEVICE_ADD("555_timer", CLOCK, 500) // from 555 timer + MCFG_CLOCK_SIGNAL_HANDLER(WRITELINE(chessmst_state, timer_555_w)) + + /* sound hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("beeper", BEEP, 1000) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) + + MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, "chessmstdm_cart") + MCFG_SOFTWARE_LIST_ADD("cart_list", "chessmstdm") +MACHINE_CONFIG_END + /* ROM definition */ ROM_START( chessmst ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x2800, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "056.bin", 0x0000, 0x0400, CRC(2b90e5d3) SHA1(c47445964b2e6cb11bd1f27e395cf980c97af196) ) ROM_LOAD( "057.bin", 0x0400, 0x0400, CRC(e666fc56) SHA1(3fa75b82cead81973bea94191a5c35f0acaaa0e6) ) ROM_LOAD( "058.bin", 0x0800, 0x0400, CRC(6a17fbec) SHA1(019051e93a5114477c50eaa87e1ff01b02eb404d) ) @@ -322,14 +448,20 @@ ROM_START( chessmst ) ROM_END ROM_START( chessmsta ) - ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + ROM_REGION( 0x2800, "maincpu", ROMREGION_ERASEFF ) ROM_LOAD( "2764.bin", 0x0000, 0x2000, CRC(6be28876) SHA1(fd7d77b471e7792aef3b2b3f7ff1de4cdafc94c9) ) ROM_LOAD( "u2616bm108.bin", 0x2000, 0x0800, CRC(6e69ace3) SHA1(e099b6b6cc505092f64b8d51ab9c70aa64f58f70) ) ROM_END +ROM_START( chessmstdm ) + ROM_REGION( 0x4000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD("CMD_bm002_bm201.bin", 0x0000, 0x4000, CRC(47858079) SHA1(eeae1126b514e4853d056690e72e7f5c6dfb3008)) +ROM_END + /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ COMP( 1984, chessmst, 0, 0, chessmst, chessmst, driver_device, 0, "VEB Mikroelektronik Erfurt", "Chess-Master (set 1)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) COMP( 1984, chessmsta, chessmst, 0, chessmsta, chessmst, driver_device, 0, "VEB Mikroelektronik Erfurt", "Chess-Master (set 2)", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) +COMP( 1987, chessmstdm,0, 0, chessmstdm, chessmstdm, driver_device, 0, "VEB Mikroelektronik Erfurt", "Chess-Master Diamond", MACHINE_NOT_WORKING | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/layout/chessmst.lay b/src/mame/layout/chessmst.lay index 40a623faf32..61dd06ce73d 100644 --- a/src/mame/layout/chessmst.lay +++ b/src/mame/layout/chessmst.lay @@ -1,351 +1,609 @@ <?xml version="1.0"?> <mamelayout version="2"> +<!-- define elements --> + <script> + local layout = {} + local board + local first_sq + local enpassant -- en passant possible on next move + local enpassant_pos -- position of the piece to be removed + + local port_tags = { ":COL_A", ":COL_B", ":COL_C", ":COL_D", ":COL_E", ":COL_F", ":COL_G", ":COL_H" } + local port_values = { } + local ports + + local function change_piece_state(pos, new_state) + board[pos.y][pos.x] = new_state + machine:outputs():set_indexed_value("pos", (pos.y * 10) + pos.x, new_state) + end + + local function move_piece(from, to) + if board[from.y][from.x] == 0 then + return 0 + end + + -- ignores move on the same position + if from.y == to.y and from.x == to.x then + change_piece_state(to, board[to.y][to.x]) + return 1 + end + + -- if another piece is on the destination position, the first input is used for remove the old piece and the next input is used for move the new piece + if board[to.y][to.x] ~= 0 then + change_piece_state(to, 0) + return 0 + end + + -- en passant + if enpassant and board[to.y][to.x] == 0 and board[from.y][from.x] == 12 and from.y == 4 and to.y == 3 and from.x ~= to.x and board[to.y + 1][to.x] == 6 then + enpassant_pos = {x = to.x, y = to.y + 1} + elseif enpassant and board[to.y][to.x] == 0 and board[from.y][from.x] == 6 and from.y == 5 and to.y == 6 and from.x ~= to.x and board[to.y - 1][to.x] == 12 then + enpassant_pos = {x = to.x, y = to.y - 1} + end + if board[to.y][to.x] == 0 and from.x == to.x and ((board[from.y][from.x] == 6 and from.y == 2 and to.y == 4) or + (board[from.y][from.x] == 12 and from.y == 7 and to.y == 5)) then + enpassant = true + else + enpassant = false + end + + -- promotion + if (to.y == 8 and board[from.y][from.x] == 6) or (to.y == 1 and board[from.y][from.x] == 12) then + change_piece_state(to, board[from.y][from.x] - 4) -- TODO: make this configurable + else + change_piece_state(to, board[from.y][from.x]) + end + + change_piece_state(from, 0) + return 1 + end + + function layout.reset() + board = + {{ 3, 5, 4, 2, 1, 4, 5, 3 }, + { 6, 6, 6, 6, 6, 6, 6, 6 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 12,12,12,12,12,12,12,12 }, + { 9,11,10, 8, 7,10,11, 9 }} + + for y, row in ipairs(board) do + for x, cell in ipairs(row) do + change_piece_state({x = x, y = y}, board[y][x]) + end + end + ports = machine:ioport().ports + first_sq = nil + enpassant = false + enpassant_pos = nil + end + + function layout.frame() + local value = ports[":EXTRA"]:read() + if value & 0x02 == 0x02 then + layout.reset() + return + end + + for x, tag in ipairs(port_tags) do + local port = ports[tag] + if not port then + return + end + local newvalue = port:read() + if port_values[x] ~= newvalue then + port_values[x] = newvalue + for y = 8, 1, -1 do + if newvalue & 1 == 0 then + if enpassant_pos and enpassant_pos.x == x and enpassant_pos.y == y then + change_piece_state(enpassant_pos, 0) + enpassant = false + enpassant_pos = nil + return + end + + if not first_sq then + if board[y][x] ~= 0 then + first_sq = {x = x, y = y} + machine:outputs():set_indexed_value("pos", (y * 10) + x, board[y][x] | 0x10) + end + else + if move_piece(first_sq, {x = x, y = y}) == 1 then + first_sq = nil + end + end + return + end + newvalue = newvalue >> 1 + end + end + end + end + + return layout, "chessmst" + </script> + <element name="led" defstate="1"> <disk state="0"> - <color red="0.75" green="0.0" blue="0.0" /> + <color red="0.95" green="0.0" blue="0.0" /> </disk> <disk state="1"> <color red="0.20" green="0.0" blue="0.0" /> </disk> </element> - - <element name="str_your"> <text string="YOUR"/> </element> - <element name="str_cm"> <text string="CM"/> </element> - <element name="str_check"> <text string="CHECK"/> </element> - <element name="str_c1"> <text string="C1"/> </element> - <element name="str_c2"> <text string="C2"/> </element> - <element name="str_c3"> <text string="C3"/> </element> - <element name="str_pawn"> <text string="Pawn"/> </element> - <element name="str_rook"> <text string="Rook"/> </element> - <element name="str_knight"> <text string="Knight"/> </element> - <element name="str_bishop"> <text string="Bishop"/> </element> - <element name="str_queen"> <text string="Queen"/> </element> - <element name="str_king"> <text string="King"/> </element> - <element name="str_white"> <text string="White"/> </element> - <element name="str_black"> <text string="Black"/> </element> - <element name="str_changeb"> <text string="CHANGE BOARD"/> </element> - - <element name="background"> - <rect> - <bounds left="0" top="0" right="1" bottom="1" /> + <element name="hl" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> <color red="0.0" green="0.0" blue="0.0" /> - </rect> + </text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> </element> + <element name="hlb" defstate="0"> + <disk state="0"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </disk> + <disk state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </disk> + </element> + + <element name="black"><rect><color red="0.64" green="0.08" blue="0.11" /></rect></element> + <element name="white"><rect><color red="1.00" green="0.88" blue="0.55" /></rect></element> + + <element name="text_1"> <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_2"> <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_3"> <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_4"> <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_5"> <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_6"> <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_7"> <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_8"> <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + + <element name="text_a"> <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_b"> <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_c"> <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_d"> <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_e"> <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_f"> <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_g"> <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_h"> <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + + <element name="text_chessmaster"> <text string="CHESS-MASTER" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_newgame"> <text string="NEW GAME" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_level"> <text string="LEVEL" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_color"> <text string="COLOR" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_board"> <text string="BOARD" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_selfplay"> <text string="SELF PLAY" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_referee"> <text string="REFEREE" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_random"> <text string="RANDOM" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_hint"> <text string="HINT" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_white"> <text string="WHITE" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_black"> <text string="BLACK" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_king" > <text string="♔" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_queen" > <text string="♕" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_rook" > <text string="♖" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_bishop" > <text string="♗" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_knight" > <text string="♘" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_pawn" > <text string="♙" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_change"> <text string="CHANGE" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_board"> <text string="BOARD" align="2"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_halt"> <text string="HALT" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_reset"> <text string="RESET" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_check"> <text string="CHECK" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_your"> <text string="YOUR" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_cms"> <text string="CM'S" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + + <element name="piece" defstate="0"> + <text string="♚" state="1"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♛" state="2"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♜" state="3"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♝" state="4"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♞" state="5"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♟" state="6"><color red="0.27" green="0.25" blue="0.25" /></text> + + <text string="♚" state="7"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♛" state="8"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♜" state="9"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♝" state="10"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♞" state="11"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♟" state="12"><color red="0.71" green="0.7" blue="0.69" /></text> + + <!-- selected pieces --> + <disk state="17"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="18"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="19"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="20"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="21"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="22"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="23"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="24"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="25"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="26"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="27"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="28"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + + <text string="♚" state="17"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♛" state="18"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♜" state="19"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♝" state="20"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♞" state="21"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♟" state="22"><color red="0.27" green="0.25" blue="0.25" /></text> + + <text string="♚" state="23"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♛" state="24"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♜" state="25"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♝" state="26"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♞" state="27"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♟" state="28"><color red="0.71" green="0.7" blue="0.69" /></text> + </element> + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-2" right="117.5" top="-2" bottom="88" /> + + <bezel element="black"><bounds x="-2.5" y="-2" width="120" height="90.5" /></bezel> + <bezel element="white"><bounds x="89" y="-2" width="30" height="90.5" /></bezel> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel> + + <!-- chessboard bezel --> + + <bezel element="white"><bounds x="2" y="2" width="82" height="82" /></bezel> + <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel> + + <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel> + + <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel> + <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel> + + <bezel name="pos11" element="piece"><bounds x="3" y="3" width="10" height="10" /></bezel> + <bezel name="pos12" element="piece"><bounds x="13" y="3" width="10" height="10" /></bezel> + <bezel name="pos13" element="piece"><bounds x="23" y="3" width="10" height="10" /></bezel> + <bezel name="pos14" element="piece"><bounds x="33" y="3" width="10" height="10" /></bezel> + <bezel name="pos15" element="piece"><bounds x="43" y="3" width="10" height="10" /></bezel> + <bezel name="pos16" element="piece"><bounds x="53" y="3" width="10" height="10" /></bezel> + <bezel name="pos17" element="piece"><bounds x="63" y="3" width="10" height="10" /></bezel> + <bezel name="pos18" element="piece"><bounds x="73" y="3" width="10" height="10" /></bezel> + + <bezel name="pos21" element="piece"><bounds x="3" y="13" width="10" height="10" /></bezel> + <bezel name="pos22" element="piece"><bounds x="13" y="13" width="10" height="10" /></bezel> + <bezel name="pos23" element="piece"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel name="pos24" element="piece"><bounds x="33" y="13" width="10" height="10" /></bezel> + <bezel name="pos25" element="piece"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel name="pos26" element="piece"><bounds x="53" y="13" width="10" height="10" /></bezel> + <bezel name="pos27" element="piece"><bounds x="63" y="13" width="10" height="10" /></bezel> + <bezel name="pos28" element="piece"><bounds x="73" y="13" width="10" height="10" /></bezel> + + <bezel name="pos31" element="piece"><bounds x="3" y="23" width="10" height="10" /></bezel> + <bezel name="pos32" element="piece"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel name="pos33" element="piece"><bounds x="23" y="23" width="10" height="10" /></bezel> + <bezel name="pos34" element="piece"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel name="pos35" element="piece"><bounds x="43" y="23" width="10" height="10" /></bezel> + <bezel name="pos36" element="piece"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel name="pos37" element="piece"><bounds x="63" y="23" width="10" height="10" /></bezel> + <bezel name="pos38" element="piece"><bounds x="73" y="23" width="10" height="10" /></bezel> + + <bezel name="pos41" element="piece"><bounds x="3" y="33" width="10" height="10" /></bezel> + <bezel name="pos42" element="piece"><bounds x="13" y="33" width="10" height="10" /></bezel> + <bezel name="pos43" element="piece"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel name="pos44" element="piece"><bounds x="33" y="33" width="10" height="10" /></bezel> + <bezel name="pos45" element="piece"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel name="pos46" element="piece"><bounds x="53" y="33" width="10" height="10" /></bezel> + <bezel name="pos47" element="piece"><bounds x="63" y="33" width="10" height="10" /></bezel> + <bezel name="pos48" element="piece"><bounds x="73" y="33" width="10" height="10" /></bezel> + + <bezel name="pos51" element="piece"><bounds x="3" y="43" width="10" height="10" /></bezel> + <bezel name="pos52" element="piece"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel name="pos53" element="piece"><bounds x="23" y="43" width="10" height="10" /></bezel> + <bezel name="pos54" element="piece"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel name="pos55" element="piece"><bounds x="43" y="43" width="10" height="10" /></bezel> + <bezel name="pos56" element="piece"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel name="pos57" element="piece"><bounds x="63" y="43" width="10" height="10" /></bezel> + <bezel name="pos58" element="piece"><bounds x="73" y="43" width="10" height="10" /></bezel> + + <bezel name="pos61" element="piece"><bounds x="3" y="53" width="10" height="10" /></bezel> + <bezel name="pos62" element="piece"><bounds x="13" y="53" width="10" height="10" /></bezel> + <bezel name="pos63" element="piece"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel name="pos64" element="piece"><bounds x="33" y="53" width="10" height="10" /></bezel> + <bezel name="pos65" element="piece"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel name="pos66" element="piece"><bounds x="53" y="53" width="10" height="10" /></bezel> + <bezel name="pos67" element="piece"><bounds x="63" y="53" width="10" height="10" /></bezel> + <bezel name="pos68" element="piece"><bounds x="73" y="53" width="10" height="10" /></bezel> + + <bezel name="pos71" element="piece"><bounds x="3" y="63" width="10" height="10" /></bezel> + <bezel name="pos72" element="piece"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel name="pos73" element="piece"><bounds x="23" y="63" width="10" height="10" /></bezel> + <bezel name="pos74" element="piece"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel name="pos75" element="piece"><bounds x="43" y="63" width="10" height="10" /></bezel> + <bezel name="pos76" element="piece"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel name="pos77" element="piece"><bounds x="63" y="63" width="10" height="10" /></bezel> + <bezel name="pos78" element="piece"><bounds x="73" y="63" width="10" height="10" /></bezel> + + <bezel name="pos81" element="piece"><bounds x="3" y="73" width="10" height="10" /></bezel> + <bezel name="pos82" element="piece"><bounds x="13" y="73" width="10" height="10" /></bezel> + <bezel name="pos83" element="piece"><bounds x="23" y="73" width="10" height="10" /></bezel> + <bezel name="pos84" element="piece"><bounds x="33" y="73" width="10" height="10" /></bezel> + <bezel name="pos85" element="piece"><bounds x="43" y="73" width="10" height="10" /></bezel> + <bezel name="pos86" element="piece"><bounds x="53" y="73" width="10" height="10" /></bezel> + <bezel name="pos87" element="piece"><bounds x="63" y="73" width="10" height="10" /></bezel> + <bezel name="pos88" element="piece"><bounds x="73" y="73" width="10" height="10" /></bezel> + + <!-- chessboard leds --> + + <bezel name="led_a1" element="led"><bounds x="3.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b1" element="led"><bounds x="13.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c1" element="led"><bounds x="23.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d1" element="led"><bounds x="33.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e1" element="led"><bounds x="43.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f1" element="led"><bounds x="53.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g1" element="led"><bounds x="63.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h1" element="led"><bounds x="73.2" y="11.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a2" element="led"><bounds x="3.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b2" element="led"><bounds x="13.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c2" element="led"><bounds x="23.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d2" element="led"><bounds x="33.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e2" element="led"><bounds x="43.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f2" element="led"><bounds x="53.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g2" element="led"><bounds x="63.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h2" element="led"><bounds x="73.2" y="21.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a3" element="led"><bounds x="3.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b3" element="led"><bounds x="13.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c3" element="led"><bounds x="23.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d3" element="led"><bounds x="33.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e3" element="led"><bounds x="43.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f3" element="led"><bounds x="53.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g3" element="led"><bounds x="63.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h3" element="led"><bounds x="73.2" y="31.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a4" element="led"><bounds x="3.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b4" element="led"><bounds x="13.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c4" element="led"><bounds x="23.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d4" element="led"><bounds x="33.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e4" element="led"><bounds x="43.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f4" element="led"><bounds x="53.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g4" element="led"><bounds x="63.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h4" element="led"><bounds x="73.2" y="41.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a5" element="led"><bounds x="3.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b5" element="led"><bounds x="13.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c5" element="led"><bounds x="23.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d5" element="led"><bounds x="33.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e5" element="led"><bounds x="43.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f5" element="led"><bounds x="53.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g5" element="led"><bounds x="63.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h5" element="led"><bounds x="73.2" y="51.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a6" element="led"><bounds x="3.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b6" element="led"><bounds x="13.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c6" element="led"><bounds x="23.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d6" element="led"><bounds x="33.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e6" element="led"><bounds x="43.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f6" element="led"><bounds x="53.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g6" element="led"><bounds x="63.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h6" element="led"><bounds x="73.2" y="61.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a7" element="led"><bounds x="3.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b7" element="led"><bounds x="13.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c7" element="led"><bounds x="23.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d7" element="led"><bounds x="33.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e7" element="led"><bounds x="43.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f7" element="led"><bounds x="53.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g7" element="led"><bounds x="63.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h7" element="led"><bounds x="73.2" y="71.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a8" element="led"><bounds x="3.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b8" element="led"><bounds x="13.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c8" element="led"><bounds x="23.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d8" element="led"><bounds x="33.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e8" element="led"><bounds x="43.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f8" element="led"><bounds x="53.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g8" element="led"><bounds x="63.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h8" element="led"><bounds x="73.2" y="81.3" width="1.5" height="1.5" /></bezel> + + <!-- chessboard sensors --> + + <bezel element="hl" inputtag="COL_A" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + + <!-- right side --> + + <bezel element="text_chessmaster"><bounds x="94" y="0" width="24" height="3" /></bezel> + <bezel element="text_newgame"> <bounds x="98" y="16" width="18" height="1.8" /></bezel> + <bezel element="text_level"> <bounds x="98" y="23" width="18" height="1.8" /></bezel> + <bezel element="text_color"> <bounds x="98" y="30" width="18" height="1.8" /></bezel> + <bezel element="text_board"> <bounds x="98" y="37" width="18" height="1.8" /></bezel> + <bezel element="text_selfplay"><bounds x="98" y="44" width="18" height="1.8" /></bezel> + <bezel element="text_referee"> <bounds x="98" y="51" width="18" height="1.8" /></bezel> + <bezel element="text_random"> <bounds x="98" y="58" width="18" height="1.8" /></bezel> + <bezel element="text_hint"> <bounds x="98" y="65" width="18" height="1.8" /></bezel> + <bezel element="text_reset"> <bounds x="92.5" y="82" width="10" height="2" /></bezel> + <bezel element="text_halt"> <bounds x="107.5" y="82" width="8" height="2" /></bezel> + + <bezel element="text_pawn"> <bounds x="95" y="18" width="4" height="4" /></bezel> + <bezel element="text_knight"> <bounds x="95" y="25" width="4" height="4" /></bezel> + <bezel element="text_bishop"> <bounds x="95" y="32" width="4" height="4" /></bezel> + <bezel element="text_rook"> <bounds x="95" y="39" width="4" height="4" /></bezel> + <bezel element="text_queen"> <bounds x="95" y="46" width="4" height="4" /></bezel> + <bezel element="text_king"> <bounds x="95" y="53" width="4" height="4" /></bezel> + <bezel element="text_white"> <bounds x="88" y="61" width="10" height="1.8" /></bezel> + <bezel element="text_black"> <bounds x="88" y="68" width="10" height="1.8" /></bezel> + + <bezel element="text_check"> <bounds x="91" y="6" width="10" height="1.8" /></bezel> + <bezel element="text_your"> <bounds x="98" y="6" width="8" height="1.8" /></bezel> + <bezel element="text_cms"> <bounds x="104" y="6" width="8" height="1.8" /></bezel> + <bezel element="text_change"> <bounds x="95.3" y="73" width="12" height="1.8" /></bezel> + <bezel element="text_board"> <bounds x="103" y="73" width="10" height="1.8" /></bezel> + + <bezel element="text_1"><bounds x="111" y="19" width="2" height="1.8" /></bezel> + <bezel element="text_2"><bounds x="111" y="26" width="2" height="1.8" /></bezel> + <bezel element="text_3"><bounds x="111" y="33" width="2" height="1.8" /></bezel> + <bezel element="text_4"><bounds x="111" y="40" width="2" height="1.8" /></bezel> + <bezel element="text_5"><bounds x="111" y="47" width="2" height="1.8" /></bezel> + <bezel element="text_6"><bounds x="111" y="54" width="2" height="1.8" /></bezel> + <bezel element="text_7"><bounds x="111" y="62" width="2" height="1.8" /></bezel> + <bezel element="text_8"><bounds x="111" y="69" width="2" height="1.8" /></bezel> + + <bezel name="led_i1" element="led"> <bounds x="100" y="19" width="2" height="2" /></bezel> + <bezel name="led_i2" element="led"> <bounds x="100" y="26" width="2" height="2" /></bezel> + <bezel name="led_i3" element="led"> <bounds x="100" y="33" width="2" height="2" /></bezel> + <bezel name="led_i4" element="led"> <bounds x="100" y="40" width="2" height="2" /></bezel> + <bezel name="led_i5" element="led"> <bounds x="100" y="47" width="2" height="2" /></bezel> + <bezel name="led_i6" element="led"> <bounds x="100" y="54" width="2" height="2" /></bezel> + <bezel name="led_i7" element="led"> <bounds x="100" y="61" width="2" height="2" /></bezel> + <bezel name="led_i8" element="led"> <bounds x="100" y="68" width="2" height="2" /></bezel> + + <bezel name="led_j7" element="led"> <bounds x="95" y="8" width="2" height="2" /></bezel> + <bezel name="led_j5" element="led"> <bounds x="101" y="8" width="2" height="2" /></bezel> + <bezel name="led_j6" element="led"> <bounds x="107" y="8" width="2" height="2" /></bezel> + + <bezel name="led_j2" element="led"> <bounds x="95" y="12" width="2" height="2" /></bezel> + <bezel name="led_j3" element="led"> <bounds x="101" y="12" width="2" height="2" /></bezel> + <bezel name="led_j4" element="led"> <bounds x="107" y="12" width="2" height="2" /></bezel> + + <bezel name="led_j8" element="led"> <bounds x="102.5" y="73" width="2" height="2" /></bezel> + + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x80"><bounds x="105" y="18" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x40"><bounds x="105" y="25" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x20"><bounds x="105" y="32" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x10"><bounds x="105" y="39" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x08"><bounds x="105" y="46" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x04"><bounds x="105" y="53" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x02"><bounds x="105" y="60" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x01"><bounds x="105" y="67" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="EXTRA" inputmask="0x02"><bounds x="95" y="77" width="4" height="4" /></bezel> + <bezel element="hlb" inputtag="EXTRA" inputmask="0x01"><bounds x="109" y="77" width="4" height="4" /></bezel> - <view name="Default Layout"> - <!-- background --> - <bezel element="background"> - <bounds left="00" top="00" right="100" bottom="80" /> - </bezel> - - <!-- Column A --> - <bezel name="led_a1" element="led" inputtag="COL_A" inputmask="0x80"> - <bounds x="5" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_a2" element="led" inputtag="COL_A" inputmask="0x40"> - <bounds x="5" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_a3" element="led" inputtag="COL_A" inputmask="0x20"> - <bounds x="5" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_a4" element="led" inputtag="COL_A" inputmask="0x10"> - <bounds x="5" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_a5" element="led" inputtag="COL_A" inputmask="0x08"> - <bounds x="5" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_a6" element="led" inputtag="COL_A" inputmask="0x04"> - <bounds x="5" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_a7" element="led" inputtag="COL_A" inputmask="0x02"> - <bounds x="5" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_a8" element="led" inputtag="COL_A" inputmask="0x01"> - <bounds x="5" y="75" width="2" height="2" /> - </bezel> - - <!-- Column B --> - <bezel name="led_b1" element="led" inputtag="COL_B" inputmask="0x80"> - <bounds x="15" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_b2" element="led" inputtag="COL_B" inputmask="0x40"> - <bounds x="15" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_b3" element="led" inputtag="COL_B" inputmask="0x20"> - <bounds x="15" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_b4" element="led" inputtag="COL_B" inputmask="0x10"> - <bounds x="15" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_b5" element="led" inputtag="COL_B" inputmask="0x08"> - <bounds x="15" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_b6" element="led" inputtag="COL_B" inputmask="0x04"> - <bounds x="15" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_b7" element="led" inputtag="COL_B" inputmask="0x02"> - <bounds x="15" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_b8" element="led" inputtag="COL_B" inputmask="0x01"> - <bounds x="15" y="75" width="2" height="2" /> - </bezel> - - <!-- Column C --> - <bezel name="led_c1" element="led" inputtag="COL_C" inputmask="0x80"> - <bounds x="25" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_c2" element="led" inputtag="COL_C" inputmask="0x40"> - <bounds x="25" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_c3" element="led" inputtag="COL_C" inputmask="0x20"> - <bounds x="25" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_c4" element="led" inputtag="COL_C" inputmask="0x10"> - <bounds x="25" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_c5" element="led" inputtag="COL_C" inputmask="0x08"> - <bounds x="25" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_c6" element="led" inputtag="COL_C" inputmask="0x04"> - <bounds x="25" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_c7" element="led" inputtag="COL_C" inputmask="0x02"> - <bounds x="25" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_c8" element="led" inputtag="COL_C" inputmask="0x01"> - <bounds x="25" y="75" width="2" height="2" /> - </bezel> - - <!-- Column D --> - <bezel name="led_d1" element="led" inputtag="COL_D" inputmask="0x80"> - <bounds x="35" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_d2" element="led" inputtag="COL_D" inputmask="0x40"> - <bounds x="35" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_d3" element="led" inputtag="COL_D" inputmask="0x20"> - <bounds x="35" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_d4" element="led" inputtag="COL_D" inputmask="0x10"> - <bounds x="35" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_d5" element="led" inputtag="COL_D" inputmask="0x08"> - <bounds x="35" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_d6" element="led" inputtag="COL_D" inputmask="0x04"> - <bounds x="35" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_d7" element="led" inputtag="COL_D" inputmask="0x02"> - <bounds x="35" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_d8" element="led" inputtag="COL_D" inputmask="0x01"> - <bounds x="35" y="75" width="2" height="2" /> - </bezel> - - <!-- Column E --> - <bezel name="led_e1" element="led" inputtag="COL_E" inputmask="0x80"> - <bounds x="45" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_e2" element="led" inputtag="COL_E" inputmask="0x40"> - <bounds x="45" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_e3" element="led" inputtag="COL_E" inputmask="0x20"> - <bounds x="45" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_e4" element="led" inputtag="COL_E" inputmask="0x10"> - <bounds x="45" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_e5" element="led" inputtag="COL_E" inputmask="0x08"> - <bounds x="45" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_e6" element="led" inputtag="COL_E" inputmask="0x04"> - <bounds x="45" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_e7" element="led" inputtag="COL_E" inputmask="0x02"> - <bounds x="45" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_e8" element="led" inputtag="COL_E" inputmask="0x01"> - <bounds x="45" y="75" width="2" height="2" /> - </bezel> - - <!-- Column F --> - <bezel name="led_f1" element="led" inputtag="COL_F" inputmask="0x80"> - <bounds x="55" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_f2" element="led" inputtag="COL_F" inputmask="0x40"> - <bounds x="55" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_f3" element="led" inputtag="COL_F" inputmask="0x20"> - <bounds x="55" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_f4" element="led" inputtag="COL_F" inputmask="0x10"> - <bounds x="55" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_f5" element="led" inputtag="COL_F" inputmask="0x08"> - <bounds x="55" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_f6" element="led" inputtag="COL_F" inputmask="0x04"> - <bounds x="55" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_f7" element="led" inputtag="COL_F" inputmask="0x02"> - <bounds x="55" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_f8" element="led" inputtag="COL_F" inputmask="0x01"> - <bounds x="55" y="75" width="2" height="2" /> - </bezel> - - <!-- Column G --> - <bezel name="led_g1" element="led" inputtag="COL_G" inputmask="0x80"> - <bounds x="65" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_g2" element="led" inputtag="COL_G" inputmask="0x40"> - <bounds x="65" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_g3" element="led" inputtag="COL_G" inputmask="0x20"> - <bounds x="65" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_g4" element="led" inputtag="COL_G" inputmask="0x10"> - <bounds x="65" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_g5" element="led" inputtag="COL_G" inputmask="0x08"> - <bounds x="65" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_g6" element="led" inputtag="COL_G" inputmask="0x04"> - <bounds x="65" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_g7" element="led" inputtag="COL_G" inputmask="0x02"> - <bounds x="65" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_g8" element="led" inputtag="COL_G" inputmask="0x01"> - <bounds x="65" y="75" width="2" height="2" /> - </bezel> - - <!-- Column H --> - <bezel name="led_h1" element="led" inputtag="COL_H" inputmask="0x80"> - <bounds x="75" y="5" width="2" height="2" /> - </bezel> - <bezel name="led_h2" element="led" inputtag="COL_H" inputmask="0x40"> - <bounds x="75" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_h3" element="led" inputtag="COL_H" inputmask="0x20"> - <bounds x="75" y="25" width="2" height="2" /> - </bezel> - <bezel name="led_h4" element="led" inputtag="COL_H" inputmask="0x10"> - <bounds x="75" y="35" width="2" height="2" /> - </bezel> - <bezel name="led_h5" element="led" inputtag="COL_H" inputmask="0x08"> - <bounds x="75" y="45" width="2" height="2" /> - </bezel> - <bezel name="led_h6" element="led" inputtag="COL_H" inputmask="0x04"> - <bounds x="75" y="55" width="2" height="2" /> - </bezel> - <bezel name="led_h7" element="led" inputtag="COL_H" inputmask="0x02"> - <bounds x="75" y="65" width="2" height="2" /> - </bezel> - <bezel name="led_h8" element="led" inputtag="COL_H" inputmask="0x01"> - <bounds x="75" y="75" width="2" height="2" /> - </bezel> - - <!-- game status LEDs --> - <bezel name="led_j5" element="led"> - <bounds x="85" y="8" width="2" height="2" /> - </bezel> - <bezel name="led_j6" element="led"> - <bounds x="90" y="8" width="2" height="2" /> - </bezel> - <bezel name="led_j7" element="led"> - <bounds x="95" y="8" width="2" height="2" /> - </bezel> - - <bezel name="lbl_your" element="str_your"> - <bounds x="84" y="5" width="4" height="2" /> - </bezel> - <bezel name="lbl_cm" element="str_cm"> - <bounds x="90" y="5" width="2" height="2" /> - </bezel> - <bezel name="lbl_check" element="str_check"> - <bounds x="94" y="5" width="5" height="2" /> - </bezel> - - <!-- command mode LEDs --> - <bezel name="led_j2" element="led"> - <bounds x="85" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_j3" element="led"> - <bounds x="90" y="15" width="2" height="2" /> - </bezel> - <bezel name="led_j4" element="led"> - <bounds x="95" y="15" width="2" height="2" /> - </bezel> - - <bezel name="lbl_c1" element="str_c1"> - <bounds x="85" y="12" width="2" height="2" /> - </bezel> - <bezel name="lbl_c2" element="str_c2"> - <bounds x="90" y="12" width="2" height="2" /> - </bezel> - <bezel name="lbl_c3" element="str_c3"> - <bounds x="95" y="12" width="2" height="2" /> - </bezel> - - <!-- type LEDs --> - <bezel name="led_i1" element="led"> - <bounds x="85" y="20" width="2" height="2" /> - </bezel> - <bezel name="led_i2" element="led"> - <bounds x="85" y="26" width="2" height="2" /> - </bezel> - <bezel name="led_i3" element="led"> - <bounds x="85" y="32" width="2" height="2" /> - </bezel> - <bezel name="led_i4" element="led"> - <bounds x="85" y="38" width="2" height="2" /> - </bezel> - <bezel name="led_i5" element="led"> - <bounds x="85" y="44" width="2" height="2" /> - </bezel> - <bezel name="led_i6" element="led"> - <bounds x="85" y="50" width="2" height="2" /> - </bezel> - <bezel name="led_i7" element="led"> - <bounds x="85" y="56" width="2" height="2" /> - </bezel> - <bezel name="led_i8" element="led"> - <bounds x="85" y="62" width="2" height="2" /> - </bezel> - - <bezel name="lbl_pawn" element="str_pawn"> - <bounds x="88" y="20" width="4" height="2" /> - </bezel> - <bezel name="lbl_knight" element="str_knight"> - <bounds x="88" y="26" width="5" height="2" /> - </bezel> - <bezel name="lbl_bishop" element="str_bishop"> - <bounds x="88" y="32" width="5" height="2" /> - </bezel> - <bezel name="lbl_rook" element="str_rook"> - <bounds x="88" y="38" width="4" height="2" /> - </bezel> - <bezel name="lbl_queen" element="str_queen"> - <bounds x="88" y="44" width="5" height="2" /> - </bezel> - <bezel name="lbl_king" element="str_king"> - <bounds x="88" y="50" width="4" height="2" /> - </bezel> - <bezel name="lbl_white" element="str_white"> - <bounds x="88" y="56" width="5" height="2" /> - </bezel> - <bezel name="lbl_black" element="str_black"> - <bounds x="88" y="62" width="4" height="2" /> - </bezel> - - <!-- change board LED --> - <bezel name="led_j8" element="led"> - <bounds x="89" y="70" width="2" height="2" /> - </bezel> - - <bezel name="lbl_cb" element="str_changeb"> - <bounds x="85" y="67" width="10" height="2" /> - </bezel> </view> </mamelayout> diff --git a/src/mame/layout/chessmstdm.lay b/src/mame/layout/chessmstdm.lay new file mode 100644 index 00000000000..b5c8e57f345 --- /dev/null +++ b/src/mame/layout/chessmstdm.lay @@ -0,0 +1,589 @@ +<?xml version="1.0"?> +<mamelayout version="2"> +<!-- define elements --> + <script> + local layout = {} + local board + local first_sq + local enpassant -- en passant possible on next move + local enpassant_pos -- position of the piece to be removed + + local port_tags = { ":COL_A", ":COL_B", ":COL_C", ":COL_D", ":COL_E", ":COL_F", ":COL_G", ":COL_H" } + local port_values = { } + local ports + + local function change_piece_state(pos, new_state) + board[pos.y][pos.x] = new_state + machine:outputs():set_indexed_value("pos", (pos.y * 10) + pos.x, new_state) + end + + local function move_piece(from, to) + if board[from.y][from.x] == 0 then + return 0 + end + + -- ignores move on the same position + if from.y == to.y and from.x == to.x then + change_piece_state(to, board[to.y][to.x]) + return 1 + end + + -- if another piece is on the destination position, the first input is used for remove the old piece and the next input is used for move the new piece + if board[to.y][to.x] ~= 0 then + change_piece_state(to, 0) + return 0 + end + + -- en passant + if enpassant and board[to.y][to.x] == 0 and board[from.y][from.x] == 12 and from.y == 4 and to.y == 3 and from.x ~= to.x and board[to.y + 1][to.x] == 6 then + enpassant_pos = {x = to.x, y = to.y + 1} + elseif enpassant and board[to.y][to.x] == 0 and board[from.y][from.x] == 6 and from.y == 5 and to.y == 6 and from.x ~= to.x and board[to.y - 1][to.x] == 12 then + enpassant_pos = {x = to.x, y = to.y - 1} + end + if board[to.y][to.x] == 0 and from.x == to.x and ((board[from.y][from.x] == 6 and from.y == 2 and to.y == 4) or + (board[from.y][from.x] == 12 and from.y == 7 and to.y == 5)) then + enpassant = true + else + enpassant = false + end + + -- promotion + if (to.y == 8 and board[from.y][from.x] == 6) or (to.y == 1 and board[from.y][from.x] == 12) then + change_piece_state(to, board[from.y][from.x] - 4) -- TODO: make this configurable + else + change_piece_state(to, board[from.y][from.x]) + end + + change_piece_state(from, 0) + return 1 + end + + function layout.reset() + board = + {{ 3, 5, 4, 2, 1, 4, 5, 3 }, + { 6, 6, 6, 6, 6, 6, 6, 6 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0, 0 }, + { 12,12,12,12,12,12,12,12 }, + { 9,11,10, 8, 7,10,11, 9 }} + + for y, row in ipairs(board) do + for x, cell in ipairs(row) do + change_piece_state({x = x, y = y}, board[y][x]) + end + end + ports = machine:ioport().ports + first_sq = nil + enpassant = false + enpassant_pos = nil + end + + function layout.frame() + local value = ports[":EXTRA"]:read() + if value & 0x03 == 0x03 then + layout.reset() + return + end + + for x, tag in ipairs(port_tags) do + local port = ports[tag] + if not port then + return + end + local newvalue = port:read() + if port_values[x] ~= newvalue then + port_values[x] = newvalue + for y = 8, 1, -1 do + if newvalue & 1 == 0 then + if enpassant_pos and enpassant_pos.x == x and enpassant_pos.y == y then + change_piece_state(enpassant_pos, 0) + enpassant = false + enpassant_pos = nil + return + end + + if not first_sq then + if board[y][x] ~= 0 then + first_sq = {x = x, y = y} + machine:outputs():set_indexed_value("pos", (y * 10) + x, board[y][x] | 0x10) + end + else + if move_piece(first_sq, {x = x, y = y}) == 1 then + first_sq = nil + end + end + return + end + newvalue = newvalue >> 1 + end + end + end + end + + return layout, "chessmstdm" + </script> + + <element name="black_rect"> + <rect> + <color red="0.0" green="0.0" blue="0.0" /> + </rect> + </element> + <element name="digit" defstate="0"> + <led16segsc> + <color red="0.5" green="1.0" blue="0.0" /> + </led16segsc> + </element> + <element name="led" defstate="1"> + <disk state="0"> + <color red="0.95" green="0.0" blue="0.0" /> + </disk> + <disk state="1"> + <color red="0.20" green="0.0" blue="0.0" /> + </disk> + </element> + <element name="hl" defstate="0"> + <text string=" "> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="1.0" green="1.0" blue="1.0" /> + </disk> + </element> + <element name="hlb" defstate="0"> + <disk state="0"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.0" green="0.0" blue="0.0" /> + </disk> + <disk state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </disk> + </element> + + <element name="black"><rect><color red="0.44" green="0.08" blue="0.01" /></rect></element> + <element name="white"><rect><color red="1.00" green="0.88" blue="0.55" /></rect></element> + + <element name="text_1"> <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_2"> <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_3"> <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_4"> <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_5"> <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_6"> <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_7"> <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_8"> <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + + <element name="text_a"> <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_b"> <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_c"> <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_d"> <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_e"> <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_f"> <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_g"> <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_h"> <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + + <element name="text_chessmaster"> <text string="CHESS-MASTER" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_diamond"> <text string="diamond" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_monitor"> <text string="MONITOR" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_view"> <text string="VIEW" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_reset"> <text string="RESET" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_selection"> <text string="SELECTION" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_dialogue"> <text string="DIALOGUE" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_function"> <text string="FUNCTION" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_notation"> <text string="NOTATION" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_parameter"> <text string="PARAMETER" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_information"> <text string="INFORMATION" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_board"> <text string="BOARD" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_match"> <text string="MATCH" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_time"> <text string="TIME" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_enter"> <text string="ENTER" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_playmode"> <text string="PLAYMODE" align="1"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_move_fore"> <text string="MOVE FORE" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + <element name="text_move_back"> <text string="MOVE BACK" align="0"><color red="0.17" green="0.15" blue="0.15" /></text> </element> + + <element name="piece" defstate="0"> + <text string="♚" state="1"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♛" state="2"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♜" state="3"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♝" state="4"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♞" state="5"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♟" state="6"><color red="0.27" green="0.25" blue="0.25" /></text> + + <text string="♚" state="7"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♛" state="8"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♜" state="9"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♝" state="10"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♞" state="11"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♟" state="12"><color red="0.71" green="0.7" blue="0.69" /></text> + + <!-- selected pieces --> + <disk state="17"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="18"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="19"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="20"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="21"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="22"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="23"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="24"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="25"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="26"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="27"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + <disk state="28"> <color red="1.00" green="0.25" blue="1.00" /> </disk> + + <text string="♚" state="17"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♛" state="18"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♜" state="19"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♝" state="20"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♞" state="21"><color red="0.27" green="0.25" blue="0.25" /></text> + <text string="♟" state="22"><color red="0.27" green="0.25" blue="0.25" /></text> + + <text string="♚" state="23"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♛" state="24"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♜" state="25"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♝" state="26"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♞" state="27"><color red="0.71" green="0.7" blue="0.69" /></text> + <text string="♟" state="28"><color red="0.71" green="0.7" blue="0.69" /></text> + </element> + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="-2" right="117.5" top="-2" bottom="88" /> + + <bezel element="white"><bounds x="-2.5" y="-2" width="120" height="90.5" /></bezel> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="-0.8" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="-0.8" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="-0.8" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="-0.8" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="-0.8" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="-0.8" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="-0.8" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="-0.8" y="77" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="7" y="85" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="17" y="85" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="27" y="85" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="37" y="85" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="47" y="85" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="57" y="85" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="67" y="85" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="77" y="85" width="2" height="2" /></bezel> + + <!-- chessboard bezel --> + + <bezel element="black"><bounds x="2" y="2" width="82" height="82" /></bezel> + <bezel element="white"><bounds x="3" y="3" width="80" height="80" /></bezel> + + <bezel element="black"><bounds x="13" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="33" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="53" y="2.5" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="73" y="2.5" width="10.5" height="10.5" /></bezel> + + <bezel element="black"><bounds x="2.5" y="13" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="13" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="23" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="33" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="33" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="43" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="53" width="10.5" height="10" /></bezel> + <bezel element="black"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="63" y="53" width="10" height="10" /></bezel> + + <bezel element="black"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel element="black"><bounds x="73" y="63" width="10.5" height="10" /></bezel> + + <bezel element="black"><bounds x="2.5" y="73" width="10.5" height="10.5" /></bezel> + <bezel element="black"><bounds x="23" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="43" y="73" width="10" height="10.5" /></bezel> + <bezel element="black"><bounds x="63" y="73" width="10" height="10.5" /></bezel> + + <bezel name="pos11" element="piece"><bounds x="3" y="3" width="10" height="10" /></bezel> + <bezel name="pos12" element="piece"><bounds x="13" y="3" width="10" height="10" /></bezel> + <bezel name="pos13" element="piece"><bounds x="23" y="3" width="10" height="10" /></bezel> + <bezel name="pos14" element="piece"><bounds x="33" y="3" width="10" height="10" /></bezel> + <bezel name="pos15" element="piece"><bounds x="43" y="3" width="10" height="10" /></bezel> + <bezel name="pos16" element="piece"><bounds x="53" y="3" width="10" height="10" /></bezel> + <bezel name="pos17" element="piece"><bounds x="63" y="3" width="10" height="10" /></bezel> + <bezel name="pos18" element="piece"><bounds x="73" y="3" width="10" height="10" /></bezel> + + <bezel name="pos21" element="piece"><bounds x="3" y="13" width="10" height="10" /></bezel> + <bezel name="pos22" element="piece"><bounds x="13" y="13" width="10" height="10" /></bezel> + <bezel name="pos23" element="piece"><bounds x="23" y="13" width="10" height="10" /></bezel> + <bezel name="pos24" element="piece"><bounds x="33" y="13" width="10" height="10" /></bezel> + <bezel name="pos25" element="piece"><bounds x="43" y="13" width="10" height="10" /></bezel> + <bezel name="pos26" element="piece"><bounds x="53" y="13" width="10" height="10" /></bezel> + <bezel name="pos27" element="piece"><bounds x="63" y="13" width="10" height="10" /></bezel> + <bezel name="pos28" element="piece"><bounds x="73" y="13" width="10" height="10" /></bezel> + + <bezel name="pos31" element="piece"><bounds x="3" y="23" width="10" height="10" /></bezel> + <bezel name="pos32" element="piece"><bounds x="13" y="23" width="10" height="10" /></bezel> + <bezel name="pos33" element="piece"><bounds x="23" y="23" width="10" height="10" /></bezel> + <bezel name="pos34" element="piece"><bounds x="33" y="23" width="10" height="10" /></bezel> + <bezel name="pos35" element="piece"><bounds x="43" y="23" width="10" height="10" /></bezel> + <bezel name="pos36" element="piece"><bounds x="53" y="23" width="10" height="10" /></bezel> + <bezel name="pos37" element="piece"><bounds x="63" y="23" width="10" height="10" /></bezel> + <bezel name="pos38" element="piece"><bounds x="73" y="23" width="10" height="10" /></bezel> + + <bezel name="pos41" element="piece"><bounds x="3" y="33" width="10" height="10" /></bezel> + <bezel name="pos42" element="piece"><bounds x="13" y="33" width="10" height="10" /></bezel> + <bezel name="pos43" element="piece"><bounds x="23" y="33" width="10" height="10" /></bezel> + <bezel name="pos44" element="piece"><bounds x="33" y="33" width="10" height="10" /></bezel> + <bezel name="pos45" element="piece"><bounds x="43" y="33" width="10" height="10" /></bezel> + <bezel name="pos46" element="piece"><bounds x="53" y="33" width="10" height="10" /></bezel> + <bezel name="pos47" element="piece"><bounds x="63" y="33" width="10" height="10" /></bezel> + <bezel name="pos48" element="piece"><bounds x="73" y="33" width="10" height="10" /></bezel> + + <bezel name="pos51" element="piece"><bounds x="3" y="43" width="10" height="10" /></bezel> + <bezel name="pos52" element="piece"><bounds x="13" y="43" width="10" height="10" /></bezel> + <bezel name="pos53" element="piece"><bounds x="23" y="43" width="10" height="10" /></bezel> + <bezel name="pos54" element="piece"><bounds x="33" y="43" width="10" height="10" /></bezel> + <bezel name="pos55" element="piece"><bounds x="43" y="43" width="10" height="10" /></bezel> + <bezel name="pos56" element="piece"><bounds x="53" y="43" width="10" height="10" /></bezel> + <bezel name="pos57" element="piece"><bounds x="63" y="43" width="10" height="10" /></bezel> + <bezel name="pos58" element="piece"><bounds x="73" y="43" width="10" height="10" /></bezel> + + <bezel name="pos61" element="piece"><bounds x="3" y="53" width="10" height="10" /></bezel> + <bezel name="pos62" element="piece"><bounds x="13" y="53" width="10" height="10" /></bezel> + <bezel name="pos63" element="piece"><bounds x="23" y="53" width="10" height="10" /></bezel> + <bezel name="pos64" element="piece"><bounds x="33" y="53" width="10" height="10" /></bezel> + <bezel name="pos65" element="piece"><bounds x="43" y="53" width="10" height="10" /></bezel> + <bezel name="pos66" element="piece"><bounds x="53" y="53" width="10" height="10" /></bezel> + <bezel name="pos67" element="piece"><bounds x="63" y="53" width="10" height="10" /></bezel> + <bezel name="pos68" element="piece"><bounds x="73" y="53" width="10" height="10" /></bezel> + + <bezel name="pos71" element="piece"><bounds x="3" y="63" width="10" height="10" /></bezel> + <bezel name="pos72" element="piece"><bounds x="13" y="63" width="10" height="10" /></bezel> + <bezel name="pos73" element="piece"><bounds x="23" y="63" width="10" height="10" /></bezel> + <bezel name="pos74" element="piece"><bounds x="33" y="63" width="10" height="10" /></bezel> + <bezel name="pos75" element="piece"><bounds x="43" y="63" width="10" height="10" /></bezel> + <bezel name="pos76" element="piece"><bounds x="53" y="63" width="10" height="10" /></bezel> + <bezel name="pos77" element="piece"><bounds x="63" y="63" width="10" height="10" /></bezel> + <bezel name="pos78" element="piece"><bounds x="73" y="63" width="10" height="10" /></bezel> + + <bezel name="pos81" element="piece"><bounds x="3" y="73" width="10" height="10" /></bezel> + <bezel name="pos82" element="piece"><bounds x="13" y="73" width="10" height="10" /></bezel> + <bezel name="pos83" element="piece"><bounds x="23" y="73" width="10" height="10" /></bezel> + <bezel name="pos84" element="piece"><bounds x="33" y="73" width="10" height="10" /></bezel> + <bezel name="pos85" element="piece"><bounds x="43" y="73" width="10" height="10" /></bezel> + <bezel name="pos86" element="piece"><bounds x="53" y="73" width="10" height="10" /></bezel> + <bezel name="pos87" element="piece"><bounds x="63" y="73" width="10" height="10" /></bezel> + <bezel name="pos88" element="piece"><bounds x="73" y="73" width="10" height="10" /></bezel> + + <!-- chessboard leds --> + + <bezel name="led_a1" element="led"><bounds x="3.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b1" element="led"><bounds x="13.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c1" element="led"><bounds x="23.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d1" element="led"><bounds x="33.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e1" element="led"><bounds x="43.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f1" element="led"><bounds x="53.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g1" element="led"><bounds x="63.2" y="11.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h1" element="led"><bounds x="73.2" y="11.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a2" element="led"><bounds x="3.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b2" element="led"><bounds x="13.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c2" element="led"><bounds x="23.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d2" element="led"><bounds x="33.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e2" element="led"><bounds x="43.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f2" element="led"><bounds x="53.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g2" element="led"><bounds x="63.2" y="21.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h2" element="led"><bounds x="73.2" y="21.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a3" element="led"><bounds x="3.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b3" element="led"><bounds x="13.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c3" element="led"><bounds x="23.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d3" element="led"><bounds x="33.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e3" element="led"><bounds x="43.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f3" element="led"><bounds x="53.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g3" element="led"><bounds x="63.2" y="31.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h3" element="led"><bounds x="73.2" y="31.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a4" element="led"><bounds x="3.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b4" element="led"><bounds x="13.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c4" element="led"><bounds x="23.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d4" element="led"><bounds x="33.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e4" element="led"><bounds x="43.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f4" element="led"><bounds x="53.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g4" element="led"><bounds x="63.2" y="41.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h4" element="led"><bounds x="73.2" y="41.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a5" element="led"><bounds x="3.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b5" element="led"><bounds x="13.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c5" element="led"><bounds x="23.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d5" element="led"><bounds x="33.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e5" element="led"><bounds x="43.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f5" element="led"><bounds x="53.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g5" element="led"><bounds x="63.2" y="51.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h5" element="led"><bounds x="73.2" y="51.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a6" element="led"><bounds x="3.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b6" element="led"><bounds x="13.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c6" element="led"><bounds x="23.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d6" element="led"><bounds x="33.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e6" element="led"><bounds x="43.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f6" element="led"><bounds x="53.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g6" element="led"><bounds x="63.2" y="61.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h6" element="led"><bounds x="73.2" y="61.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a7" element="led"><bounds x="3.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b7" element="led"><bounds x="13.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c7" element="led"><bounds x="23.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d7" element="led"><bounds x="33.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e7" element="led"><bounds x="43.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f7" element="led"><bounds x="53.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g7" element="led"><bounds x="63.2" y="71.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h7" element="led"><bounds x="73.2" y="71.3" width="1.5" height="1.5" /></bezel> + + <bezel name="led_a8" element="led"><bounds x="3.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_b8" element="led"><bounds x="13.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_c8" element="led"><bounds x="23.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_d8" element="led"><bounds x="33.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_e8" element="led"><bounds x="43.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_f8" element="led"><bounds x="53.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_g8" element="led"><bounds x="63.2" y="81.3" width="1.5" height="1.5" /></bezel> + <bezel name="led_h8" element="led"><bounds x="73.2" y="81.3" width="1.5" height="1.5" /></bezel> + + <!-- chessboard sensors --> + + <bezel element="hl" inputtag="COL_A" inputmask="0x80"><bounds x="3" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x80"><bounds x="13" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x80"><bounds x="23" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x80"><bounds x="33" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x80"><bounds x="43" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x80"><bounds x="53" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x80"><bounds x="63" y="3" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x80"><bounds x="73" y="3" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x40"><bounds x="3" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x40"><bounds x="13" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x40"><bounds x="23" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x40"><bounds x="33" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x40"><bounds x="43" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x40"><bounds x="53" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x40"><bounds x="63" y="13" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x40"><bounds x="73" y="13" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x20"><bounds x="3" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x20"><bounds x="13" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x20"><bounds x="23" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x20"><bounds x="33" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x20"><bounds x="43" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x20"><bounds x="53" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x20"><bounds x="63" y="23" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x20"><bounds x="73" y="23" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x10"><bounds x="3" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x10"><bounds x="13" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x10"><bounds x="23" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x10"><bounds x="33" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x10"><bounds x="43" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x10"><bounds x="53" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x10"><bounds x="63" y="33" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x10"><bounds x="73" y="33" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x08"><bounds x="3" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x08"><bounds x="13" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x08"><bounds x="23" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x08"><bounds x="33" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x08"><bounds x="43" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x08"><bounds x="53" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x08"><bounds x="63" y="43" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x08"><bounds x="73" y="43" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x04"><bounds x="3" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x04"><bounds x="13" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x04"><bounds x="23" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x04"><bounds x="33" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x04"><bounds x="43" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x04"><bounds x="53" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x04"><bounds x="63" y="53" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x04"><bounds x="73" y="53" width="10" height="10" /><color alpha="0.4" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x02"><bounds x="3" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x02"><bounds x="13" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x02"><bounds x="23" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x02"><bounds x="33" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x02"><bounds x="43" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x02"><bounds x="53" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x02"><bounds x="63" y="63" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x02"><bounds x="73" y="63" width="10" height="10" /><color alpha="0.2" /></bezel> + + <bezel element="hl" inputtag="COL_A" inputmask="0x01"><bounds x="3" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_B" inputmask="0x01"><bounds x="13" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_C" inputmask="0x01"><bounds x="23" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_D" inputmask="0x01"><bounds x="33" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_E" inputmask="0x01"><bounds x="43" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_F" inputmask="0x01"><bounds x="53" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + <bezel element="hl" inputtag="COL_G" inputmask="0x01"><bounds x="63" y="73" width="10" height="10" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="COL_H" inputmask="0x01"><bounds x="73" y="73" width="10" height="10" /><color alpha="0.4" /></bezel> + + <!-- right side --> + + <bezel element="text_chessmaster"><bounds x="89" y="12" width="22" height="2.8" /></bezel> + <bezel element="text_diamond"> <bounds x="106" y="15" width="14" height="2.5" /></bezel> + <bezel element="text_monitor"> <bounds x="91" y="19.5" width="14" height="2" /></bezel> + <bezel element="text_view"> <bounds x="91" y="26.5" width="8" height="2" /></bezel> + <bezel element="text_reset"> <bounds x="99" y="23.0" width="10" height="2" /></bezel> + <bezel element="text_function"> <bounds x="91" y="32.3" width="16" height="2" /></bezel> + <bezel element="text_notation"> <bounds x="91" y="34.7" width="16" height="2" /></bezel> + <bezel element="text_selection"> <bounds x="91" y="39.3" width="18" height="2" /></bezel> + <bezel element="text_dialogue"> <bounds x="91" y="41.7" width="16" height="2" /></bezel> + <bezel element="text_parameter"> <bounds x="91" y="46.3" width="18" height="2" /></bezel> + <bezel element="text_information"><bounds x="91" y="48.7" width="22" height="2" /></bezel> + <bezel element="text_match"> <bounds x="91" y="53.3" width="10" height="2" /></bezel> + <bezel element="text_time"> <bounds x="91" y="55.7" width="8" height="2" /></bezel> + <bezel element="text_board"> <bounds x="91" y="61.5" width="10" height="2" /></bezel> + <bezel element="text_enter"> <bounds x="91" y="68.5" width="10" height="2" /></bezel> + <bezel element="text_move_back"> <bounds x="87" y="83" width="18" height="2" /></bezel> + <bezel element="text_move_fore"> <bounds x="101" y="83" width="18" height="2" /></bezel> + <bezel element="text_playmode"> <bounds x="92" y="73" width="16" height="2" /></bezel> + + <bezel name="monitor_led" element="led"> <bounds x="101" y="19.63" width="1.5" height="1.5" /> </bezel> + <bezel name="playmode_led" element="led"> <bounds x="103" y="73.13" width="1.5" height="1.5" /> </bezel> + <bezel name="reset_line0" element="black_rect"> <bounds x="107.4" y="23.2" width="0.2" height="1.6" /> </bezel> + <bezel name="reset_line1" element="black_rect"> <bounds x="104.7" y="24.0" width="2.9" height="0.2" /> </bezel> + + <bezel element="hlb" inputtag="EXTRA" inputmask="0x01"><bounds x="105" y="18" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="EXTRA" inputmask="0x02"><bounds x="105" y="25" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x40"><bounds x="105" y="32" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x20"><bounds x="105" y="39" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x10"><bounds x="105" y="46" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x08"><bounds x="105" y="53" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x04"><bounds x="105" y="60" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x80"><bounds x="105" y="67" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x02"><bounds x="94" y="77" width="5" height="5" /></bezel> + <bezel element="hlb" inputtag="BUTTONS" inputmask="0x01"><bounds x="108" y="77" width="5" height="5" /></bezel> + + <!-- panel 16seg leds --> + + <bezel name="display_background" element="black_rect"> <bounds x="89" y="2" width="26" height="9.2" /> </bezel> + <bezel name="digit3" element="digit"> <bounds x="90" y="2.5" width="5.66" height="8.5" /></bezel> + <bezel name="digit2" element="digit"> <bounds x="96" y="2.5" width="5.66" height="8.5" /></bezel> + <bezel name="digit1" element="digit"> <bounds x="102" y="2.5" width="5.66" height="8.5" /></bezel> + <bezel name="digit0" element="digit"> <bounds x="108" y="2.5" width="5.66" height="8.5" /></bezel> + + </view> +</mamelayout> diff --git a/src/mame/mame.lst b/src/mame/mame.lst index ec5fe33b018..46a432ac094 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -9352,6 +9352,7 @@ cheekyms // 8004 (c) [1980?] @source:chessmst.cpp chessmst // chessmsta // +chessmstdm // @source:chesstrv.cpp borisdpl // |