don't draw layer where window is (for World Championship Soccer II)
[picodrive.git] / Pico / Pico.c
index 62b1b48..6f9ed4b 100644 (file)
@@ -8,7 +8,6 @@
 \r
 \r
 #include "PicoInt.h"\r
-#include "sound/sound.h"\r
 #include "sound/ym2612.h"\r
 \r
 int PicoVer=0x0110;\r
@@ -218,8 +217,8 @@ static int dma_bsycles[] = {
 (488<<8)/9,   (488<<8)/18,  (488<<8)/17,  (488<<8)/9\r
 };\r
 \r
-//static\r
-int CheckDMA(void)\r
+\r
+PICO_INTERNAL int CheckDMA(void)\r
 {\r
   int burn = 0, bytes_can = 0, dma_op = Pico.video.reg[0x17]>>6; // see gens for 00 and 01 modes\r
   int bytes = Pico.m.dma_bytes;\r
@@ -459,19 +458,9 @@ static void PicoRunZ80Simple(int line_from, int line_to)
 {\r
   int line_from_r=line_from, line_to_r=line_to, line = line_from;\r
   int line_sample = Pico.m.pal ? 68 : 93;\r
-  extern const unsigned short vcounts[];\r
 \r
   if(!(PicoOpt&4) || Pico.m.z80Run == 0) { line_from_r = line_to_r; line_to_r = 0; }\r
 \r
-  if(z80startCycle != 0x01000000) {\r
-    line_from_r = vcounts[z80startCycle>>8]+1;\r
-    z80startCycle = 0x01000000;\r
-  }\r
-  if(z80stopCycle != 0x01000000) {\r
-    line_to_r = vcounts[z80stopCycle>>8]+1;\r
-    z80stopCycle = 0x01000000;\r
-  }\r
-\r
   if(PicoOpt&1) {\r
     // we have ym2612 enabled, so we have to run Z80 in lines, so we could update DAC and timers\r
     for(; line < line_to; line++) {\r
@@ -653,6 +642,13 @@ int PicoFrame(void)
   return 0;\r
 }\r
 \r
+void PicoFrameDrawOnly(void)\r
+{\r
+  int y;\r
+  PicoFrameStart();\r
+  for (y=0;y<224;y++) PicoLine(y);\r
+}\r
+\r
 // callback to output message from emu\r
 void (*PicoMessage)(const char *msg)=NULL;\r
 \r
@@ -682,6 +678,7 @@ char *debugString(void)
   dstrp+=strlen(dstrp);\r
   sprintf(dstrp, "scroll size: w: %i, h: %i  SRAM: %i; eeprom: %i\n", reg[0x10]&3, (reg[0x10]&0x30)>>4,\r
        bit(Pico.m.sram_reg, 4), bit(Pico.m.sram_reg, 2)); dstrp+=strlen(dstrp);\r
+  sprintf(dstrp, "sram range: %06x-%06x, reg: %02x\n", SRam.start, SRam.end, Pico.m.sram_reg); dstrp+=strlen(dstrp);\r
   sprintf(dstrp, "pend int: v:%i, h:%i, vdp status: %04x\n", bit(pv->pending_ints,5), bit(pv->pending_ints,4), pv->status);\r
   dstrp+=strlen(dstrp);\r
 #ifdef EMU_C68K\r