From 49c47f2d298eecb074ddd617c13a80bdbec2954f Mon Sep 17 00:00:00 2001 From: Martino Fontana Date: Fri, 1 May 2026 22:20:40 +0200 Subject: [PATCH] GameSettings: Add idle loop speed hack for Excite Truck Disabled by default. --- Data/Sys/GameSettings/REX.ini | 8 ++++++- Data/Sys/GameSettings/REXP01.ini | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 Data/Sys/GameSettings/REXP01.ini diff --git a/Data/Sys/GameSettings/REX.ini b/Data/Sys/GameSettings/REX.ini index c26f2d0fa9..8b1a50d860 100644 --- a/Data/Sys/GameSettings/REX.ini +++ b/Data/Sys/GameSettings/REX.ini @@ -1,7 +1,12 @@ # REXE01, REXP01, REXJ01 - Excite Truck [Core] -# Values set here will override the main Dolphin settings. +# The game has an undetected idle loop (normal race) or runs uncapped (menus, slow motion due to car crash), +# which is equivalent to SyncOnSkipIdle already being False. +# Setting it to False is meant to avoid any performance regression when using the speed hack. +# Despite dual core not being very stable in this game, using the speed hack combined with True doesn't +# seem to improve the stability, while also having dramatically worse performance. +SyncOnSkipIdle = False [OnFrame] # Add memory patches to be applied every frame here. @@ -10,4 +15,5 @@ # Add action replay cheats here. [Video_Hacks] +# Fixes trees appearing black. EFBToTextureEnable = False diff --git a/Data/Sys/GameSettings/REXP01.ini b/Data/Sys/GameSettings/REXP01.ini new file mode 100644 index 0000000000..1a5324ff0e --- /dev/null +++ b/Data/Sys/GameSettings/REXP01.ini @@ -0,0 +1,38 @@ +# REXP01 - Excite Truck + +[OnFrame] +# This game's logic runs at a fixed rate of 60 FPS. During normal +# gameplay, the game checks how many physics steps take depending +# on time passed, then going from a loop this many times. +# (Note: during a car crash, the game runs in slow motion and +# renders interpolated frames at an uncapped speed, which is worse.) + +# The complexity of this prevents Dolphin from idling, +# meaning that if the emulated CPU is overclocked more than +# necessary needed to run the game at a stable 60 FPS), the +# emulation performance is going to be worse. +# +# The first line adds a call to `VIWaitForRetrace` (after +# `GXSetDrawDone`) so that Dolphin can idle. +# +# However, because the wait for the physics update is completely +# detached from the vblanks, the game will wait even *after* +# `VIWaitForRetrace` (until one frame of lag happens: then there +# will always be at least one physics step to do after that). +# The second line skips the idle loop: this creates the conditions +# so that, from the `VIWaitForRetrace` onwards, there's always a +# physics step to take. (Thus, the loop is naturally skipped.) +# +# The main reason why this speed hack isn't enabled by default is +# that it limits the frame rate to a dividend of the vblank rate. +# Due to how demanding this game is on the Wii's CPU with default +# clock settings, the speed hack will make the game constantly jump +# between 60 and 30 FPS during a race. Thus, the wiki explains that +# the speed hack is meant to be used with an overclocked emulated +# CPU. +$Speed hack (see wiki) +0x802D2D00:dword:0x4BD87228 +0x80177FBC:dword:0x60000000 + +[Patches_RetroAchievements_Verified] +$Speed hack (see wiki)