Emulator Issues #6096
Super Mario Sunshine JIT And Interpreter causes in-accurate collision detection in Pianta Village 5
Have you searched the issue tracker for a similar issue?
Super Mario Sunshine
What went wrong?
During Pianta Village 5 (the chuckster special stage) on the last throw, there is a catcher platform that, for some reason, if you hit the slanted wall and it pulls you toward the flat wall, you instantly die. This happens on both JIT and Interpreter, but surprisingly not JITIL. Dolphin is mostly accurate in collision bugs and tricks; this is easily the most blatant problem and easiest to show off. This happens in PAL as well.
What steps will reproduce the problem?
Go to Pianta Village Shine 5 (Entrance on top of The Shine Tower) and enter the special stage (Below the main area, need Yoshi.) On the very last throw, if you get thrown into the slanted walls and hit the back wall, you will die.
What version of Dolphin were you using?
From what I've heard, this bug has existed since 3.0, and has been confirmed to happen in 3.5. I was doing primary testing in 3.5-644 r83fc5f4747f9c8c6066bf002730827ecc17458aa That is also where the savestate was made from.
What Operating System were you using and what are your hardware
I was using Windows 7 x64, with a Core i5 760 @ 3.8 GHz and a GTX 280, 8 gigs of Ram.
Any other relevant information or links to logs:
Here's a demonstration screenshot of me dying: http://i.imgur.com/29H4VsC.png
Here's a savestate right before the last throw: http://www.mediafire.com/download.php?0lvluz5oboho6y8
Here's a GCI with all the saves at 100%: http://www.mediafire.com/download.php?wgatbaym3y0n540
#8 Updated by comexk about 7 years ago
To summarize discussion on IRC:
The issue is caused by inaccurate emulation of the frsqrte instruction. The correct behavior exists in the interpreter, but is currently hidden behind a define because it's somewhat complicated (uses a lookup table) and was not previously known to make a difference in any games. It does not exist in JitIL: x86 RSQRTSS (a single-precision operation), used by JitIL, is more accurate than the naive solution (in double precision), used by Jit64 and the interpreter without the define, at emulating fsqrte (a double-precision operation) in this specific instance, but this is probably not reliable. Since fsqrte does not seem to be used that often, interpreting it would probably work; after making this change on my machine running Sunshine under Jit64, Interpreter::frsqrtex only takes up 0.1% CPU.
#12 Updated by JMC4789 over 6 years ago
- Status changed from Accepted to Fixed
fixed in 4.0-1706 -> https://dolphin-emu.org/download/dev/cffa848b9960bcf3dd7a5f3dfd8cdbe417b6ec55/