diff lc8951.c @ 2073:c69e42444f96

Fix some cycle adjustment stuff and an off-by one on hte TOCT response
author Michael Pavone <pavone@retrodev.com>
date Mon, 31 Jan 2022 00:01:15 -0800
parents f22e04b69272
children bafb757e1cd2
line wrap: on
line diff
--- a/lc8951.c	Sun Jan 30 22:29:29 2022 -0800
+++ b/lc8951.c	Mon Jan 31 00:01:15 2022 -0800
@@ -317,10 +317,13 @@
 
 void lc8951_adjust_cycles(lc8951 *context, uint32_t deduction)
 {
+	printf("CDC deduction of %u cycles @ %u, ", deduction, context->cycle);
+	context->cycle -= deduction;
 	if (context->decode_end != CYCLE_NEVER) {
 		context->decode_end -= deduction;
 	}
 	if (context->transfer_end != CYCLE_NEVER) {
 		context->transfer_end -= deduction;
 	}
+	printf("cycle is now %u, decode_end %u, transfer_end %u\n", context->cycle, context->decode_end, context->transfer_end);
 }