feat(libSceBemp2sys): return from the two decoder release calls as firmware 13.42 does #15630

Merged
BunnyFl merged 4 commits from upstream-pr/15630 into main 2026-11-07 18:14:47 +00:00
BunnyFl commented 2026-11-03 22:28:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-03T22:28:37Z.


What

bemp2sys_psdecoder_release (26MmdD1jVj8) and bemp2sys_tsdecoder_release (XN-ohv4INIA) threw. In firmware 13.42 both bodies are a lone ret, and this change does the same: they return nothing and release nothing.

Their parameter lists are still unknown (see the debt entry); the no-parameter declarations stay. The return type becomes void in core/libs/prx/libSceBemp2sys/include/Api.hpp. The firmware bodies below never set rax, so void is the only return type that claims no value.

In docs/dev/debt/libSceBemp2sys.md, the pending-exports entry goes from 27 to 25 named exports. A new entry says the parameter lists are unverified, and that the bodies were read from disassembly, not measured on a console.

Source

Firmware 13.42 system/common/lib/libSceBemp2sys.sprx (sha256 c222550a53a5263108e5c01a64367418f152a9fe9cabae7341a91271362bae6a), read from disassembly, not run on a console. Export addresses come from the module's dynamic symbol table:

4f00: ret   ; bemp2sys_psdecoder_release
5f20: ret   ; bemp2sys_tsdecoder_release

