GameINI: Add patches for idle loop detection (speed hack)

This commit is contained in:
Martino Fontana 2025-06-23 00:56:40 +02:00
parent d423eb5a75
commit 2542c79d6b
11 changed files with 129 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,9 @@
# R7XE69, R7XJ13, R7XP69 - Need for Speed: Nitro # R7XE69, R7XJ13, R7XP69 - Need for Speed: Nitro
[Core] [Core]
# Values set here will override the main Dolphin settings. # The game has an undetected idle loop, which is equivalent to SyncOnSkipIdle already being False.
# Setting it is meant to avoid any performance regression when using the idle loop detection patch.
SyncOnSkipIdle = False
[OnFrame] [OnFrame]
# Add memory patches to be applied every frame here. # Add memory patches to be applied every frame here.

View File

@ -0,0 +1,16 @@
# R7XE69 - Need for Speed: Nitro
[OnFrame]
# Changes an idle loop that Dolphin is unable to detect, to one that it can detect.
#
# The loop waits for a vblank interrupt, spamming `OSYieldThread` in the meantime.
# The patch replaces the call to `VIWaitForRetrace`, which still executes the other threads,
# but sleeps instead of spinlocking when there is no thread to execute.
$Speed hack
0x802B2908:dword:0x4826F5C9
[OnFrame_Enabled]
$Speed hack
[Patches_RetroAchievements_Verified]
$Speed hack

View File

@ -0,0 +1,16 @@
# R7XJ13 - Need for Speed: Nitro
[OnFrame]
# Changes an idle loop that Dolphin is unable to detect, to one that it can detect.
#
# The loop waits for a vblank interrupt, spamming `OSYieldThread` in the meantime.
# The patch replaces the call to `VIWaitForRetrace`, which still executes the other threads,
# but sleeps instead of spinlocking when there is no thread to execute.
$Speed hack
0x802B3118:dword:0x4826F5B9
[OnFrame_Enabled]
$Speed hack
[Patches_RetroAchievements_Verified]
$Speed hack

View File

@ -0,0 +1,16 @@
# R7XP69 - Need for Speed: Nitro
[OnFrame]
# Changes an idle loop that Dolphin is unable to detect, to one that it can detect.
#
# The loop waits for a vblank interrupt, spamming `OSYieldThread` in the meantime.
# The patch replaces the call to `VIWaitForRetrace`, which still executes the other threads,
# but sleeps instead of spinlocking when there is no thread to execute.
$Speed hack
0x802B2908:dword:0x4826F5C9
[OnFrame_Enabled]
$Speed hack
[Patches_RetroAchievements_Verified]
$Speed hack

View File

@ -0,0 +1,15 @@
# RRBE41 - Rayman Raving Rabbids
[OnFrame]
# The game's idle loop is composed of two parts that alternate by branching to each other.
# The first part checks how much time has passed (through a function): if it's too much, it aborts the frame. This apparently never happens.
# The second part is a traditional "wait for the VIPostCallback interrupt to change a value".
# The patch changes a branch so that only the second part is executed, so that Dolphin can properly detect the idle loop.
$Idle loop speed hack
0x80353DCC:dword:0x4082FFF8
[OnFrame_Enabled]
$Idle loop speed hack
[Patches_RetroAchievements_Verified]
$Idle loop speed hack

View File

@ -0,0 +1,15 @@
# RRBE41 - Rayman Raving Rabbids
[OnFrame]
# The game's idle loop is composed of two parts that alternate by branching to each other.
# The first part checks how much time has passed (through a function): if it's too much, it aborts the frame. This apparently never happens.
# The second part is a traditional "wait for the VIPostCallback interrupt to change a value".
# The patch changes a branch so that only the second part is executed, so that Dolphin can properly detect the idle loop.
$Idle loop speed hack
0x80356780:dword:0x4082FFF8
[OnFrame_Enabled]
$Idle loop speed hack
[Patches_RetroAchievements_Verified]
$Idle loop speed hack

View File

@ -0,0 +1,15 @@
# RRBE41 - Rayman Raving Rabbids
[OnFrame]
# The game's idle loop is composed of two parts that alternate by branching to each other.
# The first part checks how much time has passed (through a function): if it's too much, it aborts the frame. This apparently never happens.
# The second part is a traditional "wait for the VIPostCallback interrupt to change a value".
# The patch changes a branch so that only the second part is executed, so that Dolphin can properly detect the idle loop.
$Idle loop speed hack
0x803564B0:dword:0x4082FFF8
[OnFrame_Enabled]
$Idle loop speed hack
[Patches_RetroAchievements_Verified]
$Idle loop speed hack

View File

@ -0,0 +1,15 @@
# RRBJ41 - Rayman Raving Rabbids
[OnFrame]
# The game's idle loop is composed of two parts that alternate by branching to each other.
# The first part checks how much time has passed (through a function): if it's too much, it aborts the frame. This apparently never happens.
# The second part is a traditional "wait for the VIPostCallback interrupt to change a value".
# The patch changes a branch so that only the second part is executed, so that Dolphin can properly detect the idle loop.
$Idle loop speed hack
0x803562AC:dword:0x4082FFF8
[OnFrame_Enabled]
$Idle loop speed hack
[Patches_RetroAchievements_Verified]
$Idle loop speed hack

View File

@ -0,0 +1,15 @@
# RRBP41 - Rayman Raving Rabbids
[OnFrame]
# The game's idle loop is composed of two parts that alternate by branching to each other.
# The first part checks how much time has passed (through a function): if it's too much, it aborts the frame. This apparently never happens.
# The second part is a traditional "wait for the VIPostCallback interrupt to change a value".
# The patch changes a branch so that only the second part is executed, so that Dolphin can properly detect the idle loop.
$Idle loop speed hack
0x803567A0:dword:0x4082FFF8
[OnFrame_Enabled]
$Idle loop speed hack
[Patches_RetroAchievements_Verified]
$Idle loop speed hack

View File

@ -90,8 +90,8 @@ public:
static constexpr std::string_view BLUE = "#0B71C1"; static constexpr std::string_view BLUE = "#0B71C1";
static constexpr std::string_view APPROVED_LIST_FILENAME = "ApprovedInis.json"; static constexpr std::string_view APPROVED_LIST_FILENAME = "ApprovedInis.json";
static const inline Common::SHA1::Digest APPROVED_LIST_HASH = { static const inline Common::SHA1::Digest APPROVED_LIST_HASH = {
0x9A, 0xFF, 0xEF, 0x72, 0x3B, 0x52, 0x6E, 0x7D, 0x3E, 0x19, 0x5A, 0x62, 0x01, 0x37, 0xEA, 0xB6, 0x3F, 0xA8, 0x19, 0x54,
0x85, 0x77, 0x19, 0x17, 0xDE, 0x37, 0xC2, 0x47, 0x59, 0x06}; 0xB7, 0x8D, 0x25, 0x37, 0xCA, 0x39, 0xFA, 0xB8, 0xED, 0x85};
struct LeaderboardEntry struct LeaderboardEntry
{ {