feat(ajm): implement sceAjmBatchJobDecodeSplit #867

Closed
aryanrawatispro-ship-it wants to merge 1 commit from upstream-pr/867 into main
aryanrawatispro-ship-it commented 2026-10-06 11:12:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by aryanrawatispro-ship-it on 2026-10-06T11:12:04Z.


What

sceAjmBatchJobDecodeSplit appends the sceAjmBatchJobDecode job over lists of input and output buffers, as sceAjmBatchJobRunSplit does for sceAjmBatchJobRun: the inputs are read as one stream, the PCM fills the outputs in order, and the result is the decode sideband (result, bytes consumed and written, total decoded samples).

The signature comes from SharpProspero's Ajm.cs and the Wwise (AkSoundEngine) call site that prosper disassembled: up to four input fragments and one or two outputs. The assumption is recorded in TechnicalDebt as not confirmed on a title.

Tested

  • Linux (Ubuntu 24.04 on WSL2), GCC 13.2, Release, BUILD_TESTING=ON, lavapipe.
  • guest_ajm: decodes the 6-frame MP3 stream with each frame's input split in two and its PCM split across two outputs (500 + 652 samples), then checks the sideband and the PCM against sceAjmBatchJobDecode on a second instance. On main the same test stops with sceAjmBatchJobDecodeSplit not implemented.
  • ctest: 358 of 359 pass. guest_sce_net also fails on unmodified main in this environment (its resolver test), unrelated to AJM.
  • The patched libSceAjm.native.prx exports SJ3i0DXP8vg.
  • Not tested on Windows or with a title.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4757873873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/867). Originally posted by [aryanrawatispro-ship-it](https://github.com/aryanrawatispro-ship-it) on 2026-10-06T11:12:04Z. --- ### What `sceAjmBatchJobDecodeSplit` appends the `sceAjmBatchJobDecode` job over lists of input and output buffers, as `sceAjmBatchJobRunSplit` does for `sceAjmBatchJobRun`: the inputs are read as one stream, the PCM fills the outputs in order, and the result is the decode sideband (result, bytes consumed and written, total decoded samples). The signature comes from SharpProspero's [`Ajm.cs`](https://github.com/SvenGDK/SharpProspero/blob/main/src/SharpProspero/Interop/Audio/Ajm.cs) and the Wwise (AkSoundEngine) call site that [prosper](https://github.com/mattias800/prosper) disassembled: up to four input fragments and one or two outputs. The assumption is recorded in TechnicalDebt as not confirmed on a title. ### Tested - Linux (Ubuntu 24.04 on WSL2), GCC 13.2, Release, `BUILD_TESTING=ON`, lavapipe. - `guest_ajm`: decodes the 6-frame MP3 stream with each frame's input split in two and its PCM split across two outputs (500 + 652 samples), then checks the sideband and the PCM against `sceAjmBatchJobDecode` on a second instance. On `main` the same test stops with `sceAjmBatchJobDecodeSplit not implemented`. - `ctest`: 358 of 359 pass. `guest_sce_net` also fails on unmodified `main` in this environment (its resolver test), unrelated to AJM. - The patched `libSceAjm.native.prx` exports `SJ3i0DXP8vg`. - Not tested on Windows or with a title. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-06 21:18:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-06T21:18:05Z.


Progress report (1f3d5c9 → 9481877)

📈 System libraries: 87.04% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceAjm.native sceAjmBatchJobDecodeSplit
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6025632598 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/867#issuecomment-6025632598). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-06T21:18:05Z. --- <!-- progress-report --> ### Progress report (1f3d5c9 → 9481877) 📈 **System libraries**: 87.04% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceAjm.native | `sceAjmBatchJobDecodeSplit` | </details>
oneandonlydean commented 2026-10-06 22:02:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T22:02:47Z.


Thanks. After the last batch (#884 and #909 touched the same file), this branch conflicts with main in core/libs/prx/libSceAjm.native/Export.cpp. Could you rebase onto main?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6026270917 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/867#issuecomment-6026270917). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-06T22:02:47Z. --- Thanks. After the last batch (#884 and #909 touched the same file), this branch conflicts with main in `core/libs/prx/libSceAjm.native/Export.cpp`. Could you rebase onto main?
oneandonlydean commented 2026-10-07 03:45:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-07T03:45:46Z.


Thanks for the rebase, it's clean with main now.

Since you opened this, the owner has asked us to check on every PR which title needs the change. The description says it wasn't tested with a title, and the signature comes from SharpProspero and the Wwise call site that prosper disassembled. Which title calls sceAjmBatchJobDecodeSplit on main? On main it stops with [ajm] unimplemented sceAjmBatchJobDecodeSplit called, so if you have a title that hits it, please add the title ID and that log line, and it can go in. If it came from the reference implementations only, I'd close it for now; it can be reopened when a title reaches it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6030479716 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/867#issuecomment-6030479716). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-07T03:45:46Z. --- Thanks for the rebase, it's clean with main now. Since you opened this, the owner has asked us to check on every PR which title needs the change. The description says it wasn't tested with a title, and the signature comes from SharpProspero and the Wwise call site that prosper disassembled. Which title calls `sceAjmBatchJobDecodeSplit` on main? On main it stops with `[ajm] unimplemented sceAjmBatchJobDecodeSplit called`, so if you have a title that hits it, please add the title ID and that log line, and it can go in. If it came from the reference implementations only, I'd close it for now; it can be reopened when a title reaches it.
aryanrawatispro-ship-it commented 2026-10-07 04:17:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by aryanrawatispro-ship-it on 2026-10-07T04:17:20Z.


No title on my side. It came from the reference implementations only: SharpProspero's signature and the Wwise call site in prosper. I haven't seen a title reach it in the issues or bring-up threads either. Fine to close; I'll reopen it with the title ID and the log line if one does.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6030815297 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/867#issuecomment-6030815297). Originally posted by [aryanrawatispro-ship-it](https://github.com/aryanrawatispro-ship-it) on 2026-10-07T04:17:20Z. --- No title on my side. It came from the reference implementations only: SharpProspero's signature and the Wwise call site in prosper. I haven't seen a title reach it in the issues or bring-up threads either. Fine to close; I'll reopen it with the title ID and the log line if one does.
oneandonlydean commented 2026-10-07 09:00:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-07T09:00:45Z.


Thanks for checking and for saying so plainly. Closing it for now, as agreed. If a title stops at sceAjmBatchJobDecodeSplit on main, please reopen it with the title ID and that log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6034593237 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/867#issuecomment-6034593237). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-07T09:00:45Z. --- Thanks for checking and for saying so plainly. Closing it for now, as agreed. If a title stops at `sceAjmBatchJobDecodeSplit` on main, please reopen it with the title ID and that log line.

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