feat(libs): add the Voice and IME exports PPSA24191 needs to load #7852

Merged
Lindamea1 merged 1 commit from upstream-pr/7852 into main 2026-10-20 02:46:43 +00:00
Lindamea1 commented 2026-10-19 11:01:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Lindamea1 on 2026-10-19T11:01:32Z.


What

Monster Hunter Wilds (PPSA24191) imports three functions that no library exports, so on main the loader stops before the title runs:

MHWilds.elf: symbol lookup error: MHWilds.elf: undefined symbol: row9sfnYNx4

The names are from the pinned aerolib.csv that tools/nid_names.py uses, and compute_nid gives back the same NIDs.

  • sceVoicePausePort (x0slGBQW+wY) and sceVoiceResumePort (gAgN+HkiEzY) check that the library is initialized and the port exists, as sceVoiceResetPort does, and return 0. VitaSDK's voice.h documents that a paused port keeps its buffered data and keeps reporting its earlier state through sceVoiceGetPortInfo until it resumes. RPCS3's cellVoicePausePort and cellVoiceResumePort make the same two checks. Nothing here processes port data, so neither call changes anything else. The title passes a 32-bit port id. Right after connecting an input port to a voice output port with sceVoiceConnectIPortToOPort, it pauses that input port. Elsewhere it pauses and resumes a port again.
  • sceImeSetConsecutiveClauseConversionEnabled (row9sfnYNx4) throws. Neither shadPS4 nor KytyPS5 implements it, and GitHub code search finds no other mention of the name. The title calls it with 1 just before each of its three sceImeOpen calls, and opens the panel only when it returns 0. The debt entry records this for whoever implements it.

GuestVoice now checks that both Voice calls throw in four cases: before sceVoiceInit, for an unknown port, after sceVoiceDeletePort and after sceVoiceEnd. It also checks that a paused port reports the same port info. The assertions that already follow on the same ports check that the connection, volume and mute flag are kept.

Tested

Gentoo Linux, kernel 7.2.8, GCC 16, Release, BUILD_TESTING=ON. Tests on main f72c7aacf, title runs on main 83bf557dc (the branch rebased cleanly; nothing in between touches these files).

  • guest_voice passes. Without the change it does not link, because the two Voice functions are undefined.
  • Tests the change reaches, selected by tools/select_tests.py as CI selects them: 239 passed, 0 failed. The VideoOut flip tests skip on this machine, as they do on main.
  • Windows: the three changed C++ files compile with x86_64-w64-mingw32-g++ -fsyntax-only -Wall -Wextra. This is a syntax check, not a Windows build or run.
  • tools/check_conventions.py passes. tools/pr_overlap.py --branch reports no overlapping lines with other pull requests. It could not compare GuestVoice.cpp with #6044, which conflicts with main. #6044 moves the file unchanged to core/libs/tests/media/. Merged with this branch, it has the same 24 conflicting files as with main, none of them this PR's, and the new assertions land in the moved file. #7566 and #7658 change neighbouring lines of the two debt files, so the new entries sit where they merge cleanly with both.
  • Monster Hunter Wilds (PPSA24191, 01.041.040), relinked with --registry --module-dir PS5, run headless in gamescope on an RTX 5090 (driver 595.99.02):
    • main: the loader stops at row9sfnYNx4. tools/import_audit.py reports 3 absent imports.
    • With this branch: 0 absent imports, and the title starts. With gdb breakpoints, the title called none of the three functions in its first 200 s, so this PR only gets it past the loader.
    • Next, at the default PIE base 0x555555554000, its own libc rejects its allocator's buffer, as #3043 describes on Windows. The log shows sceKernelDebugRaiseException c1=-1610481644 and then c1=-1610481645, followed by a segfault. Relinked with --linux-fixed-base 0x400000 or 0x400000000, the title compiles its shaders, presents frames and checks its save data within 5 minutes. Every frame is still one flat dark grey.

