mirror of
https://github.com/holub/mame
synced 2025-04-24 09:20:02 +03:00
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.
This commit is contained in:
parent
a66cb36cc7
commit
a88483233d
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user