Make the sliding 4-bit window the DHGR colour default - #246
Draft
st3fan wants to merge 1 commit into
Draft
Conversation
Field report: Thexder's DHGR title screen via Total Replay on the //e
"looked like HGR". The soft-switch probe showed Total Replay detected
128K and engaged DHGR correctly -- the problem was our aligned-cell
colour decode, which turns text into unreadable 4-px colour mottling
(the credits read as pink noise).
This promotes the parked sliding-window experiment (branch
iie/experiment-dhgr-color) onto master with the exact validation its
notes asked for -- a known DHGR artwork: side-by-side Thexder renders
show aligned = mottled noise, sliding = crisp white text with thin
composite-style edge fringes. DhgrColorMode { Aligned, Sliding } lands
in scr.rs with Sliding as the default; each pixel's colour comes from
the trailing 4-bit window, phase-weighted (1 << (pos & 3)), which
reduces to the aligned value at cell boundaries. Aligned remains
selectable via set_dhgr_color_mode. The mono DHGR path and its golden
are untouched.
Tests: colour_cell_selects_the_palette pins itself to Aligned (it checks
the palette mapping); a new sliding test asserts the default mode keeps
white runs white past the 3-px lead-in. New end-to-end gate
two_e_totalreplay.rs boots Total Replay on the //e, launches Thexder by
menu search, and asserts DHGR engages (skips without the untracked
image, like the protected WOZ gates).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
Build metrics — DHGR sliding-window promotion
Token usage for this PR (delta since PR #244; covers the /RAM and ProDrive explanations, the Thexder debugging session — headless reproduction, ][+ vs //e comparison, side-by-side renders — and the promotion):
Cost: ~$101.36 (Fable 5 @ $10/$50 per M in/out, $12.50/$1.00 per M cache write/read) |
st3fan
marked this pull request as draft
July 18, 2026 21:08
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.
Make the sliding 4-bit window the DHGR colour default
Field report: Thexder's DHGR title via Total Replay on the //e "looked like it stayed in HGR". The debugging split the question cleanly:
Graphics + HIRES + col80=true + dhires=true— Total Replay detected 128K and engaged DHGR correctly. The emulation core was right.The fix — the parked experiment, promoted
DhgrColorMode { Aligned, Sliding }lands inscr.rswith Sliding as the default: each pixel's colour comes from the trailing 4-bit window, phase-weighted (1 << (pos & 3)), reducing exactly to the aligned value at cell boundaries. Side-by-side Thexder renders were night and day — aligned: mottled noise; sliding: crisp white text with thin composite-style edge fringes, exactly what a real monitor shows. Aligned stays selectable viaset_dhgr_color_mode.New end-to-end gate
two_e_totalreplay.rs: boots Total Replay on the //e (HDD + ProDOS + 128K detection), launches Thexder via the menu's incremental search, and asserts DHGR engages — the full stack in one test. Skips when the untracked.hdvis absent (the protected-WOZ pattern).Verification
fmt/clippy -D warnings/ fullcargo testgreen (32 result files).colour_cell_selects_the_palettepins itself to Aligned (it tests the palette mapping); a new test asserts the sliding default keeps white runs white.two --model 2e --color --hdd "disks/Total Replay v6.0.1.hdv".🤖 Generated with Claude Code