fix(libSceGameUpdate): answer no update instead of throwing on request creation #10614

Merged
mrfelek merged 4 commits from upstream-pr/10614 into main 2026-10-26 07:01:57 +00:00
mrfelek commented 2026-10-24 12:54:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-24T12:54:42Z.


What

Since 41035b4a0 (#9137), sceGameUpdateCreateRequest throws once the library is initialized. Titles that check for a patch at start die there: Hot Wheels Infinite Rush (PPSA22408) aborts right after its title screen with sceGameUpdateCreateRequest: patch service request creation is not implemented, on Linux/RADV and Windows/NVIDIA.

This PR gives the library its request lifecycle and the no-update answer:

  • sceGameUpdateCreateRequest keeps requests in 8 slots with ids from 0x20000000 (wrapping at 0x2FFFFFFF); a ninth returns 0x80412806.
  • sceGameUpdateCheck, after the existing argument checks, returns 0x80412807 for an aborted request and otherwise 0 with found and the byte after it cleared. The rest of the result is left untouched.
  • sceGameUpdateAbortRequest marks a request, sceGameUpdateDeleteRequest frees it, sceGameUpdateTerminate drops all of them.
  • sceGameUpdateGetAddcontLatestVersion still throws.

Sources: prosper's reading of the PS5 3.20 libSceGameUpdate.sprx (slots, id range, error codes, the result write-back that touches only +8/+9, and that the module itself answers no update with return 0 when its patch-check service reports 0x80412883). KytyPS5 also answers no update. What the service returns on an offline console is not measured, so the no-update answer is listed under Silent stubs in docs/dev/debt/libSceGameUpdate.md: it only decides whether a title offers a patch.

How Hot Wheels uses it (from its call sites): CreateRequest() with only the sign of the result tested; Check(id, {size 0x30, option 0}, {size 0x30}) called once, synchronously, reading only the byte at +8; DeleteRequest(id) always after. A found of 1 would set Unreal's RequiredPatchAvailable privilege bit and block play, so the answer has to be no update. It runs inside the title's user privilege check, so it repeats (4 times up to the garage).

Tested

  • Windows 11, RTX A2000 Laptop (driver 610.60), main fa515def8, Hot Wheels Infinite Rush (PPSA22408), only libSceGameUpdate.prx swapped:
    • main: 1/1 starts abort with the throw about 8 s after the title screen.
    • this PR: 2/2 starts reach the garage ("Select Your Vehicle") with no throw. Calls seen: Initialize once, then Create, Check (option 0), Delete with ids 0x20000000-0x20000003. No update dialog; only the usual PSN/Milestone offline dialogs.
  • Earlier, Linux (Radeon 780M, RADV): main f6075c2 aborted at the same point in 2/2 starts; returning an error from CreateRequest instead got it to the garage.
  • guest_gameupdate passes.

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: PPSA22408 #6895
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted. Tested by me on my own machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4995559188 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10614). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-24T12:54:42Z. --- ### What Since 41035b4a0 (#9137), `sceGameUpdateCreateRequest` throws once the library is initialized. Titles that check for a patch at start die there: Hot Wheels Infinite Rush (PPSA22408) aborts right after its title screen with `sceGameUpdateCreateRequest: patch service request creation is not implemented`, on Linux/RADV and Windows/NVIDIA. This PR gives the library its request lifecycle and the no-update answer: - `sceGameUpdateCreateRequest` keeps requests in 8 slots with ids from `0x20000000` (wrapping at `0x2FFFFFFF`); a ninth returns `0x80412806`. - `sceGameUpdateCheck`, after the existing argument checks, returns `0x80412807` for an aborted request and otherwise 0 with `found` and the byte after it cleared. The rest of the result is left untouched. - `sceGameUpdateAbortRequest` marks a request, `sceGameUpdateDeleteRequest` frees it, `sceGameUpdateTerminate` drops all of them. - `sceGameUpdateGetAddcontLatestVersion` still throws. Sources: [prosper](https://github.com/mattias800/prosper)'s reading of the PS5 3.20 `libSceGameUpdate.sprx` (slots, id range, error codes, the result write-back that touches only +8/+9, and that the module itself answers no update with return 0 when its patch-check service reports `0x80412883`). KytyPS5 also answers no update. What the service returns on an offline console is not measured, so the no-update answer is listed under Silent stubs in `docs/dev/debt/libSceGameUpdate.md`: it only decides whether a title offers a patch. How Hot Wheels uses it (from its call sites): `CreateRequest()` with only the sign of the result tested; `Check(id, {size 0x30, option 0}, {size 0x30})` called once, synchronously, reading only the byte at +8; `DeleteRequest(id)` always after. A `found` of 1 would set Unreal's RequiredPatchAvailable privilege bit and block play, so the answer has to be no update. It runs inside the title's user privilege check, so it repeats (4 times up to the garage). ### Tested - Windows 11, RTX A2000 Laptop (driver 610.60), main fa515def8, Hot Wheels Infinite Rush (PPSA22408), only `libSceGameUpdate.prx` swapped: - main: 1/1 starts abort with the throw about 8 s after the title screen. - this PR: 2/2 starts reach the garage ("Select Your Vehicle") with no throw. Calls seen: Initialize once, then Create, Check (option 0), Delete with ids `0x20000000`-`0x20000003`. No update dialog; only the usual PSN/Milestone offline dialogs. - Earlier, Linux (Radeon 780M, RADV): main f6075c2 aborted at the same point in 2/2 starts; returning an error from `CreateRequest` instead got it to the garage. - `guest_gameupdate` passes. ### 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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical 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: PPSA22408 #6895 - [x] GPUs tested: n/a - [x] AI-assisted: yes AI-assisted. Tested by me on my own machine.
MarcZX10 commented 2026-10-24 12:56:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T12:56:55Z.

