X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FSek.c;h=e05f6f4ea5e9e81d176769eb2bea3bbb7f584b92;hb=cfb3dfa0f2a36569a6b090e87568b1a1c423f75c;hp=df98d9d345846aec773e17bace0e00a2a1039db8;hpb=cc68a136aa179a5f32fe40208371eb9c2b0aadae;p=picodrive.git diff --git a/Pico/Sek.c b/Pico/Sek.c index df98d9d..e05f6f4 100644 --- a/Pico/Sek.c +++ b/Pico/Sek.c @@ -41,8 +41,8 @@ static int (*ResetCallback)()=DoReset; -// interrupt acknowledgment #ifdef EMU_C68K +// interrupt acknowledgment static void SekIntAck(int level) { // try to emulate VDP's reaction to 68000 int ack @@ -81,8 +81,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; 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()); } CPU_INT_LEVEL = 0; return M68K_INT_ACK_AUTOVECTOR; } @@ -143,12 +143,8 @@ int SekReset() PicoInitPc(M68000_regs.pc); #endif #ifdef EMU_M68K - { - void *oldcontext = m68ki_cpu_p; - m68k_set_context(&PicoM68kCPU); - m68k_pulse_reset(); - m68k_set_context(oldcontext); - } + m68k_set_context(&PicoM68kCPU); // if we ever reset m68k, we always need it's context to be set + m68k_pulse_reset(); #endif return 0; @@ -190,3 +186,11 @@ void SekState(unsigned char *data) memcpy(data+0x40,&PicoM68kCPU.pc, 0x04); #endif } + +void SekSetRealTAS(int use_real) +{ +#ifdef EMU_C68K + CycloneSetRealTAS(use_real); +#endif +} +