From 7d1aa2ab5e1b839f8cd15425f1004c7d1e952400 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 14 May 2015 23:17:55 -0700 Subject: Small horizontal interrupt fixes --- vdp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vdp.c') diff --git a/vdp.c b/vdp.c index e6d5aea..a7f9d1b 100644 --- a/vdp.c +++ b/vdp.c @@ -1476,7 +1476,7 @@ void vdp_run_context(vdp_context * context, uint32_t target_cycles) } } if (is_h40 && slot == LINE_CHANGE_H40 || !is_h40 && slot == LINE_CHANGE_H32) { - if (line >= inactive_start) { + if (line > inactive_start) { context->hint_counter = context->regs[REG_HINT]; } else if (context->hint_counter) { context->hint_counter--; @@ -1954,7 +1954,7 @@ 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 >= inactive_start) { + if (context->vcounter + context->hint_counter >= inactive_start) { hint_line = context->regs[REG_HINT]; } else { hint_line = context->vcounter + context->hint_counter + 1; -- cgit v1.2.3