From: kub Date: Tue, 4 Oct 2022 21:11:26 +0000 (+0000) Subject: core, TH input latency only if output was low X-Git-Tag: v2.00~284 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2a5b098e052785754fe67bf2d926cfc36357291;p=picodrive.git core, TH input latency only if output was low --- diff --git a/pico/memory.c b/pico/memory.c index e76082a0..03450191 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -416,8 +416,8 @@ NOINLINE void io_ports_write(u32 a, u32 d) // after switching TH to input there's a latency before the pullup value is // read back as input (see Decap Attack, not in Samurai Showdown, 32x WWF Raw) if (4 <= a && a <= 5) { - if ((PicoMem.ioports[a] & 0x40) && !(d & 0x40)) - // latency after switching to input + if ((PicoMem.ioports[a] & 0x40) && !(d & 0x40) && !(PicoMem.ioports[a - 3] & 0x40)) + // latency after switching to input and output was low padTHLatency[a - 4] = SekCyclesDone() + 25; }