summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/by35.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/by35.cpp')
-rw-r--r--src/mame/drivers/by35.cpp49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp
index 09b9e6788cd..bdcbb3630bc 100644
--- a/src/mame/drivers/by35.cpp
+++ b/src/mame/drivers/by35.cpp
@@ -163,7 +163,7 @@ protected:
static solenoid_feature_data const s_solenoid_features_default;
-private:
+protected:
bool m_u10_ca2;
bool m_u10_cb1;
bool m_u10_cb2;
@@ -1106,30 +1106,30 @@ MACHINE_CONFIG_START(by35_state::by35)
genpin_audio(config);
/* Devices */
- MCFG_DEVICE_ADD("pia_u10", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(*this, by35_state, u10_a_r))
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(*this, by35_state, u10_a_w))
- MCFG_PIA_READPB_HANDLER(READ8(*this, by35_state, u10_b_r))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, by35_state, u10_b_w))
- MCFG_PIA_READCA1_HANDLER(READLINE(*this, by35_state, u10_ca1_r))
- MCFG_PIA_READCB1_HANDLER(READLINE(*this, by35_state, u10_cb1_r))
- MCFG_PIA_CA2_HANDLER(WRITELINE(*this, by35_state, u10_ca2_w))
- MCFG_PIA_CB2_HANDLER(WRITELINE(*this, by35_state, u10_cb2_w))
- MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
- MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
+ PIA6821(config, m_pia_u10, 0);
+ m_pia_u10->readpa_handler().set(FUNC(by35_state::u10_a_r));
+ m_pia_u10->writepa_handler().set(FUNC(by35_state::u10_a_w));
+ m_pia_u10->readpb_handler().set(FUNC(by35_state::u10_b_r));
+ m_pia_u10->writepb_handler().set(FUNC(by35_state::u10_b_w));
+ m_pia_u10->readca1_handler().set(FUNC(by35_state::u10_ca1_r));
+ m_pia_u10->readcb1_handler().set(FUNC(by35_state::u10_cb1_r));
+ m_pia_u10->ca2_handler().set(FUNC(by35_state::u10_ca2_w));
+ m_pia_u10->cb2_handler().set(FUNC(by35_state::u10_cb2_w));
+ m_pia_u10->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
+ m_pia_u10->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_z_freq", by35_state, timer_z_freq, attotime::from_hz(100)) // Mains Line Frequency * 2
MCFG_TIMER_DRIVER_ADD(m_zero_crossing_active_timer, by35_state, timer_z_pulse) // Active pulse length from Zero Crossing detector
- MCFG_DEVICE_ADD("pia_u11", PIA6821, 0)
- MCFG_PIA_READPA_HANDLER(READ8(*this, by35_state, u11_a_r))
- MCFG_PIA_WRITEPA_HANDLER(WRITE8(*this, by35_state, u11_a_w))
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, by35_state, u11_b_w))
- MCFG_PIA_READCA1_HANDLER(READLINE(*this, by35_state, u11_ca1_r))
- MCFG_PIA_READCB1_HANDLER(READLINE(*this, by35_state, u11_cb1_r))
- MCFG_PIA_CA2_HANDLER(WRITELINE(*this, by35_state, u11_ca2_w))
- MCFG_PIA_CB2_HANDLER(WRITELINE(*this, by35_state, u11_cb2_w))
- MCFG_PIA_IRQA_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
- MCFG_PIA_IRQB_HANDLER(INPUTLINE("maincpu", M6800_IRQ_LINE))
+ PIA6821(config, m_pia_u11, 0);
+ m_pia_u11->readpa_handler().set(FUNC(by35_state::u11_a_r));
+ m_pia_u11->writepa_handler().set(FUNC(by35_state::u11_a_w));
+ m_pia_u11->writepb_handler().set(FUNC(by35_state::u11_b_w));
+ m_pia_u11->readca1_handler().set(FUNC(by35_state::u11_ca1_r));
+ m_pia_u11->readcb1_handler().set(FUNC(by35_state::u11_cb1_r));
+ m_pia_u11->ca2_handler().set(FUNC(by35_state::u11_ca2_w));
+ m_pia_u11->cb2_handler().set(FUNC(by35_state::u11_cb2_w));
+ m_pia_u11->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
+ m_pia_u11->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_d_freq", by35_state, u11_timer, attotime::from_hz(317)) // 555 timer
MCFG_TIMER_DRIVER_ADD(m_display_refresh_timer, by35_state, timer_d_pulse) // 555 Active pulse length
MACHINE_CONFIG_END
@@ -1139,9 +1139,8 @@ MACHINE_CONFIG_START(as2888_state::as2888_audio)
MCFG_DEVICE_ADD("discrete", DISCRETE, as2888_discrete)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_DEVICE_MODIFY("pia_u11")
- MCFG_PIA_WRITEPB_HANDLER(WRITE8(*this, as2888_state, u11_b_as2888_w))
- MCFG_PIA_CB2_HANDLER(WRITELINE(*this, as2888_state, u11_cb2_as2888_w))
+ m_pia_u11->writepb_handler().set(FUNC(as2888_state::u11_b_as2888_w));
+ m_pia_u11->cb2_handler().set(FUNC(as2888_state::u11_cb2_as2888_w));
MCFG_TIMER_DRIVER_ADD_PERIODIC("timer_s_freq", as2888_state, timer_s, attotime::from_hz(353000)) // Inverter clock on AS-2888 sound board
MCFG_TIMER_DRIVER_ADD(m_snd_sustain_timer, as2888_state, timer_as2888)