From 79d32b54dc7f0be3a2159dca0cae304bd3c16a78 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Thu, 8 Oct 2026 12:38:55 -0400 Subject: [PATCH 1/2] hub: feed the overlay's FPS / VI / ms-per-VI readout from the link note_frames hands Osd::note_counters the link's running totals (Retro-Runtime link 2.2): frames done give VI, the game's own count FPS (rcore rev 8 game_frame), the runner's run_frame time ms/VI. A 2.1 runner sends neither of the last two and those rows read --. The per-frame spreading the old one-number FPS needed is gone: rates come from totals. Retro-Runtime submodule -> ed79d16 (Retro-Runtime#6, feat/frame-stats). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01P8WyraAmnCpC7UwtCEWdw5 --- src/hub/hub_play.cpp | 16 +++++----------- src/hub/hub_play.hpp | 1 - third_party/Retro-Runtime | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/hub/hub_play.cpp b/src/hub/hub_play.cpp index 82852ca..353d274 100644 --- a/src/hub/hub_play.cpp +++ b/src/hub/hub_play.cpp @@ -437,18 +437,12 @@ void PlaySession::set_turbo_running(bool on) { } } -// Every frame the core finished since the last call, for the FPS readout, -// spread evenly over the time since (a hub frame can collect several). +// The link's running totals, for the readout (Retro-Runtime docs/OVERLAY.md): +// frames done give VI, the game's own count FPS, and the runner's run_frame +// time ms/VI. A 2.1 runner sends neither of the last two; those rows read --. void PlaySession::note_frames(std::uint64_t now) { - const std::uint64_t done = link_.frames_done(); - if (done <= noted_frames_) return; - const std::uint64_t n = done - noted_frames_; - if (noted_ns_ && now > noted_ns_) { - for (std::uint64_t i = 1; i < n; ++i) osd_.note_frame(noted_ns_ + (now - noted_ns_) * i / n); - } - osd_.note_frame(now); - noted_frames_ = done; - noted_ns_ = now; + const corelink::FrameStats& s = link_.frame_stats(); + osd_.note_counters(now, {link_.frames_done(), s.game_frame, s.work_ns}); } double PlaySession::audio_queued_ms() const { diff --git a/src/hub/hub_play.hpp b/src/hub/hub_play.hpp index 272b954..29007f5 100644 --- a/src/hub/hub_play.hpp +++ b/src/hub/hub_play.hpp @@ -216,7 +216,6 @@ class PlaySession { bool l3r3_prev_ = false; bool audio_paused_ = true; // the SDL stream's state, as last set bool was_paused_ = false; - std::uint64_t noted_frames_ = 0, noted_ns_ = 0; }; } // namespace retcomm::hub diff --git a/third_party/Retro-Runtime b/third_party/Retro-Runtime index 5ce2a7a..ed79d16 160000 --- a/third_party/Retro-Runtime +++ b/third_party/Retro-Runtime @@ -1 +1 @@ -Subproject commit 5ce2a7a40724f44d239d5d6053a8fc78940f3ada +Subproject commit ed79d1674aff74a61dc6e6efe881898f2a1d9be0 From 66d06c2fe3654876ee61909e3e88e27f13803094 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Thu, 8 Oct 2026 12:57:51 -0400 Subject: [PATCH 2/2] Retro-Runtime submodule -> 218e74e (Retro-Runtime#6 merged to main) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01P8WyraAmnCpC7UwtCEWdw5 --- third_party/Retro-Runtime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/Retro-Runtime b/third_party/Retro-Runtime index ed79d16..218e74e 160000 --- a/third_party/Retro-Runtime +++ b/third_party/Retro-Runtime @@ -1 +1 @@ -Subproject commit ed79d1674aff74a61dc6e6efe881898f2a1d9be0 +Subproject commit 218e74e90e846b71cd946118b2526e8f609fbcbc