mirror of
https://github.com/holub/mame
synced 2025-04-24 01:11:11 +03:00
deco_irq: trigger interrupts at the start of hblank instead of at the 1st active pixel (nw)
This commit is contained in:
parent
3f2f495333
commit
ab95800cad
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user