docs(libSceAgcDriver): list sceAgcDriverSetHsOffchipParam as a silent stub #17883

Closed
milescoviello wants to merge 1 commit from upstream-pr/17883 into main
milescoviello commented 2026-11-09 20:21:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-11-09T20:21:57Z.


What

sceAgcDriverSetHsOffchipParam (State/src/Configuration.cpp) returns 0 and ignores its arguments, but it is not listed under Silent stubs in docs/dev/debt/libSceAgcDriver.md. The file mentions it only inside the sceAgcDriverGetHsOffchipParam entry ("which keeps nothing here"). This adds its own Silent stubs entry.

The entry also records what the callers pass. Of the titles relinked here, nine call it, once each, read from the instructions before each call in the relinked executables:

Title First argument Second argument
Ghost of Tsushima (PPSA02225) 0 0xff
Metal Gear Solid 4 (PPSA18194) 0 (n >> 15) - 1 as 16 bits, where n is the argument of the wrapper that calls it
Crimson Desert (PPSA25286) 0 the same wrapper as PPSA18194

Six homebrew apps (PPSA97358, PPSA97510, PPSA98510, PPSA98511, PPSA98512, PPSA98514) call it as well. None of the callers sets a third argument register, while the declaration here takes three 64-bit values. The entry says so without changing the declaration, since nothing reads them.

How

Changed: docs/dev/debt/libSceAgcDriver.md, one entry added to Silent stubs after sceAgcDriverSetResourceRegistrationInfo, linking to Configuration.cpp where the function is defined. No code change.

Tested

Docs only. tools/check_conventions.py --base upstream/main passes on main 4a467be387. tools/pr_overlap.py --branch lists 30 open pull requests that change this file. Of their hunks, only #14212's reach the Silent stubs lines: it inserts blank lines between entries and already conflicts with main, so whichever lands second resolves one blank line.

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: none
  • GPUs tested: n/a (docs only)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5230582443 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17883). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-11-09T20:21:57Z. --- ### What `sceAgcDriverSetHsOffchipParam` (`State/src/Configuration.cpp`) returns 0 and ignores its arguments, but it is not listed under Silent stubs in `docs/dev/debt/libSceAgcDriver.md`. The file mentions it only inside the `sceAgcDriverGetHsOffchipParam` entry ("which keeps nothing here"). This adds its own Silent stubs entry. The entry also records what the callers pass. Of the titles relinked here, nine call it, once each, read from the instructions before each call in the relinked executables: | Title | First argument | Second argument | |---|---|---| | Ghost of Tsushima (PPSA02225) | 0 | 0xff | | Metal Gear Solid 4 (PPSA18194) | 0 | `(n >> 15) - 1` as 16 bits, where `n` is the argument of the wrapper that calls it | | Crimson Desert (PPSA25286) | 0 | the same wrapper as PPSA18194 | Six homebrew apps (PPSA97358, PPSA97510, PPSA98510, PPSA98511, PPSA98512, PPSA98514) call it as well. None of the callers sets a third argument register, while the declaration here takes three 64-bit values. The entry says so without changing the declaration, since nothing reads them. ### How Changed: `docs/dev/debt/libSceAgcDriver.md`, one entry added to Silent stubs after `sceAgcDriverSetResourceRegistrationInfo`, linking to `Configuration.cpp` where the function is defined. No code change. ### Tested Docs only. `tools/check_conventions.py --base upstream/main` passes on `main` `4a467be387`. `tools/pr_overlap.py --branch` lists 30 open pull requests that change this file. Of their hunks, only #14212's reach the Silent stubs lines: it inserts blank lines between entries and already conflicts with `main`, so whichever lands second resolves one blank line. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: none - [x] GPUs tested: n/a (docs only) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gabichuuuuu commented 2026-11-10 17:49:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-10T17:49:39Z.

Review: COMMENTED


Read e68504845c against main.

Defect. The gap is already gone on main, and the new entry contradicts the code. sceAgcDriverSetHsOffchipParam on main takes (uint16_t granularity, uint16_t buffering), rejects out-of-range values, stores them and returns 0 (State/src/Configuration.cpp:33-38), and sceAgcDriverGetHsOffchipParam is implemented and returns the stored pair (Configuration.cpp:40-46, since 62937bd4f3). The entry says the function "returns 0 without keeping its arguments", "takes three 64-bit values" and that sceAgcDriverGetHsOffchipParam "still throws"; none of that holds on main, and libSceAgcDriver.md:347 on main already documents the real behaviour. The PR was written against the older Configuration.cpp (three uint64_t arguments, a throwing Get in Unimplemented.cpp:55). Close it or rewrite it against current main.

Not run here; this is from reading the code.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5846661660 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17883#pullrequestreview-5846661660). Originally posted by [gabichuuuuu](https://github.com/gabichuuuuu) on 2026-11-10T17:49:39Z. **Review:** COMMENTED --- Read `e68504845c` against `main`. **Defect.** The gap is already gone on main, and the new entry contradicts the code. `sceAgcDriverSetHsOffchipParam` on main takes `(uint16_t granularity, uint16_t buffering)`, rejects out-of-range values, stores them and returns 0 (`State/src/Configuration.cpp:33-38`), and `sceAgcDriverGetHsOffchipParam` is implemented and returns the stored pair (`Configuration.cpp:40-46`, since 62937bd4f3). The entry says the function "returns 0 without keeping its arguments", "takes three 64-bit values" and that `sceAgcDriverGetHsOffchipParam` "still throws"; none of that holds on main, and `libSceAgcDriver.md:347` on main already documents the real behaviour. The PR was written against the older `Configuration.cpp` (three `uint64_t` arguments, a throwing `Get` in `Unimplemented.cpp:55`). Close it or rewrite it against current main. Not run here; this is from reading the code. AI-assisted: yes.

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!17883
No description provided.