Skip to content

GameSettings: Add patches for Need for Speed: Hot Pursuit 2 to limit the internal frame rate.#14279

Open
jordan-woyak wants to merge 1 commit intodolphin-emu:masterfrom
jordan-woyak:nfs-hp2-speedhack
Open

GameSettings: Add patches for Need for Speed: Hot Pursuit 2 to limit the internal frame rate.#14279
jordan-woyak wants to merge 1 commit intodolphin-emu:masterfrom
jordan-woyak:nfs-hp2-speedhack

Conversation

@jordan-woyak
Copy link
Member

@jordan-woyak jordan-woyak commented Jan 13, 2026

The patches rearrange some branching to insert a call to VIWaitForRetrace in the main game loop.
This allows ImmediateXFB to work properly so I've also removed that from the main game INI.

Here's the unmodified main game loop.
image

To the best of my understanding, if the highlighted branch is not taken, the 11 loaded into r3 (red arrow) is never used. Control ultimately reaches the green arrow where r3 is overwritten.
Maybe someone can double check my logic?

Based on that load being redundant I've inserted a call to VIWaitForRetrace by optimizing that highlighted branch by making it a beq and jump to the green arrow directly.

@jordan-woyak jordan-woyak mentioned this pull request Jan 13, 2026
33 tasks
…the internal frame rate.

The patches rearrange some branching to insert a call to VIWaitForRetrace in the main game loop.
This allows ImmediateXFB to work properly so it is no longer forced off by the game ini.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant