Skip to content

zaparoo: analog H-size (CRT width stretch) OSD row and word2 contract - #35

Merged
wizzomafizzo merged 9 commits into
masterfrom
crt-hsize
Oct 13, 2026
Merged

wizzomafizzo merged 9 commits into
masterfrom
crt-hsize

Conversation

@asturur

@asturur asturur commented Oct 12, 2026

Copy link
Copy Markdown
Member

Summary

Main's side of the CRT analog width (H-size) stretch controls — ZaparooProject/zaparoo-frontend#473. Pairs with ZaparooProject/Menu_MiSTer#6 (54 MHz retimer core) and ZaparooProject/zaparoo-frontend#550 (frontend controls).

  • word2 (0x5A52 magic) packing for the analog H size, live apply to the DDR control block, and a TOML mirror of the saved value
  • H size row on the OSD Position page; saving it respawns the frontend so fb geometry is rebuilt
  • word2 republished after the pre-spawn DDR blank so a saved width survives the handoff
  • V size (vertical shrink) row was tried and reverted — word2's v byte stays reserved
  • yc.txt: drop stale MENU PHASE_INC overrides

Includes a merge with current master.

Testing

Deployed the full matched stack (this Main, frontend PR MiSTer-devel#550, menu RBF + zaparoo_scanout.ko from Menu_MiSTer PR #6 CI) on the MiSTer and rebooted: frontend comes up on the CRT path with the persisted h_size applied at presenter arm, scanout module loads with write_combined: true, and the calibration overlay width control works live.

🤖 Generated with Claude Code

asturur and others added 8 commits September 28, 2026 20:36
Interim control extension: word2 (bytes 0x08-0x0B) carries magic 0x5A52 and
a signed h_size (-8..+2) written only by Main; the frontend never touches
bytes >= 8. Persisted as crt_h_size in frontend.toml [settings], which the
frontend's toml_edit writer preserves. Test pattern publishes word2 too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Live-applies via word2 while a picture is up; saves crt_h_size on leave.
Size-only changes skip the frontend respawn: the frontend never caches or
rewrites this key.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
blank_native_crt_fb() wipes the whole 3 MB region including word2; the
frontend only republishes words 0/1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The four MENU_* entries encode colorburst increments for the stock menu
core's 20/27.027 MHz clocks and override video.cpp's measured-clock
computation. The Zaparoo menu core's video master moves to 54 MHz, where
any match makes the chroma carrier wrong; the computed path self-adapts.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Word2 bits 15:8 now carry a signed v_size (-32..0): -N adds N blank lines
per progressive frame, shrinking the picture by lowering the frame rate
(262+N / 312+N lines) while the line rate and active lines stay fixed.
Shrink only, no grow. Persisted as crt_v_size in frontend.toml; the
republish-after-blank hook and the test pattern carry both sizes. 480i
forces N=0 in the core's timing latch.

Known tradeoff carried from the plan: with the live frontend publishing on
a fixed 60 Hz sleep while the CRT consumes slower, moving content can tear
at deep shrink; the static test pattern is unaffected. The deferred v3
protocol addresses pacing properly.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This reverts commit fc4643c. The blank-line vertical shrink turned out
to be all-or-nothing on real TVs (vertical countdown lock window), so
the control is dropped; H size is enough. Word2 v byte is written as 0
again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The frontend now owns crt_h_size the way it owns the offsets: it
caches the value at start and writes word2 live. A size saved from
Main's OSD page must therefore respawn a running frontend, or it
would write the old size back on its next settings save. Contract
comment updated to the shared-ownership wording.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3edbff1f-9e49-4367-bccb-64ae68bbfd9e

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

finish_native_crt_path's 3 MB blank wiped the control words, and word2
(analog H size) was the only one Main restored afterward because the
frontend rewrote word0 every frame but word2 only on change. The
frontend now re-asserts word1 and word2 every frame alongside word0, so
word2 self-heals on its next frame like the offsets and the frame
counter do.

Remove crt_hsize_republish() (call, definition, declaration) and align
the word2 ownership comment: the frontend owns the heal; Main only
authors word2 from the Position page's live apply and the test pattern
when no frontend is writing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@wizzomafizzo
wizzomafizzo merged commit 95447a6 into master Oct 13, 2026
1 check passed
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.

2 participants