Repository navigation
fix(libSceNgs2): return the custom rack creation errors - #8609
1 commit merged into
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Checked on Rise of the Ronin (PPSA04540 01.009.000), Linux, RX 9070 XT / RADV Mesa 26.2.4. Build: Result: the title's custom racks pass the new creation checks, and it now stops about 30 s in on This is the same point as the previous Tested and written by Claude (AI assistant) on a contributor's machine. |
sceNgs2RackCreate and sceNgs2RackCreateWithAllocator now return the firmware's errors for a custom rack whose buffer count is outside 1 to 4 or below the submixer's max_inputs, whose module buffer id is at or above the count, or whose submixer has more than 37 channels, and for the state sizes of the Gain, Reverb and PitchShift modules, the Reverb option size and word, and the PitchShift option word. Racks that pass these checks with one of these modules or Convolution, with more than one buffer, more than 8 channels or a submixer max_inputs other than 1 or 2 still throw, and so does sceNgs2RackQueryBufferSize for the rejected options.
eec3f10 to
9f5640a
Compare
|
Follow-up on top of this PR: #9233 processes the custom Gain module on the custom submixer rack, from fma-rc's reading in #8039 (37 per-channel linear levels, default 0, linear ramp over the grain). Rise of the Ronin with Tested and written by Claude (AI assistant) on a contributor's machine. |
a1d4803
What
sceNgs2RackCreateandsceNgs2RackCreateWithAllocatornow return the errors that the PS5libSceNgs2.native.sprxreturns for invalid custom sampler (0x4001) and custom submixer (0x4002) rack options. Until now,Ngs2CheckCustomRackthrew for these options.Valid options whose behaviour is still unknown keep throwing, with a message that names what is missing. That covers the four built-in modules, multi-buffer racks and wide custom submixers, so this PR does not unblock a title by itself (see Unblocks).
Source of the behaviour.
0x15Gain,0x19UserFx,0x1bReverb,0x20PitchShift,0x23Convolution;0x804a8302;0x804a8013), the word after the size 0 or 1 (else0x804a8099), no state;0x804a8098), 8 bytes of state;0x804a830botherwise). Submixer and mastering racks also neednum_buffers >= max_inputs, withmax_inputs1 or 2;num_buffersfails with0x804a8306;0x804a8052above).0x804a8013at an option size check,0x804a8052at a channel count check and0x804a830bat a buffer count check. Its notes onsceNgs2RackCreateandsceNgs2RackCreateWithAllocatorcheck the buffer info or allocator before the rack core, so those checks now run before the option checks.What is kept as a throw, and why.
sceNgs2RackQueryBufferSizestill throws for these options. Neither source says whether it runs the same checks.max_inputs: a custom submixer value other than 1 or 2 throws, because the source does not say what happens then. This replaces the old acceptance, which had no source.0x19: it still throws as an unknown id. fma-rc and KytyPS5 both call it UserFx, but this library already serves a module it calls UserFx as0x1d. That id comes from Void Terrarium (PPSA03061) creating a rack with it (feat(ngs2): support custom submixer rack UserFx module 0x1d #5139), with a 20-byte option (#5055) that fma-rc's UserFx does not take, so what0x1dis remains open. The debt entries now say so; an earlier revision of this PR wrongly attributed0x1dto KytyPS5.Changes:
Ngs2Types.hpp: the seven error codes, the limits (4 buffers, 37 submixer channels, 2 inputs) and the module ids0x15,0x1b,0x20,0x23. The constant names are ours; the sources give only the values.Custom.cpp:Ngs2CheckCustomRackreturns a code.!= 0throws, and the built-in module sizes.Rack.cpp:CheckedRackOptionreturns that code, plus0x804a8052for more than 37 submixer channels. The create exports return it. The query export throws on it.ngs2_custom, newTestCustomRackChecks:sceNgs2RackCreate(one throughsceNgs2RackCreateWithAllocator, without calling the allocator), on both rack types;dest_buffer_idassertion keeps expecting the query to throw.docs/dev/debt/libSceNgs2.native.md: the custom module id entry is rewritten, and a new entry covers buffers and channels. Both cite the comment and list what is still unknown.Tested
Linux (GitHub Codespace, 4 cores, native build of this branch rebased on
ce7d54717, after #8238 and #8513 changed the rack lock next to the moved checks; the later amend only rewords the debt):ngs2_*test executables (ngs2_custom,ngs2_render,ngs2_userfx,ngs2_filter,ngs2_handleerrors,ngs2_atrac9,ngs2_parse,ngs2_stream,ngs2_report,ngs2_geom,ngs2_voiceindex,ngs2_voicehandles): 5/5 runs each pass.Custom.cpp,Rack.cppandNgs2Internal.hppfrommain,ngs2_custom_testsaborts withNGS2: custom racks with 0 buffers are not implemented, and the other 11 still pass. 5/5 pass again after restoring them.Windows (fork CI, run 39467813569, the first revision of this branch merged into the fork's
mainat892a4f132, before the rebase): build and the full test suite pass, 1764/1764.Title: @EdouardSence ran Rise of the Ronin (PPSA04540 01.009.000) on Linux with
mainc70524a3d, #8341 and the first revision of this PR (comment). The title's custom racks pass the new creation checks, and it stops about 30 s in onNGS2: the custom Gain module is not implemented, the same point as the earliercustom module id 0x15stop, now named.Checks:
python3 tools/check_conventions.py --base origin/mainpasses.tools/progress.py: unchanged (4570/10772 on base and head).Duplicate and overlap check
Searches of open and closed pull requests for
Ngs2CheckCustomRack, "custom rack" and "custom module" find no other change to these checks. The closest are the merged #781, #4417 and #5139, which this builds on, and the merged debt entry #6673, which this rewrites.python3 tools/pr_overlap.py --branch fix/ngs2-custom-rack-errorsreports text conflicts on neighbouring lines, none on the same behaviour:std::lock_guardline just below the moved option check in both create exports.Ngs2CheckCustomRackone inNgs2Internal.hpp.Whichever lands second keeps both changes. It could not compare #1384 and #5797, which conflict with
main. Checked by hand:CheckedRackOptionand an error constant next to the new ones. It would need a rebase either way, but it does not change the custom rack checks.Ngs2Types.hpp,Ngs2Internal.hppand the debt file in other places.Checklist
main(ce7d54717); 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)