-// (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"
Reset_CD();
LC89510_Reset();
gfx_cd_reset();
- PicoMemResetCD(1);
#ifdef _ASM_CD_MEMORY_C
//PicoMemResetCDdecode(1); // don't have to call this in 2M mode
#endif
// use SRam.data for RAM cart
- if (PicoOpt&POPT_EN_MCD_RAMCART) {
+ if (PicoOpt & POPT_EN_MCD_RAMCART) {
if (SRam.data == NULL)
SRam.data = calloc(1, 0x12000);
}
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)
g_m68kcontext=&PicoCpuFM68k;
SekCycleCnt+=fm68k_emulate(cyc_do, 0, 0);
#endif
+ pprof_end(m68k);
}
static __inline void SekRunS68k(int cyc)
#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"