fix(libSceNgs2.native): mix ports without set levels through the default channel map #964
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/964"
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 JAB-dev on 2026-10-06T20:25:28Z.
What
A port without a matrix sent source channel n to destination channel n, so a mono voice reached only the left channel of a stereo mix. A port that selects a voice matrix (
SCE_NGS2_VOICE_PARAM_PORT_MATRIX, or command 7 ofsceNgs2VoiceRunCommands) whose levels were never set mixed nothing at all, at any port volume.Both now mix through the console's default channel map:
TechnicalDebt records that the map comes from the PS4 library.
Reference
libSceNgs2.sprx, dumped and decrypted from a console. It was loaded on Windows with a small test loader and driven through its exports; neither the loader nor the library is part of this PR. One sampler voice per source channel was rendered through a submixer into 1, 2, 6 and 8 channel mastering voices, with no matrix and with an unset matrix, and the levels were read from its output. The test values are its results.libSceNgs2.sprx(the module titles import aslibSceNgs2): its readable ELF headers match the PS4 library: the same.eh_frame_hdrsize (3,460 bytes, 431 functions) and code plus read-only data within 1% (321,328 bytes against 323,432). A decrypted PS5 SELF was not used; anyone with a decrypted PS5libSceNgs2.sprxcan help confirm this.Tested
ngs2_renderTestDefaultChannelMap:ngs2_renderTestUnsetMatrix, selecting matrix 0 without levels:main'sRender.cppboth tests fail. Six mutations each make them fail.maind70b8998, together with #959, #2336 and #2337: 507/507.mainthe title screen is silent. With this change the music fades in and plays.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-06T21:28:50Z.
Converted to draft: the console's initial matrix levels are unknown, and this assumes an unset matrix is not silent, which is the same gap as #960. I'm checking it against the output of the console's own NGS2 library and will mark it ready with that.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:14:25Z.
Please rebase this onto main without the merge commits, and #959 on top of it the same way. Then I'll run the full build and merge this one.
Imported from boykopovar/AnyPS5. Originally posted by JAB-dev on 2026-10-09T21:56:55Z.
Done, both rebased onto main with no merge commits. #964 is now 3 commits (I dropped the old test-buffer bump since main's growing pool replaced it), and #959 is a single commit on top of it.