Project

General

Profile

Actions

Emulator Issues #546

closed

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

Added by hrydgard almost 16 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 #1

Updated by Isamu99 almost 16 years ago

hrydgard I just wanted to say thank you VERY much for working on getting F-ZeroGX
playable via Dolphin. It is my favorite game of all time and I can't wait for the day
it's fully playable in Dolphin. You have my sincere gratitude and I'm confident you
will work your magic to make this dream happen. Good luck my friend and thanks again :)

Actions #2

Updated by marcus over 15 years ago

Does this have anything to do with the camera problems in smb:bb?

Actions #3

Updated by XTra.KrazzY over 15 years ago

no.

Actions #4

Updated by marcus over 15 years ago

oh...then what's the problem with it then?
(I thought they might be related because smb1 has a similar issue in the name entry
course)

Actions #5

Updated by marcus over 15 years ago

Well now mkb1 crashes right after the av logo...

Actions #6

Updated by Anonymous over 15 years ago

how prohibitive speed wise? :>
These flags are not emulated correctly, even in interpreter?

Actions #7

Updated by XTra.KrazzY over 15 years ago

How about it now?

Actions #8

Updated by marcus over 15 years ago

None of the monkey balls get past the menu for me :(

Actions #9

Updated by MrMister1991 over 15 years ago

Damn, I got email about someone updating this issue only to be disappointed again. :(
I want to play F-Zero GX at 720p so bad!

Actions #10

Updated by hrydgard over 15 years ago

These flags are now emulated correctly, if you enable an option which is auto-enabled
for all the monkey balls and F-Zero.

However, this doesn't help F-Zero, it should've, but it didn't, it has more problems :(

Super Monkey Ball 2 has never really worked, but Super Monkey Ball 1 still works just
fine, at least for me .. what country is your version marc?

Actions #11

Updated by marcus over 15 years ago

NTSC (US)...

Actions #12

Updated by hrydgard almost 15 years ago

  • Status changed from New to Fixed

F-Zero's problem had nothing to do with this. This issue has been fixed.

Actions

Also available in: Atom PDF