changeset 1284:82838d4c84d9

Minor fix to timing of "early" overflow case in divs when the dividend is negative
author Michael Pavone <pavone@retrodev.com>
date Fri, 17 Mar 2017 08:05:55 -0700
parents 188a60def81f
children 76e47254596b
files m68k_core_x86.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/m68k_core_x86.c	Fri Mar 17 08:02:03 2017 -0700
+++ b/m68k_core_x86.c	Fri Mar 17 08:05:55 2017 -0700
@@ -1736,8 +1736,8 @@
 		context->flags[FLAG_V] = 1;
 		context->flags[FLAG_N] = 1;
 		context->flags[FLAG_Z] = 0;
-		//TODO: FIXME - this cycle count probably changes based on whether the dividend is negative
-		context->current_cycle += 16 * context->options->gen.clock_divider;
+		cycles += 2;
+		context->current_cycle += cycles * context->options->gen.clock_divider;
 		return orig_dividend;
 	}
 	uint16_t quotient = 0;