From 3afec122524f351fb9600fcd3c70c2bdcc8d70a9 Mon Sep 17 00:00:00 2001 From: SarahW Date: Thu, 6 Apr 2017 21:51:35 +0100 Subject: [PATCH] Fix 286/386/486 interpreter timing granularity at 5us. --- src/386.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/386.c b/src/386.c index d4d7bd6..998f4d1 100644 --- a/src/386.c +++ b/src/386.c @@ -214,6 +214,7 @@ void exec386(int cycs) int tempi; int cycdiff; int oldcyc; + int cycle_period = cycs / 2000; /*Use a 5us timing granularity*/ cycles+=cycs; // output=3; @@ -223,7 +224,7 @@ void exec386(int cycs) oldcyc=cycles; timer_start_period(cycles << TIMER_SHIFT); // pclog("%i %02X\n", ins, ram[8]); - while (cycdiff<100) + while (cycdiff < cycle_period) { /* testr[0]=EAX; testr[1]=EBX; testr[2]=ECX; testr[3]=EDX; testr[4]=ESI; testr[5]=EDI; testr[6]=EBP; testr[7]=ESP;*/