From d0ea8947a7fa51410f856cdac6712b935f42b992 Mon Sep 17 00:00:00 2001 From: hap Date: Sun, 14 Jul 2019 17:02:48 +0200 Subject: borisdpl: add chesspieces (nw) --- src/mame/drivers/aci_borisdpl.cpp | 5 + src/mame/drivers/aci_ggm.cpp | 2 +- src/mame/drivers/aci_prodigy.cpp | 63 ++-- src/mame/drivers/saitek_chesstrv.cpp | 2 +- src/mame/layout/aci_borisdpl.lay | 642 ++++++++++++++++++++++++++++++----- src/mame/layout/aci_prodigy.lay | 40 +-- src/mame/layout/saitek_chesstrv.lay | 5 +- 7 files changed, 615 insertions(+), 144 deletions(-) diff --git a/src/mame/drivers/aci_borisdpl.cpp b/src/mame/drivers/aci_borisdpl.cpp index 4bb14c2cbdf..77cccb8fbed 100644 --- a/src/mame/drivers/aci_borisdpl.cpp +++ b/src/mame/drivers/aci_borisdpl.cpp @@ -20,6 +20,7 @@ as SL90259. #include "emu.h" #include "cpu/f8/f8.h" #include "machine/f3853.h" +#include "machine/sensorboard.h" #include "video/pwm.h" // internal artwork @@ -200,6 +201,10 @@ void borisdpl_state::borisdpl(machine_config &config) psu.read_b().set(FUNC(borisdpl_state::ram_address_r)); psu.write_b().set(FUNC(borisdpl_state::ram_address_w)); + // built-in chessboard is not electronic + sensorboard_device &board(SENSORBOARD(config, "board").set_type(sensorboard_device::NOSENSORS)); + board.init_cb().set("board", FUNC(sensorboard_device::preset_chess)); + /* video hardware */ PWM_DISPLAY(config, m_display).set_size(8, 7); m_display->set_segmask(0xff, 0x7f); diff --git a/src/mame/drivers/aci_ggm.cpp b/src/mame/drivers/aci_ggm.cpp index 78930f53dab..6bdbfab46fb 100644 --- a/src/mame/drivers/aci_ggm.cpp +++ b/src/mame/drivers/aci_ggm.cpp @@ -213,7 +213,7 @@ WRITE_LINE_MEMBER(ggm_state::shift_data_w) WRITE8_MEMBER(ggm_state::select_w) { - // input mux, digit select + // PA0-PA7: input mux, digit select m_inp_mux = data; update_display(); } diff --git a/src/mame/drivers/aci_prodigy.cpp b/src/mame/drivers/aci_prodigy.cpp index c2e57ced24f..4601b02f337 100644 --- a/src/mame/drivers/aci_prodigy.cpp +++ b/src/mame/drivers/aci_prodigy.cpp @@ -5,6 +5,8 @@ Applied Concepts Destiny Prodigy Like most other chess computers by ACI, it was also distributed by Chafitz. +The chess engine is Morphy, which in turn is based on Sargon 2.5. + ******************************************************************************* PCB notes: @@ -170,14 +172,14 @@ READ8_MEMBER(prodigy_state::input1_r) { u8 data = 0; - // d0-d7: multiplexed inputs + // PA0-PA7: multiplexed inputs // read chessboard sensors via 74145 Q0-Q7 if (m_select < 8) data = m_board->read_file(m_select); - // read keypad(low) via 74145 Q8,Q9 + // read keypad(high) via 74145 Q8,Q9 else if (m_select == 8 || m_select == 9) - data = m_inputs[m_select - 8]->read() & 0xff; + data = m_inputs[m_select - 8]->read() >> 2 & 0xff; return ~data; } @@ -186,22 +188,22 @@ READ8_MEMBER(prodigy_state::input2_r) { u8 data = 0; - // d4,d5: keypad(high) via 74145 Q8,Q9 + // PB4,PB5: keypad(low) via 74145 Q8,Q9 if (m_select == 8 || m_select == 9) - data = (m_inputs[m_select - 8]->read() >> 8 & 3) << 4; + data = (m_inputs[m_select - 8]->read() & 3) << 4; - // d6: ? + // PB6: ? return ~data; } WRITE8_MEMBER(prodigy_state::control_w) { - // d0-d3: 74145 + // PB0-PB3: 74145 m_select = data & 0xf; update_display(); - // d7: speaker out + // PB7: speaker out m_dac->write(BIT(data, 7)); } @@ -213,9 +215,10 @@ WRITE8_MEMBER(prodigy_state::control_w) void prodigy_state::main_map(address_map &map) { + map.global_mask(0x7fff); map(0x0000, 0x07ff).ram(); map(0x2000, 0x200f).m(m_via, FUNC(via6522_device::map)); - map(0x6000, 0x7fff).mirror(0x8000).rom(); + map(0x6000, 0x7fff).rom(); } @@ -226,28 +229,28 @@ void prodigy_state::main_map(address_map &map) static INPUT_PORTS_START( prodigy ) PORT_START("IN.0") - PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D 4 / Rook") - PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G 7") - PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Restore") - PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE") // clear entry - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level") - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Change Board") - PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Verify") - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Go") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A 1 / Pawn") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("Go") + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A 1 / Pawn") + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D 4 / Rook") + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G 7") + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Restore") + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("CE") // clear entry + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Level") + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_X) PORT_NAME("Change Board") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("Verify") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") PORT_START("IN.1") - PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E 5 / Queen") - PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H 8") - PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Halt / Hint") - PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_S) PORT_NAME("Audio") - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Time / Number") - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F 6 / King") - PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C 3 / Bishop") - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("White") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Black") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B 2 / Knight") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_NAME("Black") + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B 2 / Knight") + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E 5 / Queen") + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H 8") + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Halt / Hint") + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Audio") + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Time / Number") + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F 6 / King") + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C 3 / Bishop") + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("White") INPUT_PORTS_END @@ -293,7 +296,7 @@ void prodigy_state::prodigy(machine_config &config) ROM_START( prodigy ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("007-707101", 0x6000, 0x02000, CRC(8d60345a) SHA1(fff18ff12e1b1be91f8eac1178605a682564eff2) ) + ROM_LOAD("007-707101", 0x6000, 0x2000, CRC(8d60345a) SHA1(fff18ff12e1b1be91f8eac1178605a682564eff2) ) ROM_END } // anonymous namespace diff --git a/src/mame/drivers/saitek_chesstrv.cpp b/src/mame/drivers/saitek_chesstrv.cpp index c21c0242a06..189a3fe808a 100644 --- a/src/mame/drivers/saitek_chesstrv.cpp +++ b/src/mame/drivers/saitek_chesstrv.cpp @@ -22,8 +22,8 @@ digit DP lights up). #include "emu.h" #include "cpu/f8/f8.h" #include "machine/f3853.h" -#include "video/pwm.h" #include "machine/sensorboard.h" +#include "video/pwm.h" // internal artwork #include "saitek_chesstrv.lh" // clickable diff --git a/src/mame/layout/aci_borisdpl.lay b/src/mame/layout/aci_borisdpl.lay index d391a8cc101..0fca0a41167 100644 --- a/src/mame/layout/aci_borisdpl.lay +++ b/src/mame/layout/aci_borisdpl.lay @@ -3,10 +3,11 @@ - - - - + + + + + @@ -31,15 +32,15 @@ - + - + - + @@ -49,19 +50,19 @@ - + - + - + - + @@ -71,15 +72,15 @@ - + - + - + @@ -89,19 +90,19 @@ - + - + - + - + @@ -111,15 +112,15 @@ - + - + - + @@ -129,97 +130,531 @@ - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -230,18 +665,21 @@ - - - - - - - - + + + + + + + + + - - + + + + @@ -294,25 +732,47 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/aci_prodigy.lay b/src/mame/layout/aci_prodigy.lay index 0c68ddb666d..e09d56a9b73 100644 --- a/src/mame/layout/aci_prodigy.lay +++ b/src/mame/layout/aci_prodigy.lay @@ -708,26 +708,26 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/saitek_chesstrv.lay b/src/mame/layout/saitek_chesstrv.lay index f71a5902764..b1fc0ccb8a0 100644 --- a/src/mame/layout/saitek_chesstrv.lay +++ b/src/mame/layout/saitek_chesstrv.lay @@ -481,7 +481,7 @@ - + @@ -491,6 +491,9 @@ + + + -- cgit v1.2.3