diff z80_to_x86.c @ 2412:ed7b4d869989

Fix nmi_start not getting adjusted during a cycle adjustment
author Michael Pavone <pavone@retrodev.com>
date Thu, 04 Jan 2024 22:14:29 -0800
parents c97609fe8315
children cc07f544c620
line wrap: on
line diff
--- a/z80_to_x86.c	Thu Jan 04 22:13:46 2024 -0800
+++ b/z80_to_x86.c	Thu Jan 04 22:14:29 2024 -0800
@@ -3787,6 +3787,13 @@
 			}
 		}
 	}
+	if (context->nmi_start != CYCLE_NEVER) {
+		if (context->nmi_start < deduction) {
+			context->nmi_start = 0;
+		} else {
+			context->nmi_start -= deduction;
+		}
+	}
 }
 
 uint32_t zbreakpoint_patch(z80_context * context, uint16_t address, code_ptr dst)