fix(libSceVideoOut): answer the cursor, flip status and pending-flip calls as measured on a PS5 #8927
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8927"
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 ionut27001 on 2026-10-21T06:34:18Z.
What
Make the VideoOut cursor, flip-status and is-flip-pending calls return the values measured on a PS5 payload process (firmware 12.70):
flipArg) and 56-59 (currentBuffer) are 0xff, every other byte is 0. With null buffer: ret 0x80290002, buffer untouched.Moves the cursor and flip-fresh implementations from Unimplemented.cpp into Output.cpp (SetFlipMaster and ClearFlipMaster stay as stubs in Unimplemented.cpp; their values above are measurements only) and adds a guest test that pins every measured value.
Overlaps: #8784 adds assertions to
core/libs/tests/GuestVideoOutCursor.cpp, which this PR removes (its cases expected all four cursor calls to throw on an unopened handle, which the measurement contradicts); whichever lands second rebases, and its two flip-master assertions can move intotests/Flip.cpp. #6977 declares the same four cursor exports as parameterless throwing stubs inside a much larger PS4-on-AGC change that already conflicts withmain; this PR implements them with measured behaviour, so the two cannot both merge as they are. File overlaps only: #7814 and #4040 (Output.cpp, debt file), #7965 (debt file), #8418 and #6044 (Flip.cpp).Tested
Windows 11, guest tests (video_out, videoout, flip): 29/29 pass twice; the new test (
video_out_flip_fresh) passes directly withANYPS5_VIDEO_OUT_TEST_DRIVER=windowstwice. Revert check: removing the fix fails the new test as expected.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T06:35:12Z.
The current Conventions run fails only on the template checklist:
Depends on: none,Fixes: none, andUnblocks: noneare still unchecked. Please check those three boxes (or replace them with applicable values) and rerun; the rest of the current required checks shown are passing.Imported from boykopovar/AnyPS5. Originally posted by ionut27001 on 2026-10-21T06:38:45Z.
Checked the three boxes (all three are none) and corrected the flip-status byte description in the body (bytes 56-59 are 0xff as well, as the test pins).
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T06:41:16Z.
Thanks for checking the three checklist items and correcting the byte description. I verified the latest Conventions run now passes; the current required intake/report checks also pass. The remaining platform build jobs are skipped by the workflow for this PR.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T06:51:39Z.
I checked the latest run: the follow-up conventions check passed after the earlier template failure. Thanks for fixing it.
Imported from boykopovar/AnyPS5. Originally posted by harisibrar1 on 2026-10-24T15:32:46Z.
Review: COMMENTED
Checked against main
b607bfdc8band the struct/error constants on main:flipArgat 24 andcurrentBufferat 56 inVideoOutFlipStatus; 0x80290002/0x8029000b in VideoOutDriver.hpp), and the check order in the new code matches each measured case. It needs a rebase:git merge-treeshows conflicts in all five shared files.61a44c79e2gavesceVideoOutSetFlipMaster(handle, masterHandle)andsceVideoOutClearFlipMaster(handle)signatures (Unimplemented.cpp:10, :15) and removed the "declared without parameters, signatures unknown" debt line. The new flip-master debt line still says the shapes are unknown, so it would contradict main. Keeping the measured codes with the signatures main now has would fix that (main has no debt entry for these two stubs, so the line is still worth having).guest_video_out_cursorruns with no skip code, but its replacement,video_out_flip_fresh, opens a port first, and the flip test's main() returns 77 when there's no Vulkan display. I couldn't run it, but reading the code, the handle -1 cursor checks would then be skipped on headless hosts. Running those checks beforesceVideoOutOpenwould keep them always on.Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.