new acc mode timing, VDP FIFO code
[picodrive.git] / Pico / Sek.c
index 24fda92..1f2316e 100644 (file)
@@ -46,17 +46,15 @@ static int (*ResetCallback)()=DoReset;
 static int SekIntAck(int level)\r
 {\r
   // try to emulate VDP's reaction to 68000 int ack\r
-  if     (level == 4) Pico.video.pending_ints  =  0;\r
-  else if(level == 6) Pico.video.pending_ints &= ~0x20;\r
+  if     (level == 4) { Pico.video.pending_ints  =  0;    elprintf(EL_INTS, "hack: @ %06x [%i]", SekPc, SekCycleCnt); }\r
+  else if(level == 6) { Pico.video.pending_ints &= ~0x20; elprintf(EL_INTS, "vack: @ %06x [%i]", SekPc, SekCycleCnt); }\r
   PicoCpu.irq = 0;\r
   return CYCLONE_INT_ACK_AUTOVECTOR;\r
 }\r
 \r
-static void SekResetAck()\r
+static void SekResetAck(void)\r
 {\r
-#if defined(__DEBUG_PRINT) || defined(WIN32)\r
-  dprintf("Reset encountered @ %06x", SekPc);\r
-#endif\r
+  elprintf(EL_ANOMALY, "Reset encountered @ %06x", SekPc);\r
 }\r
 \r
 static int SekUnrecognizedOpcode()\r
@@ -64,9 +62,7 @@ static int SekUnrecognizedOpcode()
   unsigned int pc, op;\r
   pc = SekPc;\r
   op = PicoCpu.read16(pc);\r
-#if defined(__DEBUG_PRINT) || defined(WIN32)\r
-  dprintf("Unrecognized Opcode %04x @ %06x", op, pc);\r
-#endif\r
+  elprintf(EL_ANOMALY, "Unrecognized Opcode %04x @ %06x", op, pc);\r
   // see if we are not executing trash\r
   if (pc < 0x200 || (pc > Pico.romsize+4 && (pc&0xe00000)!=0xe00000)) {\r
     PicoCpu.cycles = 0;\r
@@ -88,8 +84,8 @@ static int SekUnrecognizedOpcode()
 #ifdef EMU_M68K\r
 static int SekIntAckM68K(int level)\r
 {\r
-  if     (level == 4) { Pico.video.pending_ints  =  0;    dprintf("hack: [%i|%i]", Pico.m.scanline, SekCyclesDone()); }\r
-  else if(level == 6) { Pico.video.pending_ints &= ~0x20; dprintf("vack: [%i|%i]", Pico.m.scanline, SekCyclesDone()); }\r
+  if     (level == 4) { Pico.video.pending_ints  =  0;    elprintf(EL_INTS, "hack: @ %06x [%i]", SekPc, SekCycleCnt); }\r
+  else if(level == 6) { Pico.video.pending_ints &= ~0x20; elprintf(EL_INTS, "vack: @ %06x [%i]", SekPc, SekCycleCnt); }\r
   CPU_INT_LEVEL = 0;\r
   return M68K_INT_ACK_AUTOVECTOR;\r
 }\r
@@ -102,7 +98,7 @@ static int SekTasCallback(void)
 \r
 \r
 \r
-int SekInit()\r
+PICO_INTERNAL int SekInit()\r
 {\r
 #ifdef EMU_C68K\r
   CycloneInit();\r
@@ -134,7 +130,7 @@ int SekInit()
 }\r
 \r
 // Reset the 68000:\r
-int SekReset()\r
+PICO_INTERNAL int SekReset()\r
 {\r
   if (Pico.rom==NULL) return 1;\r
 \r
@@ -166,7 +162,7 @@ int SekReset()
 }\r
 \r
 \r
-int SekInterrupt(int irq)\r
+PICO_INTERNAL int SekInterrupt(int irq)\r
 {\r
 #if defined(EMU_C68K) && defined(EMU_M68K)\r
   {\r
@@ -196,7 +192,7 @@ int SekInterrupt(int irq)
 //int SekPc() { return M68000_regs.pc; }\r
 //int SekPc() { return m68k_get_reg(NULL, M68K_REG_PC); }\r
 \r
-void SekState(unsigned char *data)\r
+PICO_INTERNAL void SekState(unsigned char *data)\r
 {\r
 #ifdef EMU_C68K\r
   memcpy(data,PicoCpu.d,0x44);\r
@@ -209,7 +205,7 @@ void SekState(unsigned char *data)
 #endif\r
 }\r
 \r
-void SekSetRealTAS(int use_real)\r
+PICO_INTERNAL void SekSetRealTAS(int use_real)\r
 {\r
 #ifdef EMU_C68K\r
   CycloneSetRealTAS(use_real);\r