From e2a5b098e052785754fe67bf2d926cfc36357291 Mon Sep 17 00:00:00 2001 From: kub Date: Tue, 4 Oct 2022 21:11:26 +0000 Subject: [PATCH] core, TH input latency only if output was low --- pico/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.5