Hold the game to 240 frames a second when the limit is unlimited or higher, which stops the quick menu's crash.

Ocarina steps its game by the clock, and the frame limiter let "unlimited" run free and took numbers up to 1000
(frame_rate.c LIMIT_FREE_MAX_HZ), on the belief that the game has no lower limit to its step. It has one: on the quick
menu, where a frame costs the GPU almost nothing, the game ran at 640 to 700 fps and after about two seconds read
address 0 in its own draw code (main+0x175b2a0), twice in a row with the same call stack, while 92 to 255 fps ran on.
The game now runs at most 240 frames a second, "unlimited", "display" and numbers included; with frame generation the
cap counts the game's own frames, so the generated ones still go above it on screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-09 13:15:37 -05:00
parent 9c10827018
commit 9bba578e58
2 changed files with 18 additions and 9 deletions

View File

@@ -4,8 +4,9 @@
# '#' and ';' start a comment; [sections] only group lines.
[frame rate]
# Frame rate limit: 30, 40, 45, 60, 90, 120, 144, any whole rate from 30 to 240, or display (the refresh rate of the
# window's monitor, at most 240). A higher rate gives 240: above it the game's physics runs out of memory. Above 60
# Frame rate limit: 30, 40, 45, 60, 90, 120, 144, any whole rate from 30 to 240, display (the refresh rate of the
# window's monitor, at most 240) or unlimited (as fast as the PC goes, at most 240 frames of the game a second). A
# higher rate gives 240: far above it the game's own code fails (its quick menu crashed at 700 fps). Above 60
# is experimental and needs realtime = 1. Changes while the game runs take effect at once.
# With mailbox or fifo presentation (vk_present, the default) a frame reaches the screen at a vertical blank, so a limit
# that does not divide the monitor's refresh rate keeps each frame on screen for a different number of refreshes. On a