libSceVideoOut: Elden Ring Nightreign (PPSA25380) cannot load: sceVideoOutAddBufferAttributeOption is not exported #3802

Closed
opened 2026-10-11 16:51:21 +00:00 by 22alfbassett · 1 comment
22alfbassett commented 2026-10-11 16:51:21 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by 22alfbassett on 2026-10-11T16:51:21Z.


Elden Ring Nightreign (PPSA25380, 01.003.002) imports sceVideoOutAddBufferAttributeOption (MBlv8YWoyOk), which libSceVideoOut does not export, so tools/import_audit.py lists it as absent and the loader fails before the title starts. It is one of seven absent imports for this title.

The title calls it once, in display setup (0x02bae530), on the path that opens the overlay bus. Read in Ghidra and radare2 from the relinked executable (image base 0):

0x02baf5b0  call sceVideoOutOpen                       ; (0xff, 1, 0, NULL): overlay bus
...
0x02baf5d0  mov  esi, 0x20                             ; option
0x02baf5d5  mov  rdi, r14                              ; attribute
0x02baf5d8  call sceVideoOutAddBufferAttributeOption
0x02baf5dd  mov  rax, [rsp+0x50]                       ; return value not read
0x02baf5ea  mov  r9, r14                               ; same attribute as 6th argument
0x02baf5f6  mov  edi, [rax+0x124]                      ; overlay handle
0x02baf60c  call sceVideoOutRegisterBuffers2           ; (overlay, 0, 0, buffers, count, attribute, 0, NULL)

So the option is added to the VideoOutBufferAttribute2 that the overlay's buffers are then registered with. The overlay path is taken only when the byte at 0x04e269b4 equals 1; no instruction writes it directly (seven reads, in .bss), so whether it runs in normal play is unknown. The main bus is registered with the same attribute variable before the option is added.

The call site matches SharpProspero:

void sceVideoOutAddBufferAttributeOption(VideoOutBufferAttribute2* attribute, uint64_t option);   /* "adds an option flag to a buffer attribute before it is registered" */

which declares sceVideoOutRemoveBufferAttributeOption with the same signature next to it (not imported by PPSA25380).

If the function ORs option into attribute->option (offset 0x18), registering the overlay then fails in AnyPS5: sceVideoOutRegisterBuffers2 (core/libs/prx/libSceVideoOut/src/Buffer.cpp L15) accepts only VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_NONE (0) and STRICT_COLORIMETRY (8) (include/VideoOutDriver.hpp L70–71) and throws on 0x20. What option 0x20 selects is unknown.

Unknown

  • Whether the console ORs the option into attribute->option or keeps it elsewhere, and whether it validates the bits or checks for a null attribute.
  • What option 0x20 does for an overlay buffer.

Plan

Export sceVideoOutAddBufferAttributeOption that ORs option into attribute->option and throws on a null attribute, and keep sceVideoOutRegisterBuffers2 throwing on unknown option bits such as 0x20, with TechnicalDebt entries for the signature source and the unknown meaning. That removes this load blocker without guessing what 0x20 does; the throw stays where the meaning matters. I will link the branch here.

Elden Ring (PPSA04610) uses the same engine path with sceVideoOutSetFlipMaster instead; that function is covered by #3762, and its call site is in a comment there.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5803126206 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3802). Originally posted by [22alfbassett](https://github.com/22alfbassett) on 2026-10-11T16:51:21Z. --- Elden Ring Nightreign (PPSA25380, 01.003.002) imports `sceVideoOutAddBufferAttributeOption` (`MBlv8YWoyOk`), which `libSceVideoOut` does not export, so `tools/import_audit.py` lists it as absent and the loader fails before the title starts. It is one of seven absent imports for this title. The title calls it once, in display setup (`0x02bae530`), on the path that opens the overlay bus. Read in Ghidra and radare2 from the relinked executable (image base 0): ``` 0x02baf5b0 call sceVideoOutOpen ; (0xff, 1, 0, NULL): overlay bus ... 0x02baf5d0 mov esi, 0x20 ; option 0x02baf5d5 mov rdi, r14 ; attribute 0x02baf5d8 call sceVideoOutAddBufferAttributeOption 0x02baf5dd mov rax, [rsp+0x50] ; return value not read 0x02baf5ea mov r9, r14 ; same attribute as 6th argument 0x02baf5f6 mov edi, [rax+0x124] ; overlay handle 0x02baf60c call sceVideoOutRegisterBuffers2 ; (overlay, 0, 0, buffers, count, attribute, 0, NULL) ``` So the option is added to the `VideoOutBufferAttribute2` that the overlay's buffers are then registered with. The overlay path is taken only when the byte at `0x04e269b4` equals 1; no instruction writes it directly (seven reads, in `.bss`), so whether it runs in normal play is unknown. The main bus is registered with the same attribute variable before the option is added. The call site matches [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/60977b29103452b9681ae10c7a9011d44965bf16/src/SharpProspero/Interop/VideoOut/VideoOut.cs#L174-L176): ```c void sceVideoOutAddBufferAttributeOption(VideoOutBufferAttribute2* attribute, uint64_t option); /* "adds an option flag to a buffer attribute before it is registered" */ ``` which declares `sceVideoOutRemoveBufferAttributeOption` with the same signature next to it (not imported by PPSA25380). ### Related gap If the function ORs `option` into `attribute->option` (offset 0x18), registering the overlay then fails in AnyPS5: `sceVideoOutRegisterBuffers2` (`core/libs/prx/libSceVideoOut/src/Buffer.cpp` L15) accepts only `VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_NONE` (0) and `STRICT_COLORIMETRY` (8) (`include/VideoOutDriver.hpp` L70–71) and throws on 0x20. What option 0x20 selects is unknown. ### Unknown - Whether the console ORs the option into `attribute->option` or keeps it elsewhere, and whether it validates the bits or checks for a null attribute. - What option 0x20 does for an overlay buffer. ### Plan Export `sceVideoOutAddBufferAttributeOption` that ORs `option` into `attribute->option` and throws on a null attribute, and keep `sceVideoOutRegisterBuffers2` throwing on unknown option bits such as 0x20, with TechnicalDebt entries for the signature source and the unknown meaning. That removes this load blocker without guessing what 0x20 does; the throw stays where the meaning matters. I will link the branch here. Elden Ring (PPSA04610) uses the same engine path with `sceVideoOutSetFlipMaster` instead; that function is covered by #3762, and its call site is in a comment there. AI-assisted: yes
oneandonlydean commented 2026-10-11 23:28:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:28:21Z.


Closing: #3817 exports sceVideoOutAddBufferAttributeOption. Please open a new issue with the log line for the next stop of PPSA25380.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115107479 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3802#issuecomment-6115107479). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:28:21Z. --- Closing: #3817 exports `sceVideoOutAddBufferAttributeOption`. Please open a new issue with the log line for the next stop of PPSA25380.
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#3802
No description provided.