diff options
Diffstat (limited to 'src/mame/drivers/tehkanwc.cpp')
-rw-r--r-- | src/mame/drivers/tehkanwc.cpp | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/src/mame/drivers/tehkanwc.cpp b/src/mame/drivers/tehkanwc.cpp index b6ef48f5862..84fcb199fc9 100644 --- a/src/mame/drivers/tehkanwc.cpp +++ b/src/mame/drivers/tehkanwc.cpp @@ -665,34 +665,34 @@ static GFXDECODE_START( gfx_tehkanwc ) GFXDECODE_END -MACHINE_CONFIG_START(tehkanwc_state::tehkanwc) - +void tehkanwc_state::tehkanwc(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", Z80, 18432000/4) /* 18.432000 / 4 */ - MCFG_DEVICE_PROGRAM_MAP(main_mem) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tehkanwc_state, irq0_line_hold) + Z80(config, m_maincpu, 18432000/4); /* 18.432000 / 4 */ + m_maincpu->set_addrmap(AS_PROGRAM, &tehkanwc_state::main_mem); + m_maincpu->set_vblank_int("screen", FUNC(tehkanwc_state::irq0_line_hold)); - MCFG_DEVICE_ADD("sub", Z80, 18432000/4) - MCFG_DEVICE_PROGRAM_MAP(sub_mem) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tehkanwc_state, irq0_line_hold) + Z80(config, m_subcpu, 18432000/4); + m_subcpu->set_addrmap(AS_PROGRAM, &tehkanwc_state::sub_mem); + m_subcpu->set_vblank_int("screen", FUNC(tehkanwc_state::irq0_line_hold)); - MCFG_DEVICE_ADD("audiocpu", Z80, 18432000/4) - MCFG_DEVICE_PROGRAM_MAP(sound_mem) - MCFG_DEVICE_IO_MAP(sound_port) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", tehkanwc_state, irq0_line_hold) + Z80(config, m_audiocpu, 18432000/4); + m_audiocpu->set_addrmap(AS_PROGRAM, &tehkanwc_state::sound_mem); + m_audiocpu->set_addrmap(AS_IO, &tehkanwc_state::sound_port); + m_audiocpu->set_vblank_int("screen", FUNC(tehkanwc_state::irq0_line_hold)); - MCFG_QUANTUM_TIME(attotime::from_hz(600)) /* 10 CPU slices per frame - seems enough to keep the CPUs in sync */ + config.m_minimum_quantum = attotime::from_hz(600); /* 10 CPU slices per frame - seems enough to keep the CPUs in sync */ WATCHDOG_TIMER(config, "watchdog"); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */) - MCFG_SCREEN_SIZE(32*8, 32*8) - MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) - MCFG_SCREEN_UPDATE_DRIVER(tehkanwc_state, screen_update) - MCFG_SCREEN_PALETTE(m_palette) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + screen.set_size(32*8, 32*8); + screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); + screen.set_screen_update(FUNC(tehkanwc_state::screen_update)); + screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_tehkanwc); PALETTE(config, m_palette).set_format(palette_device::xBGR_444, 768).set_endianness(ENDIANNESS_BIG); @@ -713,11 +713,11 @@ MACHINE_CONFIG_START(tehkanwc_state::tehkanwc) ay2.port_b_read_callback().set(FUNC(tehkanwc_state::portB_r)); ay2.add_route(ALL_OUTPUTS, "mono", 0.25); - MCFG_DEVICE_ADD("msm", MSM5205, 384000) - MCFG_MSM5205_VCLK_CB(WRITELINE(*this, tehkanwc_state, adpcm_int)) /* interrupt function */ - MCFG_MSM5205_PRESCALER_SELECTOR(S48_4B) /* 8KHz */ - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.45) -MACHINE_CONFIG_END + MSM5205(config, m_msm, 384000); + m_msm->vck_legacy_callback().set(FUNC(tehkanwc_state::adpcm_int)); /* interrupt function */ + m_msm->set_prescaler_selector(msm5205_device::S48_4B); /* 8KHz */ + m_msm->add_route(ALL_OUTPUTS, "mono", 0.45); +} void tehkanwc_state::tehkanwcb(machine_config &config) { @@ -733,7 +733,6 @@ void tehkanwc_state::tehkanwcb(machine_config &config) ay2.add_route(ALL_OUTPUTS, "mono", 0.25); } - void tehkanwc_state::init_teedoff() { /* Patch to avoid the game jumping in shared memory */ |