CPU: GTE completion cycle should be reset/serialized
Yay more determinism breakage...
This commit is contained in:
parent
9f73e690ad
commit
89f11095bc
|
@ -221,14 +221,16 @@ void CPU::Reset()
|
||||||
// This consumes cycles, so do it first.
|
// This consumes cycles, so do it first.
|
||||||
SetPC(RESET_VECTOR);
|
SetPC(RESET_VECTOR);
|
||||||
|
|
||||||
g_state.pending_ticks = 0;
|
|
||||||
g_state.downcount = 0;
|
g_state.downcount = 0;
|
||||||
|
g_state.pending_ticks = 0;
|
||||||
|
g_state.gte_completion_tick = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CPU::DoState(StateWrapper& sw)
|
bool CPU::DoState(StateWrapper& sw)
|
||||||
{
|
{
|
||||||
sw.Do(&g_state.pending_ticks);
|
sw.Do(&g_state.pending_ticks);
|
||||||
sw.Do(&g_state.downcount);
|
sw.Do(&g_state.downcount);
|
||||||
|
sw.DoEx(&g_state.gte_completion_tick, 78, static_cast<u32>(0));
|
||||||
sw.DoArray(g_state.regs.r, static_cast<u32>(Reg::count));
|
sw.DoArray(g_state.regs.r, static_cast<u32>(Reg::count));
|
||||||
sw.Do(&g_state.pc);
|
sw.Do(&g_state.pc);
|
||||||
sw.Do(&g_state.npc);
|
sw.Do(&g_state.npc);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
|
|
||||||
static constexpr u32 SAVE_STATE_MAGIC = 0x43435544;
|
static constexpr u32 SAVE_STATE_MAGIC = 0x43435544;
|
||||||
static constexpr u32 SAVE_STATE_VERSION = 77;
|
static constexpr u32 SAVE_STATE_VERSION = 78;
|
||||||
static constexpr u32 SAVE_STATE_MINIMUM_VERSION = 42;
|
static constexpr u32 SAVE_STATE_MINIMUM_VERSION = 42;
|
||||||
|
|
||||||
static_assert(SAVE_STATE_VERSION >= SAVE_STATE_MINIMUM_VERSION);
|
static_assert(SAVE_STATE_VERSION >= SAVE_STATE_MINIMUM_VERSION);
|
||||||
|
|
Loading…
Reference in New Issue