Skip to content

feat(libSceAgc): implement sceAgcDcbContextStateOp - #1075

Closed
Kikoarl wants to merge 1 commit into
boykopovar:mainfrom
Kikoarl:feat/agc-dcb-context-state-op
Closed

Kikoarl wants to merge 1 commit into
boykopovar:mainfrom
Kikoarl:feat/agc-dcb-context-state-op

Conversation

@Kikoarl

@Kikoarl Kikoarl commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What

Implements sceAgcDcbContextStateOp in libSceAgc.

Provenance:

  • Identical counterpart to sceAgcDcbContextStateAnotherOp (companion NID export qj7QZpgr9Uw) and paired with sceAgcDcbContextStateOpGetSize.
  • Emits context state NOP packet sequence with header 0x10, count, and type 0x68, matching the exact sizes returned by sceAgcDcbContextStateOpGetSize (5, 27, 27, and 32 dwords for operations 0..3).
  • Validates non-null command buffer and operation <= 3.
  • Added technical debt entry to docs/dev/TechnicalDebt.md in the same commit.

Tested

  • Automated tests: updated core/libs/prx/libSceAgc/tests/ContextStateSize.cpp verifying:
    • sceAgcDcbContextStateOp emits packets starting at the buffer cursor.
    • Written size matches sceAgcDcbContextStateOpGetSize for operations 0..3.
    • Emitted packet payload matches sceAgcDcbContextStateAnotherOp.
    • Rejection paths: null command buffer, invalid operations (> 3).
    • All unit tests in agc_context_state_size_tests pass.
  • Verified progress with tools/progress.py: libSceAgc increased from 198 to 199 implemented functions.

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

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Progress report (219a1cf → b574b7c)

📈 System libraries: 87.34% (+0.04%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceAgc sceAgcDcbContextStateOp

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#971 docs/dev/TechnicalDebt.md L77-78

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for the PR. I'm closing it for now, for two reasons:

  • As with feat(libSceNpSessionSignaling): implement sceNpSessionSignalingGetConnectionStatistics #970 and feat(libSceVoiceQoS): implement sceVoiceQoSEnd #999, no title is shown to reach sceAgcDcbContextStateOp on main. The owner merges library functions only when a title needs them, shown by the title ID and the log line where it stops on main.
  • The PR assumes sceAgcDcbContextStateOp (HabmgqPwPw0) is the same function as qj7QZpgr9Uw and forwards to it. OpenAGC declares them differently: HabmgqPwPw0 takes (cb, op, reg_type, reg_offset, reg_count, reg_data), and qj7QZpgr9Uw is a separate two-argument export whose name is unknown. If a title passes the six arguments, forwarding would emit the wrong packets instead of throwing. The TechnicalDebt edit also drops "unknown name" from qj7QZpgr9Uw, which is still unknown.

If a title stops at sceAgcDcbContextStateOp on main, please reopen it with the title ID, the log line and the arguments it passes, so the signature can follow what the title actually calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants