Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MarathonRecomp/api/Marathon.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
#include "Sonicteam/StdImageFilters/BurnoutBlurFilter.h"
#include "Sonicteam/StdImageFilters/SingleTechniqueFilter.h"
#include "Sonicteam/System/CreateStatic.h"
#include "Sonicteam/System/Diagnostics/Perfomance.h"
#include "Sonicteam/System/Singleton.h"
#include "Sonicteam/TextBook.h"
#include "Sonicteam/TextBookMgr.h"
Expand Down
13 changes: 13 additions & 0 deletions MarathonRecomp/api/Sonicteam/System/Diagnostics/Perfomance.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include <Sonicteam/System/Singleton.h>
#include <Sonicteam/System/CreateStatic.h>

namespace Sonicteam::System::Diagnostics
{
class Perfomance : public Singleton<Perfomance, 0x82D3B210, CreateStatic<Perfomance, 0x82581C88>>
{
public:
be<uint64_t> m_LastFrequency;
};
}
21 changes: 21 additions & 0 deletions MarathonRecomp/patches/fps_patches.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <api/Marathon.h>
#include <user/config.h>
#include <app.h>

Comment thread
ReimousTH marked this conversation as resolved.
constexpr double REFERENCE_DELTA_TIME = 1.0 / 60.0;

Expand Down Expand Up @@ -148,6 +149,26 @@ void PlayerObject_ProcessMsgSuckPlayer_FixDeltaTime(PPCRegister& message, PPCReg
deltaTime.f64 = pMessage->DeltaTime;
}

void ParticleHFR_82670658(PPCRegister& f1,PPCRegister& stack)
{
f1.f64 = App::s_deltaTime;
}

void ParticleHFR_8266A418_1(PPCRegister& f31,PPCRegister& stack)
{
f31.f64 = App::s_deltaTime;
}

void ParticleHFR_82673F88(PPCRegister& f13,PPCRegister& stack)
{
f13.f64 = App::s_deltaTime;
}

void ParticleHFR_82674550(PPCRegister& f13,PPCRegister& stack)
{
f13.f64 = App::s_deltaTime;
}

// Allocate more space to store the previous loading
// time for this instance of Sonicteam::HUDLoading.
void HUDLoadingAlloc(PPCRegister& r3)
Expand Down
30 changes: 30 additions & 0 deletions MarathonRecompLib/config/Marathon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,36 @@ name = "PlayerObject_ProcessMsgSuckPlayer_FixDeltaTime"
address = 0x8219B660
registers = ["r28", "f31"]

# ParticleHFR_826454C8
[[midasm_hook]]
name = "NOP"
address = 0x82645518
jump_address = 0x8264551C

[[midasm_hook]]
name = "ParticleHFR_82670658"
address = 0x82670724
registers = ["f1", "r1"]
after_instruction = true

[[midasm_hook]]
name = "ParticleHFR_8266A418_1"
address = 0x8266A57C
registers = ["f31", "r1"]
after_instruction = true

[[midasm_hook]]
name = "ParticleHFR_82673F88"
address = 0x8267402C
registers = ["f13", "r1"]
after_instruction = true

[[midasm_hook]]
name = "ParticleHFR_82674550"
address = 0x826747FC
registers = ["f13", "r1"]
after_instruction = true

[[midasm_hook]]
name = "HUDLoadingAlloc"
address = 0x824FAE14
Expand Down
Loading