Commit Graph
36 Commits
Author SHA1 Message Date
Alex WhitehouseandClaude Opus 5.5 8ea336be64 feat(libSceVideoOut): change a legacy buffer group to tiled
main now registers tiled PS4 display buffers, so the PS4 change call
accepts tiling mode 0 as well: it stores the attribute without a pitch
and recomputes the group's PS4 pitch as registration does. The width
against pitch check still applies to tiled attributes, as in shadPS4.
The test changes a group to tiled at two pitches and back to linear
instead of expecting the old refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 14:06:42 +00:00
Alex WhitehouseandClaude Opus 5.5 4c62d2e590 fix(libSceVideoOut): return INVALID_ADDRESS for a null changed attribute first
The 13.42 module's sceVideoOutSubmitChangeBufferAttribute (0x112e0)
returns 0x80290002 for a null attribute before it looks up the handle,
then 0x8029000b for an unknown handle, and leaves every other check to
the port's handler. Check the attribute first and return the code
instead of throwing, then the handle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 13:56:08 +00:00
Alex WhitehouseandClaude Opus 5.5 47c82340b8 feat(libSceVideoOut): implement sceVideoOutSubmitChangeBufferAttribute
Replace a legacy PS4 buffer group's attribute through the PS4 call,
following shadPS4 commit 2183807e592b36d4440384878165b43d930c1dee
(video_out.cpp:452-460, driver.cpp:198-240): an aspect ratio other than
0, a width above the pitch and a tiling mode above linear return their
VideoOut errors. The conversion matches legacy registration and the
update matches sceVideoOutSubmitChangeBufferAttribute2, keeping buffer
addresses and pending flips.

Missing groups, reserved fields, null attributes, out-of-range indices
and PS5 groups throw, as the registration and Attribute2 paths do for
the same inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 13:56:08 +00:00
Dean Galvin 328a2bca85 Merge main 086c0686c8 into #9432 (f2928f44d4) 2026-11-04 09:36:57 +13:00
Dean 504d1217be Merge pull request #11220 from p3n1cillin/claude/videoout-register-slot-occupied
fix(libSceVideoOut): return SLOT_OCCUPIED for a registration over registered buffers as the console does
2026-11-02 23:27:18 +13:00
Adrià 7d4006607a Merge pull request #11196 from p3n1cillin/claude/videoout-unregister-busy
fix(libSceVideoOut): refuse to unregister the buffer set on screen as the console does
2026-10-30 06:21:30 +01:00
Dean ca6987de8a Merge pull request #11414 from p3n1cillin/claude/videoout-register-past-last-buffer
fix(libSceVideoOut): return INVALID_VALUE for a registration past the last buffer as the console does
2026-10-30 03:00:15 +13:00
p3nicillinandClaude Opus 5.5 ecadb6068a fix(libSceVideoOut): refuse the on-screen unregister on the main bus only
EVO Player and Prospero Win measured RESOURCE_BUSY on ports opened on
bus type 0. The overlay bus is unmeasured, so its on-screen set is
still released as before, which video_out_flip_overlay relies on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:18:02 +00:00
p3nicillinandClaude Opus 5.5 5768bc971f fix(libSceVideoOut): refuse to unregister the buffer set on screen
The console answers RESOURCE_BUSY (0x80290009) when the set holding
the buffer on screen is unregistered, and the set stays registered:
EVO Player measured it with a re-registration then failing
SLOT_OCCUPIED, and Prospero Win on firmware 12.02 after its flips went
idle. The set was released and 0 returned instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:18:02 +00:00
p3nicillinandClaude Opus 5.5 f3c29634f8 fix(libSceVideoOut): keep the PS4 registration checks in their order
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:48:22 +00:00
p3nicillinandClaude Opus 5.5 a8661988e4 fix(libSceVideoOut): return SLOT_OCCUPIED for a registration over registered buffers
The console answers sceVideoOutRegisterBuffers2 with SLOT_OCCUPIED
(0x80290010) when the buffer slots are still registered: EVO Player
measured it re-registering set 0 while that set stayed on screen. The
call threw INVALID_INDEX instead. The PS4 call and an occupied set over
free slots keep throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:48:22 +00:00
p3nicillinandClaude Opus 5.5 338ea713f2 fix(libSceVideoOut): return INVALID_VALUE for a registration past the last buffer
PS5_Vulkan measured on a PS5 (firmware 13.40) that
sceVideoOutRegisterBuffers2 refuses a set at buffers 15 to 19 with
0x80290001. The call threw instead. The other out-of-range arguments
keep throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:48:15 +00:00
ionut27001 7af0c1dc60 fix(libSceVideoOut): answer flip-master calls only on a handle that never had buffers 2026-10-27 14:40:31 +02:00
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03:00
Get-fix f2928f44d4 fix(libSceVideoOut): register and change tiled PS4 display buffers in the flip test
sceVideoOutRegisterBuffers registers a PS4 buffer with tiling mode 0 as a
GCN display buffer with its pitch padded to 128 pixels and refuses tiling
modes above 1, so video_out_flip_ps4 now checks both instead of expecting
tiled PS4 buffers to throw.

