idle debug removed, vpath added to Makefiles
[picodrive.git] / Pico / Pico.c
index 77f2023..97d7cc5 100644 (file)
@@ -23,7 +23,7 @@ struct PicoSRAM SRam = {0,};
 \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)(int count) = NULL;\r
+void (*PicoLineHook)(void) = NULL;\r
 \r
 // to be called once on emu init\r
 void PicoInit(void)\r
@@ -250,7 +250,7 @@ static __inline void SekRunM68k(int cyc)
 #elif defined(EMU_M68K)\r
   SekCycleCnt+=m68k_execute(cyc_do);\r
 #elif defined(EMU_F68K)\r
-  SekCycleCnt+=fm68k_emulate(cyc_do+1, 0);\r
+  SekCycleCnt+=fm68k_emulate(cyc_do+1, 0, 0);\r
 #endif\r
 }\r
 \r
@@ -308,17 +308,8 @@ PICO_INTERNAL void PicoSyncZ80(int m68k_cycles_done)
 }\r
 \r
 \r
-int idle_hit_counter = 0;\r
-\r
 void PicoFrame(void)\r
 {\r
-#if 0\r
-  if ((Pico.m.frame_count&0x3f) == 0) {\r
-    elprintf(EL_STATUS, "ihits: %i", idle_hit_counter);\r
-    idle_hit_counter = 0;\r
-  }\r
-#endif\r
-\r
   Pico.m.frame_count++;\r
 \r
   if (PicoAHW & PAHW_MCD) {\r
@@ -363,13 +354,22 @@ char *debugString(void)
   static char dstr[1024];\r
   struct PicoVideo *pv=&Pico.video;\r
   unsigned char *reg=pv->reg, r;\r
+  extern int HighPreSpr[];\r
+  int i, sprites_lo, sprites_hi;\r
   char *dstrp;\r
 \r
+  sprites_lo = sprites_hi = 0;\r
+  for (i = 0; HighPreSpr[i] != 0; i+=2)\r
+    if (HighPreSpr[i+1] & 0x8000)\r
+         sprites_hi++;\r
+    else sprites_lo++;\r
+\r
   dstrp = dstr;\r
-  sprintf(dstrp, "mode set 1: %02x\n", (r=reg[0])); dstrp+=strlen(dstrp);\r
+  sprintf(dstrp, "mode set 1: %02x       spr lo: %2i, spr hi: %2i\n", (r=reg[0]), sprites_lo, sprites_hi);\r
+  dstrp+=strlen(dstrp);\r
   sprintf(dstrp, "display_disable: %i, M3: %i, palette: %i, ?, hints: %i\n", bit(r,0), bit(r,1), bit(r,2), bit(r,4));\r
   dstrp+=strlen(dstrp);\r
-  sprintf(dstrp, "mode set 2: %02x\n", (r=reg[1])); dstrp+=strlen(dstrp);\r
+  sprintf(dstrp, "mode set 2: %02x                            hcnt: %i\n", (r=reg[1]), pv->reg[10]); dstrp+=strlen(dstrp);\r
   sprintf(dstrp, "SMS/gen: %i, pal: %i, dma: %i, vints: %i, disp: %i, TMS: %i\n", bit(r,2), bit(r,3), bit(r,4),\r
        bit(r,5), bit(r,6), bit(r,7)); dstrp+=strlen(dstrp);\r
   sprintf(dstrp, "mode set 3: %02x\n", (r=reg[0xB])); dstrp+=strlen(dstrp);\r