feat(libSceAjm.native): build the WVorbis header packet #9034
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9034"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-21T10:18:27Z.
What
sceAjmDecWVorbisCreateHeaderPacket(Z4HDpe1ZEa4) threw. PPSA08427 and PPSA29340 import it, through the Wwise Vorbis hardware-decoder module they ship.In the decrypted PS5 12.00 module (0x59a0) it takes one 0x48-byte parameter. The fields are: structure size, channels, sample rate, bytes per second, the two block-size exponents, the setup packet and its size, the output buffer and its size, and the written size.
It checks, in this order:
0x8A6E0001;0x8A6E0002;0x8A6E0001;1 << blockSize0below 64,blockSize1 < blockSize0, or1 << blockSize1above 8192:0x8A6E0001. The shift is a 32-bitshlx, so exponents are taken modulo 32, and this is reproduced;0x8A6E0001;0x8A6E0004;0x8A6E0001;0x8A6E0003.It then writes, with an LSB-first bit writer:
The written size is 56 plus the setup size.
This PR writes the same bytes directly. One difference, recorded under Functional in the debt file: the console's bit writer only checks that each write starts inside the buffer, so it can accept a buffer a few bytes short and write past it. Here any output smaller than the whole packet returns
0x8A6E0003.sceAjmDecWVorbisCreateSetupPacketstill throws. It rebuilds Wwise's codebook references into the decoder's own codebook format and will be a separate PR. Ajm here has no WVorbis decoder, so a title gets past header creation but not decoding.The code is written from the observed behaviour and the public Vorbis header layout; nothing from the module is copied.
Tested
Linux (CachyOS, GCC, Release). The new
guest_ajm_wvorbischecks:All four
guest_ajm*tests pass.tools/check_conventions.pyis clean. No open PR implements these exports. Three-way merges with the open PRs touching these files add no conflicts: #3205, #6044, #6977, #8087, #8353, #8468.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T10:19:15Z.
Progress report (
8c26eac→9f6a71b)📈 System libraries: 42.34% (+0.01%, +1 implemented functions)
✅ 1 implemented
sceAjmDecWVorbisCreateHeaderPacket