-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Soft-Float] - Initial Interpreter Implementation of Ps2's floating point unit specification #12001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting a contribution to PCSX2
As this is your first pull request, please be aware of the contributing guidelines.
Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.
Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!
|
Does this work on the recompilers or just interpreter? |
|
You should try reading the title. |
96414bd to
de047ea
Compare
I don’t know why my brain just skimmed over that. |
|
I ran a bunch of tests for "Test Drive Unlimited" AI during the demo scene after sitting idle on the menu. No combination of settings/interpreters seems to have any effect on behavior. There must be something else going on |
|
Shouldn't this help with #2990 as well? |
I remember seeing on the public dev channel that stuntman not longer had AI issues with this and not longer the car AI failed? it's been a while |
|
I tested the demo replays of Tokyo Xtreme Racer Zero (see issue #5597 ) and noticed that the car movement in interpreter mode is now closer to the movement in recompiler mode. comp.mp4 |
|
The Tony Hawk case is fixed, the game uses an un-documented behaviour in it's 3D engine. The PS2 has no denormals support .... except in the Mul unit apparently. The behaviour is now emulated properly. |
@AmyRoxwell Can you provide a reference to this? There's no indication of it being fixed in #2990, and I assume the devs would have closed it if it were. In any event it involves pathing in Driver 3 as well. |
2024-11-10.14-28-32.mp4This also affects the Fatal Frame 1 issue. Meaning this + the current GameDB patch will end up being the ultimate fix |
|
This pr's EE interpreter fixes #11636 's gamedb issue. |
I meant like, while using this PR, not that is has been fixed. Sorry if it was misunderstood. But if it's not mention on the PR maybe the thing it needs it's not here by this initial implementation. |
|
Driv3r seemed fine when it was tested, Stuntman NTSC is a lot better but still can "slightly" deviate. I suspect it is once again, the interpreter rounding/clamping values somewhere. |
|
@AmyRoxwell Ah, I understand you now. That's great news. @GitHubProUser67 Thanks, nice to see Driv3r is looking better. Would it make sense to list these games in your OP? |
|
Nice to hear of stuntman finally faring better nowadays. |
|
Game Constantine, tested US version. On level 2 there is dumpster that we need to climb to progress in game. Recompiler get it fine with positive rounding for EE. This is currently not working with soft floats, no matter what. Reproduction steps.
|
|
I managed to fix it, but the game requires accurate soft floats on the VU0 and the EE FPU, so far I tried with booth Add/Sub and Mul/Div on EE FPU/COP2 and VU0: Edit: Positive rounding hack-fix it because it makes the float VU0 friendly. In fact the game does some weird EE FPU->VU0 communications with high floats. |
|
Note to future tests: The constantine case is a typical case of a hack fixing a problem that is related to what I call "float broadcasting". A game might want to transfer a out of IEEE range float from the FPU to the VUs (and vice-versa). When a game Database entry has a rounding mode, usually it covers a can of worms where the game requires accurate soft floats on more than one processor. |
Ok. I'm just not very familiar with GitHub but thanks anyway. |
51eebc9 to
5c5c4c2
Compare
5c5c4c2 to
44280dd
Compare
|
What's the plan for this PR? |
|
I am on it, I know I am late, I will try to get back to it asap. |
44280dd to
811a0ed
Compare
1e76f79 to
cf64b86
Compare
|
Hello, any news on this PR? Will it be released now? |
|
So, I will update it fairly soon with the review points, I couldn't before because of some issues I had to fix on my server. I will try my best to finish it for december hopefully. |
1eb310f to
179a4de
Compare
…terpreters.nit specification. This work is a combination or several efforts and researches done prior. Credits: - https://www.gregorygaines.com/blog/emulating-ps2-floating-point-nums-ieee-754-diffs-part-1/ - https://github.com/GitHubProUser67/MultiServer3/tree/main/BackendServices/PS2FloatLibrary - https://github.com/Goatman13/pcsx2/tree/accurate_int_add_sub - PCSX2 Team for their help and support in this massive journey. Fixes codacity warnings.
This commit fixup a calculation mistake in add/sub when dealing with booth numbers that are denormals.
…/TheLastRar/pcsx2/tree/softfoat-ui I am sorry for the manual merging, hopefully credits are enough in the commit title.
This commit fixes an XML syntax issue in the visual studio filters file.
We want 100% compatibility for EFU, which is not the case yet.
…e recommandations. In some cases, a Zero value could have it's underflow flag skipped, this is fixed. We also start to simplify the code a bit per recommandations done in the pull request.
179a4de to
bbfbca4
Compare
6d7682c to
8eb0bd5
Compare
|
Wooow, updates! 👏👏🚀 |
This commit applies one of the PR requests for BSR.











This Pull Request implements the first take ever on real Soft-Float support in PCSX2.
This work is a combination or several efforts and researches done prior.
Credits:
https://www.gregorygaines.com/blog/emulating-ps2-floating-point-nums-ieee-754-diffs-part-1/
https://github.com/assumenothing/Tommunism.SoftFloat/tree/main
https://github.com/GitHubProUser67/MultiServer3/blob/main/BackendServices/CastleLibrary/EmotionEngine.Emulator/Ps2Float.cs
https://github.com/Goatman13/pcsx2/tree/accurate_int_add_sub
PCSX2 Team for their help and support in this massive journey.
This pull request should be tested with every games requiring a clamping/rounding mode/float patches (cf: GameDatabase).
Currently, this PR fixes on the interpreters:
[BUG]: DJbox (Japan) - SCPS-15082 - 56275BE9 #5169
Ratchet & Clank 2 - Megaturret Doesn't Work Correctly #354
[BUG]: Tourist Trophy: License Tests are broken and not completeable, player is placed out of bounds #11507
[BUG]: Monster Hunter games: bounce calculation inaccuracy #10519
[BUG]: Opening demo desyncs. The Taxi 2 (SLPS-20478) #8068
[BUG]: Pride FC - Fighting Championship | Missing text and textures in Hardware and Software render modes. #7642
[BUG]: Jak & Daxter/Jak 3 -- Character slides on his own | Jak 2 -- Inclined Camera Drift #5257
[BUG]: Final Fantasy X Tidus Falls Through Lift #8228
[BUG] [REGRESSION]: Final Fantasy X Bosses Turn Invisible During Death Animation #8595
[Feature Request]: Final Fantasy X GameDB Config #10885
[BUG]: Driv3r - Bizarre AI (?) problem: impossible to pass "Lead On Baccus" mission (the 2nd mission) #11714
[BUG]: Camera is static in Prince of Persia: Warrior Within menu #5070
[BUG] World Series of Poker 2008 - Battle for the Bracelets: Broken character geometry #4546
Meta: Games that don't like the Full fpu mode. #2245
[BUG]: FPU rounding issues in Shadow of the Colossus (SCUS-97472) #11528
[BUG]: Tourist Trophy: License Tests are broken and not completeable, player is placed out of bounds #11507
[BUG]: Disney's UP TLB Miss #4760
[BUG]: Need for Speed Undercover not loading save games properly unless they’re created within PCSX2 #9831
Gran Turismo 4 license tests
Mortal Combat Shaolin Monks
Tokyo Xtreme Racer Zero (Accurate Mul/Div for the EE FPU)
Any other games using the NegDiv hack or any other FPU rounding mode.
This sets the floor for Soft-Float in PCSX2, a long awaited contribution.