Repository navigation
overlay: FPS / VI / ms-per-VI readout (rcore rev 8, link 2.2) - #6
Merged
Merged
Conversation
The readout's one "60 FPS" number was the VI rate: one tick per run_frame. It is now three labelled rows: FPS the game's own pictures a second (rcore_frame::game_frame, rev 8) VI frames the core finished and presented a second (frames done) ms/VI the runner's measured run_frame time per frame (link 2.2 work_ns) - rcore.h rev 8: rcore_frame appends game_frame (0 = the core cannot tell). - Link 2.2: FrameDone grows game_frame and work_ns, the first grown message. A 2.2 runner sends it at its 2.1 size to a 2.1 hub (send_msg_sized); a 2.2 hub reads a 2.1 runner's with both zero. CoreLink::frame_stats() sums them. - Osd::note_counters takes running totals; rates span the last second, FPS anchored on the samples where the game's count moved so a window edge does not read 29.5 / 30.5 for a 30 fps game. Digits refresh 4x a second; labels dim, values white; "--" for a reading the core or link cannot supply. note_frame() remains for a host with no counters (VI only). - Tests: overlay (counters, uneven arrival, turbo, reset, pause, labels), link_frame_stats (fake core game 5 of 10, work measured). --dump renders both readouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P8WyraAmnCpC7UwtCEWdw5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The overlay's single "60 FPS" was the VI rate (one tick per
run_frame), so a 30 fps N64 game read 60. It is now three labelled rows:Changes
rcore_frameappendsgame_frame(0 = the core cannot tell). Read only whenstruct_sizecovers it.FrameDoneappendsgame_frameandwork_ns. It is the first message to grow. A 2.2 runner sends the 2.1 size (24 bytes) to a 2.1 hub, and a 2.2 hub reads a 2.1 runner's message with both fields 0.CoreLink::frame_stats()keeps the running totals.Osd::note_counters(now, {frames, game, work_ns}).--.note_frame()still works for a host with no counters (VI only).Checked
overlay(counters, uneven arrival, turbo, reset, pause, label colours, and FPS within 29.9–30.05 for a 29.97 game) and the newlink_frame_statstest (fake core, game 5 of 10, work measured).frame stats: game 522 work measured. 522 matches the VI model's ownVI_RATE swaps=522("a new buffer every 2 fields = 29.91 fps").retro-overlay-test --dumprenders the readout and was inspected. It was not captured on a live hub window: the window was behind other windows and there is no Xvfb here, so the on-screen check is still owed.Not tested
Companion PRs: n64lle (fills
game_frame) and Retro-Launcher (the hub feedsnote_counters; bumps this submodule).Release note: n64lle's
fetch_release.pyrequires the runner's draft revision to equal the core's, so Runtime and n64lle releases with rev 8 must be cut together.🤖 Generated with Claude Code