mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
2e7b751bfc
The native-wide mirror target clipped Y to the full surface (0..511), but a vertically double-buffered game (MMX6: front y0..239 / back y240..479, both sharing base_x=0) keeps both buffers in one shared wide surface. The background tile loop starts a partial top row at y = buffer_top - (scrollY & 0xf), so back-buffer draws bled across the band boundary into the front buffer's region of the wide surface -> top/bottom edge flicker as the buffers flipped. Canonical VRAM never showed it because its draw-area clip already confines each buffer. Clip the wide target's Y to the canonical draw area (g_clip_y1..g_clip_y2), exactly like rt_native, so each buffer's draws stay in its own band. X still spans the full wide width (that is where the reveal margins live). User-confirmed the top/bottom flicker is fixed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>