Skip to content

frame-analyzer: snap a pre-display scrub selection to the frame end#175

Merged
LinuxJedi merged 1 commit into
mainfrom
fix/analyzer-scrub-selection-snap
Jul 13, 2026
Merged

frame-analyzer: snap a pre-display scrub selection to the frame end#175
LinuxJedi merged 1 commit into
mainfrom
fix/analyzer-scrub-selection-snap

Conversation

@LinuxJedi

Copy link
Copy Markdown
Owner

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.

underlay only + scrub, default selection (before) + scrub, mid-frame selection
picture visible dimmed picture effectively gone intended drawn/ghost split

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.

  • A selection inside the display window is a deliberate scrub point and is kept when scrub is re-enabled.
  • No display window programmed (nothing to reveal) or no trace yet: selection is left alone.
  • Both entry points (checkbox click and the B key) dispatch through the same toggle, so one site covers both.
  • Ghost brightness stays at 1/8: with the snap, the ghost region is always contextualized by visible picture, so the strong drawn/not-drawn contrast remains useful.

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.md gains a note describing the snap.

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.
@LinuxJedi LinuxJedi merged commit 222c36c into main Jul 13, 2026
8 checks passed
@LinuxJedi LinuxJedi deleted the fix/analyzer-scrub-selection-snap branch July 13, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant