Time for some more framerate PlayStation 3 patches, or to be more specific, RPCS3 patches. You know, an emulator. With the knowledge gained with the previous post, I decided to tackle a series of titles, that is the Ratchet and Clank HD era games. Ranging from Tools of Destruction all the way to the Nexus.
Research and Patching
When I first boot up one of their games with the frame limit set to off, I saw this.
What about the newer games?
Alright, let’s fire up the debugger and see what we can find.
These look like a group of frametime values and after a little bit of trial and error it turns out that
E67B04 is the minimum frametime. Take note of the hex value
3C 5A 74 0E or
0.01333 in float. let’s try changing this to 0.005.
Is it really increased though? Introducing the tried and true method of… Looking at the ground.
Doing a search for this value in the executable shows that this is a base value for the min frametime value.
But wait, 13ms? wasn’t the cap we see in the game is 12ms?
Juhn the developer behind the KAMI, Kot(Cat) and Mouse Injector did some investigation and found out that this number is multiplied by 0.9
A little bit of code explanation,
lfs which loads float from offset to
f13 that has the 0.9 value, then loads into
f1 with 0.013333 and reads the value.
Then it gets multiplied by the
fmuls instruction and thus get us the 12ms we saw earlier.
That would be it for the rest of the games, right?
Starting with A Crack in Time, a later entry in the series, things changed. changing the value we previously discoverd works but has a side effect.
(If the video does not play in your web browser, right click and save the video to play it locally.)
In this case if it exceeds the minimum frametime set by the game it will speed up, it does not slow down below the target frametime but it speeds up, if above.
16.67ms is here to save our day, searching for
3c 88 88 89 and changing some values around resolved the issue.
Thought the headache was over? Far from it. Repeating the same method works in memory but there is no such value as
3C 5A 74 0E in the executable.
However, setting a breakpoint on that value got us here.
0072c1e4 lfd f1,0x8(param_1)=>DOUBLE_0072c140 = 0.013333333 // 3f 8b 4e 81 c0 00 00 00 0072c1e8 fsub f2,f3,f1 0072c1ec frsp f2,f2 0072c1f0 fsel f1,f2,f3,f1 0072c1f4 frsp 1,f1 0072c1f8 stfs f1,0x4(r31) // <-- breakpoint
Wait a minute, a double? They set the value initally in double, which is twice the bits as float for more accurate decimals and then converts it to float again.
The end results is the same as the rest of the games, unlocked framerate with no speedups.
If you enjoyed reading and would like to support, you can do so by supporting me my Patreon page or follow my YouTube channel and Blog for more content like this.
As always, I hope you learned something from these posts, catch you next time!
Juhn for explanation on framerate limits.
Note that the video below is recorded in slow motion to show the patch at its best.
For those looking to use the patch on the emulator, you can head over to the patch manager, click on the “Download Latest Patches” and find the patch you wanted to use with your game Title ID and version, click on the checkbox to enable the patch and save changes.
Thanks to the patrons who supported me on various platforms! You guys are awesome!
Monthly supporters: Patreon:
- Jeff Eberlin