From f48ea913302343c313d271d77b7f0034265cb676 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 5 Nov 2016 21:41:23 -0700 Subject: Fix Jaguar video interrupt cycle calculation --- jag_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jag_video.c') diff --git a/jag_video.c b/jag_video.c index bfb97bd..2532b02 100644 --- a/jag_video.c +++ b/jag_video.c @@ -189,7 +189,7 @@ enum { uint32_t jag_cycles_to_halfline(jag_video *context, uint32_t target) { - uint32_t cycles = context->regs[VID_HPERIOD] - (context->regs[VID_HCOUNT & 0x3FF]); + uint32_t cycles = context->regs[VID_HPERIOD] - (context->regs[VID_HCOUNT] & 0x3FF); uint32_t num_lines; if (context->regs[VID_VCOUNT] < target) { num_lines = target - 1 - context->regs[VID_VCOUNT]; -- cgit v1.2.3