sceVideoOutSubmitChangeBufferAttribute2 on a PS4 buffer set computes the
same padded pitch as the registration. Before, a PS4 set changed to tiling
mode 0 kept a pitch of 0 and failed the 128-pixel padding check. The test
changes a PS4 set to tiled, checks its GCN description, and changes it back
to linear.
2026-10-22 13:04:10 +03:00
Get-fix 695bed2c34 feat(libSceGnmDriver): build PS4 command buffers and submit them
Real sceGnm shader, state and draw packet writers, submit and
submit-and-flip into the AGC executor, PS4 sync packets lowered to their
PS5 forms, constant engine buffers merged into the draw buffer and the
PS4 graphics EOP event. VideoOut keeps the pitch of tiled PS4 display
buffers and accepts the PS4 10-bit display format. The four tool-state
queries (submissions allowed, user PA, GPU capture, Razor) are silent
stubs listed in the debt file.
2026-10-22 13:04:00 +03:00
hypermistandClaude Opus 5.5 e9bde2a2d4 feat(libSceVideoOut): implement sceVideoOutRemoveBufferAttributeOption
Clear the given bits of the attribute's option field, the inverse of
sceVideoOutAddBufferAttributeOption, as libSceVideoOut does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 01:28:22 +13:00
Get-fix 901b92c794 feat(libSceVideoOut): register PS4 display buffers
Add the PS4 functions sceVideoOutSetBufferAttribute and
sceVideoOutRegisterBuffers on top of the existing registration. The PS4
call uses the first free attribute set and returns its index. It
accepts linear A8R8G8B8_SRGB and A8B8G8R8_SRGB buffers, which map to the
PS5 B8G8R8A8 and R8G8B8A8 formats. It throws for tiled buffers, whose
PS4 layout differs from the PS5 one. Linear PS4 buffers may be 4 KiB
aligned: the OpenOrbis graphics sample places its second 1920x1080
buffer 8,294,400 bytes after the first. PS5 buffers keep the 64 KiB
rule. A handle with PS4 buffers writes the PS4 flip status (64 bytes)
and vblank status (32 bytes). Writing the 128-byte PS5 flip status into
the sample's stack structure overwrote its saved frame pointer.
2026-10-14 20:52:00 +03:00
Adrià 937cd6cab2 Merge pull request #5539 from JJenkx/feat/videoout-eop-flips
feat(videoout): present reserved flips from tagged GPU completion
2026-10-14 15:04:12 +02:00
JJenkx 8c0c449173 feat(videoout): present reserved flips from tagged GPU completion
Rebased onto main as one commit (conflicts in debt notes, Presentation.cpp includes and Submission.cpp helpers).
2026-10-14 14:22:36 +02:00
JJenkx aef1b2989c feat(videoout): expose buffer labels and release replaced frames 2026-10-12 23:13:18 -04:00
Dean 5aa0e15a4f Merge pull request #3867 from tv7/fix/videoout-attribute-change-pending-flip
fix(videoout): accept a buffer attribute change while a flip is pending
2026-10-12 17:28:15 +13:00
LexroidandClaude Opus 5.5 5cd25dedbd fix(videoout): accept a buffer attribute change while a flip is pending
sceVideoOutSubmitChangeBufferAttribute2 threw when a buffer of the group
had a flip pending, and Marvel's Wolverine makes that call with flips in
the queue. A flip now takes its buffer group when it is reserved, in
submission order, so flips submitted before the change keep the
attributes their buffers were rendered with and later flips use the
new ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:06:04 +03:00
omurc4 d40189d707 feat(libSceVideoOut): export sceVideoOutAddBufferAttributeOption
Elden Ring Nightreign (PPSA25380) imports the function, which no library
exported, so the title failed to load. The option is ORed into the buffer
attribute and a null attribute throws. Options other than 0 and 8 still
throw when the buffers are registered.
2026-10-11 13:26:22 -04:00
Gjon Gojcevic e6f4d2c178 fix(libSceVideoOut): ignore the reserved buffer pointers
Titles may leave the reserved pointers of a VideoOutBuffers entry uninitialized, so sceVideoOutRegisterBuffers2 no longer rejects them.
2026-10-07 19:50:12 -04:00
Celegans12 241faf881e feat(agc): present DCC display buffers whose keys are uncompressed or fast-cleared
sceVideoOutRegisterBuffers2 threw "DCC presentation is not implemented"
for category 1 (DCC-compressed) buffers, which PPSA26344 registers. Such
a buffer now needs DCC metadata and the tiled layout, and dcc_control may
only use the CB_DCC_CONTROL block layout bits 0x10026c.

