diff blastem.c @ 846:98d7b6073163

Implement interrupt latency. Fixes Sesame Street: Counting Cafe and gives accurate results in my test ROM
author Michael Pavone <pavone@retrodev.com>
date Sat, 31 Oct 2015 22:17:50 -0700
parents 74e161fe7d39
children 213c3b5160d0
line wrap: on
line diff
--- a/blastem.c	Sat Oct 31 21:11:40 2015 -0700
+++ b/blastem.c	Sat Oct 31 22:17:50 2015 -0700
@@ -156,6 +156,9 @@
 			}
 		}
 	}
+	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;