X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Pico%2FPicoInt.h;h=ed97081f620802fa46c340e1b8114f0280d0dd67;hb=53668ca0f8dae622f61c2b30000a27b80fd8ec6f;hp=0cd0644b75c7917fa84f1388842750e9213b3178;hpb=b542be4686241c9e0722ff8e452980f9ac2b4d7c;p=picodrive.git diff --git a/Pico/PicoInt.h b/Pico/PicoInt.h index 0cd0644..ed97081 100644 --- a/Pico/PicoInt.h +++ b/Pico/PicoInt.h @@ -48,6 +48,7 @@ extern struct Cyclone PicoCpuCM68k, PicoCpuCS68k; #define SekPcS68k (PicoCpuCS68k.pc-PicoCpuCS68k.membase) #define SekSetStop(x) { PicoCpuCM68k.state_flags&=~1; if (x) { PicoCpuCM68k.state_flags|=1; PicoCpuCM68k.cycles=0; } } #define SekSetStopS68k(x) { PicoCpuCS68k.state_flags&=~1; if (x) { PicoCpuCS68k.state_flags|=1; PicoCpuCS68k.cycles=0; } } +#define SekIsStoppedS68k() (PicoCpuCS68k.state_flags&1) #define SekShouldInterrupt (PicoCpuCM68k.irq > (PicoCpuCM68k.srh&7)) #define SekInterrupt(i) PicoCpuCM68k.irq=i @@ -79,6 +80,7 @@ extern M68K_CONTEXT PicoCpuFM68k, PicoCpuFS68k; PicoCpuFS68k.execinfo &= ~FM68K_HALTED; \ if (x) { PicoCpuFS68k.execinfo |= FM68K_HALTED; PicoCpuFS68k.io_cycle_counter = 0; } \ } +#define SekIsStoppedS68k() (PicoCpuFS68k.execinfo&FM68K_HALTED) #define SekShouldInterrupt fm68k_would_interrupt() #define SekInterrupt(irq) PicoCpuFM68k.interrupts[0]=irq @@ -111,9 +113,10 @@ extern m68ki_cpu_core PicoCpuMM68k, PicoCpuMS68k; if(x) { SET_CYCLES(0); PicoCpuMS68k.stopped=STOP_LEVEL_STOP; } \ else PicoCpuMS68k.stopped=0; \ } +#define SekIsStoppedS68k() (PicoCpuMS68k.stopped==STOP_LEVEL_STOP) #define SekShouldInterrupt (CPU_INT_LEVEL > FLAG_INT_MASK) -#define SekInterrupt(irq) { +#define SekInterrupt(irq) { \ void *oldcontext = m68ki_cpu_p; \ m68k_set_context(&PicoCpuMM68k); \ m68k_set_irq(irq); \ @@ -478,16 +481,18 @@ PICO_INTERNAL void z80_exit(void); #define EL_SRAMIO 0x0200 /* sram i/o */ #define EL_EEPROM 0x0400 /* eeprom debug */ #define EL_UIO 0x0800 /* unmapped i/o */ -#define EL_IO 0x1000 /* all i/o (TODO) */ +#define EL_IO 0x1000 /* all i/o */ +#define EL_CDPOLL 0x2000 /* MCD: log poll detection */ #define EL_STATUS 0x4000 /* status messages */ -#define EL_ANOMALY 0x8000 /* some unexpected conditions */ +#define EL_ANOMALY 0x8000 /* some unexpected conditions (during emulation) */ #if EL_LOGMASK +extern void lprintf(const char *fmt, ...); #define elprintf(w,f,...) \ { \ if ((w) & EL_LOGMASK) \ - printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__); \ + lprintf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__); \ } #else #define elprintf(w,f,...)