For sdram sync, like NJTE.
Still bad, but don't have a better solution for now (or ever?).
+#define STEP_LS 24
+#define STEP_N 440
+
#define sync_sh2s_normal p32x_sync_sh2s
//#define sync_sh2s_lockstep p32x_sync_sh2s
#define sync_sh2s_normal p32x_sync_sh2s
//#define sync_sh2s_lockstep p32x_sync_sh2s
target = m68k_target;
if (event_time_next && CYCLES_GT(target, event_time_next))
target = event_time_next;
target = m68k_target;
if (event_time_next && CYCLES_GT(target, event_time_next))
target = event_time_next;
+ if (CYCLES_GT(target, now + STEP_N))
+ target = now + STEP_N;
while (CYCLES_GT(target, now))
{
while (CYCLES_GT(target, now))
{
Pico32x.comm_dirty = 0;
}
Pico32x.comm_dirty = 0;
}
void sync_sh2s_lockstep(unsigned int m68k_target)
{
unsigned int mcycles;
void sync_sh2s_lockstep(unsigned int m68k_target)
{
unsigned int mcycles;
mcycles = ssh2.m68krcycles_done;
while (mcycles < m68k_target) {
mcycles = ssh2.m68krcycles_done;
while (mcycles < m68k_target) {
sync_sh2s_normal(mcycles);
}
}
sync_sh2s_normal(mcycles);
}
}