X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.c;h=93d6876460f887e3fa5624e724b9fdd7889865eb;hb=d4ca252d929395352f581b532e9d3726da31d718;hp=bb0f6e5b819a4c9a687a27d856d81685cfb8e3ef;hpb=f8ef8ff7100baa0ac0ecfcacb47aea3a9e24bc38;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index bb0f6e5..93d6876 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -19,6 +19,7 @@ int PicoAutoRgnOrder = 0; int emustatus = 0; // rapid_ym2612, multi_ym_updates 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; struct PicoSRAM SRam = {0,}; int z80startCycle, z80stopCycle; // in 68k cycles @@ -363,6 +364,7 @@ static int PicoFrameSimple(void) SekRunM68k(cycles_68k_block); PicoRunZ80Simple(line, lines); + if (PicoLineHook) PicoLineHook(lines_step); line=lines; } @@ -376,6 +378,7 @@ static int PicoFrameSimple(void) lines += sects*lines_step; PicoRunZ80Simple(line, lines); + if (PicoLineHook) PicoLineHook(sects*lines_step); } // render screen @@ -439,6 +442,7 @@ static int PicoFrameSimple(void) SekRunM68k(cycles_68k_vblock); PicoRunZ80Simple(line, lines); + if (PicoLineHook) PicoLineHook(lines_step); line=lines; sects--; @@ -449,6 +453,7 @@ static int PicoFrameSimple(void) if (sects) { lines += sects*lines_step; PicoRunZ80Simple(line, lines); + if (PicoLineHook) PicoLineHook(sects*lines_step); } return 0; @@ -576,14 +581,6 @@ char *debugString(void) } #endif -#if 0 - { - FILE *f = fopen("zram", "wb"); - fwrite(Pico.zram, 1, 0x2000, f); - fclose(f); - } -#endif - return dstr; } #endif