mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Rogue Galaxy blocks the GS thread 7.5 ms every frame to read back sixty-four pixels. It is an 8x8 patch of the depth buffer at a fixed screen position, read once a frame -- a depth occlusion probe, the test a game does before deciding whether to draw a lens flare. The cost is entirely GPU-fence synchronisation, so it does not scale with the payload: the emulator submits, waits for the GPU to finish, and reads 256 bytes. The asynchronous download mode issues the same copy into a throwaway staging texture and retires it at a later vsync, so the GS thread never waits. Measured on the M2 by timing the readback directly rather than the frame, which keeps the number clear of the gsrunner -perf perturbation: 7.2-7.8 ms becomes 0.005-0.008 ms. On a 45 ms frame that stall was around a fifth of the time. It is not the blunt option. NoReadbacks and Unsynchronized, which this overlay already ships for other titles, either skip the readback or race it. Async does the real download and merely serves it a frame late, and it drops a late result outright when an EE upload or a local-to-local move has since claimed those pages, so stale data cannot overwrite newer contents. Output is unchanged on every frame we can compare: four captured scenes, thirty two colour frames, all pixel-identical, each scored against three baseline runs of the unmodified binary first so run-to-run dump nondeterminism could not be read as a result. What that evidence cannot cover is motion. A frame-old occlusion probe differs from a fresh one exactly when the probe's answer changes, which needs the camera or the light to move, and every capture we hold is near-static. The visible failure would be a lens flare blinking a frame late as it passes behind scenery. That is the thing to watch for in play, and reverting is a one-line change if anyone sees it. Seven serials, every Rogue Galaxy entry the overlay carries, including the three Japanese ones -- SCPS-15102, SCPS-17013 and SCPS-19254 are the same game under its Japanese title. OutRun 2006 is the only other title of the eight we profile that reads back at all, three times a frame for 3.3-4.2 ms, and it is deliberately not included here. Its readbacks are small colour buffers rather than depth, and there is an open unexplained brightness bug in that game; feeding frame-old data into what may be an adaptive-exposure loop is not something to do before understanding it.