diff options
Diffstat (limited to 'src/mame/drivers/k28.cpp')
-rw-r--r-- | src/mame/drivers/k28.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp index d1652dde306..53dfffa4e92 100644 --- a/src/mame/drivers/k28.cpp +++ b/src/mame/drivers/k28.cpp @@ -53,7 +53,7 @@ public: private: // devices - required_device<cpu_device> m_maincpu; + required_device<i8021_device> m_maincpu; required_device<tms6100_device> m_tms6100; required_device<votrax_sc01_device> m_speech; required_device<timer_device> m_onbutton_timer; @@ -448,29 +448,26 @@ INPUT_PORTS_END ***************************************************************************/ -MACHINE_CONFIG_START(k28_state::k28) - +void k28_state::k28(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", I8021, 3.579545_MHz_XTAL) - MCFG_MCS48_PORT_BUS_OUT_CB(WRITE8(*this, k28_state, mcu_p0_w)) - MCFG_MCS48_PORT_P1_IN_CB(READ8(*this, k28_state, mcu_p1_r)) - MCFG_MCS48_PORT_P2_IN_CB(READ8(*this, k28_state, mcu_p2_r)) - MCFG_MCS48_PORT_P2_OUT_CB(WRITE8(*this, k28_state, mcu_p2_w)) - MCFG_MCS48_PORT_PROG_OUT_CB(WRITELINE(*this, k28_state, mcu_prog_w)) - MCFG_MCS48_PORT_T1_IN_CB(READLINE("speech", votrax_sc01_device, request)) // SC-01 A/R pin + I8021(config, m_maincpu, 3.579545_MHz_XTAL); + m_maincpu->bus_out_cb().set(FUNC(k28_state::mcu_p0_w)); + m_maincpu->p1_in_cb().set(FUNC(k28_state::mcu_p1_r)); + m_maincpu->p2_in_cb().set(FUNC(k28_state::mcu_p2_r)); + m_maincpu->p2_out_cb().set(FUNC(k28_state::mcu_p2_w)); + m_maincpu->prog_out_cb().set(FUNC(k28_state::mcu_prog_w)); + m_maincpu->t1_in_cb().set("speech", FUNC(votrax_sc01_device::request)); // SC-01 A/R pin TMS6100(config, m_tms6100, 3.579545_MHz_XTAL); // CLK tied to 8021 ALE pin - MCFG_TIMER_ADD_NONE("on_button") - - MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", k28_state, display_decay_tick, attotime::from_msec(1)) - config.set_default_layout(layout_k28); + TIMER(config, "on_button", 0).configure_generic(timer_device::expired_delegate()); + TIMER(config, "display_decay", 0).configure_periodic(timer_device::expired_delegate(FUNC(k28_state::display_decay_tick), this), attotime::from_msec(1)); /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("speech", VOTRAX_SC01, 760000) // measured 760kHz on its RC pin - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5) -MACHINE_CONFIG_END + VOTRAX_SC01(config, "speech", 760000).add_route(ALL_OUTPUTS, "mono", 0.5); // measured 760kHz on its RC pin +} |