summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-05-22 18:38:44 -0700
committerMichael Pavone <pavone@retrodev.com>2015-05-22 18:38:44 -0700
commit808e9ca1a04cf5c5a6077e5f3a11f289db2093b6 (patch)
treea1bef9559f8e489e5203f6fd8c430745442600dc
parent68f82c7735196d65a2d57ce8d36cac01a402c3a2 (diff)
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
-rw-r--r--vdp.c3
1 files changed, 3 insertions, 0 deletions
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;