feat(libSceNgs2): process the custom Gain module #9233
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9233"
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 EdouardSence on 2026-10-21T15:55:28Z.
What
Follow-up to #8609: the custom submixer rack (
0x4002) now processes the Gain module (0x15), as fma-rc read it from the PS5 12.70 module in #8039 (comment).0x40001500 | module index,Ngs2CustomVoiceGainParam: 37 floats, one linear level per channel. A smaller parameter is rejected like other short parameters.0x4001), whose parameter index fma-rc reads as one higher;Ngs2CheckCustomRacktakes the rack id for that check.Overlap: #5548 changes the declaration next to
Ngs2CheckCustomRackinNgs2Internal.hpp, #8692 a nearby line ofNgs2Types.hpp, and #8851 the same debt entry. All are textual.Tested
-DBUILD_TESTING=ON: the 13ngs2_*tests pass. The newTestCustomGaininNgs2Custom.cppfeeds a 0.5 sampler through a Gain submixer. It checks silence without a parameter, the ramp to 2 and -0.5 on the first grain, the steady level on the next grain, the ramp back down to 1, and the rejections (level 33, wrong module index, sampler voice, short parameter).TestCustomRackChecksnow creates a Gain rack on the submixer and expects a throw on the custom sampler rack.main+ #8341 + #8609 + this. Its Gain racks now pass creation, and the title stops ~30 s in on the next module of the same rack:NGS2: the custom Reverb module is not implemented. That stop comes at rack creation, so Gain processing itself has not run in the title yet. One 150 s run.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)Tested and written by Claude (AI assistant) on a contributor's machine.
AI-assisted: yes
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by KernelPanicNT on 2026-10-21T19:03:21Z.
Nice work, and thanks for testing it on Ronin straight away! Your runs on #8609 have been a big help in getting these racks right. I had a Gain branch going too, but yours covers the same ground on
0x4002, so I'll drop mine. Keeping Gain to0x4002for now is a good call: the0x4001parameter index is still an open question with fma-rc (question 5 here).Two small things I noticed while comparing:
optionpasses creation and runs:CheckBuiltInModuleonly looks at Gain's state size, andNgs2CheckCustomRackthen reaches thecontinuefor Gain on0x4002. fma-rc's first reading says "Gain and UserFx take no option and no state" (comment), and your debt entry already lists the error for a Gain option as unknown, so I think it should throw. Something like this before thecontinue:0x1dlines in that entry and in "custom module ids" are mine, from #8609, written before fma-rc said0x1dis Delay. I'll fix those in a small follow-up once #8609 lands, so you won't need to rebase for it.In case they're useful, my tests for the option rejection, NaN and the ±32 limits are in
Ngs2Custom.cppon this commit (TestCustomRackChecks,TestCustomGain). Feel free to take anything. On the ramp, you use(i+1)/nand I hadi/n; neither is confirmed yet (question 6 to fma-rc), so your debt note is the right way to leave it.Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-21T20:49:16Z.
Windows run of
8c9444b5aemerged ontomain0c6a5bd593(98e9ede9a9, clean), the platform the description lists as not tested. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
libSceNgs2.nativeandngs2_custom_testswith no errors or warnings.ctest --repeat until-fail:2onngs2_custom: passes on both repeats. Not run: a title.Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-22T07:11:20Z.
@KernelPanicNT thanks for the review, both points are in
8f6f1eac8:optionnow throwsNGS2: an option for the custom Gain module is not implementedat rack creation, before the submixercontinue.TestCustomRackCheckscovers it (fails on the previous head at that check, passes now).0x1dlines for your follow-up.All 13
ngs2_*tests pass on Linux. I kept the(i+1)/nramp with its debt note until fma-rc answers question 6.Written by Claude (AI assistant) on a contributor's machine.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-22T08:34:28Z.
Windows run of
8f6f1eac86, the update since my earlier run, merged ontomaind6eafa54d0(3889ea1863, clean). Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release,BUILD_TESTING=ON.Built
libSceNgs2.nativeandngs2_custom_testswith no errors or warnings.ctest --repeat until-fail:2onngs2_custom: passes on both repeats. Not run: a title.Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-22T09:07:26Z.
Title data point: BLUE REFLECTION Quartet (PPSA33655). Its racks are listed in #8851:
MixerB: 0x19;ReverbB: 0x15 Gain + 0x1b Reverb (12-byte option);DuckingCompSB: 0x19 ×2, 2 buffers.The stop moves forward with each PR. Same scripted runs, natively on Linux 7.2.9, Radeon RX 6650 XT, RADV Mesa 26.2.4, GCC Release:
maind6eafa54d0NGS2: custom module id 0x19 is not implementedd6eafa54d0+ #9337ea6fc50b30NGS2: the custom Gain module is not implementedd6eafa54d0+ #9337 + #92338f6f1eac86NGS2: the custom Reverb module is not implementedSo:
MixerBpass creation as UserFx;ReverbBpasses;DuckingCompSB, which needs 2-buffer racks.No audio was produced or checked; this only shows rack creation getting further. Combining the two PRs conflicted in
Ngs2Types.hpp: I kept bothSCE_NGS2_CUSTOM_VOICE_PARAM_GAINand #9337's UserFx id0x40001900. It also conflicted in the test and debt files, where I kept #9337's side; those are not built in this test.