asm code updated, Bass Masters fix
[picodrive.git] / Pico / Pico.c
index 6d9d525..93d6876 100644 (file)
@@ -19,7 +19,7 @@ int PicoAutoRgnOrder = 0;
 int emustatus = 0; // rapid_ym2612, multi_ym_updates\r
 void (*PicoWriteSound)(int len) = NULL; // called at the best time to send sound buffer (PsndOut) to hardware\r
 void (*PicoResetHook)(void) = NULL;\r
-void (*PicoLineHook)(void) = NULL;\r
+void (*PicoLineHook)(int count) = NULL;\r
 \r
 struct PicoSRAM SRam = {0,};\r
 int z80startCycle, z80stopCycle; // in 68k cycles\r
@@ -364,6 +364,7 @@ static int PicoFrameSimple(void)
     SekRunM68k(cycles_68k_block);\r
 \r
     PicoRunZ80Simple(line, lines);\r
+    if (PicoLineHook) PicoLineHook(lines_step);\r
     line=lines;\r
   }\r
 \r
@@ -377,6 +378,7 @@ static int PicoFrameSimple(void)
 \r
     lines += sects*lines_step;\r
     PicoRunZ80Simple(line, lines);\r
+    if (PicoLineHook) PicoLineHook(sects*lines_step);\r
   }\r
 \r
   // render screen\r
@@ -440,6 +442,7 @@ static int PicoFrameSimple(void)
     SekRunM68k(cycles_68k_vblock);\r
 \r
     PicoRunZ80Simple(line, lines);\r
+    if (PicoLineHook) PicoLineHook(lines_step);\r
     line=lines;\r
 \r
     sects--;\r
@@ -450,6 +453,7 @@ static int PicoFrameSimple(void)
   if (sects) {\r
     lines += sects*lines_step;\r
     PicoRunZ80Simple(line, lines);\r
+    if (PicoLineHook) PicoLineHook(sects*lines_step);\r
   }\r
 \r
   return 0;\r
@@ -577,14 +581,6 @@ char *debugString(void)
   }\r
 #endif\r
 \r
-#if 0\r
-  {\r
-    FILE *f = fopen("zram", "wb");\r
-    fwrite(Pico.zram, 1, 0x2000, f);\r
-    fclose(f);\r
-  }\r
-#endif\r
-\r
   return dstr;\r
 }\r
 #endif\r