frame-analyzer: snap a pre-display scrub selection to the frame end#175
Merged
Conversation
Enabling Beam scrub ghosts everything past the selected slot, and a fresh panel's selection defaults to the display window's top-left corner, where the CRT has drawn nothing: the whole underlay ghosted to an eighth brightness, which read as the picture underlay switching off even though it stayed active. When scrub is enabled with the selection at or before the frame-start DIW top-left corner (same DIWSTRT/DIWHIGH decode as the DIW overlay), snap the selection to the last slot of the traced frame so the picture starts fully drawn and scrubbing backward peels it away. Selections inside the display window are deliberate scrub points and are kept, as is the selection when no display window is programmed or no trace exists yet.
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.
Problem
In the Frame Analyzer, ticking Picture underlay and then Beam scrub appeared to turn the underlay off while its checkbox stayed ticked.
Not a state bug: scrub ghosts everything past the selected slot at an eighth brightness, and a fresh panel's selection defaults to the display window's top-left corner -- a beam position where the CRT has drawn nothing. The entire picture fell in the not-yet-drawn region and ghosted to near-black, indistinguishable from the underlay being off. The checkbox was truthful (scrub implies the underlay); only the ghosting made it look disabled.
Fix
When scrub is enabled with the selection at or before the frame-start DIW top-left corner (decoded from the DIWSTRT/DIWHIGH snapshot, same decode as the DIW overlay), snap the selection to the last slot of the traced frame: the picture starts fully drawn and scrubbing backward peels it away.
Bkey) dispatch through the same toggle, so one site covers both.Tests
frame_analyzer_scrub_enable_snaps_predisplay_selection_to_frame_end: default selection snaps to the frame end; a mid-picture selection survives re-enabling scrub.frame_analyzer_scrub_enable_without_display_window_keeps_selection: no DIW programmed, no snap.Full suite green (1381 lib tests + golden probe renders), clippy and fmt clean. Docs: Beam scrub paragraph in
docs/debugger/window.mdgains a note describing the snap.