libSceVideoOut: sceVideoOutSetFlipMaster and sceVideoOutClearFlipMaster are absent (Tomba! 2); branch ready #3762

Closed
opened 2026-10-11 16:33:08 +00:00 by screamm · 1 comment
screamm commented 2026-10-11 16:33:08 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T16:33:08Z.


libSceVideoOut lacks sceVideoOutSetFlipMaster (WkYtyOg30do) and sceVideoOutClearFlipMaster (T0ynQY3mH-0). Tomba! 2 (PPSA29866, #3646) imports both: "Eleven imports that no library exports: eight sceHmd2Reprojection*, sceVrTracker2Finalize, sceVideoOutSetFlipMaster, sceVideoOutClearFlipMaster." Neither was called in the 60 s run, so what the title needs back is unobserved; the only prior art is xXPBSXx's declare-only branch. (sce_net_in6addr_linklocal_allnodes from the same research pass is already covered by the open #3707, so it was skipped.)

Branch ready: screamm:feat/videoout-flipmaster-net-in6addr (d33e2a4b, one commit on main a11c8f7f). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.

  • The real signature is sceVideoOutSetFlipMaster(int slave, int master) with two handles and sceVideoOutClearFlipMaster(int slave): KytyPS5 src/graphics/presentation/videoOut.cpp:785-808 (16a7fe68) for Set and the UNSUPPORTED_OPERATION code 0x8029001C (errno.h, fpPS4 agrees), SharpProspero VideoOut.cs for the Clear signature (fact only, GPL-3.0). The repository's model holds several ports at once (main, overlay, sub), so a tie between two real ports is recorded: unknown or closed handle INVALID_HANDLE; the same handle twice, a slave that already has a master or slaves, or a master with its own master UNSUPPORTED_OPERATION (new constant); a pending flip on either port RESOURCE_BUSY; otherwise the tie is recorded on both ports (a master may have several slaves) and Set returns 0; Clear removes it; closing a slave drops its tie as Kyty does.
  • What throws, with the reason named: any flip on a tied port (the grouped master/slave flip, Kyty's flip modes 8 and 9, is not modelled), Clear on a port without a master (no source has a body for Clear), and closing a master that still has slaves (fatal in Kyty). Recorded in TechnicalDebt.
  • New video_out_flip_flipmaster mode in tests/Flip.cpp (registered in the existing foreach): invalid handles for all three arguments, Set(h, h), Clear without a master, RESOURCE_BUSY while a flip is pending, tying overlay to main, double and reverse ties, flips on a tied port and closing a tied master throwing, Clear followed by a completed flip, re-tie then closing the slave followed by a completed flip.

Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including libs: under ctest the video_out_flip_* tests skip here as they always do (the SDL offscreen driver has no Vulkan), so video_out_flip_flipmaster was run against the real display (NVIDIA RTX 4070, ANYPS5_REQUIRE_DISPLAY=1, SDL_VIDEODRIVER=windows): passed 3/3, with overlay and lifetime passing once each; ctest -j8 -E "^agc_driver_|^video_out_flip" 533/536, the failures being the known windows_exceptions (#3411, fixed by #3415), guest_kernel_sys (#3510) and guest_filesystem (#3518); tools/check_conventions.py --base main and git diff --check pass. Not run on Linux.

Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5802981763 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3762). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T16:33:08Z. --- libSceVideoOut lacks `sceVideoOutSetFlipMaster` (`WkYtyOg30do`) and `sceVideoOutClearFlipMaster` (`T0ynQY3mH-0`). Tomba! 2 (PPSA29866, #3646) imports both: "Eleven imports that no library exports: eight `sceHmd2Reprojection*`, `sceVrTracker2Finalize`, `sceVideoOutSetFlipMaster`, `sceVideoOutClearFlipMaster`." Neither was called in the 60 s run, so what the title needs back is unobserved; the only prior art is xXPBSXx's declare-only branch. (`sce_net_in6addr_linklocal_allnodes` from the same research pass is already covered by the open #3707, so it was skipped.) **Branch ready:** [`screamm:feat/videoout-flipmaster-net-in6addr`](https://github.com/screamm/AnyPS5/tree/feat/videoout-flipmaster-net-in6addr) (`d33e2a4b`, one commit on `main` `a11c8f7f`). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. - The real signature is `sceVideoOutSetFlipMaster(int slave, int master)` with two handles and `sceVideoOutClearFlipMaster(int slave)`: KytyPS5 `src/graphics/presentation/videoOut.cpp:785-808` (`16a7fe68`) for Set and the `UNSUPPORTED_OPERATION` code `0x8029001C` (`errno.h`, fpPS4 agrees), SharpProspero `VideoOut.cs` for the Clear signature (fact only, GPL-3.0). The repository's model holds several ports at once (main, overlay, sub), so a tie between two real ports is recorded: unknown or closed handle `INVALID_HANDLE`; the same handle twice, a slave that already has a master or slaves, or a master with its own master `UNSUPPORTED_OPERATION` (new constant); a pending flip on either port `RESOURCE_BUSY`; otherwise the tie is recorded on both ports (a master may have several slaves) and Set returns 0; Clear removes it; closing a slave drops its tie as Kyty does. - What throws, with the reason named: any flip on a tied port (the grouped master/slave flip, Kyty's flip modes 8 and 9, is not modelled), Clear on a port without a master (no source has a body for Clear), and closing a master that still has slaves (fatal in Kyty). Recorded in TechnicalDebt. - New `video_out_flip_flipmaster` mode in `tests/Flip.cpp` (registered in the existing `foreach`): invalid handles for all three arguments, Set(h, h), Clear without a master, `RESOURCE_BUSY` while a flip is pending, tying overlay to main, double and reverse ties, flips on a tied port and closing a tied master throwing, Clear followed by a completed flip, re-tie then closing the slave followed by a completed flip. **Tested** on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`, full build including `libs`: under ctest the `video_out_flip_*` tests skip here as they always do (the SDL offscreen driver has no Vulkan), so `video_out_flip_flipmaster` was run against the real display (NVIDIA RTX 4070, `ANYPS5_REQUIRE_DISPLAY=1`, `SDL_VIDEODRIVER=windows`): passed 3/3, with `overlay` and `lifetime` passing once each; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 533/536, the failures being the known `windows_exceptions` (#3411, fixed by #3415), `guest_kernel_sys` (#3510) and `guest_filesystem` (#3518); `tools/check_conventions.py --base main` and `git diff --check` pass. Not run on Linux. Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
oneandonlydean commented 2026-10-13 02:19:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:19:26Z.


Closing: both calls are exported on main since #3819, so PPSA29866 loads; they throw when called and no run calls them. Reopen with the log line when a title reaches the throw.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6136779007 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3762#issuecomment-6136779007). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-13T02:19:26Z. --- Closing: both calls are exported on main since #3819, so PPSA29866 loads; they throw when called and no run calls them. Reopen with the log line when a title reaches the throw.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#3762
No description provided.