// SPDX-License-Identifier: MIT // Copyright (c) 2026 The Roofer Dev - Beast Roofer Edition. Clean-room integration code. // Built on Ryujinx (MIT). using System; namespace Ryujinx.Graphics.Shader.Translation { /// /// [PERISCOPE] Temporary VISUALIZATION experiment (RYUJINX_PERISCOPE=1), inert unless set. /// Makes the screen show the RAW 64x36 motion tile map instead of the motion-blur result. /// /// After ten cause families died by measurement (journal 121-148), the missing piece is a /// direct LOOK at the corrupted data itself: readbacks deform it ((112)(3)), Nsight is out. /// This probe turns the display into the debugger: in the blur shader (guest FS 0x1000AE430), /// the first sample of the tile map (handle 0xE) is captured at translation and REPLACES the /// shader's colour output (rt0.xyz), so the final image IS the map, one texel = 20 screen px, /// through the normal render path -- no readback, no deformation. Alex's captures become /// memory dumps I can analyse offline: replicated rows would say scale/clamp mismatch, /// static blocks would say uninitialized regions, flicker would say generation mixing. /// /// Address-gated like TILEMAP_CONST (the blur FS lacks the 0.01 fingerprint), so the shader /// cache must be OFF for the run -- the TILEMAP-style pre-flight bat handles it. Codegen /// probe: in the DiskCacheHostStorage interlock. Witness: the screen looks obviously wrong /// (a coarse mosaic instead of the scene's blur) + the [PERISCOPE] log line. /// public static class PeriscopeProbe { public static readonly bool Enabled = Environment.GetEnvironmentVariable("RYUJINX_PERISCOPE") == "1"; // [PERISCOPE2] Ladder stage 1 (journal 153): display the RAW 720p object-MV buffer, // one pixel per texel, by capturing the temporal resolve's tcb_10 sample (guest FS // 0x100082C30) and overriding its rt0 scene output. Same field, same return-site override. public static readonly bool Stage2 = Environment.GetEnvironmentVariable("RYUJINX_PERISCOPE2") == "1"; } }