feat(libSceVideoOut): register PS4 display buffers #5991
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5991"
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 Get-fix on 2026-10-14T18:36:53Z.
What
Adds the PS4 functions
sceVideoOutSetBufferAttributeandsceVideoOutRegisterBufferson top of the existing registration. PS4 programs built with the OpenOrbis toolchain import these instead of the...2functions; the graphics, input, pngdec and exceptions samples stop atFAIL: unresolved ELF import i6-sR91Wt-4andw3BY+tAEiQYwithout them.0x80000000) and A8B8G8R8_SRGB (0x80002200) buffers, which map to the PS5 formats0x8000000000000000and0x8000000022000000. Other formats and tiled buffers throw; the PS4 tiled layout differs from the PS5 one.DisplayBuffercarries the alignment, so registration and the reads at flip time check 4 KiB for these buffers. PS5 buffers keep the 64 KiB rule.The libSceVideoOut debt file records the limits. A handle counts as PS4 once PS4 buffers are registered, so a PS4 title that reads a status before that gets the PS5 layout. Only the two linear formats are accepted. The PS4 alignment rule itself is not known.
Part of the PS4 homebrew work tracked in #3093.
Tested
Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, full build with
BUILD_TESTING=ON, onmaine442f4c2e:video_out_flip_*modes, which ctest skips under the offscreen driver, run in a window (ANYPS5_REQUIRE_DISPLAY=1): all 12 pass, including the newps4mode. It registers PS4 buffers at 4 KiB and 64 KiB offsets, checks the attribute fields, set indices, format mapping, rejected options, tiled buffers and unknown formats, flips the 4 KiB-aligned buffer, and checks that the PS4 flip and vblank status stay within 64 and 32 bytes while a PS5 handle still fills 128.ps4orlabelsmode fail: keeping the 64 KiB rule for PS4 buffers at registration or at flip time; not widening the format; not marking the handle as PS4; dropping the label reset; starting the set search at 1; accepting tiled PS4 buffers; writing the PS5 flip or vblank status for PS4; accepting 4 KiB for tiled buffers; ignoring the alignment in the address check.main84b01f9cd, all together one442f4c2e): graphics (Mandelbrot set, CPU-drawn), input and pngdec (its decodedlogo.png) present correct frames in their windows; exceptions passes its test case.tools/check_conventions.py --base origin/mainpasses.Not tested on Linux.
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 repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T18:37:29Z.
Progress report (
73efd94→901b92c)➖ System libraries: 88.86% (+0.0%, +2 implemented functions)
✅ 2 implemented
sceVideoOutRegisterBufferssceVideoOutSetBufferAttributeImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:12:51Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceVideoOut/CMakeLists.txtcore/libs/prx/libSceVideoOut/src/Output.cppdocs/dev/debt/libSceVideoOut.mdcore/libs/prx/libSceVideoOut/CMakeLists.txtcore/libs/prx/libSceVideoOut/tests/Flip.cppcore/libs/prx/libSceVideoOut/CMakeLists.txtcore/libs/prx/libSceVideoOut/tests/Flip.cppcore/libs/SceTypes.hppcore/libs/prx/libSceVideoOut/include/VideoOutDriver.hppcore/libs/prx/libSceVideoOut/CMakeLists.txtcore/libs/prx/libSceVideoOut/tests/Flip.cppdocs/dev/debt/libSceVideoOut.mdcore/libs/prx/libSceVideoOut/include/VideoOutDriver.hppImported from boykopovar/AnyPS5. Originally posted by Get-fix on 2026-10-15T13:35:03Z.
I checked the overlap the bot lists. I fetched each listed pull request and, for every file it shares with this one, merged its change with
git merge-fileinto currentmain(a5e2a80c6) and intomainwith this pull request merged. A conflict that appears only in the second case is one this pull request adds.The bot lists 25 pull requests, with 46 shared files between them (mostly
libSceVideoOut'sCMakeLists.txt,tests/Flip.cppandsrc/Output.cpp). This pull request adds no conflict to any of them. Two of them already conflict withmainin those files, and this pull request doesn't change that.AI-assisted: yes (Claude Code). I ran these checks myself on Windows 11.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-16T20:46:45Z.
Checked the PS4 attribute layout (40 bytes) and the 64/32-byte flip and vblank status against prosper and shadPS4, ran the
ps4,labelsandlifetimeflip modes with a display on RADV, and confirmed that disabling the PS4 status path makesps4fail. Debt entry and tests look right; merging once the full Build is green.