diff options
Diffstat (limited to 'src/mame/drivers/zac_1.cpp')
-rw-r--r-- | src/mame/drivers/zac_1.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/mame/drivers/zac_1.cpp b/src/mame/drivers/zac_1.cpp index fb728dbcca3..8f6bd91309d 100644 --- a/src/mame/drivers/zac_1.cpp +++ b/src/mame/drivers/zac_1.cpp @@ -71,7 +71,7 @@ private: uint8_t m_input_line; virtual void machine_reset() override; virtual void machine_start() override { m_digits.resolve(); } - required_device<cpu_device> m_maincpu; + required_device<s2650_device> m_maincpu; required_shared_ptr<uint8_t> m_p_ram; output_finder<78> m_digits; }; @@ -259,25 +259,27 @@ TIMER_DEVICE_CALLBACK_MEMBER(zac_1_state::zac_1_outtimer) } } -MACHINE_CONFIG_START(zac_1_state::zac_1) +void zac_1_state::zac_1(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", S2650, 6000000/2) // no xtal, just 2 chips forming a random oscillator - MCFG_DEVICE_PROGRAM_MAP(zac_1_map) - MCFG_DEVICE_IO_MAP(zac_1_io) - MCFG_DEVICE_DATA_MAP(zac_1_data) - MCFG_S2650_SENSE_INPUT(READLINE(*this, zac_1_state, serial_r)) - MCFG_S2650_FLAG_OUTPUT(WRITELINE(*this, zac_1_state, serial_w)) + S2650(config, m_maincpu, 6000000/2); // no xtal, just 2 chips forming a random oscillator + m_maincpu->set_addrmap(AS_PROGRAM, &zac_1_state::zac_1_map); + m_maincpu->set_addrmap(AS_IO, &zac_1_state::zac_1_io); + m_maincpu->set_addrmap(AS_DATA, &zac_1_state::zac_1_data); + m_maincpu->sense_handler().set(FUNC(zac_1_state::serial_r)); + m_maincpu->flag_handler().set(FUNC(zac_1_state::serial_w)); + NVRAM(config, "ram", nvram_device::DEFAULT_ALL_0); - MCFG_TIMER_DRIVER_ADD_PERIODIC("zac_1_inttimer", zac_1_state, zac_1_inttimer, attotime::from_hz(200)) - MCFG_TIMER_DRIVER_ADD_PERIODIC("zac_1_outtimer", zac_1_state, zac_1_outtimer, attotime::from_hz(187500)) + TIMER(config, "zac_1_inttimer").configure_periodic(FUNC(zac_1_state::zac_1_inttimer), attotime::from_hz(200)); + TIMER(config, "zac_1_outtimer").configure_periodic(FUNC(zac_1_state::zac_1_outtimer), attotime::from_hz(187500)); /* Video */ config.set_default_layout(layout_zac_1); /* Sound */ genpin_audio(config); -MACHINE_CONFIG_END +} /*************************** LOCOMOTION ********************************/ @@ -306,15 +308,15 @@ READ8_MEMBER( zac_1_state::reset_int_r ) return 0; } -MACHINE_CONFIG_START(zac_1_state::locomotp) +void zac_1_state::locomotp(machine_config &config) +{ zac_1(config); /* basic machine hardware */ - MCFG_DEVICE_MODIFY("maincpu") - MCFG_DEVICE_PROGRAM_MAP(locomotp_map) - MCFG_DEVICE_IO_MAP(locomotp_io) - MCFG_DEVICE_DATA_MAP(locomotp_data) + m_maincpu->set_addrmap(AS_PROGRAM, &zac_1_state::locomotp_map); + m_maincpu->set_addrmap(AS_IO, &zac_1_state::locomotp_io); + m_maincpu->set_addrmap(AS_DATA, &zac_1_state::locomotp_data); // also has sound cpu -MACHINE_CONFIG_END +} /*-------------------------------- |