X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fpico_cmn.c;h=e2ec0e1ab057d537d8e3cc1e37bf481b991c24d1;hb=a4dfdb6de1d63aed997554c347cd36cc33b134a3;hp=bdf48cfa40e3dd7c4c154947906153b378eda154;hpb=08769494e89920b5987f10c9d15e33e4e0110930;p=picodrive.git diff --git a/pico/pico_cmn.c b/pico/pico_cmn.c index bdf48cf..e2ec0e1 100644 --- a/pico/pico_cmn.c +++ b/pico/pico_cmn.c @@ -1,6 +1,6 @@ /* - * common code for pico.c and cd/pico.c - * (C) notaz, 2007-2009 + * common code for base/cd/32x + * (C) notaz, 2007-2009,2013 * * This work is licensed under the terms of MAME license. * See COPYING file in the top-level directory. @@ -157,6 +157,7 @@ static int PicoFrameHints(void) } // Run scanline: + line_base_cycles = SekCyclesDone(); if (Pico.m.dma_xfers) SekCyclesBurn(CheckDMA()); CPUS_RUN(CYCLES_M68K_LINE); @@ -201,6 +202,8 @@ static int PicoFrameHints(void) // there must be a delay after vblank bit is set and irq is asserted (Mazin Saga) // also delay between F bit (bit 7) is set in SR and IRQ happens (Ex-Mutants) // also delay between last H-int and V-int (Golden Axe 3) + line_base_cycles = SekCyclesDone(); + if (Pico.m.dma_xfers) SekCyclesBurn(CheckDMA()); CPUS_RUN(CYCLES_M68K_VINT_LAG); if (pv->reg[1]&0x20) { @@ -232,7 +235,6 @@ static int PicoFrameHints(void) } // Run scanline: - if (Pico.m.dma_xfers) SekCyclesBurn(CheckDMA()); CPUS_RUN(CYCLES_M68K_LINE - CYCLES_M68K_VINT_LAG - CYCLES_M68K_ASD); if (PicoLineHook) PicoLineHook(); @@ -253,6 +255,7 @@ static int PicoFrameHints(void) PAD_DELAY(); // Run scanline: + line_base_cycles = SekCyclesDone(); if (Pico.m.dma_xfers) SekCyclesBurn(CheckDMA()); CPUS_RUN(CYCLES_M68K_LINE);