re: the gamma ramp write -- direct observation attempted, blocked by the build tree

ui-render-tone-curve.md records the game's gamma-ramp write as "inferred from a
closed chain, not directly observed". The direct observation is a log in Canary's
own DC_LUT write path, which /canary being read-write makes available. Wrote it;
could not build it.

The patch logs each completed 256-entry sweep with samples against the identity
ramp the source documents (i * 0x3FF / 0xFF), so a written ramp is
distinguishable from an unwritten one by reading the log. Recorded in the page in
full so a future iteration with a working build can re-apply it.

BLOCKED: /sylph-home/re/canary-build was configured with -S/work/xenia-canary and
that path does not exist in this container. ninja fails at CMake regeneration
before compiling anything, and reconfiguring against /canary would trigger a
near-full Xenia rebuild -- not something to start on the way to one log line. Per
"do not improvise around a blocker", stopped and wrote it down.

REVERTED the patch and verified /canary byte-identical to its backup. Leaving
instrumented source the running binary does not contain is the
source-and-binary-disagree trap this session has caught three times; a later
reader would find the logging in the tree and conclude it was live.

Also of note for the corpus: the header edit initially failed silently because I
chained it with `||`, which hid the failure -- the "assert every edit" lesson from
four iterations ago, repeated. Caught by grepping for the symbol afterwards rather
than by trusting the command.

The ramp write remains inferred, not observed. What is new is the reach: the
experiment is written and the obstacle is a build-tree path, not anything about
the game.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
This commit is contained in:
sylph-decoder
2026-08-30 19:33:25 +00:00
parent 2ea7b7eb3d
commit cf04a14958

View File

@@ -215,6 +215,50 @@ LOG_LEVEL=3` (both are needed — kernel calls log at Debug) and look for
emulator only to **boot**, not to reach a menu: video init happens in the first emulator only to **boot**, not to reach a menu: video init happens in the first
seconds. This had been parked behind the title-screen blocker for no reason. seconds. This had been parked behind the title-screen blocker for no reason.
## 🔴 The direct observation: ATTEMPTED, BLOCKED by the build tree (2026-08-30)
This page records the game's ramp write as *"inferred from a closed chain, not
directly observed"*, the chain being that the swap-path stage is a pure 256-entry
LUT and that an unwritten table is identity (`i * 0x3FF / 0xFF`). The direct
observation is a log in Canary's own write path, which `/canary` being read-write
makes available. Attempted; blocked, and the blocker is worth recording.
**The patch**`command_processor.cc`, inside `XE_GPU_REG_DC_LUT_SEQ_COLOR`, on
each completed 256-entry sweep:
```cpp
if (gamma_ramp_rw_index.rw_index == 255 && gamma_ramp_rw_component_ == 2) {
auto id = [](uint32_t i) { return i * 0x3FFu / 0xFFu; };
XELOGI("[RE-GAMMA] full 256-entry ramp written (sweep #{})", ++re_gamma_sweeps_);
for (uint32_t i : {0u, 64u, 128u, 192u, 255u}) {
const auto& e = gamma_ramp_256_entry_table_[i];
XELOGI("[RE-GAMMA] [{:3}] r={:4} g={:4} b={:4} identity={:4}{}",
i, uint32_t(e.color_10_red), uint32_t(e.color_10_green),
uint32_t(e.color_10_blue), id(i),
uint32_t(e.color_10_red) == id(i) ? "" : " <- NOT identity");
}
}
```
plus `uint32_t re_gamma_sweeps_ = 0;` beside `gamma_ramp_rw_component_` in the
header. It prints each written ramp against the identity the source documents, so
a written ramp is distinguishable from an unwritten one **by reading the log**.
🔴 **Blocked: the build tree cannot regenerate.** `/sylph-home/re/canary-build` was
configured with `-S/work/xenia-canary`, and **that path does not exist** — the tree
was configured against a source location this container no longer has. `ninja`
fails at the CMake regeneration step before compiling anything. Reconfiguring
against `/canary` would almost certainly trigger a near-full Xenia rebuild, which
is not a thing to start on the way to one log line.
**The patch was REVERTED and `/canary` verified byte-identical to its backup.**
Leaving instrumented source that the running binary does not contain is the
source-and-binary-disagree trap this corpus has hit repeatedly — a later reader
would find the logging in the tree and conclude it is live.
⚠️ So the ramp write **remains inferred, not observed**, exactly as this page
already says. What is new is the reach: the experiment is *written*, and the
obstacle is a build-tree path rather than anything about the game.
## What a port should do with this ## What a port should do with this
Treat it as **authored**, not transcribed. If the goal is to match the emulator — Treat it as **authored**, not transcribed. If the goal is to match the emulator —