Emulator Issues #546
closedFloating point math errors (F-Zero, Super Monkey Ball 1/2/Wii)
0%
Description
What steps will reproduce the problem?
- Start game
What is the expected output? What do you see instead?
- The game should run correctly.
- Instead, there are very strange graphical glitches.
- We have hacky workarounds for Super Monkey Ball 1 but there are still
problems. SMB2/Wii/F-Zero still have problems.
The root cause is that these games use a completely mad math library that
relies on the status of weird flags in FPSCR after simple operations like
fmul or frsp. We do not emulate these flags correctly since the performance
hit would be prohibitive and nearly zero games read them. Unfortunately,
this number is obviously not zero.
One solution would be to pull in soft-float-ppc from the linux kernel and
use it for a small range of code (the mad math library), hardcoded (or
ini-defined) per game. Another would be to HLE the offending functions.
This was done with some success for Super Monkey Ball but I have not been
able to fix all the problems in F-Zero yet.