From a88483233d75ff8c1528445b3510b40424ac324b Mon Sep 17 00:00:00 2001 From: vadosnaprimer Date: Wed, 6 Dec 2017 18:48:21 +0300 Subject: [PATCH] icount was missing from the savestates When you load a state, icount (*icountptr) would remain whatever it was before loading, messing with the remaining cycles and with the amount of code executed per run() call. This introduced non-determinism and badly influenced usage of savestates while debugging. machine().time() would also return wrong values after that, since it adds remaining cycles. --- src/emu/diexec.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp index 0958108fe42..9af197ac5db 100644 --- a/src/emu/diexec.cpp +++ b/src/emu/diexec.cpp @@ -499,6 +499,7 @@ void device_execute_interface::interface_post_start() assert_always(m_icountptr != nullptr, "m_icountptr never initialized!"); // register for save states + device().save_pointer(NAME(m_icountptr), 1); device().save_item(NAME(m_suspend)); device().save_item(NAME(m_nextsuspend)); device().save_item(NAME(m_eatcycles));