Skip to content

docs(ledger): narrow the video gap to the CI4 + TLUT texel path - #180

Merged
doublegate merged 2 commits into
mainfrom
fix/rdp-renders-black
Jul 29, 2026
Merged

docs(ledger): narrow the video gap to the CI4 + TLUT texel path#180
doublegate merged 2 commits into
mainfrom
fix/rdp-renders-black

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Two suspects eliminated, the third narrowed to one code path

The previous entry left three suspects for "the RDP rasterises real geometry to
black". Inspecting the RDP state Ocarina actually leaves settles two of them and
turns the third into a specific, testable path.

Z path — REFUTED

z_compare_en = false, z_update_en = false. Nothing is depth-rejected.
SET_Z_IMAGE is issued (z_image = 0x12c700), but the compare is off — so the
"every triangle is the 0x0F Z-buffered variant" reasoning, while true, does not
lead anywhere.

Combiner — REFUTED as a collapse, and it is the key evidence

cyc1 decodes to rgb_a=15, rgb_b=15, rgb_c=31, rgb_d=1:

(0 − 0) × 0 + TEXEL0   →  a pure texture pass-through

The pixel colour is the texel. So a black frame means the texel fetch
resolves to 0
— the combiner is faithfully passing through black.

Texture path — narrowed to CI4 + TLUT

  • Tiles are fmt=2, size=0 = CI4 — 4-bit colour-indexed, resolved via a TLUT.
  • Both TMEM halves are populated after 4,374 LOAD_BLOCKs: 1,508/2,048
    non-zero bytes in the texture half, 760/2,048 in the TLUT half.
  • TLUT entry 0 reads 0x0000 (black), with entries alternating
    0000 ffff 0000 ffff at the 8-byte stride tlut_lookup uses.

So real indices and a real palette are both present, and the resolution yields
black.

Why this is a good stopping point for a docs PR

The gap is now one code path — CI4 index → TLUT lookup — rather than a
subsystem. It is directly testable against the existing Angrylion .rvec
harness
: a CI4-with-TLUT vector is the obvious next probe, in the same shape as
the CI/TLUT work already recorded under R-7.

I am deliberately not guessing at a fix in this PR. The last three times I named a
cause before measuring its boundary I was wrong (exception vector, presentation
path, Z), and the pattern each time was reasoning ahead of the oracle. The vector
comes first.

Gates

cargo fmt --all --check, cargo test --workspace, pre-commit run markdownlint --all-files — each run separately, exit status checked.

Oracle: docs-only, no emulation behaviour change, so n64-systemtest is
unchanged at 90 suite-wide, Phase 1 Failed: 0, per docs/STATUS.md.

🤖 Generated with Claude Code

Inspecting the RDP state Ocarina actually leaves eliminates two of the three
suspects from the previous entry and turns the third into a single code path.

The Z path is refuted: z_compare_en and z_update_en are both false, so nothing is
depth-rejected. SET_Z_IMAGE is issued and z_image is set, but the compare is off.

The combiner is refuted as a collapse - and is the key evidence. cyc1 decodes to
rgb_a=15, rgb_b=15, rgb_c=31, rgb_d=1, i.e. (0 - 0) x 0 + TEXEL0: a pure texture
pass-through. The pixel colour IS the texel, so a black frame means the texel
fetch resolves to 0.

The tiles are fmt=2 size=0 - CI4, 4-bit colour-indexed textures resolved through
a TLUT. Both TMEM halves are populated after 4,374 LOAD_BLOCKs (1,508/2,048
non-zero bytes in the texture half, 760/2,048 in the TLUT half), and TLUT entry 0
reads 0x0000 with entries alternating 0000 ffff at the 8-byte stride tlut_lookup
uses.

