diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp index eec48437d00..19b6d074817 100644 --- a/src/mame/drivers/mephisto_montec.cpp +++ b/src/mame/drivers/mephisto_montec.cpp @@ -471,6 +471,7 @@ void mephisto_montec_state::montec(machine_config &config) BEEP(config, m_beeper, 3250).add_route(ALL_OUTPUTS, "mono", 1.0); MEPHISTO_SENSORS_BOARD(config, m_board, 0); + m_board->set_delay(attotime::from_msec(300)); config.set_default_layout(layout_mephisto_montec); } @@ -479,6 +480,7 @@ void mephisto_montec_state::monteciv(machine_config &config) { montec(config); m_maincpu->set_clock(XTAL(8'000'000)); + m_board->set_delay(attotime::from_msec(150)); } void mephisto_montec_state::megaiv(machine_config &config) @@ -489,6 +491,7 @@ void mephisto_montec_state::megaiv(machine_config &config) m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(4'915'200) / (1 << 13))); MEPHISTO_BUTTONS_BOARD(config.replace(), m_board, 0); + m_board->set_delay(attotime::from_msec(250)); m_board->set_disable_leds(true); config.set_default_layout(layout_mephisto_megaiv); } diff --git a/src/mame/layout/chessmst.lay b/src/mame/layout/chessmst.lay index 3ddc2be5b5e..bdc53d071a5 100644 --- a/src/mame/layout/chessmst.lay +++ b/src/mame/layout/chessmst.lay @@ -197,43 +197,43 @@ + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -376,8 +376,8 @@ - - + + diff --git a/src/mame/layout/chessmstdm.lay b/src/mame/layout/chessmstdm.lay index 94a12915ab2..1d48d9bd738 100644 --- a/src/mame/layout/chessmstdm.lay +++ b/src/mame/layout/chessmstdm.lay @@ -193,43 +193,43 @@ + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -373,7 +373,7 @@ - + diff --git a/src/mame/layout/glasgow.lay b/src/mame/layout/glasgow.lay index a53d96a942e..f2e7fb7d450 100644 --- a/src/mame/layout/glasgow.lay +++ b/src/mame/layout/glasgow.lay @@ -13,16 +13,6 @@ - - - - - - - - - - @@ -34,11 +24,6 @@ - - - - - @@ -56,258 +41,352 @@ - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - + + diff --git a/src/mame/layout/mephisto.lay b/src/mame/layout/mephisto.lay index 5204f53d58d..adbace156c9 100644 --- a/src/mame/layout/mephisto.lay +++ b/src/mame/layout/mephisto.lay @@ -14,16 +14,6 @@ - - - - - - - - - - @@ -35,10 +25,6 @@ - - - - @@ -56,290 +42,359 @@ - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/src/mame/layout/mephisto_academy.lay b/src/mame/layout/mephisto_academy.lay index c67fe49c0ae..c1f81f2339e 100644 --- a/src/mame/layout/mephisto_academy.lay +++ b/src/mame/layout/mephisto_academy.lay @@ -1,6 +1,6 @@ - + @@ -9,29 +9,28 @@ - - + + - - - - - - + + + + + + - + - + - @@ -69,13 +68,315 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -102,133 +403,53 @@ - - - + + + - - - - - - - - + + + + + + + + - - + + + + + + + - + + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/src/mame/layout/mephisto_lcd.lay b/src/mame/layout/mephisto_lcd.lay index 0aee33c571f..7f28547f960 100644 --- a/src/mame/layout/mephisto_lcd.lay +++ b/src/mame/layout/mephisto_lcd.lay @@ -9,16 +9,6 @@ - - - - - - - - - - @@ -26,14 +16,10 @@ - + - - - - @@ -66,266 +52,376 @@ - - - - - - - - - - + + + + + + + - - - - - - - - + + + + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - + - - + + + diff --git a/src/mame/layout/mephisto_megaiv.lay b/src/mame/layout/mephisto_megaiv.lay index b90656a2fc9..79fd82476b0 100644 --- a/src/mame/layout/mephisto_megaiv.lay +++ b/src/mame/layout/mephisto_megaiv.lay @@ -14,31 +14,21 @@ - + - - + + - - - - - - - - - - - + @@ -80,17 +70,297 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -105,22 +375,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -128,8 +398,8 @@ - - + + @@ -138,7 +408,7 @@ - + @@ -146,175 +416,80 @@ + + + + + + + + + + + + + + + + + - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + diff --git a/src/mame/layout/mephisto_milano.lay b/src/mame/layout/mephisto_milano.lay index 080dcb47fef..13311ae0c23 100644 --- a/src/mame/layout/mephisto_milano.lay +++ b/src/mame/layout/mephisto_milano.lay @@ -9,16 +9,6 @@ - - - - - - - - - - @@ -26,14 +16,10 @@ - + - - - - @@ -66,9 +52,288 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -80,199 +345,77 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - + + + - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + - - + + diff --git a/src/mame/layout/mephisto_modena.lay b/src/mame/layout/mephisto_modena.lay index 2908d489b04..7f3b79b773e 100644 --- a/src/mame/layout/mephisto_modena.lay +++ b/src/mame/layout/mephisto_modena.lay @@ -14,16 +14,6 @@ - - - - - - - - - - @@ -31,14 +21,10 @@ - + - - - - @@ -71,167 +57,373 @@ - - - - - - + + + + + + + - - - - - - - - + + + + + + - - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + - - + + diff --git a/src/mame/layout/mephisto_mondial2.lay b/src/mame/layout/mephisto_mondial2.lay index 0122999b804..56591e8e52d 100644 --- a/src/mame/layout/mephisto_mondial2.lay +++ b/src/mame/layout/mephisto_mondial2.lay @@ -9,22 +9,8 @@ - - - - - - - - - - - - - - - + @@ -34,14 +20,13 @@ - + - @@ -60,29 +45,308 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -139,174 +403,61 @@ - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + diff --git a/src/mame/layout/mephisto_montec.lay b/src/mame/layout/mephisto_montec.lay index 5e6aa5c2cf8..bfd1e1684a9 100644 --- a/src/mame/layout/mephisto_montec.lay +++ b/src/mame/layout/mephisto_montec.lay @@ -14,31 +14,30 @@ - - + + - - - - - - + + + + + + - + - + - - - + + @@ -80,8 +79,309 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111,8 +411,8 @@ - - + + @@ -121,7 +421,7 @@ - + @@ -130,245 +430,54 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + diff --git a/src/mame/layout/mephisto_smondial2.lay b/src/mame/layout/mephisto_smondial2.lay index 1294e648ca4..a01312b969b 100644 --- a/src/mame/layout/mephisto_smondial2.lay +++ b/src/mame/layout/mephisto_smondial2.lay @@ -14,31 +14,21 @@ - + - - + + - - - - - - - - - - - + @@ -83,17 +73,297 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -108,31 +378,31 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - + + @@ -141,183 +411,88 @@ - - + + + + + + + + + + + + + + + + + + + - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + diff --git a/src/mame/layout/mmodular.lay b/src/mame/layout/mmodular.lay index c79af50ef82..f070e5469b5 100644 --- a/src/mame/layout/mmodular.lay +++ b/src/mame/layout/mmodular.lay @@ -9,30 +9,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -51,229 +27,343 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - + - - + + + diff --git a/src/mame/layout/saitek_risc2500.lay b/src/mame/layout/saitek_risc2500.lay index b2b095749f2..b93932234a7 100644 --- a/src/mame/layout/saitek_risc2500.lay +++ b/src/mame/layout/saitek_risc2500.lay @@ -197,23 +197,23 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + @@ -385,12 +385,12 @@ - + - - - + + + @@ -469,7 +469,7 @@ - + diff --git a/src/mame/machine/mmboard.cpp b/src/mame/machine/mmboard.cpp index 2e00ab158f9..66340bf3e11 100644 --- a/src/mame/machine/mmboard.cpp +++ b/src/mame/machine/mmboard.cpp @@ -24,173 +24,28 @@ DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODUL, mephisto_display_modul_device, "mdisp // IMPLEMENTATION //*************************************************************************** -static INPUT_PORTS_START( mephisto_sensors_board ) - PORT_START("IN.0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_START("IN.1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_START("IN.2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_START("IN.3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_START("IN.4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_START("IN.5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_START("IN.6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_START("IN.7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_TOGGLE -INPUT_PORTS_END - -static INPUT_PORTS_START( mephisto_buttons_board ) - PORT_START("IN.0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) - PORT_START("IN.1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) - PORT_START("IN.2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) - PORT_START("IN.3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) - PORT_START("IN.4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) - PORT_START("IN.5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) - PORT_START("IN.6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) - PORT_START("IN.7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER) -INPUT_PORTS_END - - //------------------------------------------------- -// input_ports - device-specific input ports +// device_add_mconfig - add device-specific +// machine configuration //------------------------------------------------- -ioport_constructor mephisto_sensors_board_device::device_input_ports() const +void mephisto_sensors_board_device::device_add_mconfig(machine_config &config) { - return INPUT_PORTS_NAME( mephisto_sensors_board ); + SENSORBOARD(config, m_board); + m_board->set_type(sensorboard_device::MAGNETS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); } //------------------------------------------------- -// input_ports - device-specific input ports +// device_add_mconfig - add device-specific +// machine configuration //------------------------------------------------- -ioport_constructor mephisto_buttons_board_device::device_input_ports() const +void mephisto_buttons_board_device::device_add_mconfig(machine_config &config) { - return INPUT_PORTS_NAME( mephisto_buttons_board ); + SENSORBOARD(config, m_board); + m_board->set_type(sensorboard_device::BUTTONS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); } //************************************************************************** @@ -203,7 +58,8 @@ ioport_constructor mephisto_buttons_board_device::device_input_ports() const mephisto_board_device::mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, type, tag, owner, clock) - , m_sensors(*this, "IN.%u", 0) + , m_board(*this, "board") + , m_sensordelay(attotime::from_msec(150)) , m_led(*this, "led%u", 0U) , m_disable_leds(false) { @@ -241,6 +97,8 @@ void mephisto_board_device::device_start() save_item(NAME(m_mux)); save_item(NAME(m_leds)); save_item(NAME(m_leds_state)); + + m_board->set_delay(m_sensordelay); } //------------------------------------------------- @@ -283,7 +141,7 @@ READ8_MEMBER( mephisto_board_device::input_r ) for (int i=0; i<8; i++) if (!BIT(m_mux, i)) - data &= m_sensors[i]->read(); + data &= ~m_board->read_rank(i); return data; } diff --git a/src/mame/machine/mmboard.h b/src/mame/machine/mmboard.h index 6df2c3f828e..eed4a61d818 100644 --- a/src/mame/machine/mmboard.h +++ b/src/mame/machine/mmboard.h @@ -12,6 +12,7 @@ #pragma once +#include "machine/sensorboard.h" #include "sound/beep.h" #include "video/hd44780.h" #include "emupal.h" @@ -33,6 +34,7 @@ public: // configuration helpers void set_disable_leds(int _disable_leds) { m_disable_leds = _disable_leds; } + void set_delay(attotime _sensordelay) { m_sensordelay = _sensordelay; } DECLARE_READ8_MEMBER(input_r); DECLARE_WRITE8_MEMBER(led_w); @@ -47,8 +49,9 @@ protected: virtual void device_start() override; virtual void device_reset() override; -private: - required_ioport_array<8> m_sensors; +protected: + required_device m_board; + attotime m_sensordelay; output_finder<64> m_led; emu_timer * m_leds_update_timer; emu_timer * m_leds_refresh_timer; @@ -69,7 +72,7 @@ public: protected: // optional information overrides - virtual ioport_constructor device_input_ports() const override; + virtual void device_add_mconfig(machine_config &config) override; }; @@ -84,7 +87,7 @@ public: protected: // optional information overrides - virtual ioport_constructor device_input_ports() const override; + virtual void device_add_mconfig(machine_config &config) override; };