summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2019-08-27 21:10:12 -0400
committer GitHub <noreply@github.com>2019-08-27 21:10:12 -0400
commit4c1d4e8e0c3c351e347de9db510f4c325a498188 (patch)
tree167a572bcef5d9cadcabf46e7a02ba38c37c9b0d
parentd6c145c0e763e9280d5b1d1182e55a37f25800ce (diff)
parent912a1c1b9d5307cf13dc075ea57708546624eaa2 (diff)
Merge pull request #5562 from 68bit/hd6845s-cursor-fix
MC6845: correct cursor.
-rw-r--r--src/devices/video/mc6845.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp
index ec61201648e..fabf80b639e 100644
--- a/src/devices/video/mc6845.cpp
+++ b/src/devices/video/mc6845.cpp
@@ -705,8 +705,9 @@ bool mc6845_device::check_cursor_visible(uint16_t ra, uint16_t line_addr)
}
uint16_t cursor_start_ras = m_cursor_start_ras & 0x1f;
+ uint16_t max_ras_addr = m_max_ras_addr + (MODE_INTERLACE_AND_VIDEO ? m_interlace_adjust : m_noninterlace_adjust);
- if (cursor_start_ras > m_max_ras_addr)
+ if (cursor_start_ras > max_ras_addr)
{
// No cursor possible.
return false;
@@ -714,6 +715,11 @@ bool mc6845_device::check_cursor_visible(uint16_t ra, uint16_t line_addr)
if (cursor_start_ras <= m_cursor_end_ras)
{
+ if (m_cursor_end_ras > max_ras_addr)
+ {
+ // Full cursor.
+ return true;
+ }
// Cursor from start to end inclusive.
return (ra >= cursor_start_ras) && (ra <= m_cursor_end_ras);
}