X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fsms.c;h=dfe7769ee40f370036263d3d0ec234018a8902aa;hb=eaa10a6eb80b6e60210df27ad6b6ccb9c0ae9e66;hp=ba9be50d1ca8145a2e5d1b4e809df0ed0ec4265f;hpb=87b0845f3733166b491ae236feb8bc2eb0fca2ec;p=picodrive.git diff --git a/pico/sms.c b/pico/sms.c index ba9be50..dfe7769 100644 --- a/pico/sms.c +++ b/pico/sms.c @@ -9,6 +9,7 @@ * - H counter */ #include "pico_int.h" +#include "memory.h" #include "sound/sn76496.h" static unsigned char vdp_data_read(void) @@ -141,6 +142,7 @@ static int bank_mask; static void write_bank(unsigned short a, unsigned char d) { + elprintf(EL_Z80BNK, "bank %04x %02x @ %04x", a, d, z80_pc()); switch (a & 0x0f) { case 0x0c: @@ -234,6 +236,7 @@ void PicoFrameMS(void) int lines = is_pal ? 313 : 262; int cycles_line = is_pal ? 58020 : 58293; /* (226.6 : 227.7) * 256 */ int cycles_done = 0, cycles_aim = 0; + int skip = PicoSkipFrame; int lines_vis = 192; int hint; // Hint counter int y; @@ -245,7 +248,7 @@ void PicoFrameMS(void) { pv->v_counter = Pico.m.scanline = y; - if (y < lines_vis) + if (y < lines_vis && !skip) PicoLineMode4(y); if (y <= lines_vis) @@ -272,7 +275,8 @@ void PicoFrameMS(void) cycles_done += z80_run((cycles_aim - cycles_done) >> 8) << 8; } - PsndGetSamplesMS(); + if (PsndOut) + PsndGetSamplesMS(); } void PicoFrameDrawOnlyMS(void)