From 0e881e49fcf3d616c99631f56da80ec69d4f594f Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sat, 31 Oct 2015 22:17:50 -0700 Subject: Implement interrupt latency. Fixes Sesame Street: Counting Cafe and gives accurate results in my test ROM --- blastem.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'blastem.c') diff --git a/blastem.c b/blastem.c index aaed215..78d1c0d 100644 --- a/blastem.c +++ b/blastem.c @@ -156,6 +156,9 @@ void adjust_int_cycle(m68k_context * context, vdp_context * v_context) } } } + if (context->int_cycle > context->current_cycle) { + context->int_pending = 0; + } /*if (context->int_cycle != old_int_cycle) { printf("int cycle changed to: %d, level: %d @ %d(%d), frame: %d, vcounter: %d, hslot: %d, mask: %d, hint_counter: %d\n", context->int_cycle, context->int_num, v_context->cycles, context->current_cycle, v_context->frame, v_context->vcounter, v_context->hslot, context->status & 0x7, v_context->hint_counter); old_int_cycle = context->int_cycle; -- cgit v1.2.3