X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=Pico%2FPico.c;h=96a6da0cad32f89676bec08f7833525632005289;hb=c77ca79e899d9cff96f90a2c5b6a866cf02ed47e;hp=73321bce7427a0e5560cad215f90dce0da6b90af;hpb=1dceadaee482ad3ca6f5ccbef57ea93893f45e82;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index 73321bc..96a6da0 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -16,14 +16,13 @@ int PicoOpt=0; // disable everything by default int PicoSkipFrame=0; // skip rendering frame? int PicoRegionOverride = 0; // override the region detection 0: Auto, 1: Japan NTSC, 2: Japan PAL, 4: US, 8: Europe int PicoAutoRgnOrder = 0; -int emustatus = 0; +int emustatus = 0; // rapid_ym2612, multi_ym_updates void (*PicoWriteSound)(int len) = 0; // called once per frame at the best time to send sound buffer (PsndOut) to hardware struct PicoSRAM SRam = {0,}; int z80startCycle, z80stopCycle; // in 68k cycles -//int z80ExtraCycles = 0; int PicoPad[2]; // Joypads, format is SACB RLDU -int PicoMCD = 0; // mega CD status: scd_started, reset_pending +int PicoMCD = 0; // mega CD status: scd_started // to be called once on emu init int PicoInit(void) @@ -199,7 +198,7 @@ PICO_INTERNAL int CheckDMA(void) return burn; } -static __inline void SekRun(int cyc) +static __inline void SekRunM68k(int cyc) { int cyc_do; SekCycleAim+=cyc; @@ -265,6 +264,8 @@ static int CheckIdle(void) return 0; } +void lprintf_al(const char *fmt, ...); + // to be called on 224 or line_sample scanlines only static __inline void getSamples(int y) { @@ -496,7 +497,7 @@ static int PicoFrameSimple(void) if (CheckIdle()) break; lines += lines_step; - SekRun(cycles_68k_block); + SekRunM68k(cycles_68k_block); PicoRunZ80Simple(line, lines); line=lines; @@ -541,7 +542,7 @@ static int PicoFrameSimple(void) // a gap between flags set and vint pv->pending_ints|=0x20; pv->status|=8; // go into vblank - SekRun(68+4); + SekRunM68k(68+4); // ---- V-Blanking period ---- // fix line counts @@ -568,7 +569,7 @@ static int PicoFrameSimple(void) while (sects) { lines += lines_step; - SekRun(cycles_68k_vblock); + SekRunM68k(cycles_68k_vblock); PicoRunZ80Simple(line, lines); line=lines; @@ -625,7 +626,7 @@ void PicoFrameDrawOnly(void) // callback to output message from emu void (*PicoMessage)(const char *msg)=NULL; -#if defined(__DEBUG_PRINT) || defined(__GP2X__) +#if defined(__DEBUG_PRINT) || defined(__GP2X__) || defined(__GIZ__) // tmp debug: dump some stuff #define bit(r, x) ((r>>x)&1) void z80_debug(char *dstr);