From 033a996db6fc48a77b6058988551990d9f05802b Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 31 Mar 2024 18:39:55 -0500 Subject: [PATCH] crtc_ega: latch the row preset --- src/devices/video/crtc_ega.cpp | 5 ++++- src/devices/video/crtc_ega.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/devices/video/crtc_ega.cpp b/src/devices/video/crtc_ega.cpp index 15131095fd3..3b9f8ac5d20 100644 --- a/src/devices/video/crtc_ega.cpp +++ b/src/devices/video/crtc_ega.cpp @@ -105,7 +105,7 @@ void crtc_ega_device::register_w(uint8_t data) m_vert_blank_start = ((data & 0x08) << 5) | (m_vert_blank_start & 0x00ff); m_line_compare = ((data & 0x10) << 4) | (m_line_compare & 0x00ff); break; - case 0x08: m_preset_row_scan = data & 0x1f; + case 0x08: m_preset_row_latch = data & 0x1f; break; case 0x09: m_max_ras_addr = data & 0x1f; break; @@ -272,7 +272,10 @@ void crtc_ega_device::set_vblank(int state) if (!m_irq_enable) m_res_out_irq_cb(m_vblank); if (state) + { m_disp_start_addr = m_start_addr_latch; + m_preset_row_scan = m_preset_row_latch; + } } } diff --git a/src/devices/video/crtc_ega.h b/src/devices/video/crtc_ega.h index 62bcac8c5c3..6418f248ef3 100644 --- a/src/devices/video/crtc_ega.h +++ b/src/devices/video/crtc_ega.h @@ -130,6 +130,7 @@ private: /* other internal state */ uint8_t m_register_address_latch; uint16_t m_start_addr_latch; + uint8_t m_preset_row_latch; bool m_cursor_state; /* 0 = off, 1 = on */ uint8_t m_cursor_blink_count; int m_hpixels_per_column; /* number of pixels per video memory address */