X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.c;h=97d7cc5167a38c87ec9e358a9f64e8a0ecc05113;hb=8187ba84b7ed56e2535a8381ac66fb5b32414b39;hp=77f20231f0b3ee7c62bde0ce39f03f13847f3af2;hpb=d9fc2fe1ac69169861cb60b62ccc9fbc6e4fd4c6;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index 77f2023..97d7cc5 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -23,7 +23,7 @@ struct PicoSRAM SRam = {0,}; void (*PicoWriteSound)(int len) = NULL; // called at the best time to send sound buffer (PsndOut) to hardware void (*PicoResetHook)(void) = NULL; -void (*PicoLineHook)(int count) = NULL; +void (*PicoLineHook)(void) = NULL; // to be called once on emu init void PicoInit(void) @@ -250,7 +250,7 @@ static __inline void SekRunM68k(int cyc) #elif defined(EMU_M68K) SekCycleCnt+=m68k_execute(cyc_do); #elif defined(EMU_F68K) - SekCycleCnt+=fm68k_emulate(cyc_do+1, 0); + SekCycleCnt+=fm68k_emulate(cyc_do+1, 0, 0); #endif } @@ -308,17 +308,8 @@ PICO_INTERNAL void PicoSyncZ80(int m68k_cycles_done) } -int idle_hit_counter = 0; - void PicoFrame(void) { -#if 0 - if ((Pico.m.frame_count&0x3f) == 0) { - elprintf(EL_STATUS, "ihits: %i", idle_hit_counter); - idle_hit_counter = 0; - } -#endif - Pico.m.frame_count++; if (PicoAHW & PAHW_MCD) { @@ -363,13 +354,22 @@ char *debugString(void) static char dstr[1024]; struct PicoVideo *pv=&Pico.video; unsigned char *reg=pv->reg, r; + extern int HighPreSpr[]; + int i, sprites_lo, sprites_hi; char *dstrp; + sprites_lo = sprites_hi = 0; + for (i = 0; HighPreSpr[i] != 0; i+=2) + if (HighPreSpr[i+1] & 0x8000) + sprites_hi++; + else sprites_lo++; + dstrp = dstr; - sprintf(dstrp, "mode set 1: %02x\n", (r=reg[0])); dstrp+=strlen(dstrp); + sprintf(dstrp, "mode set 1: %02x spr lo: %2i, spr hi: %2i\n", (r=reg[0]), sprites_lo, sprites_hi); + dstrp+=strlen(dstrp); sprintf(dstrp, "display_disable: %i, M3: %i, palette: %i, ?, hints: %i\n", bit(r,0), bit(r,1), bit(r,2), bit(r,4)); dstrp+=strlen(dstrp); - sprintf(dstrp, "mode set 2: %02x\n", (r=reg[1])); dstrp+=strlen(dstrp); + sprintf(dstrp, "mode set 2: %02x hcnt: %i\n", (r=reg[1]), pv->reg[10]); dstrp+=strlen(dstrp); sprintf(dstrp, "SMS/gen: %i, pal: %i, dma: %i, vints: %i, disp: %i, TMS: %i\n", bit(r,2), bit(r,3), bit(r,4), bit(r,5), bit(r,6), bit(r,7)); dstrp+=strlen(dstrp); sprintf(dstrp, "mode set 3: %02x\n", (r=reg[0xB])); dstrp+=strlen(dstrp);