Skip to content

docs(ledger): localise the video gap to RDP rasterisation, not presentation - #179

Merged
doublegate merged 2 commits into
mainfrom
fix/rdp-vi-presentation
Jul 29, 2026
Merged

docs(ledger): localise the video gap to RDP rasterisation, not presentation#179
doublegate merged 2 commits into
mainfrom
fix/rdp-vi-presentation

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Correcting my own localisation

The previous entry blamed the "RDP → VI presentation path". That was wrong,
and this PR replaces it with a measured boundary.

Presentation is not at fault

Ocarina of Time's framebuffer at VI_ORIGIN is uniformly 0x0001 — RGBA5551
with R=G=B=0 and the coverage bit set. The VI is faithfully presenting a
genuinely black buffer, and scanout is correct.

(VI_ORIGIN = 0x3b5280 sits exactly one scanline into the RDP's colour image
0x3b5000, which is normal — so even the addresses line up.)

Submission is not at fault either

A DPC-seam opcode census over 300 frames shows the real F3DEX stream arriving:

Opcode Command Count
0x0F TRIANGLE — shade + texture + Z 7,412
0x35 SET_TILE 7,705
0x33 LOAD_BLOCK 4,374
0x24 TEXTURE_RECTANGLE 1,630
0x3C SET_COMBINE 1,589

…of 74,508 commands. Geometry, textures and tile state all reach the RDP.

So the gap is between those two

The RDP rasterises real geometry to black. That is far more useful than "does
not reach video", and unlike the previous framing it is directly testable.

First suspects, each isolatable against the Angrylion vector harness that already
exists:

  • the Z path — every one of those 7,412 triangles is the 0x0F Z-buffered
    variant, so a z_compare that rejects universally produces exactly this result;
  • texture fetch returning 0;
  • the combiner collapsing to 0.

A note on my own process

Two localisations in two turns have now been wrong — presentation, and before
that the exception vector — both because I named a subsystem before measuring
its boundary. In both cases a census or a correlated capture settled it in one
run. Recorded in the ledger alongside the finding, since the pattern is more
useful than the individual corrections.

Gates

cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings,
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

…tation

Correcting my own localisation from the previous entry, which blamed the
"RDP to VI presentation path". That was wrong.

Ocarina of Time's framebuffer at VI_ORIGIN is uniformly 0x0001 - RGBA5551 with
R=G=B=0 and the coverage bit set. The VI is faithfully presenting a genuinely
black buffer and scanout is correct, so presentation is not at fault.

Submission is not at fault either. A DPC-seam opcode census over 300 frames shows
the real F3DEX stream arriving: 7,412 TRIANGLE (0x0F - shade + texture + Z),
1,630 TEXTURE_RECTANGLE, 4,374 LOAD_BLOCK, 7,705 SET_TILE, 1,589 SET_COMBINE, of
74,508 commands. Geometry, textures and tile state all reach the RDP.

So the gap is between those two: the RDP rasterises real geometry to black. That
is a far more useful statement than "does not reach video", and it is testable.
First suspects, each isolatable against the Angrylion vector harness that already
exists: the Z path (every one of those triangles is the Z-buffered 0x0F variant,
so a z_compare rejecting universally produces exactly this), the texture fetch
returning 0, and the combiner collapsing to 0.

Two localisations in two turns have now been wrong - presentation, and before
that the exception vector - both because I named a subsystem before measuring the
boundary. The census is what settled it.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: dff2d12f-3da6-4fc5-950b-22f5de277f13

📥 Commits

Reviewing files that changed from the base of the PR and between 3b95d25 and c7568e7.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • docs/accuracy-ledger.md

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated the accuracy ledger to mark the Ocarina of Time execution issue as substantially resolved.
    • Clarified that missing CPU initialisation prevented proper video setup.
    • Corrected evidence and measurement guidance for RSP execution and framebuffer output.
    • Added graphics-command census data and narrowed remaining video issues to black RDP rasterisation.
    • Updated the changelog with more concrete, testable evidence and investigation targets.

Walkthrough

R-18 documentation now records the missing sp initialisation in hle_boot, corrects RSP execution measurements, retires “lit pixels” as evidence, and narrows the remaining video issue to black RDP rasterisation.

Changes

R-18 evidence correction