Review: CHANGES_REQUESTED


The request lifecycle and focused regression executable pass in my local direct build (g++ 12.2, C++20, compiling Export.cpp with GuestGameUpdate.cpp and running the binary). The remaining issue is live-ID uniqueness at wraparound; see the inline comment. Hosted eligibility, conventions, intake, labels, and report pass. Product build/test jobs were skipped by eligibility.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638320209 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10614#pullrequestreview-5638320209). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T12:56:55Z. **Review:** CHANGES_REQUESTED --- The request lifecycle and focused regression executable pass in my local direct build (`g++ 12.2`, C++20, compiling `Export.cpp` with `GuestGameUpdate.cpp` and running the binary). The remaining issue is live-ID uniqueness at wraparound; see the inline comment. Hosted eligibility, conventions, intake, labels, and report pass. Product build/test jobs were skipped by eligibility.
MarcZX10 commented 2026-10-24 13:09:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T13:09:42Z.

Review: APPROVED


Reviewed updated head 0870b4dc11. The new allocator skips live IDs across wraparound. I locally compiled and ran GuestGameUpdate.cpp with Export.cpp (GCC 12.2, C++20), and also ran a focused boundary harness that holds FIRST_REQUEST_ID, sets the cursor to LAST_REQUEST_ID, allocates/deletes that slot, then verifies the wrapped allocation skips the still-live first ID. Both passed. The reported Windows title run and hosted conventions checks are additional author/CI evidence; hosted product jobs were skipped by eligibility.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638362990 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10614#pullrequestreview-5638362990). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T13:09:42Z. **Review:** APPROVED --- Reviewed updated head 0870b4dc11cdabca7174e3db6e457b60a328dee. The new allocator skips live IDs across wraparound. I locally compiled and ran GuestGameUpdate.cpp with Export.cpp (GCC 12.2, C++20), and also ran a focused boundary harness that holds FIRST_REQUEST_ID, sets the cursor to LAST_REQUEST_ID, allocates/deletes that slot, then verifies the wrapped allocation skips the still-live first ID. Both passed. The reported Windows title run and hosted conventions checks are additional author/CI evidence; hosted product jobs were skipped by eligibility.
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!10614
No description provided.