+// 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, 0) - cyc_do;
+#endif
+ }
+
+ SekCyclesLeft = 0;
+
+ SekTrace(0);
+ pevt_log_m68k_o(EVT_RUN_END);
+ pprof_end(m68k);
+}
+
+static inline void SekRunM68k(int cyc)
+{
+ SekCycleAim += cyc;
+ SekSyncM68k();
+}
+