diff options
author | hap <happppp@users.noreply.github.com> | 2019-06-29 14:41:12 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2019-06-29 14:41:24 +0200 |
commit | 106c63c749a7472b828330a27cb4dcfdcf4bcef8 (patch) | |
tree | e03d2c7d92bc82f9b90f1a0d337b754f9dc6ba66 | |
parent | 4064f2ba8297b88c30155db09ef7d5ead9421475 (diff) |
mk1: use pwm_display (nw)
-rw-r--r-- | src/devices/machine/sensorboard.cpp | 9 | ||||
-rw-r--r-- | src/mame/drivers/novag_mk1.cpp | 191 | ||||
-rw-r--r-- | src/mame/drivers/novag_presto.cpp | 12 | ||||
-rw-r--r-- | src/mame/drivers/novag_sexpert.cpp | 8 | ||||
-rw-r--r-- | src/mame/layout/cmpchess.lay | 32 | ||||
-rw-r--r-- | src/mame/layout/cncchess.lay | 36 | ||||
-rw-r--r-- | src/mame/layout/novag_mk1.lay | 32 | ||||
-rw-r--r-- | src/mame/layout/scisys_chesstrv.lay | 20 |
8 files changed, 152 insertions, 188 deletions
diff --git a/src/devices/machine/sensorboard.cpp b/src/devices/machine/sensorboard.cpp index 7f2bee9ae04..f1691939a5f 100644 --- a/src/devices/machine/sensorboard.cpp +++ b/src/devices/machine/sensorboard.cpp @@ -221,12 +221,15 @@ u8 sensorboard_device::read_sensor(u8 x, u8 y) } else { + // buttons are forced + if (m_inp_ui->read() & 1) + return live_state; + // buttons are blocked - if (m_inp_ui->read() & 2) + else if (m_inp_ui->read() & 2) return 0; - // buttons are forced - if (m_sensordelay == attotime::never || m_inp_ui->read() & 1) + else if (m_sensordelay == attotime::never) return live_state; return (pos == m_sensorpos) ? 1 : 0; diff --git a/src/mame/drivers/novag_mk1.cpp b/src/mame/drivers/novag_mk1.cpp index 77e74f3be83..776ce71f3b9 100644 --- a/src/mame/drivers/novag_mk1.cpp +++ b/src/mame/drivers/novag_mk1.cpp @@ -9,6 +9,10 @@ Initial version by PeT mess@utanet.at 2000,2001. TODO: - cncchess sound is wrong, it should be a long dual-tone alarm sound +BTANB: +- digits may flash briefly after entering a command, eg. the "b" or "P" digit + after setting board preset, this happens on the real device + ******************************************************************************* The MK I was a clone of Data Cash Systems's CompuChess (1977, one of the first @@ -67,6 +71,7 @@ Fairchild 3850PK CPU @ 2MHz (LC circuit), 3853PK #include "cpu/f8/f8.h" #include "machine/f3853.h" #include "machine/timer.h" +#include "video/pwm.h" #include "sound/beep.h" #include "speaker.h" @@ -84,13 +89,10 @@ public: mk1_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_display(*this, "display"), m_beeper_off(*this, "beeper_off"), m_beeper(*this, "beeper"), - m_keypad(*this, "LINE%u", 1U), - m_delay_display(*this, "delay_display_%u", 0), - m_out_digit(*this, "digit%u", 0U), - m_out_led(*this, "led%u", 0U), - m_out_leda(*this, "led%ua", 0U) + m_inputs(*this, "IN.%u", 0) { } void cmpchess(machine_config &config); @@ -106,13 +108,10 @@ protected: private: // devices/pointers required_device<cpu_device> m_maincpu; + required_device<pwm_display_device> m_display; optional_device<timer_device> m_beeper_off; optional_device<beep_device> m_beeper; - required_ioport_array<4> m_keypad; - required_device_array<timer_device, 4> m_delay_display; - output_finder<4> m_out_digit; - output_finder<4> m_out_led; - output_finder<4> m_out_leda; + required_ioport_array<4> m_inputs; void main_map(address_map &map); void main_io(address_map &map); @@ -120,8 +119,6 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(beeper_off) { m_beeper->set_state(0); } TIMER_DEVICE_CALLBACK_MEMBER(blink) { m_blink = !m_blink; update_display(); } - TIMER_DEVICE_CALLBACK_MEMBER(delay_display); - void clear_digit(int i); void update_display(); void update_reset(ioport_value state); @@ -143,11 +140,6 @@ private: void mk1_state::machine_start() { - // resolve handlers - m_out_digit.resolve(); - m_out_led.resolve(); - m_out_leda.resolve(); - // zerofill m_inp_mux = 0; m_digit_select = 0; @@ -166,14 +158,6 @@ void mk1_state::machine_reset() update_reset(ioport("RESET")->read()); } -void mk1_state::clear_digit(int i) -{ - // clear digit + connected leds - m_out_digit[i] = 0; - m_out_led[i] = 0; - m_out_leda[i] = 0; -} - void mk1_state::update_reset(ioport_value state) { // reset switch is tied to F3850 RESET pin @@ -182,9 +166,8 @@ void mk1_state::update_reset(ioport_value state) // clear display if (state) { - m_digit_select = 0xff; - for (int i = 0; i < 4; i++) - clear_digit(i); + m_digit_select = 0; + update_display(); } } @@ -194,36 +177,6 @@ void mk1_state::update_reset(ioport_value state) Devices, I/O ******************************************************************************/ -// display handling - -TIMER_DEVICE_CALLBACK_MEMBER(mk1_state::delay_display) -{ - // clear digits if inactive - if (BIT(m_digit_select, param)) - clear_digit(param); -} - -void mk1_state::update_display() -{ - // output digits if active - for (int i = 0; i < 4; i++) - { - if (!BIT(m_digit_select, i)) - { - // display panel goes into automated blink mode if DP segment is held high, - // and DP segment itself by default only appears to be active if no other segments are - u8 dmask = (m_digit_data == 1) ? 0x80 : 0x7f; - u8 bmask = (m_blink && m_digit_data & 1) ? 0 : 0xff; - m_out_digit[i] = bitswap<8>(m_digit_data,0,2,1,3,4,5,6,7) & dmask & bmask; - - // output led separately too - m_out_led[i] = (m_out_digit[i] & 0x80) ? 1 : 0; - m_out_leda[i] = m_digit_data & bmask & 1; // for ignoring dmask above - } - } -} - - // I/O handlers READ8_MEMBER(mk1_state::beeper_r) @@ -238,10 +191,23 @@ READ8_MEMBER(mk1_state::beeper_r) return m_maincpu->space(AS_PROGRAM).read_byte(offset); } +void mk1_state::update_display() +{ + // display panel goes into automated blink mode if DP segment is held high, + // and DP segment itself by default only appears to be active if no other segments are + u8 dmask = (m_digit_data == 1) ? 0x80 : 0x7f; + u8 bmask = (m_blink && m_digit_data & 1) ? 0 : 0xff; + u8 bstate = m_digit_data & bmask & 1; // DP state for ignoring dmask + + u8 digit_data = bitswap<8>(m_digit_data,0,2,1,3,4,5,6,7) & dmask & bmask; + m_display->matrix(m_digit_select, bstate << 8 | digit_data); +} + WRITE8_MEMBER(mk1_state::digit_data_w) { // digit segment data m_digit_data = data; + update_display(); } READ8_MEMBER(mk1_state::digit_data_r) @@ -252,12 +218,7 @@ READ8_MEMBER(mk1_state::digit_data_r) WRITE8_MEMBER(mk1_state::digit_select_w) { // d0-d3: digit select (active low) - // they're strobed, so on rising edge, delay them going off to prevent flicker or stuck display - for (int i = 0; i < 4; i++) - if (BIT(~m_digit_select & data, i)) - m_delay_display[i]->adjust(attotime::from_msec(20), i); - - m_digit_select = data; + m_digit_select = ~data & 0xf; update_display(); } @@ -273,13 +234,13 @@ READ8_MEMBER(mk1_state::input_r) // d0-d3: multiplexed inputs from d4-d7 for (int i = 0; i < 4; i++) - if (m_inp_mux & m_keypad[i]->read()) + if (m_inp_mux & m_inputs[i]->read() << 4) data |= 1 << i; // d4-d7: multiplexed inputs from d0-d3 for (int i = 0; i < 4; i++) if (BIT(m_inp_mux, i)) - data |= m_keypad[i]->read(); + data |= m_inputs[i]->read() << 4; return data; } @@ -318,58 +279,58 @@ void mk1_state::cnc_io(address_map &map) ******************************************************************************/ static INPUT_PORTS_START( cmpchess ) - PORT_START("LINE1") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("A / White King") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("B / White Queen") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("C / White Bishop") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("D / Play") - - PORT_START("LINE2") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("E / White Knight") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("F / White Rook") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("G / White Pawn") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_M) PORT_NAME("H / md") // more data - - PORT_START("LINE3") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1 / Black King") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2 / Black Queen") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3 / Black Bishop") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4 / fp") // find piece(position) - - PORT_START("LINE4") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5 / Black Knight") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6 / Black Rook") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7 / Black Pawn") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8 / ep") // enter piece(position) + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("D / Play") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("C / White Bishop") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("B / White Queen") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("A / White King") + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_M) PORT_NAME("H / md") // more data + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("G / White Pawn") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("F / White Rook") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("E / White Knight") + + PORT_START("IN.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4 / fp") // find piece(position) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3 / Black Bishop") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2 / Black Queen") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1 / Black King") + + PORT_START("IN.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("8 / ep") // enter piece(position) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("7 / Black Pawn") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6 / Black Rook") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5 / Black Knight") PORT_START("RESET") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, mk1_state, reset_switch, nullptr) PORT_NAME("Reset Switch") // L.S. switch on the MK I INPUT_PORTS_END static INPUT_PORTS_START( cncchess ) - PORT_START("LINE1") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1 / Black Pawn") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2 / Black Rook") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3 / Black Knight") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4 / Black Bishop") - - PORT_START("LINE2") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5 / Black Queen") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6 / Black King") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_S) PORT_NAME("7 / SP") // search piece (same as fp) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_I) PORT_NAME("8 / IP") // insert piece (same as ep) - - PORT_START("LINE3") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("A / White Pawn") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("B / White Rook") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("C / White Knight") - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("D / White Bishop") - - PORT_START("LINE4") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("E / White Queen") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("F / White King") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_M) PORT_NAME("G / MD") // more data - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("H / GO") + PORT_START("IN.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("4 / Black Bishop") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("3 / Black Knight") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("2 / Black Rook") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("1 / Black Pawn") + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_I) PORT_NAME("8 / IP") // insert piece (same as ep) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_S) PORT_NAME("7 / SP") // search piece (same as fp) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("6 / Black King") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("5 / Black Queen") + + PORT_START("IN.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_NAME("D / White Bishop") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_NAME("C / White Knight") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_NAME("B / White Rook") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_NAME("A / White Pawn") + + PORT_START("IN.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("H / GO") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_M) PORT_NAME("G / MD") // more data + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_NAME("F / White King") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("E / White Queen") PORT_START("RESET") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mk1_state, reset_switch, nullptr) PORT_NAME("Reset") @@ -393,11 +354,11 @@ void mk1_state::cmpchess(machine_config &config) smi.int_req_callback().set_inputline("maincpu", F8_INPUT_LINE_INT_REQ); /* video hardware */ - for (int i = 0; i < 4; i++) - TIMER(config, m_delay_display[i]).configure_generic(FUNC(mk1_state::delay_display)); + PWM_DISPLAY(config, m_display).set_size(4, 8+1); + m_display->set_segmask(0xf, 0xff); + config.set_default_layout(layout_cmpchess); TIMER(config, "blink_display").configure_periodic(FUNC(mk1_state::blink), attotime::from_msec(250)); // approximation - config.set_default_layout(layout_cmpchess); } void mk1_state::mk1(machine_config &config) diff --git a/src/mame/drivers/novag_presto.cpp b/src/mame/drivers/novag_presto.cpp index d9717f9e4a7..3b8293589c2 100644 --- a/src/mame/drivers/novag_presto.cpp +++ b/src/mame/drivers/novag_presto.cpp @@ -5,13 +5,6 @@ Novag Presto / Novag Octo -TODO: -- controls are too sensitive, is there a bug in the CPU core timer emulation? - 6MHz: valid (single) button press registered between 307ms and 436ms, - 12MHz: between 154ms and 218ms, 15MHz: between 123ms and 174ms. - -******************************************************************************* - Hardware notes (Presto): - NEC D80C49C MCU(serial 186), OSC from LC circuit measured ~6MHz - buzzer, 16+4 LEDs, 8*8 chessboard buttons @@ -20,6 +13,11 @@ Octo has a NEC D80C49HC MCU(serial 111), OSC from LC circuit measured ~12MHz The buzzer has a little electronic circuit going on, not sure whatfor. Otherwise, it's identical to Presto. The MCU internal ROM is same too. +TODO: +- controls are too sensitive, is there a bug in the CPU core timer emulation? + 6MHz: valid (single) button press registered between 307ms and 436ms, + 12MHz: between 154ms and 218ms, 15MHz: between 123ms and 174ms. + ******************************************************************************/ #include "emu.h" diff --git a/src/mame/drivers/novag_sexpert.cpp b/src/mame/drivers/novag_sexpert.cpp index e70b9ca487e..8728b4d37a4 100644 --- a/src/mame/drivers/novag_sexpert.cpp +++ b/src/mame/drivers/novag_sexpert.cpp @@ -5,11 +5,6 @@ Novag Super Expert (model 878/887/902) / Novag Super Forte -TODO: -- sforte lcd_data_w implementation is wrong, especially led handling - -******************************************************************************* - Hardware notes (Super Expert) - 65C02 @ 5MHz or 6MHz (10MHz or 12MHz XTAL) - 8KB RAM battery-backed, 3*32KB ROM @@ -23,6 +18,9 @@ I/O via TTL, hardware design was very awkward. Super Forte is very similar, just a cheaper plastic case and chessboard buttons instead of magnet sensors. +TODO: +- sforte lcd_data_w implementation is wrong, especially led handling + ******************************************************************************/ #include "emu.h" diff --git a/src/mame/layout/cmpchess.lay b/src/mame/layout/cmpchess.lay index 63fee7cc253..8cbe67f0189 100644 --- a/src/mame/layout/cmpchess.lay +++ b/src/mame/layout/cmpchess.lay @@ -246,22 +246,22 @@ <bezel element="text_b16a"><bounds x="46.1" y="66.5" width="8.8" height="5" /></bezel> <bezel element="text_b16b"><bounds x="46.1" y="71.3" width="8.8" height="3" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x80"><bounds x="10" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x40"><bounds x="22" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x20"><bounds x="34" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x10"><bounds x="46" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x80"><bounds x="10" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x40"><bounds x="22" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x20"><bounds x="34" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x10"><bounds x="46" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x80"><bounds x="10" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x40"><bounds x="22" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x20"><bounds x="34" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x10"><bounds x="46" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x80"><bounds x="10" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x40"><bounds x="22" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x20"><bounds x="34" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x10"><bounds x="46" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="10" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="22" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="34" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="46" y="30" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="10" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="22" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="34" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="46" y="42" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="10" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="22" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="34" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="46" y="54" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="10" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="22" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="34" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="46" y="66" width="9" height="9" /><color alpha="0.2" /></bezel> </view> </mamelayout> diff --git a/src/mame/layout/cncchess.lay b/src/mame/layout/cncchess.lay index 25a05b5f8f6..3d34ae3714c 100644 --- a/src/mame/layout/cncchess.lay +++ b/src/mame/layout/cncchess.lay @@ -201,8 +201,8 @@ <bezel element="disk_blackb"><bounds x="33.82" y="27.0" width="0.55" height="0.55" /></bezel> <bezel element="disk_blackb"><bounds x="38.82" y="27.0" width="0.55" height="0.55" /></bezel> <bezel element="disk_blackb"><bounds x="41.82" y="27.0" width="0.55" height="0.55" /></bezel> - <bezel name="led1a" element="led"><bounds x="35.15" y="24.0" width="0.45" height="0.45" /></bezel> - <bezel name="led0a" element="led"><bounds x="35.0" y="26.05" width="0.45" height="0.45" /></bezel> + <bezel name="1.8" element="led"><bounds x="35.15" y="24.0" width="0.45" height="0.45" /></bezel> + <bezel name="0.8" element="led"><bounds x="35.0" y="26.05" width="0.45" height="0.45" /></bezel> <bezel element="red"><bounds x="25.3" y="22" width="20" height="6.5" /><color alpha="0.15" /></bezel> <!-- button panel --> @@ -258,22 +258,22 @@ <bezel element="text_b16a"><bounds x="48.10" y="36.6" width="2.4" height="1.2" /></bezel> <bezel element="text_b16b"><bounds x="48.15" y="38.2" width="2.4" height="1.9" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x80"><bounds x="20" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x40"><bounds x="24" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x20"><bounds x="28" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x10"><bounds x="32" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x80"><bounds x="36" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x40"><bounds x="40" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x20"><bounds x="44" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x10"><bounds x="48" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x80"><bounds x="20" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x40"><bounds x="24" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x20"><bounds x="28" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x10"><bounds x="32" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x80"><bounds x="36" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x40"><bounds x="40" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x20"><bounds x="44" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x10"><bounds x="48" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="20" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="24" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="28" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="32" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="36" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="40" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="44" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="48" y="30" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="20" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="24" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="28" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="32" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="36" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="40" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="44" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="48" y="36.2" width="2.6" height="4.5" /><color alpha="0.25" /></bezel> <bezel element="orange"><bounds x="10.8" y="37.15" width="4.5" height="2.6" /></bezel> <bezel element="text_br"><bounds x="10.9" y="37.65" width="4.3" height="1.5" /></bezel> diff --git a/src/mame/layout/novag_mk1.lay b/src/mame/layout/novag_mk1.lay index d42b84108f6..ae93fcb698f 100644 --- a/src/mame/layout/novag_mk1.lay +++ b/src/mame/layout/novag_mk1.lay @@ -249,22 +249,22 @@ <bezel element="text_b16b"><bounds x="46.1" y="66.5" width="5.5" height="3" /></bezel> <bezel element="text_b16a"><bounds x="50.5" y="70.5" width="3.5" height="4" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x80"><bounds x="10" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x40"><bounds x="22" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x20"><bounds x="34" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE1" inputmask="0x10"><bounds x="46" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x80"><bounds x="10" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x40"><bounds x="22" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x20"><bounds x="34" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE2" inputmask="0x10"><bounds x="46" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x80"><bounds x="10" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x40"><bounds x="22" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x20"><bounds x="34" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE3" inputmask="0x10"><bounds x="46" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x80"><bounds x="10" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x40"><bounds x="22" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x20"><bounds x="34" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> - <bezel element="hl" inputtag="LINE4" inputmask="0x10"><bounds x="46" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x08"><bounds x="10" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x04"><bounds x="22" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x02"><bounds x="34" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.0" inputmask="0x01"><bounds x="46" y="30" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x08"><bounds x="10" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x04"><bounds x="22" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x02"><bounds x="34" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.1" inputmask="0x01"><bounds x="46" y="42" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x08"><bounds x="10" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x04"><bounds x="22" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x02"><bounds x="34" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.2" inputmask="0x01"><bounds x="46" y="54" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x08"><bounds x="10" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x04"><bounds x="22" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x02"><bounds x="34" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> + <bezel element="hl" inputtag="IN.3" inputmask="0x01"><bounds x="46" y="66" width="9" height="9" /><color alpha="0.25" /></bezel> </view> </mamelayout> diff --git a/src/mame/layout/scisys_chesstrv.lay b/src/mame/layout/scisys_chesstrv.lay index d3c7c0f7337..968ff146e9f 100644 --- a/src/mame/layout/scisys_chesstrv.lay +++ b/src/mame/layout/scisys_chesstrv.lay @@ -186,6 +186,10 @@ <element name="hlbb" defstate="0"> <text string=" "><bounds x="0" y="0" width="1" height="1" /></text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="0" green="0" blue="0" /> + </disk> </element> <element name="piece" defstate="0"> @@ -323,14 +327,14 @@ <param name="y" start="0" increment="10" /> <param name="i" start="8" increment="-1" /> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /></bezel> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /></bezel> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /></bezel> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /></bezel> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /></bezel> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /></bezel> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /></bezel> - <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel> <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel> |