docs(agc): count how local titles call sceAgcAcbMemSemaphore and sceAgcDcbMemSemaphore #12701

Merged
xXPBSXx merged 2 commits from upstream-pr/12701 into main 2026-10-29 06:44:02 +00:00
xXPBSXx commented 2026-10-29 02:59:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-29T02:59:50Z.


What

The entry then reads (the new part is its last two sentences):

sceAgcAcbMemSemaphore, sceAgcDcbMemSemaphore (libSceAgc) - signature (cb, semaphoreAddr, waitForMailbox, signalType, operation) inferred from PPSA03396, whose wrapper passes the address second and operation 6 (signal) or 7 (wait) last; the three trailing arguments go to the packet as-is. Of 53 local titles, 13 call both functions directly from the executable, each once (26 call sites), from a wrapper in the title's library code that is the same in all 13: it takes the operation as an 8-bit third parameter, passes 0 for waitForMailbox and signalType when the operation is 7, and does not read the result. The constant operation values are not visible at these call sites.

Changed: docs/dev/debt/libSceAgc.md, one existing entry extended. No code change.

Method: for each of the 53 local titles the import table of the executable gives the import stub of each function, and the direct call instructions to it were counted in the executable's code; the instructions before each call site were read. Two independent counts (objdump on the executable and a byte scan of the registry stubs) agree on the 24 sites in the 12 titles both read; a third count over all 53 titles adds PPSA20612 (2 sites). Static counting only, nothing run on a console; no game code is attached. Per-title results and the counting script are attached to this PR. Not read: indirect calls and library modules loaded next to the executable. Whether a title reaches these calls was not measured.

Overlap

Five open PRs change docs/dev/debt/libSceAgc.md (#12475, #10736, #10048, #8314, #1060); none of their hunks touches this entry. git merge-tree of each head with this commit and with main alone gives the same result: #12475, #10736, #10048 and #1060 merge cleanly, #8314 already conflicts with main in that file. #11971 names the same two functions in an entry of docs/dev/debt/libSceAgcVsh.md, a different file. Measured on the file sets of the 1359 open PRs on 29 October 00:40 (git diff --name-only from each PR head's merge base with main).

Tested

Documentation only. python tools/check_conventions.py --base upstream/main passes; based on main 3a2b919816 (head 44b24ddb5c; main has moved to b433c40f2f, git merge-tree is clean). Not built, not run.

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
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5061333724 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12701). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-29T02:59:50Z. --- ### What The entry then reads (the new part is its last two sentences): > [sceAgcAcbMemSemaphore, sceAgcDcbMemSemaphore](../../../core/libs/prx/libSceAgc/Acb/src/Sync.cpp) (libSceAgc) - signature (cb, semaphoreAddr, waitForMailbox, signalType, operation) inferred from PPSA03396, whose wrapper passes the address second and operation 6 (signal) or 7 (wait) last; the three trailing arguments go to the packet as-is. Of 53 local titles, 13 call both functions directly from the executable, each once (26 call sites), from a wrapper in the title's library code that is the same in all 13: it takes the operation as an 8-bit third parameter, passes 0 for waitForMailbox and signalType when the operation is 7, and does not read the result. The constant operation values are not visible at these call sites. Changed: `docs/dev/debt/libSceAgc.md`, one existing entry extended. No code change. Method: for each of the 53 local titles the import table of the executable gives the import stub of each function, and the direct `call` instructions to it were counted in the executable's code; the instructions before each call site were read. Two independent counts (objdump on the executable and a byte scan of the registry stubs) agree on the 24 sites in the 12 titles both read; a third count over all 53 titles adds PPSA20612 (2 sites). Static counting only, nothing run on a console; no game code is attached. Per-title results and the counting script are attached to this PR. Not read: indirect calls and library modules loaded next to the executable. Whether a title reaches these calls was not measured. ### Overlap Five open PRs change `docs/dev/debt/libSceAgc.md` (#12475, #10736, #10048, #8314, #1060); none of their hunks touches this entry. `git merge-tree` of each head with this commit and with `main` alone gives the same result: #12475, #10736, #10048 and #1060 merge cleanly, #8314 already conflicts with `main` in that file. #11971 names the same two functions in an entry of `docs/dev/debt/libSceAgcVsh.md`, a different file. Measured on the file sets of the 1359 open PRs on 29 October 00:40 (`git diff --name-only` from each PR head's merge base with `main`). ### Tested Documentation only. `python tools/check_conventions.py --base upstream/main` passes; based on `main` `3a2b919816` (head `44b24ddb5c`; `main` has moved to `b433c40f2f`, `git merge-tree` is clean). Not built, not run. ### 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: none - [x] GPUs tested: n/a - [x] AI-assisted: yes AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!12701
No description provided.