feat(voiceqos): implement sceVoiceQoSInit #730

Merged
alfalfa-star merged 1 commit from upstream-pr/730 into main 2026-10-05 23:19:38 +00:00
alfalfa-star commented 2026-10-05 18:12:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-05T18:12:08Z.


What

Implement sceVoiceQoSInit, which threw.

PPSA14632 (Unreal Engine) allocates a 0x40000-byte block and calls sceVoiceQoSInit(block, 0x40000, 0x20000000) during startup. On success it marks voice as initialized and calls sceVoiceQoSEnd at shutdown; on a nonzero return it keeps voice chat off (seen in a debugger). Init now records the library as initialized and returns 0, as the fpPS4 and SharpEmu reimplementations do. The error codes are unknown, so a null or empty memory block, an app type other than 0x20000000 and a second initialization throw. The memory block is not used, as no endpoint is implemented. The assumptions are recorded in TechnicalDebt.

The library gets its own CMakeLists.txt so it can register a test, following libSceRtc.

#645 declares the other libSceVoiceQoS exports as throwing stubs right after this function in the same file and leaves sceVoiceQoSInit unchanged; whichever lands second needs a small rebase there. sceVoiceQoSEnd is left to it.

Tested

  • Arch Linux, GCC 16.2, Release. New guest_voice_qos test: success, the second initialization, a null and an empty block and another app type. Full ctest: 291/291 apart from the three wave64 pixel tests that fail on main on this GPU (RX 9070 XT, RADV).
  • LEGO Horizon Adventures (PPSA14632), together with #672, #580, #722, #723 and local throwing stubs for its missing imports: initialization succeeds. The title then loads sysmodule 0x112 and segfaults in its own code while building the parameters for sceNpSessionSignalingInitialize (a null read through an engine object), before calling any further libSceVoiceQoS function. The cause is not identified yet.
  • Windows not built or tested.

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:4749055714 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/730). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-05T18:12:08Z. --- ### What Implement `sceVoiceQoSInit`, which threw. PPSA14632 (Unreal Engine) allocates a 0x40000-byte block and calls `sceVoiceQoSInit(block, 0x40000, 0x20000000)` during startup. On success it marks voice as initialized and calls `sceVoiceQoSEnd` at shutdown; on a nonzero return it keeps voice chat off (seen in a debugger). Init now records the library as initialized and returns 0, as the fpPS4 and SharpEmu reimplementations do. The error codes are unknown, so a null or empty memory block, an app type other than 0x20000000 and a second initialization throw. The memory block is not used, as no endpoint is implemented. The assumptions are recorded in TechnicalDebt. The library gets its own `CMakeLists.txt` so it can register a test, following `libSceRtc`. #645 declares the other libSceVoiceQoS exports as throwing stubs right after this function in the same file and leaves `sceVoiceQoSInit` unchanged; whichever lands second needs a small rebase there. `sceVoiceQoSEnd` is left to it. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. --> - Arch Linux, GCC 16.2, Release. New `guest_voice_qos` test: success, the second initialization, a null and an empty block and another app type. Full ctest: 291/291 apart from the three wave64 pixel tests that fail on `main` on this GPU (RX 9070 XT, RADV). - LEGO Horizon Adventures (PPSA14632), together with #672, #580, #722, #723 and local throwing stubs for its missing imports: initialization succeeds. The title then loads sysmodule 0x112 and segfaults in its own code while building the parameters for `sceNpSessionSignalingInitialize` (a null read through an engine object), before calling any further libSceVoiceQoS function. The cause is not identified yet. - Windows not built or tested. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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)
Celegans12 commented 2026-10-05 21:10:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-05T21:10:17Z.


Tested on Windows 11 (MinGW-w64 GCC 15.2.0, Release, NVIDIA RTX 3080 Laptop) with PPSA26344 (Ghost of Yōtei, v1.008).

  • Merged onto current main 2707b3a3 (clean), together with our open pull requests: guest_voice_qos builds and passes on Windows.
  • PPSA26344 calls sceVoiceQoSInit(block, 0x40000, 0x10000000) at eboot 0xe307bf. The block comes from the title's allocator (esi = 0x40000, edx = 0x10000000). On a nonzero return it calls another import and frees the block.
    • On main this stops at sceVoiceQoSInit not implemented.
    • With this PR it stops at sceVoiceQoSInit: unsupported app type 268435456.
  • With 0x10000000 accepted as well (a local one-line change to the app type check), initialization succeeds. The title calls no other libSceVoiceQoS function before it reaches an unrelated GPU stop (compute shader 0x800040a500: guest sampler descriptor uses unnormalized coordinates).

So two app types have been seen so far: 0x20000000 (PPSA14632) and 0x10000000 (PPSA26344). Both titles pass a 0x40000-byte block.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6002983672 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/730#issuecomment-6002983672). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-05T21:10:17Z. --- Tested on Windows 11 (MinGW-w64 GCC 15.2.0, Release, NVIDIA RTX 3080 Laptop) with PPSA26344 (Ghost of Yōtei, v1.008). - Merged onto current `main` 2707b3a3 (clean), together with our open pull requests: `guest_voice_qos` builds and passes on Windows. - PPSA26344 calls `sceVoiceQoSInit(block, 0x40000, 0x10000000)` at eboot 0xe307bf. The block comes from the title's allocator (`esi` = 0x40000, `edx` = 0x10000000). On a nonzero return it calls another import and frees the block. - On `main` this stops at `sceVoiceQoSInit not implemented`. - With this PR it stops at `sceVoiceQoSInit: unsupported app type 268435456`. - With 0x10000000 accepted as well (a local one-line change to the app type check), initialization succeeds. The title calls no other libSceVoiceQoS function before it reaches an unrelated GPU stop (`compute shader 0x800040a500: guest sampler descriptor uses unnormalized coordinates`). So two app types have been seen so far: 0x20000000 (PPSA14632) and 0x10000000 (PPSA26344). Both titles pass a 0x40000-byte block.
github-actions[bot] commented 2026-10-05 23:04:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T23:04:30Z.


Progress report (0518f0e → d7f3b7c)

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

✅ 1 implemented
Library Name
libSceVoiceQoS sceVoiceQoSInit
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6005017548 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/730#issuecomment-6005017548). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T23:04:30Z. --- <!-- progress-report --> ### Progress report (0518f0e → d7f3b7c) 📈 **System libraries**: 79.24% (+0.03%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceVoiceQoS | `sceVoiceQoSInit` | </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!730
No description provided.