bsnes-emu / bsnes

bsnes is a Super Nintendo (SNES) emulator focused on performance, features, and ease of use.
Other
1.68k stars 156 forks source link

Mouse input is polled on latch from 0 -> 1 #236

Open Morilli opened 2 years ago

Morilli commented 2 years ago

In https://github.com/bsnes-emu/bsnes/blob/master/bsnes/sfc/controller/mouse/mouse.cpp#L67, controller input for the mouse is polled no matter whether the latch state goes from 0 -> 1 or from 1 -> 0. My understanding (from what I was told) is that input should only be polled on a 1 -> 0 transition and there should be a similar guard as in this line.

I know literally nothing about the hardware though, so please correct me if I'm wrong.