feat(libSceGameLiveStreaming): answer offline setting and feedback calls locally #9524
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9524"
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 AlxcBTW on 2026-10-22T00:13:58Z.
What
Sixteen
libSceGameLiveStreamingexports are stillNotImplemented_nid_no_patchstubs, so every call from a title that imports them throws. The debt file already notes that PS4 titles import the library and do not load without it. This replaces the stubs with typed implementations that answer locally, the way the host already treats the service: it never broadcasts.Under the existing
g_mutex/g_initializedlifecycle each call returns0x80A00004(not initialized) first, then0x80A00002for an invalid argument, otherwise 0. Invalid means, from BunnyFl's firmware 13.42 check on this PR: a null pointer (also a null array with count 0 forSetSpoilerTag, a nullmessageswith capacity 0 forGetSocialFeedbackMessages), a feedback type outside 1-3, a string longer than 240 (SetMetadata), 720 (preset description), 45 (invitation session id) or 360 (PostSocialMessage) characters, more than 16 spoiler tags or 5 preset commands, and a non-zero reserved tail (31 bytes at offset 193 of the 224-byte spoiler tag, 197 of the 228-byte preset command, 9 of the camera setting). Nothing is stored; queries report zero messages. The service's return after validation is not measured.Left out on purpose:
Enable...(#9319),GetProgramInfo(#9031), the oldGetCurrentStatus, theScreen*group,ServiceProviderPermission,RegisterCallback, and the standby-screen calls.Tested
ctest -R guest_game_live_streaming): 1 of 1 passed (guest_game_live_streaming, 0.01 s). Not run on Windows.GuestGameLiveStreaming.cppcalls the exports directly. BeforesceGameLiveStreamingInitialize(0x4000)and again afterTerminate, every one of the 16 returns0x80A00004, also with null pointers (lifecycle is checked before arguments). While initialized, null pointer arguments return0x80A00002and valid arguments return 0, including extreme values (SetMaxBitratewith 0 and 0xffffffff, a count of 0x1000, empty strings). TheCountquery overwrites a sentinel with 0,GetSocialFeedbackMessagesoverwrites its sentinel with 0 and leaves a buffer pre-filled with 0xAA unchanged for several message types,Clear*calls are repeated, and zero-count calls with a null array return 0 (this is the case stated as unmeasured).python3 tools/check_conventions.py --base origin/mainpasses. Based ona6dcea9279.tools/pr_overlap.py --branchlists #9031 and #9319 (same three files; #9031 is listed under "same exports" forsceGameLiveStreamingGetProgramInfo, which this PR does not change, the insertion sits directly above it) and could not compare the three shared files because both conflict withmain. Neither implements one of the sixteen functions. #9126 (a test asserting thatPermitLiveStreamingandSetMaxBitratestill throw) is closed, so nothing contradicts this change; a re-opened version would have to be rebased onto it. #9031 and #9319 touch the same three files and will need a rebase for whichever lands second.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T00:29:27Z.
Review: CHANGES_REQUESTED
The 16 functions have consistent lifecycle-first checks, typed declarations, focused state/output tests, and corresponding debt notes. The author-reported Linux test passes; current eligibility, intake, labels and report checks pass, while conventions is still in progress in the latest snapshot. Hosted product and relinker jobs are skipped. I did not run a local build or tests.
Please resolve the repository-required overlap ordering before merge. The live overlap scan reports the shared
GetProgramInfoarea with #9031 and cannot compare the sharedExport.cpp, test, and debt files for #9031/#9319 because those PRs conflict with currentmain. Direct three-way merges confirm conflicts in all three shared files with both PRs. Your description says whichever lands second will rebase, but the checklist saysDepends on: none; please coordinate the order, record the agreed prerequisite(s), and rebase/resolve the shared changes.The PR body also includes a Claude session URL.
AI-assisted: yesalready provides the required disclosure; please remove the session link since it is unnecessary to review the change and may expose more information than the repository needs.Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-22T08:41:24Z.
Reviewed; this is consistent with the module's established pattern. The 12 converted calls follow the module's existing error vocabulary (
ErrorNotInitialized/ErrorInvalidArgument, which are the codes the siblingsceGameLiveStreamingInitialize/GetSocialFeedbackMessagesCountalready use — nothing invented), the lifecycle→null argument ordering matches the one pre-existing converted sibling, and the null-argument cases are recorded as unmeasured in the debt entry rather than presented as console behavior — the right shape given the signatures come from Orbital'sdb_types.jsonand the zero-answers trail fpPS4's Pascal module, both disclosed in the body.Notes:
GetSocialFeedbackMessages-by-array call visible in the diff — the acquired/count pairs are covered, but if the console has a "read messages by index" counterpart the stub for it still throws; fine to leave for a follow-up given the count checks stub at zero.GetCurrentStatus2stays at its inactive stub) — that's the honest minimal model while the host broadcasts nothing. If a title later polls one of these expecting nonzero after enabling social feedback, that becomes the first real data point for this file's debt.SetSpoilerTag(0, nullptr)etc., which some hosts reject) are handled as success with no new constant — consistent with the "no valid-code" approach in the debt text; just flagging that this is an Orbital-inferred choice, which the debt file already says.Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-10-22T08:47:51Z.
Checked these 16 against firmware 13.42's
libSceGameLiveStreaming.sprx, running each function under an emulator with the service call stubbed. The not-initialised and null checks you have match. The firmware also rejects these with0x80A00002before it calls the service:ClearSocialFeedbackMessages,GetSocialFeedbackMessagesCount,GetSocialFeedbackMessages: a type other than 1–3.SetMetadata,SetPresetSocialFeedbackCommandsDescription,SetInvitationSessionId,PostSocialMessage: a string longer than 240, 720, 45 and 360 characters.SetSpoilerTag: a count of 17 or more, or a null array even when the count is 0. Each tag is 224 bytes, not 96, and its 31 bytes at offset 193 must be zero.SetPresetSocialFeedbackCommands: a count above 5. Each command is 228 bytes, and its 31 bytes at offset 197 must be zero.SetCameraFrameSetting: any non-zero byte in the 31 bytes at offset 9.GetSocialFeedbackMessages: a nullmessageseven when the capacity is 0.I didn't check what the service returns after these checks.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T11:40:48Z.
Review: CHANGES_REQUESTED
I rechecked head
24d6b39768: it merges cleanly with currentmain, diff-check/conventions pass, and the author reports the focused Linux test passing. The branch is 2 ahead / 119 behind currentmain(basea6dcea927), so refresh and rerun before merge.A new firmware 13.42 check on this PR’s 16 entry points reports validation that this implementation currently omits (BunnyFl’s comment, https://github.com/boykopovar/AnyPS5/pull/9524#issuecomment-6336671575). The current code accepts arbitrary feedback types, string lengths, array counts and reserved bytes, uses 96-byte spoiler tags, and permits null arrays/messages for zero capacity. The firmware check reports
0x80A00002for out-of-range message types, strings over 240/720/45/360 bytes, spoiler counts ≥17 or null arrays (including count 0), nonzero tag reserved bytes, preset counts >5/nonzero preset reserved bytes, nonzero camera reserved bytes, and null message arrays even at capacity 0. Please verify these cases against the available firmware evidence, implement the supported checks/layouts, and add boundary/regression tests; update the debt entry and report exact firmware/build evidence. The service return values remain untested, so retaining the local offline response after validation is still a separate explicit limit.The repository overlap blocker is also still live. #9031 and #9319 remain open, while this PR says
Depends on: none; pairwise merge checks currently conflict inGuestGameLiveStreaming.cppwith both, and also in the debt file with #9031. Please agree on the order with both authors and declare the needed dependency/dependencies, then preserve all tests and debt entries through the rebase. The earlier request to remove the unnecessary session link is resolved; the PR still discloses AI assistance. I did not run a local build in this pass.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-25T15:22:09Z.
Review: CHANGES_REQUESTED
Thanks for the PR. Two things block it:
mainnow has #9031 and #9319 merged, and this branch conflicts incore/libs/prx/libSceGameLiveStreaming/Export.cpp,core/libs/tests/GuestGameLiveStreaming.cppanddocs/dev/debt/libSceGameLiveStreaming.md. Please rebase and keep both sides of each hunk (the ordering question with them is moot now).GameLiveStreamingSpoilerTagis declared as 96 bytes (text[65]+reserved[31], with astatic_assert); the firmware uses 224-byte tags with the 31 reserved bytes at offset 193 required to be zero. The preset command is 228 bytes (reserved at 197) and the camera setting has 31 reserved bytes at offset 9.0x80A00002is also returned for a feedback type outside 1–3 (ClearSocialFeedbackMessages,GetSocialFeedbackMessagesCount,GetSocialFeedbackMessages), strings longer than 240/720/45/360 (SetMetadata,SetPresetSocialFeedbackCommandsDescription,SetInvitationSessionId,PostSocialMessage), a spoiler count ≥ 17 or a preset count > 5, and a null array forSetSpoilerTag/ nullmessagesforGetSocialFeedbackMessageseven when the count/capacity is 0.SetSpoilerTag(0x1000, &tag)and zero-count null arrays return 0), and the PR states "no range, length, count or type errors are invented".Please implement the checks and layouts that evidence supports, add boundary tests for each (type 0/1/3/4, string at limit and limit+1, counts 16/17 and 5/6, a non-zero reserved byte, null array with count 0), and update the debt entry to say what is still unmeasured (the service's return after validation). If you disagree with any of BunnyFl's values, say which and why.