uncommited code for 151 release (PSP suspend, file browser, etc)
[picodrive.git] / Pico / cd / Pico.c
index 1fd3bd5..3ab0fe3 100644 (file)
@@ -10,26 +10,6 @@ extern unsigned int s68k_poll_adclk;
 void (*PicoMCDopenTray)(void) = NULL;
 int  (*PicoMCDcloseTray)(void) = NULL;
 
-#define dump_ram(ram,fname) \
-{ \
-  int i, d; \
-  FILE *f; \
-\
-  for (i = 0; i < sizeof(ram); i+=2) { \
-    d = (ram[i]<<8) | ram[i+1]; \
-    *(unsigned short *)(ram+i) = d; \
-  } \
-  f = fopen(fname, "wb"); \
-  if (f) { \
-    fwrite(ram, 1, sizeof(ram), f); \
-    fclose(f); \
-  } \
-  for (i = 0; i < sizeof(ram); i+=2) { \
-    d = (ram[i]<<8) | ram[i+1]; \
-    *(unsigned short *)(ram+i) = d; \
-  } \
-}
-
 
 PICO_INTERNAL void PicoInitMCD(void)
 {
@@ -37,13 +17,9 @@ PICO_INTERNAL void PicoInitMCD(void)
   Init_CD_Driver();
 }
 
-
 PICO_INTERNAL void PicoExitMCD(void)
 {
   End_CD_Driver();
-
-  //dump_ram(Pico_mcd->prg_ram, "prg.bin");
-  //dump_ram(Pico.ram, "ram.bin");
 }
 
 PICO_INTERNAL void PicoPowerMCD(void)
@@ -104,7 +80,7 @@ static __inline void SekRunM68k(int cyc)
   SekCycleCnt+=m68k_execute(cyc_do);
 #elif defined(EMU_F68K)
   g_m68kcontext=&PicoCpuFM68k;
-  SekCycleCnt+=fm68k_emulate(cyc_do, 0);
+  SekCycleCnt+=fm68k_emulate(cyc_do, 0, 0);
 #endif
 }
 
@@ -124,7 +100,7 @@ static __inline void SekRunS68k(int cyc)
   SekCycleCntS68k+=m68k_execute(cyc_do);
 #elif defined(EMU_F68K)
   g_m68kcontext=&PicoCpuFS68k;
-  SekCycleCntS68k+=fm68k_emulate(cyc_do, 0);
+  SekCycleCntS68k+=fm68k_emulate(cyc_do, 0, 0);
 #endif
 }
 
@@ -138,7 +114,7 @@ static __inline void SekRunPS(int cyc_m68k, int cyc_s68k)
 {
   SekCycleAim+=cyc_m68k;
   SekCycleAimS68k+=cyc_s68k;
-  fm68k_emulate(0, 1);
+  fm68k_emulate(0, 1, 0);
 }
 #else
 static __inline void SekRunPS(int cyc_m68k, int cyc_s68k)
@@ -164,7 +140,7 @@ static __inline void SekRunPS(int cyc_m68k, int cyc_s68k)
       SekCycleCnt += m68k_execute(cyc_do);
 #elif defined(EMU_F68K)
       g_m68kcontext = &PicoCpuFM68k;
-      SekCycleCnt += fm68k_emulate(cyc_do, 0);
+      SekCycleCnt += fm68k_emulate(cyc_do, 0, 0);
 #endif
     }
     if ((cyc_do = SekCycleAimS68k-SekCycleCntS68k-cycn_s68k) > 0) {
@@ -177,7 +153,7 @@ static __inline void SekRunPS(int cyc_m68k, int cyc_s68k)
       SekCycleCntS68k += m68k_execute(cyc_do);
 #elif defined(EMU_F68K)
       g_m68kcontext = &PicoCpuFS68k;
-      SekCycleCntS68k += fm68k_emulate(cyc_do, 0);
+      SekCycleCntS68k += fm68k_emulate(cyc_do, 0, 0);
 #endif
     }
   }