Project

General

Profile

Actions

Emulator Issues #546

closed

Floating point math errors (F-Zero, Super Monkey Ball 1/2/Wii)

Added by hrydgard over 15 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What steps will reproduce the problem?

  1. 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.

Actions

Also available in: Atom PDF