feat(libs): PS4 imports and a buffer option inFAMOUS Second Son needs #10531

Closed
DealPotato wants to merge 1 commit from upstream-pr/10531 into main
DealPotato commented 2026-10-24 08:45:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DealPotato on 2026-10-24T08:45:07Z.


What

inFAMOUS Second Son (CUSA00004) imports four PS4 entry points main does not export, and its display buffers carry an option the PS4 path refused:

  • libSceDiscMap fJgP+wqifno answers SCE_DISC_MAP_ERROR_NO_BITMAP_INFO and writes nothing, like sceDiscMapIsRequestOnHDD and ioKMruft1ek. The title's bundled libSceFios2 passes a path, an offset, a size and three 64-bit outputs, and after the error keeps the request unmapped.
  • sceNpRegisterGamePresenceCallbackA accepts a callback that is never called, since the user is signed out, and returns callback ID 1; a null callback is SCE_NP_ERROR_INVALID_ARGUMENT.
  • sceVideoOutConfigureOutputMode_ only checks its arguments and the handle; no mode is applied.
  • sceKernelIsNeoMode returns 0, so the title takes its base PS4 paths. It was a throwing stub in libkernel_sys only, and the title imports it from libkernel. It moves to libkernel; the relinker resolves a libkernel_sys import there too.
  • sceVideoOutRegisterBuffers accepts the strict colorimetry option (8) and passes it on, as sceVideoOutRegisterBuffers2 does. Any other PS4 option still throws VIDEO_OUT_ERROR_INVALID_OPTION.

sceVideoOutGetDeviceCapabilityInfo_ and sceVideoOutModeSetAny_, which the title also imports, are left to #9880.

None of the answers is measured on a console; each has a debt note.

Tested

Windows 11 Pro (build 26300), WinLibs GCC 15.2.0 (MinGW), on this branch:

  • guest_disc_map, guest_np_manager and guest_video_out_output_mode check the new entry points; video_out_flip_ps4, run with SDL_VIDEODRIVER=windows, registers a PS4 buffer with the strict colorimetry option and checks that the option reaches the buffer group. The NP, DiscMap, VideoOut, kernel, import and export tests pass (94).
  • tools/check_conventions.py --base origin/main passes.
  • inFAMOUS Second Son on ps4/limbo-gpu (45625370e) merged with main and the PS4 pull requests it needs (#9432, #9893, #9889, #9671, #8285): with these changes it no longer stops at the unresolved sceKernelIsNeoMode import or at sceVideoOutRegisterBuffers, presents frames and plays its intro video. It then stops in AGC on a GCN-tiled 1D array texture, which is outside this pull request.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: CUSA00004 (inFAMOUS Second Son), together with the PS4 pull requests above
  • GPUs tested: NVIDIA GeForce RTX 4070, driver 610.88, Windows 11 Pro (VideoOut flip test)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4993960097 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10531). Originally posted by [DealPotato](https://github.com/DealPotato) on 2026-10-24T08:45:07Z. --- ### What inFAMOUS Second Son (CUSA00004) imports four PS4 entry points main does not export, and its display buffers carry an option the PS4 path refused: - `libSceDiscMap` `fJgP+wqifno` answers `SCE_DISC_MAP_ERROR_NO_BITMAP_INFO` and writes nothing, like `sceDiscMapIsRequestOnHDD` and `ioKMruft1ek`. The title's bundled `libSceFios2` passes a path, an offset, a size and three 64-bit outputs, and after the error keeps the request unmapped. - `sceNpRegisterGamePresenceCallbackA` accepts a callback that is never called, since the user is signed out, and returns callback ID 1; a null callback is `SCE_NP_ERROR_INVALID_ARGUMENT`. - `sceVideoOutConfigureOutputMode_` only checks its arguments and the handle; no mode is applied. - `sceKernelIsNeoMode` returns 0, so the title takes its base PS4 paths. It was a throwing stub in `libkernel_sys` only, and the title imports it from `libkernel`. It moves to `libkernel`; the relinker resolves a `libkernel_sys` import there too. - `sceVideoOutRegisterBuffers` accepts the strict colorimetry option (8) and passes it on, as `sceVideoOutRegisterBuffers2` does. Any other PS4 option still throws `VIDEO_OUT_ERROR_INVALID_OPTION`. `sceVideoOutGetDeviceCapabilityInfo_` and `sceVideoOutModeSetAny_`, which the title also imports, are left to #9880. None of the answers is measured on a console; each has a debt note. ### Tested Windows 11 Pro (build 26300), WinLibs GCC 15.2.0 (MinGW), on this branch: - `guest_disc_map`, `guest_np_manager` and `guest_video_out_output_mode` check the new entry points; `video_out_flip_ps4`, run with `SDL_VIDEODRIVER=windows`, registers a PS4 buffer with the strict colorimetry option and checks that the option reaches the buffer group. The NP, DiscMap, VideoOut, kernel, import and export tests pass (94). - `tools/check_conventions.py --base origin/main` passes. - inFAMOUS Second Son on `ps4/limbo-gpu` (45625370e) merged with main and the PS4 pull requests it needs (#9432, #9893, #9889, #9671, #8285): with these changes it no longer stops at the unresolved `sceKernelIsNeoMode` import or at `sceVideoOutRegisterBuffers`, presents frames and plays its intro video. It then stops in AGC on a GCN-tiled 1D array texture, which is outside this pull request. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: CUSA00004 (inFAMOUS Second Son), together with the PS4 pull requests above - [x] GPUs tested: NVIDIA GeForce RTX 4070, driver 610.88, Windows 11 Pro (VideoOut flip test) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Pull request closed

Sign in to join this conversation.
No reviewers
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!10531
No description provided.