From 4ea984b6886ecb61afc26c177eeced77e8582a44 Mon Sep 17 00:00:00 2001 From: Tim Allen Date: Sun, 4 Apr 2021 21:53:33 +1000 Subject: [PATCH] sfc: You can turn off auto-joypad-polling while it's in progress. Discovered by Jonas Quinn, and originally implemented for higan in commit e422ddc. --- bsnes/sfc/cpu/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsnes/sfc/cpu/io.cpp b/bsnes/sfc/cpu/io.cpp index 5e90b587..3338051c 100644 --- a/bsnes/sfc/cpu/io.cpp +++ b/bsnes/sfc/cpu/io.cpp @@ -134,9 +134,9 @@ auto CPU::writeCPU(uint addr, uint8 data) -> void { controllerPort2.device->latch(data & 1); return; - //todo: it is not known what happens when writing to this register during auto-joypad polling case 0x4200: //NMITIMEN io.autoJoypadPoll = data & 1; + if(!io.autoJoypadPoll) status.autoJoypadCounter = 33; // Disable auto-joypad read nmitimenUpdate(data); return;