feat(libSceGameLiveStreaming): answer sceGameLiveStreamingGetProgramInfo with an empty program #9031

Merged
hypermoist merged 2 commits from upstream-pr/9031 into main 2026-10-22 22:02:06 +00:00
hypermoist commented 2026-10-21 10:06:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-21T10:06:53Z.


What

sceGameLiveStreamingGetProgramInfo (OIIm19xu+NM) threw. PPSA08427 and PPSA29340 import it.

In the decrypted PS5 12.00 libSceGameLiveStreaming, the export (0x2050) does this under the module lock:

  1. returns 0x80A00004 before initialization;
  2. returns 0x80A00002 for a null pointer;
  3. clears the 0x134C-byte program info;
  4. asks the system service for its first 0xFD4 bytes;
  5. clears the 0x37B bytes from offset 0xFD1;
  6. returns 0, the service's negative error, or 0x80A00001 for a positive service result.

Here the call takes the info pointer. Under the module lock it returns 0x80A00004 before sceGameLiveStreamingInitialize, using the initialization state main now tracks, and 0x80A00002 for null. Otherwise it clears the 0x134C bytes and returns 0, as with no program on air. This matches sceGameLiveStreamingGetCurrentStatus2, which already reports that nothing is broadcast.

One console behaviour is not reproduced: what the service fills in when nothing is on air is not measured. The all-zero info is an assumption and is recorded under Functional in the debt file.

The code is written from the observed behaviour; nothing from the module is copied.

Tested

Linux (CachyOS, GCC, Release). guest_game_live_streaming asserted that the call throws. It now checks the null result and that exactly 0x134C bytes are cleared, with the bytes after them untouched. The test passes.

tools/check_conventions.py is clean. #8333 adds other exports to the same two files. The three-way merge adds no conflict, because the new Functional section sits above "Unknown function info", where #8333 appends.

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: PPSA08427 and PPSA29340 import it; neither was run with this change
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4949852934 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9031). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-21T10:06:53Z. --- ### What `sceGameLiveStreamingGetProgramInfo` (`OIIm19xu+NM`) threw. PPSA08427 and PPSA29340 import it. In the decrypted PS5 12.00 `libSceGameLiveStreaming`, the export (0x2050) does this under the module lock: 1. returns `0x80A00004` before initialization; 2. returns `0x80A00002` for a null pointer; 3. clears the 0x134C-byte program info; 4. asks the system service for its first 0xFD4 bytes; 5. clears the 0x37B bytes from offset 0xFD1; 6. returns 0, the service's negative error, or `0x80A00001` for a positive service result. Here the call takes the info pointer. Under the module lock it returns `0x80A00004` before `sceGameLiveStreamingInitialize`, using the initialization state `main` now tracks, and `0x80A00002` for null. Otherwise it clears the 0x134C bytes and returns 0, as with no program on air. This matches `sceGameLiveStreamingGetCurrentStatus2`, which already reports that nothing is broadcast. One console behaviour is not reproduced: what the service fills in when nothing is on air is not measured. The all-zero info is an assumption and is recorded under Functional in the debt file. The code is written from the observed behaviour; nothing from the module is copied. ### Tested Linux (CachyOS, GCC, Release). `guest_game_live_streaming` asserted that the call throws. It now checks the null result and that exactly 0x134C bytes are cleared, with the bytes after them untouched. The test passes. `tools/check_conventions.py` is clean. #8333 adds other exports to the same two files. The three-way merge adds no conflict, because the new Functional section sits above "Unknown function info", where #8333 appends. ### 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: PPSA08427 and PPSA29340 import it; neither was run with this change - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
github-actions[bot] commented 2026-10-21 10:07:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T10:07:38Z.


Progress report (8c26eac → 55de3d4)

📈 System libraries: 42.34% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceGameLiveStreaming sceGameLiveStreamingGetProgramInfo
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6313385579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9031#issuecomment-6313385579). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T10:07:38Z. --- <!-- progress-report --> ### Progress report (8c26eac → 55de3d4) 📈 **System libraries**: 42.34% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceGameLiveStreaming | `sceGameLiveStreamingGetProgramInfo` | </details>
clairtonmichel commented 2026-10-21 10:29:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T10:29:51Z.


Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):

  • Built cleanly with zero errors.
  • Ran the guest_game_live_streaming test suite: 100% passed successfully (1/1 green in 0.01s).
  • Program info correctly returns empty status, clearing 0x134C bytes safely. Ready to merge!
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6313779355 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9031#issuecomment-6313779355). Originally posted by [clairtonmichel](https://github.com/clairtonmichel) on 2026-10-21T10:29:51Z. --- Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5): - Built cleanly with zero errors. - Ran the `guest_game_live_streaming` test suite: **100% passed successfully (1/1 green in 0.01s)**. - Program info correctly returns empty status, clearing 0x134C bytes safely. Ready to merge!
xXPBSXx commented 2026-10-21 15:42:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T15:42:42Z.


