ares-emulator / ares

ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation.
https://ares-emu.net
Other
865 stars 105 forks source link

[SNES] Possible issue with auto joypad polling #970

Open Max833 opened 1 year ago

Max833 commented 1 year ago

Describe the bug / Steps to reproduce the behavior:

When you are in a soccer game in "Zenkoku Koukou Soccer 2 (Japan)" and want to pause the game with "start", you will notice that it can't be accessed safely without it closing immediately. Some time ago there was a game that had a very similar issue and was later fixed:

SpellCraft - Aspects of Valor , https://github.com/bsnes-emu/bsnes/commit/4f7a269ba5d053bb824b5ffa0978799331a5f2d8

Maybe past fixes are helpful as well:

https://github.com/bsnes-emu/bsnes/search?o=desc&q=joypad&s=committer-date&type=commits

Especially: https://github.com/bsnes-emu/bsnes/commit/39c37ec2d1bfcc6b2ee8ae8995fb862eb77c9248

remutro commented 1 year ago

Note: The commit referenced here: https://github.com/bsnes-emu/bsnes/commit/39c37ec2d1bfcc6b2ee8ae8995fb862eb77c9248 already exists in ares.

Max833 commented 1 year ago

Yes, bsnes has the exact same issue and Spellcraft is working in both emulators, but something is not 100% right yet.

FitzRoyX commented 1 year ago

If you tap it quickly enough it does stay paused, however snes9x you can press and hold and it will stay paused. Can anyone check hardware with a flash cart to verify it's not just bad programming on the game's part?

Max833 commented 10 months ago

Mesen improved auto-read emulation. There is a new test rom as well. Maybe this is helpful. You can read a lot more about this topic in the "SNES development" discord server.

Mesen changes https://github.com/SourMesen/Mesen2/commit/efcf0d1523995df31a714391ea53a046fb0b4ba4

Source https://github.com/undisbeliever/snes-test-roms/blob/master/src/hardware-tests/auto-joy-timing-test.asm

ROM auto-joy-timing-test.zip

FitzRoyX commented 7 months ago

The test rom is not pass/fail, so we have no idea what min/max results are on a real snes unless someone here tests it

ares ares

mesen2 mesen2

snes9x snes9x

Morilli commented 7 months ago

According to what's been posted on the discord, the expected console values are

cur min max
start - 002A/002C 0070
end - 004B/004C 009C/009B

which seems to match mesen2's results.