Tested

  • Merged main 56374036ad into the branch; the head is now cbbbb6b475. The only conflict was in core/libs/CMakeLists.txt: #15837 moved the guest_voice_chat registration next to this branch's new test into core/libs/prx/libSceVoiceChat/CMakeLists.txt, so only this branch's guest_bemp2sys_decoder_release block stays there. No debt count changes.
    • On cbbbb6b475, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 67 of 67 pass, none Not Run, with both test executables rebuilt: guest_bemp2sys_decoder_release, guest_bemp2sys, public_headers and the 64 public_headers_compile_* batches.
    • Negative control at this head: with main's Export.cpp and include/Api.hpp put back, guest_bemp2sys_decoder_release aborts with bemp2sys_psdecoder_release_nid_postfix not implemented (1 of 1 failed).
    • tools/check_conventions.py --base upstream/main on the committed head cbbbb6b475: all checks pass.
  • Windows 11, WinLibs GCC, Release, head b748dc6aae: 66 of 66 pass. That is the new guest_bemp2sys_decoder_release, public_headers and the 64 public_headers_compile_* batches.
  • New core/libs/tests/GuestBemp2sysDecoderRelease.cpp calls each release twice and checks that it returns.
  • Negative control: with main's Export.cpp and include/Api.hpp put back, the test aborts with bemp2sys_psdecoder_release_nid_postfix not implemented (1 of 1 failed).
  • tools/check_conventions.py --base upstream/main on the committed head: all checks pass.
  • tools/pr_overlap.py --branch: 24 open PRs share lines, mostly in core/libs/CMakeLists.txt. None of their diffs names these two functions. #15061 (edubox) changes the same library's logging and memory manager calls, not these.
  • Merged main 3cb1cd29ec into the branch; the head is now ac819ef8dc. The only conflict was in docs/dev/debt/libSceBemp2sys.md, where both sides took exports out of the pending count and added an entry for them: main implemented the four logprintf and memmanager wrappers and opened a ### Functional section for them, reading 27 named pending exports, while this branch read 29 for its two decoder release calls. Both new entries are kept, with this branch's decoder release entry moved under main's new heading, and every entry stays under the 1000-character debt limit.
    • The merged number is counted from the merged Export.cpp rather than subtracted: of its 33 APS5_VABI entries, 27 still throw through NotImplemented_nid_no_patch, 25 of them named and 2 bound by NID only, which the separate additional callable exports entry already covers. The pending entry now reads 25. As a check on the method, the same count gives main's 27 on main and this branch's 29 at head b748dc6aae, which is what each of those trees states.
    • The merge also brings main's 3rdparty/SDL2 submodule bump; the staged pin matches upstream/main exactly.
  • On the merged head ac819ef8dc, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: 67 of 67 pass, 0 failed, none skipped, none reported Not Run, with both test executables deleted and rebuilt before the run. That is guest_bemp2sys_decoder_release and guest_bemp2sys, which links the same library, plus public_headers and the 64 public_headers_compile_* batches. The pre-merge run below did not include guest_bemp2sys.
  • Linux and macOS were not built or run. No title was run.

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: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5145490835 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15630). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-03T22:28:37Z. --- ### What `bemp2sys_psdecoder_release` (`26MmdD1jVj8`) and `bemp2sys_tsdecoder_release` (`XN-ohv4INIA`) threw. In firmware 13.42 both bodies are a lone `ret`, and this change does the same: they return nothing and release nothing. Their parameter lists are still unknown (see the debt entry); the no-parameter declarations stay. The return type becomes `void` in `core/libs/prx/libSceBemp2sys/include/Api.hpp`. The firmware bodies below never set `rax`, so `void` is the only return type that claims no value. In `docs/dev/debt/libSceBemp2sys.md`, the pending-exports entry goes from 27 to 25 named exports. A new entry says the parameter lists are unverified, and that the bodies were read from disassembly, not measured on a console. ### Source Firmware 13.42 `system/common/lib/libSceBemp2sys.sprx` (sha256 `c222550a53a5263108e5c01a64367418f152a9fe9cabae7341a91271362bae6a`), read from disassembly, not run on a console. Export addresses come from the module's dynamic symbol table: ``` 4f00: ret ; bemp2sys_psdecoder_release 5f20: ret ; bemp2sys_tsdecoder_release ``` ### 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. --> - Merged `main` `56374036ad` into the branch; the head is now `cbbbb6b475`. The only conflict was in `core/libs/CMakeLists.txt`: #15837 moved the `guest_voice_chat` registration next to this branch's new test into `core/libs/prx/libSceVoiceChat/CMakeLists.txt`, so only this branch's `guest_bemp2sys_decoder_release` block stays there. No debt count changes. - On `cbbbb6b475`, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: **67 of 67 pass, none Not Run**, with both test executables rebuilt: `guest_bemp2sys_decoder_release`, `guest_bemp2sys`, `public_headers` and the 64 `public_headers_compile_*` batches. - **Negative control** at this head: with `main`'s `Export.cpp` and `include/Api.hpp` put back, `guest_bemp2sys_decoder_release` aborts with `bemp2sys_psdecoder_release_nid_postfix not implemented` (1 of 1 failed). - `tools/check_conventions.py --base upstream/main` on the committed head `cbbbb6b475`: all checks pass. - Windows 11, WinLibs GCC, Release, head `b748dc6aae`: 66 of 66 pass. That is the new `guest_bemp2sys_decoder_release`, `public_headers` and the 64 `public_headers_compile_*` batches. - New `core/libs/tests/GuestBemp2sysDecoderRelease.cpp` calls each release twice and checks that it returns. - **Negative control:** with `main`'s `Export.cpp` and `include/Api.hpp` put back, the test aborts with `bemp2sys_psdecoder_release_nid_postfix not implemented` (1 of 1 failed). - `tools/check_conventions.py --base upstream/main` on the committed head: all checks pass. - `tools/pr_overlap.py --branch`: 24 open PRs share lines, mostly in `core/libs/CMakeLists.txt`. None of their diffs names these two functions. #15061 (edubox) changes the same library's logging and memory manager calls, not these. - Merged `main` `3cb1cd29ec` into the branch; the head is now `ac819ef8dc`. The only conflict was in `docs/dev/debt/libSceBemp2sys.md`, where both sides took exports out of the pending count and added an entry for them: `main` implemented the four logprintf and memmanager wrappers and opened a `### Functional` section for them, reading 27 named pending exports, while this branch read 29 for its two decoder release calls. Both new entries are kept, with this branch's decoder release entry moved under `main`'s new heading, and every entry stays under the 1000-character debt limit. - The merged number is counted from the merged `Export.cpp` rather than subtracted: of its 33 `APS5_VABI` entries, **27 still throw through `NotImplemented_nid_no_patch`, 25 of them named** and 2 bound by NID only, which the separate additional callable exports entry already covers. The pending entry now reads 25. As a check on the method, the same count gives `main`'s 27 on `main` and this branch's 29 at head `b748dc6aae`, which is what each of those trees states. - The merge also brings `main`'s `3rdparty/SDL2` submodule bump; the staged pin matches `upstream/main` exactly. - On the merged head `ac819ef8dc`, Windows 11 Pro 10.0.26300, WinLibs GCC, Release: **67 of 67 pass, 0 failed, none skipped, none reported Not Run**, with both test executables deleted and rebuilt before the run. That is `guest_bemp2sys_decoder_release` and `guest_bemp2sys`, which links the same library, plus `public_headers` and the 64 `public_headers_compile_*` batches. The pre-merge run below did not include `guest_bemp2sys`. - Linux and macOS were not built or run. No title was run. ### 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 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!15630
No description provided.