Independent Windows run of this PR (data only).

Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against main is clean. I built only guest_game_live_streaming_tests; ctest -N -R guest_game_live_streaming lists exactly one test.

PR head tested: 98e8a2b791a03b55677d7ed35f30f64d33cdff6d.

Results (3 runs each):

  • PR head: guest_game_live_streaming passes 3/3.
  • Baseline: I kept the PR's test and replaced only core/libs/prx/libSceGameLiveStreaming/Export.cpp with the version from the PR's merge base (27c88a8d75), then rebuilt. The test fails 3/3 (exit 0xc0000409). I restored the PR's files afterwards.

GPU: the run output has no Selected GPU line; no GPU claim is made.

Not run: other platforms, the other tests in the same family, the full repository CTest, and any title or console run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6320046066 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9031#issuecomment-6320046066). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T15:42:42Z. --- Independent Windows run of this PR (data only). **Environment:** Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against `main` is clean. I built only `guest_game_live_streaming_tests`; `ctest -N -R guest_game_live_streaming` lists exactly one test. **PR head tested:** `98e8a2b791a03b55677d7ed35f30f64d33cdff6d`. **Results (3 runs each):** - PR head: `guest_game_live_streaming` passes 3/3. - Baseline: I kept the PR's test and replaced only `core/libs/prx/libSceGameLiveStreaming/Export.cpp` with the version from the PR's merge base (`27c88a8d75`), then rebuilt. The test fails 3/3 (exit 0xc0000409). I restored the PR's files afterwards. **GPU:** the run output has no `Selected GPU` line; no GPU claim is made. **Not run:** other platforms, the other tests in the same family, the full repository CTest, and any title or console run. AI-assisted (Claude Code).
hypermoist commented 2026-10-22 09:10:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T09:10:59Z.


@clairtonmichel @xXPBSXx thanks for the Linux and Windows runs. One change since then: after merging main, sceGameLiveStreamingGetProgramInfo takes the lock and returns not initialised (0x80A00004) before it checks for null (0x80A00002), as the firmware does, and the test now covers that order. The clear is still 0x134C bytes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6337099014 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9031#issuecomment-6337099014). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-22T09:10:59Z. --- @clairtonmichel @xXPBSXx thanks for the Linux and Windows runs. One change since then: after merging `main`, `sceGameLiveStreamingGetProgramInfo` takes the lock and returns not initialised (0x80A00004) before it checks for null (0x80A00002), as the firmware does, and the test now covers that order. The clear is still 0x134C bytes.
MarcZX10 commented 2026-10-22 11:41:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:41:01Z.


The overlap report names #9524. I confirmed the pairwise merge conflicts in GuestGameLiveStreaming.cpp and docs/dev/debt/libSceGameLiveStreaming.md; the implementation areas are otherwise separate. Please coordinate the landing order with #9524’s author, who has been asked to record any required Depends on link and preserve both test/debt changes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6339857167 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9031#issuecomment-6339857167). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T11:41:01Z. --- The overlap report names #9524. I confirmed the pairwise merge conflicts in `GuestGameLiveStreaming.cpp` and `docs/dev/debt/libSceGameLiveStreaming.md`; the implementation areas are otherwise separate. Please coordinate the landing order with #9524’s author, who has been asked to record any required `Depends on` link and preserve both test/debt changes.
hypermoist commented 2026-10-22 12:13:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-22T12:13:39Z.


@MarcZX10 thanks for checking the overlap. @AlxcBTW, #9524 and this PR only meet in core/libs/tests/GuestGameLiveStreaming.cpp and docs/dev/debt/libSceGameLiveStreaming.md; the implementations don't overlap. Neither depends on the other, so I'd propose: whichever is merged first goes in as is, and the second one merges main and keeps both sides of those two files: both sets of test checks and both debt entries. If yours lands first, I'll do that merge here and rerun guest_game_live_streaming.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340456445 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9031#issuecomment-6340456445). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-22T12:13:39Z. --- @MarcZX10 thanks for checking the overlap. @AlxcBTW, #9524 and this PR only meet in `core/libs/tests/GuestGameLiveStreaming.cpp` and `docs/dev/debt/libSceGameLiveStreaming.md`; the implementations don't overlap. Neither depends on the other, so I'd propose: whichever is merged first goes in as is, and the second one merges `main` and keeps both sides of those two files: both sets of test checks and both debt entries. If yours lands first, I'll do that merge here and rerun `guest_game_live_streaming`.
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!9031
No description provided.