feat(libSceAudio3d): implement sceAudio3dObjectSetAttributes and sceAudio3dPortFlush #1849

Merged
authurtabo-byte merged 2 commits from upstream-pr/1849 into main 2026-10-09 22:03:08 +00:00
authurtabo-byte commented 2026-10-08 21:59:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by authurtabo-byte on 2026-10-08T21:59:09Z.


What

Implement sceAudio3dObjectSetAttributes (4uyHN9q4ZeU) and sceAudio3dPortFlush (ZOGrxWLgQzE) in the library's existing offline model.

Title evidence requested in review: 3D MiniGolf v01.000.000, PPSA03647. Both NIDs are present in its guest ELF. With libSceAudio3d freshly built from source identical to main 0fdda7be, startup fails with:

FAIL: unresolved ELF import 4uyHN9q4ZeU from libSceAudio3d.prx

Replacing only that staged library with this PR's build resolves the imports and logs:

Transferring control to ELF entry point

This is an import-resolution reproducer: the converted title and its other dependencies were already staged, including the separate relinker note fix #2088. It does not claim this PR alone makes the title playable.

Object attributes validate the port, reserved object and attribute array; reset-state accepts a null value, other attributes require a value. Attribute identifiers and values are otherwise not interpreted. Port flush validates the port and drops queued offline frames. The attribute layout and reset-state identifier follow shadPS4's audio3d implementation; PS5 equivalence and the offline limitation are documented in TechnicalDebt.

Tested

Rebased onto main f8c2f072. Subsequent main commits only change PR-intake workflows; the tested runtime/relinker source is unchanged. Windows, MinGW-w64 GCC 15.2.0, Release.

  • Independent branch build and both guest Audio3d tests pass: parameters and port, including flush and object-attribute cases (2/2; 0.66 seconds total).
  • MiniGolf import-resolution comparison above, captured again against the freshly built main library on 2026-10-09.
  • tools/check_conventions.py --base origin/main passes.

Linux, PS5 hardware behavior and audible 3D mixing were not tested. No mixing implementation is added.

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; offline limitations are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source: none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes, Codex
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4793283174 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1849). Originally posted by [authurtabo-byte](https://github.com/authurtabo-byte) on 2026-10-08T21:59:09Z. --- ### What Implement `sceAudio3dObjectSetAttributes` (`4uyHN9q4ZeU`) and `sceAudio3dPortFlush` (`ZOGrxWLgQzE`) in the library's existing offline model. **Title evidence requested in review:** 3D MiniGolf v01.000.000, **PPSA03647**. Both NIDs are present in its guest ELF. With `libSceAudio3d` freshly built from source identical to main `0fdda7be`, startup fails with: ```text FAIL: unresolved ELF import 4uyHN9q4ZeU from libSceAudio3d.prx ``` Replacing only that staged library with this PR's build resolves the imports and logs: ```text Transferring control to ELF entry point ``` This is an import-resolution reproducer: the converted title and its other dependencies were already staged, including the separate relinker note fix #2088. It does not claim this PR alone makes the title playable. Object attributes validate the port, reserved object and attribute array; reset-state accepts a null value, other attributes require a value. Attribute identifiers and values are otherwise not interpreted. Port flush validates the port and drops queued offline frames. The attribute layout and reset-state identifier follow shadPS4's audio3d implementation; PS5 equivalence and the offline limitation are documented in TechnicalDebt. ### Tested Rebased onto main `f8c2f072`. Subsequent main commits only change PR-intake workflows; the tested runtime/relinker source is unchanged. Windows, MinGW-w64 GCC 15.2.0, Release. - Independent branch build and both guest Audio3d tests pass: parameters and port, including flush and object-attribute cases (2/2; 0.66 seconds total). - MiniGolf import-resolution comparison above, captured again against the freshly built main library on 2026-10-09. - `tools/check_conventions.py --base origin/main` passes. Linux, PS5 hardware behavior and audible 3D mixing were not tested. No mixing implementation is added. ### 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 - [x] Unimplemented paths throw; offline limitations are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source: none added - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes, Codex
oneandonlydean commented 2026-10-09 09:22:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T09:22:38Z.


Which title imports these? With its ID and the unresolved ELF import line from main this can go in; otherwise I'll close it until one does.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6078125921 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1849#issuecomment-6078125921). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T09:22:38Z. --- Which title imports these? With its ID and the `unresolved ELF import` line from main this can go in; otherwise I'll close it until one does.
authurtabo-byte commented 2026-10-09 20:30:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by authurtabo-byte on 2026-10-09T20:30:56Z.


Title: 3D MiniGolf v01.000.000 (PPSA03647).

Startup failure against freshly built \libSceAudio3d\ from main (\

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088753420 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1849#issuecomment-6088753420). Originally posted by [authurtabo-byte](https://github.com/authurtabo-byte) on 2026-10-09T20:30:56Z. --- Title: 3D MiniGolf v01.000.000 (**PPSA03647**). Startup failure against freshly built \libSceAudio3d\ from main (\
adriadam10 commented 2026-10-09 21:33:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:33:18Z.


Checked against shadPS4 (validation order: port, parameters, object; flush drops queued frames), built and ran guest_audio3d_port on Linux (passes; the test does not build without the change), TechnicalDebt line is in the right section. The MiniGolf (PPSA03647) import evidence answers the earlier question.

Added one commit, rebased onto current main:

  • docs/dev/TechnicalDebt.md: the Audio3d line now records that an object id that was never reserved returns INVALID_OBJECT, while shadPS4 returns success for it and the error only for a released object; neither is measured on a console.

Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089620017 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1849#issuecomment-6089620017). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T21:33:18Z. --- Checked against shadPS4 (validation order: port, parameters, object; flush drops queued frames), built and ran `guest_audio3d_port` on Linux (passes; the test does not build without the change), TechnicalDebt line is in the right section. The MiniGolf (PPSA03647) import evidence answers the earlier question. Added one commit, rebased onto current `main`: - `docs/dev/TechnicalDebt.md`: the Audio3d line now records that an object id that was never reserved returns `INVALID_OBJECT`, while shadPS4 returns success for it and the error only for a released object; neither is measured on a console. Merging once CI is green.
github-actions[bot] commented 2026-10-09 22:12:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T22:12:22Z.


Progress report (54f28f2 → 4924932)

📈 System libraries: 85.31% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceAudio3d sceAudio3dObjectSetAttributes
libSceAudio3d sceAudio3dPortFlush
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6090115507 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1849#issuecomment-6090115507). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T22:12:22Z. --- <!-- progress-report --> ### Progress report (54f28f2 → 4924932) 📈 **System libraries**: 85.31% (+0.01%, +2 implemented functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libSceAudio3d | `sceAudio3dObjectSetAttributes` | | libSceAudio3d | `sceAudio3dPortFlush` | </details>
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!1849
No description provided.