Not run on Windows, macOS or a console.

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: PPSA24191 #7972
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4919892968 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7852). Originally posted by [Lindamea1](https://github.com/Lindamea1) on 2026-10-19T11:01:32Z. --- ### What Monster Hunter Wilds (PPSA24191) imports three functions that no library exports, so on `main` the loader stops before the title runs: ``` MHWilds.elf: symbol lookup error: MHWilds.elf: undefined symbol: row9sfnYNx4 ``` The names are from the pinned `aerolib.csv` that `tools/nid_names.py` uses, and `compute_nid` gives back the same NIDs. - `sceVoicePausePort` (`x0slGBQW+wY`) and `sceVoiceResumePort` (`gAgN+HkiEzY`) check that the library is initialized and the port exists, as `sceVoiceResetPort` does, and return 0. VitaSDK's [`voice.h`](https://github.com/vitasdk/vita-headers/blob/ae5808f3105c42fa3373ba4ab64ab54e2e3ca848/include/psp2/voice.h#L516-L538) documents that a paused port keeps its buffered data and keeps reporting its earlier state through `sceVoiceGetPortInfo` until it resumes. RPCS3's [`cellVoicePausePort` and `cellVoiceResumePort`](https://github.com/RPCS3/rpcs3/blob/be69c054eeac57e2e671697a463473d37fe5a7b2/rpcs3/Emu/Cell/Modules/cellVoice.cpp#L443-L529) make the same two checks. Nothing here processes port data, so neither call changes anything else. The title passes a 32-bit port id. Right after connecting an input port to a voice output port with `sceVoiceConnectIPortToOPort`, it pauses that input port. Elsewhere it pauses and resumes a port again. - `sceImeSetConsecutiveClauseConversionEnabled` (`row9sfnYNx4`) throws. Neither [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/0ebea15c24253b60f514fc37a348dabc8d0bcb90/src/core/libraries/ime/ime.cpp) nor [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/e5f0ee7fc2fb4ce88c6abb2fa02296404e2fe2a6/src/libs/ime.cpp) implements it, and GitHub code search finds no other mention of the name. The title calls it with 1 just before each of its three `sceImeOpen` calls, and opens the panel only when it returns 0. The debt entry records this for whoever implements it. `GuestVoice` now checks that both Voice calls throw in four cases: before `sceVoiceInit`, for an unknown port, after `sceVoiceDeletePort` and after `sceVoiceEnd`. It also checks that a paused port reports the same port info. The assertions that already follow on the same ports check that the connection, volume and mute flag are kept. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Gentoo Linux, kernel 7.2.8, GCC 16, Release, `BUILD_TESTING=ON`. Tests on `main` f72c7aacf, title runs on `main` 83bf557dc (the branch rebased cleanly; nothing in between touches these files). - `guest_voice` passes. Without the change it does not link, because the two Voice functions are undefined. - Tests the change reaches, selected by `tools/select_tests.py` as CI selects them: 239 passed, 0 failed. The VideoOut flip tests skip on this machine, as they do on `main`. - Windows: the three changed C++ files compile with `x86_64-w64-mingw32-g++ -fsyntax-only -Wall -Wextra`. This is a syntax check, not a Windows build or run. - `tools/check_conventions.py` passes. `tools/pr_overlap.py --branch` reports no overlapping lines with other pull requests. It could not compare `GuestVoice.cpp` with #6044, which conflicts with `main`. #6044 moves the file unchanged to `core/libs/tests/media/`. Merged with this branch, it has the same 24 conflicting files as with `main`, none of them this PR's, and the new assertions land in the moved file. #7566 and #7658 change neighbouring lines of the two debt files, so the new entries sit where they merge cleanly with both. - Monster Hunter Wilds (PPSA24191, 01.041.040), relinked with `--registry --module-dir PS5`, run headless in gamescope on an RTX 5090 (driver 595.99.02): - `main`: the loader stops at `row9sfnYNx4`. `tools/import_audit.py` reports 3 absent imports. - With this branch: 0 absent imports, and the title starts. With gdb breakpoints, the title called none of the three functions in its first 200 s, so this PR only gets it past the loader. - Next, at the default PIE base `0x555555554000`, its own libc rejects its allocator's buffer, as #3043 describes on Windows. The log shows `sceKernelDebugRaiseException c1=-1610481644` and then `c1=-1610481645`, followed by a segfault. Relinked with `--linux-fixed-base 0x400000` or `0x400000000`, the title compiles its shaders, presents frames and checks its save data within 5 minutes. Every frame is still one flat dark grey. Not run on Windows, macOS or a console. ### 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 under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: PPSA24191 #7972 <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no --> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-actions[bot] commented 2026-10-19 11:02:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T11:02:20Z.


Progress report (f72c7aa → 4faf57a)

📉 System libraries: 82.5% (-0.01%, +2 implemented, +1 declared functions)

✅ 2 implemented
Library Name
libSceVoice sceVoicePausePort
libSceVoice sceVoiceResumePort
🆕 1 declared as stubs
Library Name
libSceIme sceImeSetConsecutiveClauseConversionEnabled
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6265687261 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7852#issuecomment-6265687261). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T11:02:20Z. --- <!-- progress-report --> ### Progress report (f72c7aa → 4faf57a) 📉 **System libraries**: 82.5% (-0.01%, +2 implemented, +1 declared functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | libSceVoice | `sceVoicePausePort` | | libSceVoice | `sceVoiceResumePort` | </details> <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libSceIme | `sceImeSetConsecutiveClauseConversionEnabled` | </details>
github-actions[bot] commented 2026-10-19 11:09:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T11:09:50Z.


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
PR 8059 docs/dev/debt/libSceVoice.md L11

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestVoice.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6265819596 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7852#issuecomment-6265819596). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T11:09:50Z. --- <!-- pr-overlap --> 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 | |---|---|---|---| | [PR 8059](https://www.github.com/boykopovar/AnyPS5/pull/8059) | `docs/dev/debt/libSceVoice.md` [L11](https://github.com/boykopovar/AnyPS5/blob/e004d03ceb460c5b802b7905a8a88a2a3db26b46/docs/dev/debt/libSceVoice.md#L11) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestVoice.cpp` |
fogydes commented 2026-10-19 12:16:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fogydes on 2026-10-19T12:16:38Z.

Review: APPROVED


Verified locally on Windows 11 with WinLibs MinGW-w64 GCC 15.2.0, Release (-DBUILD_TESTING=ON):

  • Target guest_voice_tests builds cleanly with Ninja.
  • ctest --test-dir build-libs -R "^guest_voice$" --output-on-failure:
    • guest_voice: Passed (0.02s)
  • sceVoicePausePort and sceVoiceResumePort validate library initialization and valid port ID handles, asserting invariant port configuration across pause/resume cycles.
  • libSceIme throwing stub for sceImeSetConsecutiveClauseConversionEnabled (NID row9sfnYNx4) is documented with caller context in docs/dev/debt/libSceIme.md.
  • Zero comments added in code; Conventional Commits title; all checklist items verified.
  • Overlap with #6044 is purely the file path relocation of GuestVoice.cpp to tests/media/.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5571394900 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7852#pullrequestreview-5571394900). Originally posted by [fogydes](https://github.com/fogydes) on 2026-10-19T12:16:38Z. **Review:** APPROVED --- Verified locally on Windows 11 with WinLibs MinGW-w64 GCC 15.2.0, Release (`-DBUILD_TESTING=ON`): - Target `guest_voice_tests` builds cleanly with Ninja. - `ctest --test-dir build-libs -R "^guest_voice$" --output-on-failure`: - `guest_voice`: Passed (0.02s) - `sceVoicePausePort` and `sceVoiceResumePort` validate library initialization and valid port ID handles, asserting invariant port configuration across pause/resume cycles. - `libSceIme` throwing stub for `sceImeSetConsecutiveClauseConversionEnabled` (NID `row9sfnYNx4`) is documented with caller context in `docs/dev/debt/libSceIme.md`. - Zero comments added in code; Conventional Commits title; all checklist items verified. - Overlap with #6044 is purely the file path relocation of `GuestVoice.cpp` to `tests/media/`. AI-assisted: yes
adriadam10 commented 2026-10-20 02:48:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T02:48:19Z.


Checked the signatures against VitaSDK/RPCS3, the init/port checks against sceVoiceResetPort, the throwing IME stub and its debt entry, and that GuestVoice fails without the change (the two functions don't link); merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282164636 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7852#issuecomment-6282164636). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-20T02:48:19Z. --- Checked the signatures against VitaSDK/RPCS3, the init/port checks against `sceVoiceResetPort`, the throwing IME stub and its debt entry, and that `GuestVoice` fails without the change (the two functions don't link); merged.
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!7852
No description provided.