From 808e9ca1a04cf5c5a6077e5f3a11f289db2093b6 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Fri, 22 May 2015 18:38:44 -0700 Subject: Fix bug in vdp_next_hint that was causing HINTs to fire repeatedly when they should not have fired at all based on an HINT interval that was larger than the number of active lines in the display --- vdp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index 065d719..5bbe50a 100644 --- a/vdp.c +++ b/vdp.c @@ -2034,6 +2034,9 @@ uint32_t vdp_next_hint(vdp_context * context) uint32_t inactive_start = context->latched_mode & BIT_PAL ? PAL_INACTIVE_START : NTSC_INACTIVE_START; uint32_t hint_line; if (context->vcounter + context->hint_counter >= inactive_start) { + if (context->regs[REG_HINT] > inactive_start) { + return 0xFFFFFFFF; + } hint_line = context->regs[REG_HINT]; } else { hint_line = context->vcounter + context->hint_counter + 1; -- cgit v1.2.3