Skip to content
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

Ratchet UYA, Deadlocked: Add 60 FPS splitscreen patch #383

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SuperSamus
Copy link

@SuperSamus SuperSamus commented Jun 28, 2024

These patches allow "Ratchet & Clank: Up Your Arsenal" and "Ratchet: Deadlocked" to play at 60 FPS during splitscreen modes, instead of the regular 30 FPS.
In reality, it was two physics steps per frame, so the physics aren't changed. What the patch does is simply removing a physics step and a Vsync in the splitscreen loop.

Usage notes

  • Requires a lot of EE overclock, preferably 180%. Unfortunately, 300% corrupts the graphics.
  • Frameskipping is supported, if the emulated CPU can't keep up.
    • However, if it can't handle 30 FPS either, the game will slow down.
      • At 180%, this is going to be an issue only on Endzone.

Testing done

  • Deadlocked's campaign has been thoroughly tested, start to finish
  • In the PvP modes, the only testing I did is that they work
    • 3/4 players in particular needs more testing (see the comments)

For reviewers

  • The frameskip, just like normally, is based on whether the value of REG_RCNT1_COUNT reaches a certain threshold, I only lowered its threshold because the regular one was too high. The value I inserted was obtained through trial and error, I don't know if I could use math to get a better value.
  • This only supports the NTSC versions of the games.
    • If you want to port it, good news! The code touched by the patch is in the "outermost" function executed during the splitscreen loop, so you can easily get there through the debugger (Step Out), then find which function does the physics step, and which one does the Vsync, through trial and error. Follow the comments for the rest.

(Original post on https://forums.pcsx2.net/Thread-60-fps-codes?pid=640315#pid640315, but I can't update it anymore)

Documentation

Up Your Arsenal

+  dynaPatches:
+    - pattern:
+        - { offset: 0x50, value: 0x24022D00 }
+        - { offset: 0x54, value: 0x0044180B }
+        - { offset: 0x58, value: 0x00A3182A }
+        - { offset: 0x68, value: 0x0000202D }
+      replacement:
+        - { offset: 0x08, value: 0x00000000 } # Remove the first physics step (not the second one: it does things like drawing the aiming reticle)
+        - { offset: 0x80, value: 0x00000000 } # Always take the "not 3/4 players" branch (I don't know what it's actually for, but without this, 3/4 players is broken)
+        - { offset: 0xF8, value: 0x00000000 } # Same, but for the frameskip branch (only useful if starting the match underclocked)
+        - { offset: 0x64, value: 0x00000000 } # Remove the first VSync (leaving the one that is never skipped)
+        # Feel free to tweak the last 4 digits of the value.
+        # If too low: the game will frameskip when it doesn't need to.
+        # If too high: the game may not realize that it needs to frameskip, and run at half speed. Avoid!
+        - { offset: 0xbc, value: 0x24032470 } # Reduce the time required to do another framestep (so that the game will frameskip if it can't keep up)

Deadlocked

+    - pattern:
+        - { offset: 0x58, value: 0xA2B01680 }
+        - { offset: 0x6C, value: 0xA2A01680 }
+        - { offset: 0x70, value: 0x3C030022 }
+        - { offset: 0x74, value: 0x8C63DDA4 }
+      replacement:
+        - { offset: 0x04, value: 0x00000000 } # Remove the first physics step (not the second one: it does things like drawing the aiming reticle)
+        - { offset: 0x50, value: 0x00000000 } # Always take the "not 3/4 players" branch (I don't know what it's actually for, but without this, 3/4 players is broken)
+        - { offset: 0x34, value: 0x00000000 } # Remove the first VSync (leaving the one that is never skipped)
+        # Feel free to tweak the last 4 digits of the value.
+        # If too low: the game will frameskip when it doesn't need to.
+        # If too high: the game may not realize that it needs to frameskip, and run at half speed. Avoid!
+        - { offset: 0x94, value: 0x24032470 } # Reduce the time required to do another framestep (so that the game will frameskip if it can't keep up)

@F0bes
Copy link
Member

F0bes commented Sep 26, 2024

I've merged the dynamic patches pr PCSX2/pcsx2#11801

Know that I've added a version field since you've last commented on the pr. The pr explains it.

@SuperSamus
Copy link
Author

SuperSamus commented Sep 26, 2024

The patches are now in the new format!

I'm still a little hesitant to undraft until the 3/4 player modes are more tested... (Only a little.)
Unfortunately, the PC required to play 3/4 players at full speed is... not something I own.

@SuperSamus SuperSamus changed the title [Needs dynaPatches] Ratchet UYA, Deadlocked: Add 60 FPS splitscreen patch Ratchet UYA, Deadlocked: Add 60 FPS splitscreen patch Sep 26, 2024
@dreamsyntax
Copy link

dreamsyntax commented Sep 29, 2024

Tested the new format patch on 2.1.174 for Ratchet Deadlocked co-op (2 hour test)
Finished up to and including Dark Cathedral (approx 28% game completion)

  • 180% EE Overclock
  • Set Blending Accuracy to Basic to ensure performance

Overall experience was stable other than some expected performance dips. It would potentially be worth enabling fine-tuning the EE Overclock to allow 190%/200% etc... but that's outside the scope of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants