Add high frame rate fixes for 2D splines & down force.

This commit is contained in:
Skyth 2024-10-18 15:40:07 +03:00
parent e899f32f0e
commit d29dd06dce
2 changed files with 58 additions and 1 deletions

View file

@ -162,4 +162,14 @@ PPC_FUNC(sub_825197C0)
__imp__sub_825197C0(ctx, base); __imp__sub_825197C0(ctx, base);
} }
void HighFrameRateDeltaTimeFixMidAsmHook(PPCRegister& f1)
{
// Having 60 FPS threshold ensures we still retain
// the original game behavior when locked to 30/60 FPS.
constexpr double threshold = 1.0 / 60.0;
if (f1.f64 < threshold)
f1.f64 = threshold;
}
#pragma endregion #pragma endregion

View file

@ -140,4 +140,51 @@ jump_address_on_true = 0x827A2E4C
[[midasm_hook]] [[midasm_hook]]
name = "SetXButtonHomingMidAsmHook" name = "SetXButtonHomingMidAsmHook"
address = 0x8237AC88 address = 0x8237AC88
registers = ["r30"] registers = ["r30"]
# Down force HFR fix
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x8234AB94
registers = ["f1"]
# 2D spline HFR fix
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x82345468
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x8234547C
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823454B0
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x82345534
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823455EC
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x8234564C
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823457A8
registers = ["f1"]
[[midasm_hook]]
name = "HighFrameRateDeltaTimeFixMidAsmHook"
address = 0x823458A0
registers = ["f1"]