From cb354b3109a8c72bf84df9c5f91c135b2138ec20 Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 28 Mar 2018 15:42:54 -0400 Subject: cubeqst: Use MCFG_SCREEN_VBLANK_CALLBACK instead of MCFG_CPU_VBLANK_INT (nw) --- src/mame/drivers/cubeqst.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/mame/drivers/cubeqst.cpp b/src/mame/drivers/cubeqst.cpp index 265d2775488..a6b2d534e90 100644 --- a/src/mame/drivers/cubeqst.cpp +++ b/src/mame/drivers/cubeqst.cpp @@ -34,6 +34,7 @@ public: cubeqst_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_laserdisc(*this, "laserdisc"), + m_maincpu(*this, "main_cpu"), m_rotatecpu(*this, "rotate_cpu"), m_linecpu(*this, "line_cpu"), m_soundcpu(*this, "sound_cpu"), @@ -57,6 +58,7 @@ public: uint8_t m_io_latch; uint8_t m_reset_latch; required_device m_laserdisc; + required_device m_maincpu; required_device m_rotatecpu; required_device m_linecpu; required_device m_soundcpu; @@ -83,7 +85,7 @@ public: virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_cubeqst(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(vblank); + DECLARE_WRITE_LINE_MEMBER(vblank_irq); TIMER_CALLBACK_MEMBER(delayed_bank_swap); void swap_linecpu_banks(); void cubeqst(machine_config &config); @@ -207,14 +209,17 @@ READ16_MEMBER(cubeqst_state::line_r) return m_screen->vpos(); } -INTERRUPT_GEN_MEMBER(cubeqst_state::vblank) +WRITE_LINE_MEMBER(cubeqst_state::vblank_irq) { - int int_level = m_video_field == 0 ? 5 : 6; + if (state) + { + int int_level = m_video_field == 0 ? 5 : 6; - device.execute().set_input_line(int_level, HOLD_LINE); + m_maincpu->set_input_line(int_level, HOLD_LINE); - /* Update the laserdisc */ - m_video_field ^= 1; + /* Update the laserdisc */ + m_video_field ^= 1; + } } @@ -522,7 +527,6 @@ WRITE16_MEMBER( cubeqst_state::sound_dac_w ) MACHINE_CONFIG_START(cubeqst_state::cubeqst) MCFG_CPU_ADD("main_cpu", M68000, XTAL(16'000'000) / 2) MCFG_CPU_PROGRAM_MAP(m68k_program_map) - MCFG_CPU_VBLANK_INT_DRIVER("screen", cubeqst_state, vblank) MCFG_CPU_ADD("rotate_cpu", CQUESTROT, XTAL(10'000'000) / 2) MCFG_CPU_PROGRAM_MAP(rotate_map) @@ -547,7 +551,7 @@ MACHINE_CONFIG_START(cubeqst_state::cubeqst) MCFG_LASERDISC_OVERLAY_SCALE(1.0f, 1.030f) MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc") - + MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(cubeqst_state, vblank_irq)) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") -- cgit v1.2.3