From: kub Date: Mon, 24 Jun 2024 19:37:37 +0000 (+0200) Subject: core z80, revert non-working ebde43d (bus blocking DMA) X-Git-Tag: v2.00~24 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=711628f3a3d07cbaa7172636bcee4ebbe6e6b98c;p=picodrive.git core z80, revert non-working ebde43d (bus blocking DMA) --- diff --git a/pico/memory.c b/pico/memory.c index 17139a0d..34d0cf7b 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -565,7 +565,6 @@ void NOINLINE ctl_write_z80reset(u32 d) pprof_end_sub(m68k); } Pico.t.z80_busdelay &= 0xff; // also resets bus request - Pico.video.status &= ~PVS_Z80WAIT; YM2612ResetChip(); timers_reset(); } @@ -1373,11 +1372,6 @@ void PicoWrite16_32x(u32 a, u32 d) {} static void access_68k_bus(int delay) // bus delay as Q8 { // TODO: if the 68K is in DMA wait, Z80 has to wait until DMA ends - if (Pico.video.status & (PVS_CPUWR|PVS_CPURD)) { - z80_subCLeft(z80_cyclesLeft); // rather rough on both condition and action - // TODO the next line will cause audio lag in Overdrive 2 demo? - //Pico.video.status |= PVS_Z80WAIT; - } // 68k bus access delay for z80. The fractional part needs to be accumulated // until an additional cycle is full. That is then added to the integer part. diff --git a/pico/pico_cmn.c b/pico/pico_cmn.c index cd037899..af2e598c 100644 --- a/pico/pico_cmn.c +++ b/pico/pico_cmn.c @@ -125,12 +125,6 @@ static void do_timing_hacks_start(struct PicoVideo *pv) int cycles = PicoVideoFIFOHint(); SekCyclesBurn(cycles); // prolong cpu HOLD if necessary - if (pv->status & PVS_Z80WAIT) { - Pico.t.z80c_cnt += cycles_68k_to_z80(cycles); - if (!(pv->status & (PVS_CPUWR|PVS_CPURD))) - pv->status &= ~PVS_Z80WAIT; - } - // XXX how to handle Z80 bus cycle stealing during DMA correctly? if ((Pico.t.z80_buscycles -= cycles) < 0) Pico.t.z80_buscycles = 0; diff --git a/pico/pico_int.h b/pico/pico_int.h index 79997d9b..c57c5f6a 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -300,7 +300,6 @@ extern SH2 sh2s[2]; #define PVS_DMAFILL (1 << 20) // DMA fill is waiting for fill data #define PVS_DMABG (1 << 21) // background DMA operation is running #define PVS_FIFORUN (1 << 22) // FIFO is processing -#define PVS_Z80WAIT (1 << 23) // Z80 blocked by VDP DMA struct PicoVideo {