Files
psxrecomp/runtime/include
tetrisgm a05ad08651 Add [[widescreen.cull.widen]]: move the cull bound instead of pinning it
[[widescreen.cull.keep]] forces a comparison's verdict while wide. That is
correct for a separately proven binary decision, and config_schema.md already
says as much -- "keep has no queue policy and is appropriate only for a
separately proven binary verdict", and prefer an aspect cone "when the original
predicate is a camera-frustum test".

At a clip-code packer it is actively wrong. Pinning the classifier tells the
clipper that nothing crosses the screen edge, so polygons that do are never
subdivided; they are submitted whole with coordinates outside the GPU's legal
primitive range and the hardware discards the entire primitive. The visible
result is geometry disappearing as the camera moves -- widening the view draws
LESS, not more.

Measured on a WipEout 3 game repo, same track and camera path: ~323 primitives
emitted with the pinned sites active against ~761 with the margin at 0. Live
A/B via the ws_margin debug command also showed inverted ship steering and
broken AI with the pins active, both of which cleared at margin 0 while the
16:9 image was retained.

This adds the widening alternative:

    [[widescreen.cull.widen]]
    address  = "0x8017032C"
    expected = "0x28850000"
    mode     = "imm_lower"

Modes name which operand carries the bound and which way it travels:
  imm_upper  SLTI/SLTIU  coord <  imm + m
  imm_lower  SLTI/SLTIU  coord <  imm - m
  bound_rt   SLT/SLTU    rs    <  rt  + m
  bound_rs   SLT/SLTU    rs + m <  rt

Every mode reduces to the vanilla comparison at margin 0, so 4:3 output stays
bit-for-bit identical -- the same guarantee keep sites give. The immediate modes
reuse the existing psx_ws_cull_slti / psx_ws_cull_slti_lower helpers; the
register-bound modes need psx_ws_cull_slt_widen, added here.

The parser rejects a mode that does not match the instruction shape (an
immediate mode on a register compare would widen an operand that does not
exist), rejects duplicate addresses, and full-word guards the site as keep does
so an overlay variant at the same VA is left alone. Widen sites contribute to
overlay cache identity, otherwise migrating a site from keep to widen would
silently reuse the pinned overlay.

No game config uses this yet; migrating a title's sites is a separate change
that needs each site's operand roles established first.
2026-08-17 00:42:30 -07:00
..
2026-07-29 03:18:10 -04:00
2026-08-06 20:34:50 -04:00
2026-07-29 03:18:10 -04:00
ok
2026-08-07 22:14:26 -04:00
2026-08-07 16:42:43 -04:00
2026-08-16 17:59:20 -04:00
2026-07-29 03:18:10 -04:00
2026-08-03 05:26:37 -04:00
2026-08-06 20:34:50 -04:00
2026-08-07 18:11:35 -04:00
2026-08-03 05:26:37 -04:00
2026-08-03 05:26:37 -04:00
2026-07-29 03:18:10 -04:00
2026-07-29 03:18:10 -04:00
2026-08-06 00:52:14 -04:00
2026-07-31 17:14:35 -04:00
2026-08-13 17:38:22 -04:00
2026-07-31 17:14:35 -04:00
2026-07-29 03:18:10 -04:00
2026-07-31 17:14:35 -04:00
2026-07-29 03:18:10 -04:00
2026-07-29 03:18:10 -04:00
2026-08-13 10:37:18 -04:00
2026-08-11 18:59:19 -04:00
2026-08-07 18:57:25 -04:00
2026-08-16 21:55:51 -04:00
2026-07-29 03:18:10 -04:00