So real indices and a real palette are both present and the resolution yields
black. The gap is the CI4 + TLUT texel path: one code path, directly testable
against the existing Angrylion .rvec harness. A CI4-with-TLUT vector is the
obvious next probe, in the same shape as the CI/TLUT work already under R-7.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 22ee6330-d175-4620-a85a-74a07d9e1ad9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR updates the R-18 accuracy record and changelog with the corrected hle_boot stack-pointer diagnosis, observed retail execution results, revised RSP evidence, and a narrowed CI4 plus TLUT texel-fetch hypothesis.

Changes

R-18 diagnosis

Layer / File(s) Summary
Corrected boot diagnosis and CI4 probe
docs/accuracy-ledger.md, CHANGELOG.md
The documentation records the missing initial sp seeding in hle_boot, corrected retail boot and RSP execution evidence, retirement of “lit pixels” as a rendering metric, and the CI4 plus TLUT path resolving texels to zero with an Angrylion-testable vector.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Title check ✅ Passed Matches Conventional Commits, stays within 72 characters, and the scope/subject align with the docs-only change.
Description check ✅ Passed It clearly describes the same CI4 + TLUT narrowing and docs-only intent as the change set.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Oracle Number Is Stated ✅ Passed Docs-only diff (CHANGELOG.md only); the oracle-number rule is exempt here, and docs/STATUS.md still records 90 suite-wide.
Docs-As-Spec Sync ✅ Passed PASS: HEAD changes only CHANGELOG.md; no rustyn64-* chip-crate files or docs/.md changed, so there is no observable chip behaviour to sync.
Changelog Entry For User-Visible Changes ✅ Passed Docs-only PR; no user-visible product change to log, and CHANGELOG.md already has the entry under [Unreleased].
Measured, Never Tuned ✅ Passed Only ASCII normalisation in the combiner expression changed; no new hardware constants or timings were introduced.
Unsafe Stays Out Of The Chip Crates ✅ Passed PASS: the patch only touches CHANGELOG.md; no Rust sources change, no unsafe is added, and no #![forbid(unsafe_code)] is removed.

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

The same expression appeared with Unicode minus and multiplication signs in
CHANGELOG.md and ASCII in docs/accuracy-ledger.md. It is one formula; it now
reads identically in both, in ASCII, which also survives grep and terminals that
mangle U+2212.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@doublegate

Copy link
Copy Markdown
Owner Author

Antigravity — Unicode vs ASCII in the combiner expression. ADOPTED. The same formula appeared as (0−0)×0 + TEXEL0 (U+2212, U+00D7) in CHANGELOG.md and (0 - 0) x 0 + TEXEL0 in docs/accuracy-ledger.md. It is one formula and now reads identically in both, in ASCII — which also survives grep and terminals that mangle U+2212. Same class as the comma/space split you caught on #179: one measurement rendered two ways reads as two.

Nitpick — commas in 4-digit byte fractions (1,508/2,048). NOT ADOPTED, with a reason. They are there deliberately so the pair scans as counts out of a total rather than as a ratio or a version number, and they match the comma convention this file settled on last PR. Dropping separators only at four digits would reintroduce a per-number judgement call, which is what the standardisation was meant to remove.

@github-actions

Copy link
Copy Markdown

Antigravity review (Gemini via Ultra)

This PR updates CHANGELOG.md and docs/accuracy-ledger.md (row R-18) to document the technical narrowing of the RDP video rendering gap specifically to the CI4 + TLUT texel fetch path.

Blocking issues

None found.

Suggestions

  • CHANGELOG.md (lines 31–38) / docs/accuracy-ledger.md (line 413): The documentation update states that the issue is "directly testable with a CI4 .rvec vector against Angrylion," but no reproduction vector or test case is included in this pull request. If the vector was produced during this investigation, it should accompany this documentation change to ensure test coverage.

Nitpicks

  • CHANGELOG.md (line 32) / docs/accuracy-ledger.md (line 413): (0 - 0) x 0 + TEXEL0 uses ASCII x instead of the multiplication symbol × used elsewhere in the ledger (e.g., × 63/64).

Automated first-pass review by agy on a self-hosted runner -- not a human review.

@doublegate

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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