RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.7k stars 1.93k forks source link

PPU: FCMPO inaccuracies #3516

Open AniLeo opened 7 years ago

AniLeo commented 7 years ago

Currently FCMPO has equal implementation as FCMPU.

Whenever [11] appears on comparison, it returns 00001000 on getFPSCR(), which is the correct value for FCMPU, but not for FCMPO. On a real PS3, this value is A0081000 on FCMPO. Since we fall back to using the same implemention of FCMPU, we're obtaining the wrong value here when using FCMPO.

Tested on Recompiler (LLVM), everything else besides that scenario is accurate.

Note: On Interpreters on RPCS3, the sample always returns 00000000 on getFPSCR(). Something is wrong there as well.

Verified with ppu_float_compare on latest RPCS3 and physical PS3.

hcorion commented 7 years ago

After doing some research the issue is that the NaN exceptions are not implemented. If you look at https://github.com/RPCS3/rpcs3/blob/adf119e960cc455d526de650bc53901fc1755a40/rpcs3/Emu/Cell/PPUTranslator.cpp#L4141-L4153 you can see the NaN exception calls are commented out (and if you do uncomment it, it doesn't compile).

Perhaps this could be added to the roadmap?

dio-gh commented 5 years ago

Needs updating / retesting.

elad335 commented 5 years ago

Interpreter's bug has been fixed.

dio-gh commented 5 years ago

So it's still an issue on the recompiler? Would make sense to keep the ticket open then I guess.

elad335 commented 5 years ago

Yes, but they are both on the same state now.

dio-gh commented 5 years ago

Closable then. :tada:

elad335 commented 5 years ago

I meant only this.

Note: On Interpreters on RPCS3, the sample always returns 00000000 on getFPSCR(). Something is wrong there as well.