-#ifndef PICO_CD
-#define CPUS_RUN(m68k_cycles,s68k_cycles) \
-{ \
- SekRunM68k(m68k_cycles); \
- RUN_SH2S(m68k_cycles); \
+// sync m68k to SekCycleAim
+static void SekSyncM68k(void)
+{
+ int cyc_do;
+ pprof_start(m68k);
+ pevt_log_m68k_o(EVT_RUN_START);
+
+ while ((cyc_do = SekCycleAim - SekCycleCnt) > 0) {
+ SekCycleCnt += cyc_do;
+
+#if defined(EMU_C68K)
+ PicoCpuCM68k.cycles = cyc_do;
+ CycloneRun(&PicoCpuCM68k);
+ SekCycleCnt -= PicoCpuCM68k.cycles;
+#elif defined(EMU_M68K)
+ SekCycleCnt += m68k_execute(cyc_do) - cyc_do;
+#elif defined(EMU_F68K)
+ SekCycleCnt += fm68k_emulate(cyc_do, 0) - cyc_do;
+#endif
+ }
+
+ SekCyclesLeft = 0;
+
+ SekTrace(0);
+ pevt_log_m68k_o(EVT_RUN_END);
+ pprof_end(m68k);