summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2022-04-28 09:20:30 -0400
committer AJR <ajrhacker@users.noreply.github.com>2022-04-28 09:20:42 -0400
commit1f00541db96ba4540736c28df22729e3327eefb9 (patch)
tree83d2fd2d53c39ff195cd1742774552e3f8e0a1b2
parent1c7d98a5fdb1368e1304efdb992b4110a0f43147 (diff)
x68k_crtc.cpp: Fix screen assert in debug build
-rw-r--r--src/mame/video/x68k_crtc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mame/video/x68k_crtc.cpp b/src/mame/video/x68k_crtc.cpp
index a86b011f0cb..72697c3b430 100644
--- a/src/mame/video/x68k_crtc.cpp
+++ b/src/mame/video/x68k_crtc.cpp
@@ -367,7 +367,7 @@ void x68k_crtc_device::crtc_w(offs_t offset, u16 data, u16 mem_mask)
attotime irq_time = attotime::zero;
if ((data / m_vmultiple) != screen().vpos())
{
- irq_time = screen().time_until_pos((data - 1) / m_vmultiple,2);
+ irq_time = screen().time_until_pos(((data != 0 ? data : screen().height()) - 1) / m_vmultiple,2);
m_rint_callback(1);
}
m_raster_irq_timer->adjust(irq_time, (data) / m_vmultiple);