From 13e56f57a76db0f7a03b520100f4fc196d488023 Mon Sep 17 00:00:00 2001 From: CrazyEttin <> Date: Mon, 12 Sep 2022 20:32:15 +0300 Subject: [PATCH] Make the CPU timing more precise --- emulator.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emulator.pas b/emulator.pas index 996ca71..d34e934 100644 --- a/emulator.pas +++ b/emulator.pas @@ -71,7 +71,10 @@ end; procedure wait; begin if IC div 500 = 0 then sleep (1) - else sleep (IC div 500); + else begin + sleep (IC div 500); + if IC mod 500 >= 250 then sleep (1); + end; IC := 0; end; {$endif}