From c644ce99cd5c662ef9d1d94e874a8343dabdffe9 Mon Sep 17 00:00:00 2001 From: kub Date: Sun, 17 Oct 2021 22:46:12 +0200 Subject: [PATCH] sms, fix core timing --- pico/sms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pico/sms.c b/pico/sms.c index 78fce13b..3f4e80ed 100644 --- a/pico/sms.c +++ b/pico/sms.c @@ -404,7 +404,7 @@ void PicoFrameMS(void) struct PicoVideo *pv = &Pico.video; int is_pal = Pico.m.pal; int lines = is_pal ? 313 : 262; - int cycles_line = is_pal ? 58020 : 58293; /* (226.6 : 227.7) * 256 */ + int cycles_line = 228; int cycles_done = 0, cycles_aim = 0; int skip = PicoIn.skipFrame; int lines_vis = 192; @@ -454,8 +454,8 @@ void PicoFrameMS(void) } cycles_aim += cycles_line; - Pico.t.z80c_aim = cycles_aim >> 8; - cycles_done += z80_run((cycles_aim - cycles_done) >> 8) << 8; + Pico.t.z80c_aim = cycles_aim; + cycles_done += z80_run(cycles_aim - cycles_done); } if (PicoIn.sndOut) -- 2.39.5