clarify PicoDrive's license
[picodrive.git] / pico / cd / pico.c
index eac8164..8bd716f 100644 (file)
@@ -1,5 +1,10 @@
-// (c) Copyright 2007 notaz, All rights reserved.
-
+/*
+ * PicoDrive
+ * (C) notaz, 2007
+ *
+ * This work is licensed under the terms of MAME license.
+ * See COPYING file in the top-level directory.
+ */
 
 #include "../pico_int.h"
 #include "../sound/ym2612.h"
@@ -66,6 +71,9 @@ PICO_INTERNAL int PicoResetMCD(void)
 static __inline void SekRunM68k(int cyc)
 {
   int cyc_do;
+
+  pprof_start(m68k);
+
   SekCycleAim+=cyc;
   if ((cyc_do=SekCycleAim-SekCycleCnt) <= 0) return;
 #if defined(EMU_CORE_DEBUG)
@@ -81,6 +89,7 @@ static __inline void SekRunM68k(int cyc)
   g_m68kcontext=&PicoCpuFM68k;
   SekCycleCnt+=fm68k_emulate(cyc_do, 0, 0);
 #endif
+  pprof_end(m68k);
 }
 
 static __inline void SekRunS68k(int cyc)
@@ -211,6 +220,16 @@ static __inline void update_chips(void)
 
 
 #define PICO_CD
+#define CPUS_RUN(m68k_cycles,s68k_cycles) \
+{ \
+    if ((PicoOpt&POPT_EN_MCD_PSYNC) && (Pico_mcd->m.busreq&3) == 1) { \
+      SekRunPS(m68k_cycles, s68k_cycles); /* "better/perfect sync" */ \
+    } else { \
+      SekRunM68k(m68k_cycles); \
+      if ((Pico_mcd->m.busreq&3) == 1) /* no busreq/no reset */ \
+        SekRunS68k(s68k_cycles); \
+    } \
+}
 #include "../pico_cmn.c"