At a flip the keys are read behind their recorded writers, one byte per
256 bytes as in the driver's DCC model. Uncompressed keys present the
stored texels as before; a uniform clear code presents its color with a
GPU clear of the scaler's source image; a pending storage image is used
when it serves the keys. Mixed or unreadable keys, clear codes the
display format has no DCC encoding for, register-clear keys over a
pending image and a clear color wider than 32 bits throw. Buffers
without DCC take the old path.
2026-10-05 23:45:15 +02:00
Celegans12andClaude Opus 5.5 d3e2e53a7c feat(videoout): accept the STRICT_COLORIMETRY buffer option
sceVideoOutRegisterBuffers2 and sceVideoOutSubmitChangeBufferAttribute2
threw for every buffer attribute option other than 0. PPSA26344 builds
its display buffers with option 8 through the libSceAgc helper linked
into it, so its first registration failed.

Option 8, VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_STRICT_COLORIMETRY (name
and value from KytyPS5), is now accepted and presented as option 0;
every other option still throws. What the console changes for it is
unknown and recorded in TechnicalDebt. The rejection now names the
tiling mode, pitch, aspect ratio and option it was given.

video_out_flip_tests decode checks that option 8 describes the same
buffer as option 0 and that options 1, 32 and 40 are rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:53:26 +02:00
boykopovar 39fd90b050 fix(kernel): orderly shutdown when closing the display window 2026-09-28 18:30:34 +03:00
SamG-Coder 07930c6726 feat(videoout): present linear framebuffer layouts 2026-09-28 09:05:49 +10:00
devilismyfriendandClaude Fable 5.1 9c2a75601d feat(libs): agc packet builders, savedata memory, offline service stubs
- libSceAgc: SetIndexCount, SetBaseIndirectArgs, DispatchIndirect, wait
  and write-data patch functions, relaxed checks for what titles send,
  NOP fillers for LOD stats and wait-until-safe, NotImplemented stubs.
- libSceSaveData.native: short mount points, backup events, save-data
  memory slots.
- user/system service, store dialog, video-out flip modes and queue-full
  error, pad read, fibers, offline behaviour for network/NP modules, and
  new export-only modules Ampr, JpegEnc, Json2, MsgDialog.native,
  NpCppWebApi, NpUtility.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-25 16:27:49 -07:00
boykopovar fd5e236aad feat(videoOut): add tiled buffer presentation and flip lifecycle handling 2026-09-14 12:38:16 +03:00
boykopovar d31e35e1ab feat(agc): add flip presentation and suspend synchronization (wip) 2026-09-14 07:39:38 +03:00
boykopovar 7773bbcbf8 chore(sceVideoOut): throw ex instead of stubs 2026-09-13 13:52:41 +03:00
boykopovar d225df7449 feat(sceVideoOut): implement sdl2 window and present thread 2026-09-12 17:32:24 +03:00
boykopovar 497821e94f feat(sceVideoOut): video out functions impl (wip) 2026-09-12 11:02:17 +03:00
boykopovar bd16eaaacf refactor(libs): organize libSceVideoOut with cmakelists 2026-09-11 16:41:01 +03:00