Repository navigation
feat(libSceVideoOut): deliver pre-vblank start events - #2152
Merged
oneandonlydean merged 1 commit intoOct 10, 2026
Merged
oneandonlydean merged 1 commit into
oneandonlydean merged 1 commit into
Conversation
sceVideoOutAddPreVblankStartEvent threw "physical pre-vblank timing is not implemented", so titles that pace on it stopped at startup. It now registers the event like the vblank event does, and each emulated vblank tick triggers the pre-vblank start events just before the vblank events, with the pre-vblank count as data. The console's lead time is unknown. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9 tasks done
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 10, 2026
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 10, 2026
SleglJan
pushed a commit
to SleglJan/AnyPS5
that referenced
this pull request
Oct 10, 2026
…t-pre-vblank-start-events feat(libSceVideoOut): deliver pre-vblank start events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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](https://github.com/shadps4-emu/shadPS4/blob/0fe263a4760dfbfa973366890061749b4af0de97/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 repository