You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bit of a forward from mgba-emu/mgba#2202, but bsnes seems to suffer the same incorrect behavior that mGBA + other HLE SGB emulators have with incrementing the SGB Joypad number.
Simply be, this game expects to be able to increment the joypad number without writing $30 in between joypad reads. This is possible since all that is needed to increment the joypad number is P15 going from low to high, nothing else. The "lock" behavior currently in I believe was a simple misinterpretation of endrift's test results (re: 90f094b) going off the assumption that you need to write $30 to increment the joypad number (which was something someone came up with in the Pandocs, with no discernible source of this claim besides an implication from Nintendo documentation).
The results show that simple P15 low to highs will increment the joypad number, and implementing such behavior in other emus still pass endrift's previous tests. The fix is ultimately fairly simple here anyways.
On a minor slightly unrelated note, it seems like reads of joyp are also broken in the way that the written P14 and P15 bits do not get correctly set and are always read as low, which is incorrect. Might be something Sameboy needs to fix? I don't know /shrug
The text was updated successfully, but these errors were encountered:
A bit of a forward from mgba-emu/mgba#2202, but bsnes seems to suffer the same incorrect behavior that mGBA + other HLE SGB emulators have with incrementing the SGB Joypad number.
Simply be, this game expects to be able to increment the joypad number without writing $30 in between joypad reads. This is possible since all that is needed to increment the joypad number is P15 going from low to high, nothing else. The "lock" behavior currently in I believe was a simple misinterpretation of endrift's test results (re: 90f094b) going off the assumption that you need to write $30 to increment the joypad number (which was something someone came up with in the Pandocs, with no discernible source of this claim besides an implication from Nintendo documentation).
I wrote a test to prove this, which can be found here:
sgb-mlt-test.zip
https://github.com/CasualPokePlayer/test-roms/blob/sgb-mlt-test/src/intro.asm
The results show that simple P15 low to highs will increment the joypad number, and implementing such behavior in other emus still pass endrift's previous tests. The fix is ultimately fairly simple here anyways.
On a minor slightly unrelated note, it seems like reads of joyp are also broken in the way that the written P14 and P15 bits do not get correctly set and are always read as low, which is incorrect. Might be something Sameboy needs to fix? I don't know /shrug
The text was updated successfully, but these errors were encountered: