[Soft-Float] - Fixes Tony Hawk Pro Skater 4 Mul issue.

The game sends some super low floats to the Mul unit.

On PS2, floats with exponent zero should return zero, but this is not the case in Mul, the multiplier can work with denormals internally.

I love when undocumented stuff is used by some games for their 3D engine ^^.
This commit is contained in:
GitHubProUser67 2024-11-13 16:09:02 +01:00
parent de047eaa40
commit b7f38061df
1 changed files with 1 additions and 1 deletions

View File

@ -399,7 +399,7 @@ Ps2Float Ps2Float::DoMul(Ps2Float other)
if (resExponent > 255)
return result.Sign ? Min() : Max();
else if (resExponent <= 0)
else if (resExponent < 0)
return Ps2Float(result.Sign, 0, 0);
uint32_t testImprecision = otherMantissa ^ ((otherMantissa >> 4) & 0x800); // For some reason, 0x808000 loses a bit and 0x800800 loses a bit, but 0x808800 does not