mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 13:09:57 -04:00
Keep the time of day at the game's pace under the real-time step, its fraction carried from frame to frame.
The day's update (main+0x3cdf70) adds trunc(2 x frames per update) game seconds a frame. With the set ostep's step, the display interval in 60 Hz frames, that sum lost its fraction every frame: 1 a frame from 61 to 119 fps, 0 above 120 (the clock stood still), and at 60 fps a step a little under one frame dropped a second now and then. Its convert now calls the patch page's +0xf60 (runtime/frame_rate.c frame_rate_day_host), which keeps the fraction per counter and hands out the whole seconds. NX2NAVI_TRACE=perf logs, every 10 s, the seconds given beside those the cut would have given. Measured in Kakariko, 10 s windows: at a 60 fps limit 998 game seconds against 881 from the cut alone; at 144 fps 1,201 against 219 to 972 (the steady 1,200 a 10 s window should have). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -393,6 +393,7 @@ int frame_limit_adjustable(void); // the frame limit set
|
||||
int frame_free_running(void); // no fps60/realtime patch set: the game steps by the clock
|
||||
double frame_step_limit_hz(void); // the frame rate the limit gives (overlay); 0 unknown
|
||||
double frame_step_game_hz(void); // the rate the game draws at under the limit; 0 unknown
|
||||
void frame_rate_day_host(Cpu *c); // the time of day's seconds a frame (set ostep, page +0xf60)
|
||||
float frame_step_frames(void); // the 60 Hz frames the game steps per update (set ostep), else 1
|
||||
void frame_step_flight(float *page, float *game, uint64_t *presents); // flight.c: the step at a host present
|
||||
// rtss_limit.c: RivaTuner Statistics Server takes the frame limit where it runs
|
||||
|
||||
Reference in New Issue
Block a user