Add physics_steps = 2: at least a 60 fps frame's solver steps in every update on 1.1.1.

Link is carried by the Deku Tree's floating platform fully at 60 fps, about a tenth at 160 and not at all at 240,
which follows the solver steps an update (4, 2, 1 with physics_steps = 1) rather than those a second. The new set
osolverfull raises the rounded-up count to the 60 Hz frame's 4 in every update; physics_steps = 2 switches it on and
osolver off at start, and the mode is logged. 60 and 30 fps keep the game's 4 and 8. It costs more physics time above
60 fps: 576 solver steps a second at 144 fps and 960 at 240, against 288 and 240 with 1, the default, which stays
until a run confirms the carry. frame_step_check runs the lifted words of all three counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 06:26:39 -05:00
parent b912d72b87
commit a74503cd86
7 changed files with 121 additions and 5 deletions

View File

@@ -96,6 +96,20 @@ void frame_step_init(void) {
atomic_store_explicit(ostep_page, bits, memory_order_release);
rt_log("frame rate: the game's frames per update follow the display interval (set ostep)");
}
// physics_steps (patches-v111.txt osolver and osolverfull): 0 the game's solver step count, trunc(frames per update
// * 4 + 0.001); 1 (the default) that count rounded up; 2 rounded up and at least the 4 of a 60 Hz frame, every
// update. The two sets patch the same words; this start keeps one of them on.
int solver = rt_patch_set("osolver"), solver_full = rt_patch_set("osolverfull");
if (solver_full >= 0) {
const char *e = cfg_get("NX2NAVI_PHYSICS_STEPS");
int full = (e && !strcmp(e, "2")) || rt_patch_enabled(solver_full);
rt_patch_switch(solver_full, full);
if (full && solver >= 0) rt_patch_disable(solver);
rt_log("frame rate: physics solver steps an update: %s",
full ? "rounded up and at least a 60 fps frame's 4 (physics_steps = 2)"
: solver >= 0 && rt_patch_enabled(solver) ? "rounded up (physics_steps = 1)"
: "the game's own count (physics_steps = 0)");
}
if (realtime < 0) {
rt_log("frame rate: no patch table, shipping 30 fps whole-vsync steps");
return;