From: Toni Wilen Date: Sat, 6 Jan 2018 18:34:05 +0000 (+0200) Subject: Add extra cycles to prevent hang if all code and data in a loop is cached. X-Git-Tag: 3600~9 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=8719e899225fdb9915a5181ed20807b019be6df2;p=francis%2Fwinuae.git Add extra cycles to prevent hang if all code and data in a loop is cached. --- diff --git a/newcpu.cpp b/newcpu.cpp index 474df49a..b2c86d6f 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5750,6 +5750,7 @@ static void m68k_run_3ce (void) { struct regstruct *r = ®s; bool exit = false; + int extracycles = 0; while (!exit) { TRY(prb) { @@ -5766,6 +5767,13 @@ static void m68k_run_3ce (void) if (do_specialties (0)) exit = true; } + + // workaround for situation when all accesses are cached + extracycles++; + if (extracycles >= 8) { + extracycles = 0; + x_do_cycles(CYCLE_UNIT); + } } } CATCH(prb) { bus_error();