Skip to content

feat(libSceAgc): implement DCB and ACB marker span functions - #1055

Closed
Kikoarl wants to merge 1 commit into
boykopovar:mainfrom
Kikoarl:feat/agc-marker-span
Closed

Kikoarl wants to merge 1 commit into
boykopovar:mainfrom
Kikoarl:feat/agc-marker-span

Conversation

@Kikoarl

@Kikoarl Kikoarl commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What

Implements sceAgcDcbPushMarkerSpan, sceAgcDcbSetMarkerSpan, sceAgcAcbPushMarkerSpan, and sceAgcAcbSetMarkerSpan in libSceAgc.

  • Provenance: Signatures (cb, marker, length, color) follow OpenAGC (include/agcdriver.h and src/cb_builders.c), which document the explicit-length marker variants for DCB and ACB.
  • Sits symmetrically alongside existing sceAgcDcbPushMarker, sceAgcDcbSetMarker, sceAgcAcbPushMarker, and sceAgcAcbSetMarker.
  • Emits the standard custom NOP marker packet (0x10, sub-opcode 0x0b for push, 0x0c for pop) with explicit length bounds, ensuring payload zero-padding and null-termination.
  • Validates command buffer pointers and rejects null text when length is non-zero with an exact-or-throw policy.
  • Documented in TechnicalDebt.md in the same commit.

Tested

  • Built cleanly on Linux with GCC in /tmp/anyps5_build.
  • Unit tests added to core/libs/prx/libSceAgc/tests/Commands.cpp (testMarkers in agc_commands):
    • Verified packet header, sub-opcode, text payload, and cursor advance for DCB and ACB PushMarkerSpan.
    • Verified SetMarkerSpan emits matching push and pop packets for DCB and ACB.
    • Verified empty marker with length 0 and null pointer.
    • Negative tests verify rejection of null command buffers and null text with non-zero length.
    • Passed ctest -R agc_commands.
  • Progress: python3 tools/progress.py confirms libSceAgc progress improved from 199 to 202 implemented functions (4 stubs resolved).

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 (a9ec7be → de52e0e)

📈 System libraries: 87.44% (+0.14%, +4 implemented functions)

✅ 4 implemented
Library Name
libSceAgc sceAgcAcbPushMarkerSpan
libSceAgc sceAgcAcbSetMarkerSpan
libSceAgc sceAgcDcbPushMarkerSpan
libSceAgc sceAgcDcbSetMarkerSpan

@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 core/libs/prx/libSceAgc/DcbState/src/Marker.cpp L22, L24-25, L31, L34, L62 sceAgcAcbPushMarkerSpan
sceAgcAcbSetMarkerSpan
sceAgcDcbPushMarkerSpan
sceAgcDcbSetMarkerSpan
#1061 docs/dev/TechnicalDebt.md L33

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for the PR. I'm closing this one, for two reasons:

If a title stops at one of the marker span functions on main, please add the title ID and that log line on #971.

@github-actions github-actions Bot added docs agc libSceAgc* labels Oct 7, 2026
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