Coherent projection publication and bounded diagnostics; repaired final-pass history advancement and reload clock. Real GL182 checks and combined title regression/visual gate passed. Owner explicitly authorized this merge.
Some PlayStation 1 titles implement trivial rejection by folding the sign bits of projected vertex screen coordinates across triangle or quad primitives with a chain of AND instructions. Without adjusting these checks during widescreen presentation, geometry in the newly revealed horizontal area is still rejected by the original 4:3 bounds. Rather than embedding title specific instruction patterns directly into the recompiler, this introduces a generalized `[[widescreen.cull.sxy]]` configuration schema within `game.toml`.
Game configurations can now declare multi vertex trivial rejection sequences by their exact AND instruction words, vertex registers and the branch that consumes the result. The loader derives the expected chain from those words and rejects any other shape. Each AND keeps its original value except for the horizontal sign bit, which survives only while that vertex lies beyond the revealed left edge, so vertical and right side rejection are preserved and 4:3 output is bit identical. Shifted coordinate lower edge comparisons reuse the existing `screen_x_sites` handling through a new `slti rt, x, 0` form instead of adding a separate site family.
Full parity is maintained between recompiled code and the dirty RAM interpreter by sharing the same runtime helper and validating every fold and consumer instruction word on both paths, leaving mismatching overlay variants untouched. This eliminates hardcoded game logic from the recompiler while giving titles clean geometry retention in expanded aspect ratios.
For title-specific lighting presets ([video] post_shader):
- `input <sampler> depth`: view depth sz (GTE screen z) of the presented frame,
R32F at window size, rebuilt from the surfaces' PGXP depth; 0 where nothing
3D drew. Only built while a loaded chain reads it.
- `input <sampler> history`: the pass's own target from the last real frame
(trails, temporal filters); generated frames do not update it.
- `u_time` (seconds since the chain loaded) and `u_proj` (latest GTE
projection: 240/H, screen centre in uv, aspect) in every pass.
- Live uniforms: psx_host_set_post_uniform(name, x, y, z, w) sets a preset
`uniform` from game state (e.g. a light source projected to the screen);
the preset value applies until the first call.
- Debug: TCP {"cmd":"post_shader"} reports the loaded preset, its parse status
and the live values; {"cmd":"post_shader","path":"..."} reloads a preset
(or loads another) without restarting, for shader work.
docs/POST_EFFECTS.md documents the inputs and the uniforms.
Used by a lighting preset for R4 (sun and tunnel light shafts, lamp halos,
speed streaks, paint reflections on the player's car from live car pose),
about 0.7 ms of GPU at 1080p on an RTX 3060.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rkyma8rbyPiccs9n2bkyG6
Use a bounded atomic snapshot and presenter-owned reset across all backends. Readers sort their own snapshots; report host API completion cadence. Add deterministic and concurrent reader/reset coverage.
Keep the requested internal resolution / supersample (shown and saved)
apart from what the backend last applied. When the live change is
unavailable (no GL, windowed high-resolution mode, CPU-authoritative dual
rendering, no context) or refused, the session scale is left as applied and
PSX_VIDEO_RESTART_RESOLUTION stays set, in both psx_video_apply_live and
the menu's restart bits (psx_host_video_restart_bits_backend, unit-tested
for the capable and refused cases). video_set rejects invalid presets and
factors without applying or saving, and reports applied values, capability
and pending restart. TCP command index regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep selector zero stock and seal all choices until the next session restart. Refuse nonzero online activation, scope non-stock save states by frozen choices, and preserve original instruction guards when combined with effective-address adapters. Use overlay ABI34 on current master without the old menu dependency stack.
Extract the audited adapters and card transport onto master without the held selector/menu stack. Keep adapters and codecs tied to mod activation, use overlay ABI 33, retain rejected-load protection on codec registration, and refuse extended-card codecs in netplay before frame zero. Preserve default atomic save publication and guest-visible write failures.