From ab95800cadb9b80f62e50fc357814460100fc6cf Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 22 Nov 2018 17:05:29 +0100 Subject: deco_irq: trigger interrupts at the start of hblank instead of at the 1st active pixel (nw) --- src/mame/machine/deco_irq.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mame/machine/deco_irq.cpp b/src/mame/machine/deco_irq.cpp index c8756c9dd8f..7ed3a210205 100644 --- a/src/mame/machine/deco_irq.cpp +++ b/src/mame/machine/deco_irq.cpp @@ -63,7 +63,7 @@ void deco_irq_device::device_start() // allocate scanline timer and start it m_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(deco_irq_device::scanline_callback), this)); - m_scanline_timer->adjust(m_screen->time_until_pos(0)); + m_scanline_timer->adjust(m_screen->time_until_pos(0, m_screen->visible_area().right() + 1)); // register for save states save_item(NAME(m_lightgun_irq)); @@ -115,14 +115,14 @@ TIMER_CALLBACK_MEMBER( deco_irq_device::scanline_callback ) } // vblank-in? - if (y == (visible.bottom() + 1)) + if (y == visible.bottom()) { m_vblank_irq = true; m_vblank_irq_cb(ASSERT_LINE); } // wait for next line - m_scanline_timer->adjust(m_screen->time_until_pos(y + 1)); + m_scanline_timer->adjust(m_screen->time_until_pos(y + 1), visible.right() + 1); } -- cgit v1.2.3