feat(ngs2): support custom submixer rack UserFx module 0x1d #5139
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5139"
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 Kikoarl on 2026-10-13T12:39:41Z.
What
Supports
SCE_NGS2_CUSTOM_MODULE_ID_USER_FX(0x1d) on custom submixer racks alongsideUserFx2(0x1f). Custom submixer voice parameterSCE_NGS2_CUSTOM_VOICE_PARAM_USER_FX(0x40001d00 | module index) installs legacy UserFx process callbacks and user data per voice.During voice rendering, custom UserFx callbacks are executed with planar mixed samples, honoring initial/continuation flags and updating sample presence.
Crash Log (Rule 4B):
PPSA03061)origin/main):Closes #5055
Tested
libSceNgs2.native.prxand all tests in RAM (/tmp/anyps5_build).TestCustomLegacyUserFxunit test incore/libs/prx/libSceNgs2.native/tests/Ngs2Custom.cppwith pinned values.libSceNgs2.nativeunit tests: 100% passed.python3 tools/check_conventions.pypassed with 0 errors.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)Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T15:35:44Z.
Windows test: head merged on its own onto current
mainc35bc4b92(clean merge; it conflicts with #5140, which adds the same module, so only one of the two can land). Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: build of the Ngs2 tests 0 errors; ctestngs2_customandngs2_userfxpassed. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-13T17:38:44Z.
Thanks @xXPBSXx for the Windows test verification and confirming clean compilation with MinGW.
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T20:04:43Z.
Void Terrarium (PPSA03061) passes a 20-byte UserFx (
0x1d) module option (00000014 00000000 00000004 447a0000 00000000). This PR only accepts 4 bytes or the UserFx2 size, so the game stops onNgs2CheckCustomRack: invalid argument; #5140 lets it through. Details in https://github.com/boykopovar/AnyPS5/issues/5055#issuecomment-6154121860Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-13T21:26:13Z.
Thanks @p3n1cillin for reporting this and providing the hex dump! I've updated the PR to accept any option with
size >= sizeof(Ngs2CustomModuleOption)(handling the 20-byte extended option structure as well as null pointers), and added a unit test covering the 20-byte option layout with pinned values.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:34:00Z.
Can you drop the branch that reads a 0x1d option as a UserFx2 module when its size is 24? Nothing shows 0x1d takes that layout, and picking it by size is a guess; the size check and the 20-byte case are enough for PPSA03061.
@p3n1cillin could you rerun PPSA03061 with this head in place of #5140? The 20-byte option is accepted now.
Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-14T08:19:21Z.
Done @oneandonlydean. Dropped the 24-byte UserFx2 branch for module 0x1d as requested; 0x1d options are now strictly handled as UserFx (accepting null or size >= 4, which covers the 20-byte case for PPSA03061). Rebased cleanly onto latest
origin/main(d1670009f) and verified all NGS2 tests pass.Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-15T01:46:45Z.
Windows run of this head alone, merged onto
main6239ceffc(clean merge; it also merges cleanly onto the newer2559e9623, not built).40e201975, base6239ceffc.libspass with 0 errors and no warnings in libSceNgs2.native.--repeat until-fail:3, all 10 passed 3/3 (30/30 runs):ngs2_core_render,ngs2_render,ngs2_atrac9,ngs2_filter,ngs2_custom,ngs2_parse,ngs2_stream,ngs2_userfx,ngs2_report,ngs2_geom.ngs2_customincludesTestCustomLegacyUserFx, which covers the 20-byte0x1doption (size 20, channels 4, 1000.0f) and the null option.ctest -j8 --timeout 120 -E '^agc_driver_|^video_out_flip'): 804/808.conventions_function_bodies,hardware_oracle_compareandtls_function_coverage_register_address_loadstimed out while the host was busy and passed when rerun one at a time.check_main_syncfails the same way on plainmainhere (console code page).Verdict: the build, all Ngs2 tests including the 20-byte UserFx option, and the non-GPU suite pass on Windows on top of current
main.AI-assisted (Claude Code).