From cc4ab9bc25227ebada38aadfafd49ff3abf3c218 Mon Sep 17 00:00:00 2001 From: byuu <2107894+byuu@users.noreply.github.com> Date: Sat, 28 Dec 2019 13:53:06 +0900 Subject: [PATCH] Added workaround to reduce auto-joypad polling delays (until we can emulate the behavior more faithfully) --- bsnes/sfc/cpu/timing.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bsnes/sfc/cpu/timing.cpp b/bsnes/sfc/cpu/timing.cpp index 20d76f07..d4f713bd 100644 --- a/bsnes/sfc/cpu/timing.cpp +++ b/bsnes/sfc/cpu/timing.cpp @@ -5,7 +5,11 @@ auto CPU::dmaCounter() const -> uint { //joypad auto-poll clock divider auto CPU::joypadCounter() const -> uint { - return counter.cpu & 255; + //todo: this should be &255, but it causes too many issues in games, due to incomplete emulation: + //Nuke (PD): inputs do not work (unless clearing $421x to $00) + //Taikyoku Igo - Goliath: start button not acknowledged (unless clearing $421x to $ff) + //Tatakae Genshijin 2: attract sequence ends early + return counter.cpu & 31; } auto CPU::stepOnce() -> void {