pokemon-speedrunning / gambatte-speedrun

Fork of https://github.com/sinamas/gambatte with Pokemon speedrunning-related changes.
GNU General Public License v2.0
94 stars 27 forks source link

Add very partial support for exiting stop from a joypad interrupt #73

Closed CasualPokePlayer closed 3 years ago

CasualPokePlayer commented 3 years ago

This keeps all of the "make stop really stop" while letting a joypad interrupt request actually allow stop mode to be exited. It doesn't do anything to actually improve the current stop mode implementation (ie screen doesn't black out or anything like it should), but just allows the correct functionality to work as it should.

CasualPokePlayer commented 3 years ago

Ok realizing some time later that it's not the joypad IRQ that actually causes stop to exit, but rather it's just the button press (which of course won't be detected if rP1 doesn't have anything selected, but just like the joypad IRQ doesn't care if rIE or IME is set), which happens to also cause a joypad IRQ (but it's not the IRQ that causes stop mode to exit, but rather it's the same cause as that IRQ).

A better fix needs to be done to really have proper emulation, hopefully can come someday.