diff --git a/src/mame/drivers/20pacgal.cpp b/src/mame/drivers/20pacgal.cpp index 94b47a12ad4..24a51e99252 100644 --- a/src/mame/drivers/20pacgal.cpp +++ b/src/mame/drivers/20pacgal.cpp @@ -387,10 +387,10 @@ void _20pacgal_state::machine_reset() m_game_selected = 0; } -INTERRUPT_GEN_MEMBER(_20pacgal_state::vblank_irq) +WRITE_LINE_MEMBER(_20pacgal_state::vblank_irq) { - if(m_irq_mask) - device.execute().set_input_line(0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode + if (state && m_irq_mask) + m_maincpu->set_input_line(0, HOLD_LINE); // TODO: assert breaks the inputs in 25pacman test mode } MACHINE_CONFIG_START(_20pacgal_state::_20pacgal) @@ -399,7 +399,6 @@ MACHINE_CONFIG_START(_20pacgal_state::_20pacgal) MCFG_CPU_ADD("maincpu", Z180, MAIN_CPU_CLOCK) MCFG_CPU_PROGRAM_MAP(_20pacgal_map) MCFG_CPU_IO_MAP(_20pacgal_io_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", _20pacgal_state, vblank_irq) MCFG_EEPROM_SERIAL_93C46_8BIT_ADD("eeprom") diff --git a/src/mame/drivers/baraduke.cpp b/src/mame/drivers/baraduke.cpp index 34a48623fe1..e6bc55a8300 100644 --- a/src/mame/drivers/baraduke.cpp +++ b/src/mame/drivers/baraduke.cpp @@ -378,12 +378,10 @@ MACHINE_CONFIG_START(baraduke_state::baraduke) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", MC6809E, XTAL(49'152'000)/32) // 68A09E MCFG_CPU_PROGRAM_MAP(baraduke_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", baraduke_state, irq0_line_assert) MCFG_CPU_ADD("mcu", HD63701, XTAL(49'152'000)/8) MCFG_CPU_PROGRAM_MAP(mcu_map) MCFG_CPU_IO_MAP(mcu_port_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", baraduke_state, irq0_line_hold) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */ diff --git a/src/mame/drivers/gaplus.cpp b/src/mame/drivers/gaplus.cpp index 6dbcc5feea2..f263fa7bec0 100644 --- a/src/mame/drivers/gaplus.cpp +++ b/src/mame/drivers/gaplus.cpp @@ -235,9 +235,12 @@ TIMER_CALLBACK_MEMBER(gaplus_state::namcoio1_run) m_namco56xx->customio_run(); } -INTERRUPT_GEN_MEMBER(gaplus_state::vblank_main_irq) +WRITE_LINE_MEMBER(gaplus_state::vblank_irq) { - if(m_main_irq_mask) + if (!state) + return; + + if (m_main_irq_mask) m_maincpu->set_input_line(0, ASSERT_LINE); if (!m_namco58xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ @@ -245,29 +248,32 @@ INTERRUPT_GEN_MEMBER(gaplus_state::vblank_main_irq) if (!m_namco56xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ m_namcoio1_run_timer->adjust(attotime::from_usec(50)); -} -INTERRUPT_GEN_MEMBER(gaplus_state::gapluso_vblank_main_irq) -{ - if(m_main_irq_mask) - m_maincpu->set_input_line(0, ASSERT_LINE); - - if (!m_namco58xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ - m_namcoio1_run_timer->adjust(attotime::from_usec(50)); - - if (!m_namco56xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ - m_namcoio0_run_timer->adjust(attotime::from_usec(50)); -} - -INTERRUPT_GEN_MEMBER(gaplus_state::vblank_sub_irq) -{ - if(m_sub_irq_mask) + if (m_sub_irq_mask) m_subcpu->set_input_line(0, ASSERT_LINE); + + if (m_sub2_irq_mask) + m_subcpu2->set_input_line(0, ASSERT_LINE); } -INTERRUPT_GEN_MEMBER(gaplus_state::vblank_sub2_irq) +WRITE_LINE_MEMBER(gaplus_state::gapluso_vblank_irq) { - if(m_sub2_irq_mask) + if (!state) + return; + + if (m_main_irq_mask) + m_maincpu->set_input_line(0, ASSERT_LINE); + + if (!m_namco58xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ + m_namcoio1_run_timer->adjust(attotime::from_usec(50)); + + if (!m_namco56xx->read_reset_line()) /* give the cpu a tiny bit of time to write the command before processing it */ + m_namcoio0_run_timer->adjust(attotime::from_usec(50)); + + if (m_sub_irq_mask) + m_subcpu->set_input_line(0, ASSERT_LINE); + + if (m_sub2_irq_mask) m_subcpu2->set_input_line(0, ASSERT_LINE); } @@ -520,15 +526,12 @@ MACHINE_CONFIG_START(gaplus_state::gaplus) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", MC6809E, XTAL(24'576'000)/16) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(cpu1_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", gaplus_state, vblank_main_irq) MCFG_CPU_ADD("sub", MC6809E, XTAL(24'576'000)/16) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(cpu2_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", gaplus_state, vblank_sub_irq) MCFG_CPU_ADD("sub2", MC6809E, XTAL(24'576'000)/16) /* 1.536 MHz */ MCFG_CPU_PROGRAM_MAP(cpu3_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", gaplus_state, vblank_sub2_irq) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* a high value to ensure proper synchronization of the CPUs */ @@ -564,6 +567,7 @@ MACHINE_CONFIG_START(gaplus_state::gaplus) MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE_DRIVER(gaplus_state, screen_update) MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(gaplus_state, screen_vblank)) + MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(gaplus_state, vblank_irq)) MCFG_SCREEN_PALETTE("palette") MCFG_GFXDECODE_ADD("gfxdecode", "palette", gaplus) @@ -604,8 +608,9 @@ MACHINE_CONFIG_START(gaplus_state::gapluso) gaplusd(config); /* basic machine hardware */ - MCFG_CPU_MODIFY("maincpu") - MCFG_CPU_VBLANK_INT_DRIVER("screen", gaplus_state, gapluso_vblank_main_irq) + MCFG_DEVICE_MODIFY("screen") + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(gaplus_state, screen_vblank)) + MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE(gaplus_state, gapluso_vblank_irq)) MCFG_DEVICE_REPLACE("namcoio_1", NAMCO_56XX, 0) MCFG_NAMCO56XX_IN_0_CB(IOPORT("COINS")) diff --git a/src/mame/drivers/skykid.cpp b/src/mame/drivers/skykid.cpp index bd7d0f4a7a3..c707fb0c182 100644 --- a/src/mame/drivers/skykid.cpp +++ b/src/mame/drivers/skykid.cpp @@ -423,17 +423,13 @@ static GFXDECODE_START( skykid ) GFXDECODE_END -INTERRUPT_GEN_MEMBER(skykid_state::main_vblank_irq) +WRITE_LINE_MEMBER(skykid_state::vblank_irq) { - if(m_main_irq_mask) - device.execute().set_input_line(0, ASSERT_LINE); -} + if (state && m_main_irq_mask) + m_maincpu->set_input_line(0, ASSERT_LINE); - -INTERRUPT_GEN_MEMBER(skykid_state::mcu_vblank_irq) -{ - if(m_mcu_irq_mask) - device.execute().set_input_line(0, ASSERT_LINE); + if (state && m_mcu_irq_mask) + m_mcu->set_input_line(0, ASSERT_LINE); } @@ -442,12 +438,10 @@ MACHINE_CONFIG_START(skykid_state::skykid) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", MC6809E, XTAL(49'152'000)/32) MCFG_CPU_PROGRAM_MAP(skykid_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", skykid_state, main_vblank_irq) MCFG_CPU_ADD("mcu", HD63701, XTAL(49'152'000)/8) /* or compatible 6808 with extra instructions */ MCFG_CPU_PROGRAM_MAP(mcu_map) MCFG_CPU_IO_MAP(mcu_port_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", skykid_state, mcu_vblank_irq) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) /* we need heavy synch */ @@ -461,6 +455,7 @@ MACHINE_CONFIG_START(skykid_state::skykid) MCFG_SCREEN_VISIBLE_AREA(0*8, 36*8-1, 0*8, 28*8-1) MCFG_SCREEN_UPDATE_DRIVER(skykid_state, screen_update_skykid) MCFG_SCREEN_PALETTE("palette") + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(skykid_state, vblank_irq)) MCFG_GFXDECODE_ADD("gfxdecode", "palette", skykid) MCFG_PALETTE_ADD("palette", 64*4+128*4+64*8) diff --git a/src/mame/drivers/toypop.cpp b/src/mame/drivers/toypop.cpp index 73718804111..34d32d35ac2 100644 --- a/src/mame/drivers/toypop.cpp +++ b/src/mame/drivers/toypop.cpp @@ -80,7 +80,7 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(master_scanline); - INTERRUPT_GEN_MEMBER(slave_vblank_irq); + DECLARE_WRITE_LINE_MEMBER(slave_vblank_irq); DECLARE_READ8_MEMBER(irq_enable_r); DECLARE_WRITE8_MEMBER(irq_disable_w); @@ -658,10 +658,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos16_state::master_scanline) } } -INTERRUPT_GEN_MEMBER(namcos16_state::slave_vblank_irq) +WRITE_LINE_MEMBER(namcos16_state::slave_vblank_irq) { - if(m_slave_irq_enable == true) - device.execute().set_input_line(6,HOLD_LINE); + if (state && m_slave_irq_enable == true) + m_slave_cpu->set_input_line(6, HOLD_LINE); } MACHINE_CONFIG_START(namcos16_state::liblrabl) @@ -671,7 +671,6 @@ MACHINE_CONFIG_START(namcos16_state::liblrabl) MCFG_CPU_ADD("slave", M68000, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(slave_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", namcos16_state, slave_vblank_irq) MCFG_CPU_ADD("audiocpu", MC6809E, MASTER_CLOCK/4) MCFG_CPU_PROGRAM_MAP(sound_map) @@ -700,6 +699,7 @@ MACHINE_CONFIG_START(namcos16_state::liblrabl) MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK,384,0,288,264,0,224) // derived from Galaxian HW, 60.606060 MCFG_SCREEN_UPDATE_DRIVER(namcos16_state, screen_update) MCFG_SCREEN_PALETTE("palette") + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(namcos16_state, slave_vblank_irq)) MCFG_GFXDECODE_ADD("gfxdecode", "palette", toypop) MCFG_PALETTE_ADD("palette", 128*4+64*4+16*2) diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index 08a8fb2cee3..b42caf1f9fc 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -61,7 +61,7 @@ public: virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_20pacgal(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vblank_irq); + DECLARE_WRITE_LINE_MEMBER(vblank_irq); void get_pens(pen_t *pens); void do_pen_lookup(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_sprites(bitmap_rgb32 &bitmap); diff --git a/src/mame/includes/baraduke.h b/src/mame/includes/baraduke.h index 8978d2084db..37b3e78dc2f 100644 --- a/src/mame/includes/baraduke.h +++ b/src/mame/includes/baraduke.h @@ -11,6 +11,7 @@ public: m_videoram(*this, "videoram"), m_textram(*this, "textram"), m_maincpu(*this, "maincpu"), + m_mcu(*this, "mcu"), m_cus30(*this, "namco"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette") { } @@ -21,6 +22,7 @@ public: required_shared_ptr m_videoram; required_shared_ptr m_textram; required_device m_maincpu; + required_device m_mcu; required_device m_cus30; required_device m_gfxdecode; required_device m_palette; diff --git a/src/mame/includes/gaplus.h b/src/mame/includes/gaplus.h index 28c55ee55b2..b38f20b98e8 100644 --- a/src/mame/includes/gaplus.h +++ b/src/mame/includes/gaplus.h @@ -93,10 +93,8 @@ public: TILEMAP_MAPPER_MEMBER(tilemap_scan); TILE_GET_INFO_MEMBER(get_tile_info); - INTERRUPT_GEN_MEMBER(vblank_main_irq); - INTERRUPT_GEN_MEMBER(gapluso_vblank_main_irq); - INTERRUPT_GEN_MEMBER(vblank_sub_irq); - INTERRUPT_GEN_MEMBER(vblank_sub2_irq); + DECLARE_WRITE_LINE_MEMBER(vblank_irq); + DECLARE_WRITE_LINE_MEMBER(gapluso_vblank_irq); TIMER_CALLBACK_MEMBER(namcoio0_run); TIMER_CALLBACK_MEMBER(namcoio1_run); diff --git a/src/mame/includes/skykid.h b/src/mame/includes/skykid.h index 2fe11a37549..92428b05349 100644 --- a/src/mame/includes/skykid.h +++ b/src/mame/includes/skykid.h @@ -56,8 +56,7 @@ public: virtual void video_start() override; DECLARE_PALETTE_INIT(skykid); uint32_t screen_update_skykid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(main_vblank_irq); - INTERRUPT_GEN_MEMBER(mcu_vblank_irq); + DECLARE_WRITE_LINE_MEMBER(vblank_irq); void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect); void skykid(machine_config &config); void mcu_map(address_map &map); diff --git a/src/mame/video/20pacgal.cpp b/src/mame/video/20pacgal.cpp index 48d9db0e33f..e515c656cac 100644 --- a/src/mame/video/20pacgal.cpp +++ b/src/mame/video/20pacgal.cpp @@ -435,4 +435,5 @@ MACHINE_CONFIG_START(_20pacgal_state::_20pacgal_video) MCFG_SCREEN_SIZE(SCREEN_WIDTH, SCREEN_HEIGHT) MCFG_SCREEN_VISIBLE_AREA(0, SCREEN_WIDTH - 1, 0, SCREEN_HEIGHT - 1) MCFG_SCREEN_UPDATE_DRIVER(_20pacgal_state, screen_update_20pacgal) + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(_20pacgal_state, vblank_irq)) MACHINE_CONFIG_END diff --git a/src/mame/video/baraduke.cpp b/src/mame/video/baraduke.cpp index 3ce0f59070a..a24df28ca89 100644 --- a/src/mame/video/baraduke.cpp +++ b/src/mame/video/baraduke.cpp @@ -343,5 +343,8 @@ WRITE_LINE_MEMBER(baraduke_state::screen_vblank_baraduke) m_copy_sprites = 0; } + + m_maincpu->set_input_line(0, ASSERT_LINE); + m_mcu->set_input_line(0, HOLD_LINE); } }