feat(libSceVideoOut): deliver pre-vblank start events #2152
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2152"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MathiasDevelopes on 2026-10-09T10:07:06Z.
What
[sceVideoOutAddPreVblankStartEvent](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceVideoOut/src/Event.cpp)threwVideoOut: physical pre-vblank timing is not implemented. Planet Coaster (PPSA01736) registers a pre-vblank start event at startup and does not catch the exception, so it aborts:(
what()is not printed on this path. A temporary print in__cxa_throwshowed it asVideoOut: physical pre-vblank timing is not implemented.)The event is now registered through the same
registerVideoOutEventpath as the vblank event, so re-registration updatesudataandsceVideoOutDeletePreVblankStartEvent(already implemented) removes it. In[VideoOutDriver::vblankEnd](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp), each emulated vblank tick increments the port'spreVblankStatuscount, which already existed and was unused, and stamps its process time. It then triggers the pre-vblank start events with that count as data, just before the vblank events of the same tick.How long before the vblank the console signals pre-vblank start is unknown. The vblank here is a host timer with no scanout, so the event fires at the vblank tick. This is recorded in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md) under unknown function info. [shadPS4](
github.com/shadps4-emu/shadPS4@0fe263a476/src/core/libraries/videoout/video_out.h (L52)) defines the event ID but neither registers nor triggers the event, so it gives no reference timing either.Tested
Windows 11, MinGW-w64 15.2.0, RTX 3060.
video_out_flip_tests controls: after the existing vblank checks, the test subscribes a pre-vblank start event with its ownudataand waits for a vblank. It checks that both a pre-vblank start and a vblank event are delivered and that the pre-vblank event carries itsudata, then unsubscribes. Without the change, it fails withVideoOut: physical pre-vblank timing is not implemented.presentandbacktobackmodes still pass.video_out_flip_testsopens a real window and is inKNOWN_UNRUN, so I ran these modes by hand.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-09T10:07:12Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.