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