Layer / File(s) Summary
Corrected rendering diagnosis
docs/accuracy-ledger.md, CHANGELOG.md
R-18 is marked substantially resolved with the hle_boot stack-pointer fault identified, authoritative SP_STATUS measurements documented, “lit pixels” retired as a pass metric, and remaining black-output evidence narrowed to RDP rasterisation suspects.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is relevant, but it exceeds the 72-character Conventional Commits limit. Shorten it to 72 characters or fewer, for example: docs(ledger): localise video gap to RDP rasterisation.},{
✅ Passed checks (8 passed)
Check name Status Explanation
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 PASS: only CHANGELOG.md and docs/accuracy-ledger.md changed, and they either say “not measured” or quote the current 90-suite oracle; docs/STATUS.md confirms 90.
Docs-As-Spec Sync ✅ Passed PASS: the diff touches only CHANGELOG.md and docs/accuracy-ledger.md; no rustyn64-* chip crate files changed, so the docs-sync rule is not triggered.
Changelog Entry For User-Visible Changes ✅ Passed CHANGELOG.md has an [Unreleased] fixed entry for the visible Ocarina/R-18 correction, so the user-facing change is recorded.
Measured, Never Tuned ✅ Passed PASS: the new changelog numerals are mirrored in R-18, which records the 300-frame census and framebuffer measurement method.
Unsafe Stays Out Of The Chip Crates ✅ Passed PASS: Diff is docs-only; no Rust sources changed, and chip crates plus rustyn64-core still have #![forbid(unsafe_code)].

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

Review follow-up. The census appeared in two files with two separators - commas
in CHANGELOG.md, spaces in docs/accuracy-ledger.md - and with different opcode
lists, so the same measurement read as two.

Both now use commas for this content: CHANGELOG.md is decisively comma already
(38 to 2), and it is the more standard convention. docs/accuracy-ledger.md is
historically mixed (26 space, 22 comma); only the census text is changed here,
since a whole-file sweep would bury this correction in an unrelated diff.

CHANGELOG.md was also missing SET_COMBINE from the breakdown; the two lists now
match.

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

Copy link
Copy Markdown
Owner Author

Adjudicating the Antigravity review.

Inconsistent number formatting — ADOPTED. The same census appeared with commas in CHANGELOG.md and spaces in docs/accuracy-ledger.md, so one measurement read as two. Both now use commas for this content: the CHANGELOG is decisively comma already (38 to 2), and it is the more standard convention.

Scoped deliberately: docs/accuracy-ledger.md is historically mixed (26 space-separated vs 22 comma-separated), so there was no existing convention there to violate. I changed only the census text — a whole-file sweep would bury this correction inside a large unrelated diff, and the ledger is an append-mostly record where that matters.

Incomplete opcode breakdown — ADOPTED. CHANGELOG.md omitted 1,589 SET_COMBINE. The two lists now match exactly. That one mattered more than the formatting: a census with a silently different member list is a different census.

Nitpick: the R-18 row is an overly dense block — AGREED, not actioned here. This is the second review to raise it and it is right; the row has accumulated many appended corrections and is now hard to read. I have not restructured it in this PR because rewriting the row layout would obscure the correction the PR exists to make. It belongs in a dedicated ledger pass, and I would rather it stay visibly overdue than be half-done inside an unrelated change.

@github-actions

Copy link
Copy Markdown

Antigravity review (Gemini via Ultra)

This documentation PR updates CHANGELOG.md and docs/accuracy-ledger.md (ledger item R-18) to clarify that the video rendering gap in Ocarina of Time is localized to RDP geometry rasterisation rather than the VI presentation layer.

Blocking issues

None found.

Suggestions

  • CHANGELOG.md#L26-L28: The line wrap places SET_TILE at the start of line 28 with leading whitespace ( SET_TILE), disrupting line continuation inside the list item.
  • docs/accuracy-ledger.md#L413: The resolution text in row R-18 appends ~1,200 characters onto an already extremely long single-line table cell. Consider whether historical investigation logs belong directly in the ledger table or in dedicated tracking docs to avoid unmaintainable table rows.

Nitpicks

  • CHANGELOG.md#L27: Z-buffered TRIANGLEs has a dangling plural 's' outside the backticks, whereas docs/accuracy-ledger.md#L413 uses ``TRIANGLE (0x0F: shade + texture + Z). Standardize the opcode formatting across both files.

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.

@doublegate
doublegate merged commit 401c05c into main Jul 29, 2026
11 checks passed
@doublegate
doublegate deleted the fix/rdp-vi-presentation branch July 29, 2026 08:27
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