diff lc8951.c @ 2147:4cd60eecb0b1

Fix LC8951 cycle adjustment for data transfer next byte tracking
author Michael Pavone <pavone@retrodev.com>
date Sat, 26 Mar 2022 20:10:51 -0700
parents 10e4439d8f13
children 8a30e44e8223
line wrap: on
line diff
--- a/lc8951.c	Sat Mar 26 20:10:21 2022 -0700
+++ b/lc8951.c	Sat Mar 26 20:10:51 2022 -0700
@@ -419,5 +419,8 @@
 	if (context->transfer_end != CYCLE_NEVER) {
 		context->transfer_end -= deduction;
 	}
+	if (context->next_byte_cycle != CYCLE_NEVER) {
+		context->next_byte_cycle -= deduction;
+	}
 	printf("cycle is now %u, decode_end %u, transfer_end %u\n", context->cycle, context->decode_end, context->transfer_end);
 }