Skip to content

feat(libSceAgcDriver): add the workload, NOP and user data packet sizes - #8459

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
hypermoist:feat/agcdriver-packet-sizes
Oct 21, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
hypermoist:feat/agcdriver-packet-sizes

Conversation

@hypermoist

@hypermoist hypermoist commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds five absent libSceAgcDriver size queries next to sceAgcDriverGetSetFlipPacketSizeInDwords:

Export NID Value
sceAgcDriverGetSetWorkloadsActivePacketSize gyVTZWyySpM 18
sceAgcDriverGetSetWorkloadCompletePacketSize WNyjOWq8-Vk 12
sceAgcDriverGetSetWorkloadStreamInactivePacketSize k8rLr8nq-hE 9
sceAgcDriverNopDataGetPacketSize(bytes) gtvWv7DEKD4 ceil(bytes / 4) + 2, computed in 64 bits
sceAgcDriverUserDataGetPacketSize(bytes) VhLnEiTuuWo the helper below, exported as is

The decrypted libSceAgcDriver.sprx derives the first three from one helper (0x6cf0). For a payload of b bytes the helper returns:

  • 3 when b is 0;
  • 4 when the payload is one dword;
  • ceil(b / 4) + 7 otherwise.

The workload getters call it with 8, 0 and 8 bytes, and the first two add 9. The helper is exported as sceAgcDriverUserDataGetPacketSize and reproduced as WorkloadDataPacketDwords.

The values match the packets libSceAgc already writes for SetWorkloadsActive (18 dwords) and SetWorkloadComplete (12), and the 9-dword SetWorkloadStreamInactive packet in #8302. They are independent of that PR.

Tested

Linux (CachyOS, GCC, Release).

  • Firmware check. A harness called the console exports: 18, 12 and 9. It also compared NopDataGetPacketSize with this formula over 1 000 000 inputs, including 0–63 and the top 64 values below 2^32, with 0 mismatches. The same sweep against the helper gave 0 mismatches for UserDataGetPacketSize.
  • Repo test. guest_rendering_wait checks the five exports, including NopDataGetPacketSize(0xffffffff) == 0x40000002. It 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: none verified
  • GPUs tested: NVIDIA GeForce RTX 3060 (tests only)
  • AI-assisted: yes (Claude Code), reviewed by the contributor

🤖 Generated with Claude Code

https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK

Report the dword sizes of the workload state packets and of a NOP that
carries a given number of data bytes, as libSceAgcDriver computes them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Progress report (44e3389 → 5ca5c14)

📈 System libraries: 64.17% (+0.02%, +5 implemented functions)

✅ 5 implemented
Library Name
libSceAgcDriver sceAgcDriverGetSetWorkloadCompletePacketSize
libSceAgcDriver sceAgcDriverGetSetWorkloadStreamInactivePacketSize
libSceAgcDriver sceAgcDriverGetSetWorkloadsActivePacketSize
libSceAgcDriver sceAgcDriverNopDataGetPacketSize
libSceAgcDriver sceAgcDriverUserDataGetPacketSize

It is the payload size helper the workload packet sizes are built on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
@hypermoist hypermoist changed the title feat(libSceAgcDriver): add the workload and NOP data packet sizes feat(libSceAgcDriver): add the workload, NOP and user data packet sizes Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestRenderingWait.cpp

@github-actions github-actions Bot added the agc libSceAgc* label Oct 20, 2026
@oneandonlydean
oneandonlydean merged commit f3a3d6f into boykopovar:main Oct 21, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants