Repository navigation
feat(libSceNgs2): add the custom mastering modules 0x17, 0x18 and 0x1a measured on a PS5 - #18501
oneandonlydean merged 16 commits into
Conversation
…a measured on a PS5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tead of guessing The measurement does not say whether a custom mastering setup clears the matrix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… which were not measured Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e the mix scratch buffer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
|
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.
|
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 5560952714:
- Conventions:
tools/check_conventions.pypassed;git diff --checkclean. - Build:
ngs2_custom_testsbuilt cleanly. - CTest (
ngs2_custom_safety_custom_callback,ngs2_custom_safety_upstream_callback,ngs2_custom_safety_configured_gain,ngs2_custom_safety_routing_one_buffer,ngs2_custom_safety_routing_two_buffers,ngs2_custom):1/6 Test #3816: ngs2_custom_safety_custom_callback ....... Passed 0.02 sec 2/6 Test #3817: ngs2_custom_safety_upstream_callback ..... Passed 0.02 sec 3/6 Test #3818: ngs2_custom_safety_configured_gain ....... Passed 0.02 sec 4/6 Test #3819: ngs2_custom_safety_routing_one_buffer .... Passed 0.02 sec 5/6 Test #3820: ngs2_custom_safety_routing_two_buffers ... Passed 0.03 sec 6/6 Test #3825: ngs2_custom .............................. Passed 0.21 sec 100% tests passed, 0 tests failed out of 6 - Negative control: with
core/libs/prx/libSceNgs2.native/include/Ngs2Types.hpp,core/libs/prx/libSceNgs2.native/src/Custom.cpp,core/libs/prx/libSceNgs2.native/src/Ngs2Internal.hpp,core/libs/prx/libSceNgs2.native/src/Rack.cpp,core/libs/prx/libSceNgs2.native/src/Render.cpp,core/libs/prx/libSceNgs2.native/src/Voice.cppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass. - Code reading:
- Verified Custom.cpp CheckMasteringModules and CheckMasteringModuleState enforce state size requirements, min state size 16, and exact error codes SCE_NGS2_ERROR_INVALID_STATE_SIZE (0x804A8302) and SCE_NGS2_ERROR_INVALID_STATE_OFFSET (0x804A8301).
- Verified Custom.cpp ProcessMixMatrix and ApplyMasteringModuleParam bounds safety, clamping levels to [-32.0f, 32.0f] while preserving NaN passthrough, and indexing within the 37x37 levels matrix without out-of-bounds access.
- Verified Custom.cpp Ngs2CheckMasteringParamId and Voice.cpp sceNgs2VoiceControl position-based module slot routing (0xffff00e0u mask), returning SCE_NGS2_ERROR_INVALID_VOICE_CONTROL_ID (0x804A8362) for 0x40030002..6 and SCE_NGS2_ERROR_INVALID_PARAM_ID (0x804A835A) for mismatched or invalid module IDs.
- Verified Voice.cpp sceNgs2VoiceGetState output size handling for SCE_NGS2_RACK_ID_CUSTOM_MASTERING with peak meter module, accepting 8 and >= 172 bytes, zeroing state in mode 0, throwing runtime_error for modes 1 and 2, and returning SCE_NGS2_ERROR_INVALID_OUT_SIZE otherwise.
- Verified Render.cpp Ngs2MasteringOutputUnbound correctly silences output when outputId exceeds numBufferInfo on custom mastering racks configured with module 0x1a.
- Verified Rack.cpp CheckedRackOption and sceNgs2RackQueryBufferSize validation for SCE_NGS2_RACK_ID_CUSTOM_MASTERING, returning exact error codes 0x804A8013, 0x804A8311, 0x804A8052, and 0x804A8309.
- Verified AGENTS.md compliance: zero comments in code, Conventional Commit title, no untracked files, and all unmodelled/unimplemented behaviors documented in docs/dev/debt/libSceNgs2.native.md.
- Note: the AI-assisted checkbox can stay.
Looks Good To Me
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Head 55609527146a7003f35677c093d5174c921c8ea6 adds custom mastering modules 0x17, 0x18 and 0x1a to libSceNgs2; I found no blocking defect in the code I read, and nothing was built or run here.
What I ran
- Head SHA
55609527146a7003f35677c093d5174c921c8ea6, basemain. - Read the diff of all 8 reviewed files, then the head code around the changed lines with the repository reader.
- No build, no test run, no negative control. Toolchain is Linux here; the author's Windows results are reported, not reproduced.
Reader commands
repo_read.py search "samples" core/libs/prx/libSceNgs2.native/src/Custom.cpp
repo_read.py search "CheckedRackOption" core/libs/prx/libSceNgs2.native/src/Rack.cpp
repo_read.py search "ApplyParam" core/libs/prx/libSceNgs2.native/src/Voice.cpp
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Rack.cpp 278 300
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Voice.cpp 1075 1090
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Voice.cpp 1140 1162
repo_read.py search "const bool inside" core/libs/prx/libSceNgs2.native/src/Custom.cpp
repo_read.py search "option->size != size" core/libs/prx/libSceNgs2.native/src/Rack.cpp
Results
| Check | Result | Note |
|---|---|---|
| Build libSceNgs2 (Windows, GCC) | not run | author-reported only |
| ngs2_custom and ngs2 tests | not run | author-reported 3/3 |
| Negative control | not run | author-reported only |
| check_test_registration.py, check_conventions.py | not run | author-reported only |
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceNgs2.native/src/Custom.cpp:95: the state range check adds twostd::uint32_tvalues, sostate_offset + state_sizecan wrap. A peak meter at offset0xFFFFFF00with size 156 on a 172-byte rack sums to 156, passes the check, and the rack is created. Suggested change:
const bool inside = info.state_offset >= SCE_NGS2_CUSTOM_MASTERING_MIN_STATE_SIZE && info.state_size <= option.state_size && info.state_offset <= option.state_size - info.state_size;
core/libs/prx/libSceNgs2.native/src/Rack.cpp:106: the option-size check now returns0x804A8013for every custom mastering rack, including racks with no modules. Before this change those racks threwstd::invalid_argument. The PR body says "racks without modules keep their old behaviour", so either that sentence or the code is wrong. The create path returns the code (Rack.cpp:282). No test covers a no-module rack with a wrong option size; the size test inNgs2Custom.cppusesTitleRackOption, which has modules.
Sources
- Custom.cpp:95 —
- Rack.cpp:106 —
Not verified
- No build or test run. The author's test results are taken as reported, not reproduced.
- The 13.590.001 console measurements (the linked #8039 comment) were not opened, so the error codes and state sizes were not checked against the console.
- Whether the console rejects the wrapped offset in finding 1, or returns an error for no-module racks with a wrong option size (finding 2).
- Whether
ProcessUserFxruns for every mastering voice, which the mix-matrix path depends on; only the author's tests cover this. - Compile-time sizes: the
static_assert(sizeof(Ngs2CustomVoiceMixMatrixParam) == 5484)assumes 37 channels and an 8-byte header. - Only hunks and the head ranges above were read.
Ngs2Internal.hpp,Render.cpp,Ngs2Custom.cppand the debt file were read in the diff only. Excluded by rule: none.
To get this to a good state
- Decide whether no-module mastering racks should keep throwing on a wrong option size (
Rack.cpp:106). Either restrict the check tonum_modules != 0or correct the PR text. - Make the state range check overflow-safe (
Custom.cpp:95). - Rerun
ngs2_custom,ngs2,check_test_registration.pyandcheck_conventions.pyon the new head.
… and keep the old throw for racks without modules Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
@MarcZX10 thanks, both points are addressed in
All 49 AI-assisted: yes. |
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tering debt entry Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
Changes are required before merge: make existing custom mastering gain and output parameters capturable when controls are deferred, and add coverage for that path.
What I ran
Reviewed head cc80b4e8a2d659086c3a5c436b39f81ed4b8c7b7. No commands or tests were run; author-reported test results are not independent runs.
Results
| Check | Result | Note |
|---|---|---|
| Changed-line review | passed | All listed changed files read |
| Test execution | not run | Results below are author-reported |
Findings
Blocking
core/libs/prx/libSceNgs2.native/src/Voice.cpp:757: The new capture hook handles module params, but custom mastering gain (0x40030004) and output (0x40030005) still fall through to the “buffered voice parameter is not implemented” exception. During render or job execution, controls are deferred, so these existing parameters cannot be changed on a custom mastering rack with modules. Extend capture to preserve and apply these parameters, and cover both deferred controls.
Non-blocking
None.
Not verified
- Tests described in the PR body (including the 49-test suite and negative controls) were not run in this review.
- Files read:
core/libs/prx/libSceNgs2.native/include/Ngs2Types.hpp,core/libs/prx/libSceNgs2.native/src/Custom.cpp,core/libs/prx/libSceNgs2.native/src/Ngs2Internal.hpp,core/libs/prx/libSceNgs2.native/src/Rack.cpp,core/libs/prx/libSceNgs2.native/src/Render.cpp,core/libs/prx/libSceNgs2.native/src/Voice.cpp,core/libs/prx/libSceNgs2.native/tests/Ngs2Custom.cpp, anddocs/dev/debt/libSceNgs2.native.md. - Files excluded: none; the manifest lists eight changed files and all eight were read.
To get this to a good state
- Add deferred capture and application for custom mastering gain and output parameters, with tests exercising controls issued during render or job execution.
|
@MarcZX10 on a rack with modules, 0x40030004 and 0x40030005 never reach The red |
…stering-modules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The change is consistent with its stated scope, and the inspected code showed no verified blocking defect.
What I ran
Reviewed head b7748c925ef3d829fac6ac4cb4ee422b0a6f95e5 using repo_read.py; no tests or builds were run in this review. The description reports Windows 11 / GCC 15.2 test results on an earlier revision and a later head, which I did not independently run.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | Inspected relevant implementation and tests |
| Automated checks | not run | No commands were run in this review |
| Console behavior | not run | Measurement is author-reported |
Negative control
Not run during this review. The description reports negative controls on earlier revisions; those results were not independently verified.
Findings
Blocking
None verified.
Non-blocking
None.
Sources
Reviewed the prepared description.md, commits.md, manifest.json, and diff.patch, plus the changed files Ngs2Types.hpp, Custom.cpp, Ngs2Internal.hpp, Rack.cpp, Render.cpp, Voice.cpp, Ngs2Custom.cpp, and libSceNgs2.native.md. The implementation accepts only the stated module set and checked state ranges; matrix processing and output routing follow the described behavior in the inspected code. The description and debt entry limit the measurement claim to firmware 13.590.001 payload-process observations, not a title run.
Not verified
Build and test results, console behavior, and any changed lines outside the inspected ranges were not independently verified. No files were excluded by the manifest.
To get this to a good state
Nothing is required. The test and measurement results remain author-reported and were not run or confirmed in this review.
|
Hi AlfaRojo, the merge with main is clean and the rest of the PR is the same as the head I and the other reviewers passed. One thing in the merge resolution needs a change, in sceNgs2VoiceGetState for the custom mastering rack (Voice.cpp, the The earlier head cleared the caller's state with Please keep the host buffer bounded. For example build only the 172 byte state (or |
… copy of its size sceNgs2VoiceGetState on a custom mastering rack with a peak meter accepts any state_size from 172 up, and the reply was built in a host vector of that size, so a large state_size allocated that much host memory or threw out of the export. Write the common header, then zero the rest through 4 KiB chunks of a fixed zero block, returning INVALID_OUT_ADDRESS when a chunk cannot be written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@oneandonlydean thanks, fixed in New case AI-assisted: yes. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head d73bc635cfdcb3ee2d6365feff4a4b506b8e964d. I used the review reader to inspect the prepared diff and targeted source context; I did not run commands or tests.
Results
| Check | Result | Note |
|---|---|---|
| Diff and changed code review | passed | All eight changed files were included and reviewed |
| Test execution | not run | Reader-only environment |
Negative control
Not run; the reader-only environment does not provide test execution.
Findings
Blocking
None identified in the reviewed diff.
Non-blocking
None.
Sources
Not verified
Tests and console behavior were not independently verified. I reviewed the complete prepared diff for all changed files: Ngs2Types.hpp, Custom.cpp, Ngs2Internal.hpp, Rack.cpp, Render.cpp, Voice.cpp, Ngs2Custom.cpp, and libSceNgs2.native.md. No changed files were excluded by the review bundle. Repository files were read in targeted ranges, not in full.
To get this to a good state
Nothing is required. Optionally, run the reported ngs2 test suite on this head.
…stering-modules Module 0x17 on the custom mastering rack now uses main's ChannelMixer (SCE_NGS2_CUSTOM_VOICE_PARAM_CHANNEL_MIXER, Ngs2CustomVoiceChannelMixerParam, voice.customChannelMixer, ProcessChannelMixer) instead of the separate MixMatrix type, state and processing. The mastering-specific param-id, short-param and setup checks stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
- Head
a70b1f566ce6a5c27e06e272412a93be726dd42b, basemain, merged-preview not checked. - Read the review folder (description, commits, manifest, file list, diff) and the house-rule sections "Readable reviews", "Accuracy and evidence" and "Standard PR response format".
- Traced the changed code at head with the reader, in
Voice.cpp,Custom.cpp,Rack.cppandNgs2Internal.hpp. - No build and no test run. This is a static review.
Reader commands
repo_read.py search "CaptureParamControl" core/libs/prx/libSceNgs2.native/src/Voice.cpp
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Voice.cpp 1205 1250
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Voice.cpp 1168 1200
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Voice.cpp 1094 1118
repo_read.py search "customChannelMixer" core/libs/prx/libSceNgs2.native/src/Voice.cpp
repo_read.py search "customChannelMixer" core/libs/prx/libSceNgs2.native/src/Custom.cpp
repo_read.py search "WriteGuestBytes" core/libs/prx/libSceNgs2.native/src/Voice.cpp
repo_read.py search "Ngs2ApplyCustomParam" core/libs/prx/libSceNgs2.native/src/Voice.cpp
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Custom.cpp 130 150
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Rack.cpp 255 300
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Ngs2Internal.hpp 366 376
repo_read.py cat core/libs/prx/libSceNgs2.native/src/Ngs2Internal.hpp 440 470
Results
| Check | Result | Note |
|---|---|---|
| Diff and manifest read | passed | 8 of 8 reviewed files |
| Changed code traced at head | passed | Four source files |
| Build and unit tests | not run | Static review only |
| Author-reported test runs | not run | 51 ngs2 tests, not re-run |
| Negative control | not run | Not run here |
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceNgs2.native/src/Custom.cpp:108: module 0x17 accepts a module option of size 20. The debt entry for the channel mixer lists 4, 8 and 16, and the PR text does not mention 20. Confirm that 20 is part of the measurement, or drop it.core/libs/prx/libSceNgs2.native/src/Custom.cpp:97: a peak meter module (0x18) withstate_size0 is accepted as having no state, and the rack then reports a meter toGetState. Neither the PR nor the debt entry says this was measured.core/libs/prx/libSceNgs2.native/src/Custom.cpp:394:(id >> 16) == SCE_NGS2_CUSTOM_VOICE_PARAM_USER_FX2 >> 16is correct, because>>binds tighter than==, but parentheses would make the intent clearer.core/libs/prx/libSceNgs2.native/src/Voice.cpp:1385: the zero fill writes in 4 KiB chunks and can returnINVALID_OUT_ADDRESSafter an earlier chunk has already been written. A failed call can leave part of the guest buffer zeroed, where main wrote nothing on failure. Low impact; worth a comment in the debt entry.
Not verified
- The build, the 51
ngs2tests, the negative control and thecheck_*scripts. The results are author-reported and were not run here. - Console behaviour. The measured values (kali113's section A, firmware 13.590.001) and every claim that depends on them. The linked comment was not fetched.
- The deferred path,
Voice.cpp:763(mastering module params captured while a voice is deferred). I did not check whether any test reaches it. - Overlap and merge claims in the description (
pr_overlap.py, #15946, #18461, #18464). Not checked. - Full text of the eight reviewed files. I read the changed hunks in
diff.patchand the reader ranges listed above.Ngs2Types.hpp,Render.cpp, the test file and the debt file were read only through their diffs. WriteGuestBytesrejecting the guard-page write, which the guard-page test relies on.GuestCopyOutwas not read.
To get this to a good state
Nothing is required. The non-blocking points above are optional.
|
@oneandonlydean merged current upstream/main ( There is now one implementation of 0x17, main's:
One difference, not resolved from sources: a param shorter than the 5484-byte table. Main's ChannelMixer applies the bytes present and zero-fills the rest on the submixer and sampler racks. On the mastering rack this PR throws, since the 13.590.001 measurement shows the console reading past the param and the result is unknown. I kept both, each on its own rack, and noted it in the debt entries. Tests: |
artor410
left a comment
There was a problem hiding this comment.
Independent run of the current head, plus a check of the code against section A of the measurement. I found no defects. Two small documentation points follow, neither blocking.
Since a70b1f566c replaced the separate mixing matrix with main's ChannelMixer, the only test results have been the author's; the later reviews were static. This run covers that head.
Windows run of a70b1f566c
Setup: Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Ninja, Release. The head was merged onto main a902d373c1 with --no-ff (clean merge).
- All
ngs2tests:ctest -R '^ngs2'gives 51 of 51 in 3 of 3 runs. - Negative control: the branch's
src/was reverted tomain, keeping this PR'sNgs2Types.hpp, since the tests use its new error constants.ngs2_customthen stops withwhat(): NGS2: custom mastering racks with modules are not implemented(0 of 1). With the branch'ssrc/restored and the executable rebuilt, it passes again. - Checks:
tools/check_conventions.py --base origin/mainpasses with 0 errors (see point 2 for the warnings).tools/debt_fold.py --checkpasses, and no pending fragment changes the entries this PR edits.
Checked against section A of kali113's measurement
- Creation:
max_grain_samples0 gives0x804A8311,max_channels0 gives0x804A8052,max_voices0 gives0x804A8309.- With modules, an option size other than
0x508gives0x804A8013. - A rack state below 16 gives
0x804A8302.
- Module state:
0x17with a non-zero state gives0x804A8302.0x18with a state size other than 156 gives0x804A8302; at offset 0 it gives0x804A8301.- Rack state 16 and 171 with the title's modules give
0x804A8301, through the overflow-safe range check. 0x17accepts options of size 4, 8, 16 and 20 (20 is in the table, at buffer size 53592).0x18with an option of size 4 gives0x804A8092.
- Params:
- Ids are bound to the module position (
0x40001701,0x40001800and0x40001a00on the title's rack give0x804A835A). 0x40030002to0x40030006give0x804A8362, and0x30000002/3/4/6give0x804A835A.- Peak meter mode 3 gives
0x804A8093. 0x40001a02withoutput_id1 renders silence.
- Ids are bound to the module position (
- GetState: sizes 8 and 172 or more are accepted, other sizes give
0x804A8011, and mode 0 is zero past the flags. - Bounds: every route to
ApplyMasteringModuleParam, direct or through the deferredCaptureParamControlcopy, passesNgs2CheckMasteringParamIdinsceNgs2VoiceControlfirst. SocustomChannelMixer[param.id & 0x1f]stays within thenum_modulesentriesCustom.cppassigns.
Non-blocking
- Debt entries are edited directly.
docs/dev/TechnicalDebt.md#fragments(sinceb720379ac3, 8 Nov) says a pull request addsdocs/dev/debt/changes/<branch>.mdinstead of editing the debt file. This branch changes twolibSceNgs2.native.mdentries and adds a third in place. The check does not reject it, so this is only about the convention. Moving the three edits into a fragment (## addfor the new entry,## changefor the two others) would also stop them from conflicting with later edits to the same lines. - Length warnings.
check_conventionswarnsdebt-lengthon two entries. "NGS2 custom mastering modules" is new and has 1081 characters. "NGS2 custom ChannelMixer" was already 1001 onmainand grows to 1039 with the added "(see NGS2 custom mastering modules)".
Not covered: console behaviour (measurement as reported), Linux or macOS, and titles.
AI-assisted: yes (Claude Code). I ran the tests above and read the code at this head against the cited measurement.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@artor410 thanks for the run and the check against section A. Both points are addressed in
The branch also merges current AI-assisted: yes. |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Inspected the prepared diff and relevant source sections at head c92c00a8903e3c46b8600facba334d1bbbdc047b using the review reader. I did not run tests.
Results
| Check | Result | Note |
|---|---|---|
| Changed-code review | passed | Relevant hunks inspected |
| Test suite | not run | No test command available through the reader |
| Negative control | not run | Not executed in this review |
Findings
Blocking
None.
Non-blocking
None.
Sources
- Custom module validation and processing at reviewed head
- Rack option handling at reviewed head
- Voice and render handling at reviewed head
Not verified
I inspected relevant sections, not every line, of the eight changed files listed in the manifest: Ngs2Types.hpp, Custom.cpp, Ngs2Internal.hpp, Rack.cpp, Render.cpp, Voice.cpp, Ngs2Custom.cpp, and the debt change fragment. The manifest marks all eight as included; the separate files.json exclusion list was unavailable through the reader. Tests, CI results, and console behavior were not independently verified. The description reports successful tests on earlier heads, not this reviewed head.
To get this to a good state
Nothing is required. Optionally, run the reported test suite on this exact head before merging.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — no blocking findings
The reviewed changes add custom mastering rack modules 0x17, 0x18 and 0x1a; I found no verified blocking defect in the inspected implementation.
What I ran
- Reviewed head
42ab5683f34dc39df32bf0e39021e5b3a86a9995usingrepo_read.py. - No tests or build commands were run. The test results in the PR description are author reported.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | Inspected implementation and tests |
| Build and tests | not run | Author reported results only |
Findings
Blocking
None verified in the inspected code.
Non-blocking
None.
Not verified
The manifest lists seven changed files, all marked included. I read Ngs2Types.hpp, Custom.cpp, Ngs2Internal.hpp, Rack.cpp, Render.cpp, Voice.cpp, and Ngs2Custom.cpp only partially, alongside the description, commits, manifest, and diff. I did not inspect the full text of every changed file or the debt fragment, and did not run tests or builds. The diff patch was read through line 721.
To get this to a good state
Nothing is required.
|
A title this does not reach yet, for scope. BLUE REFLECTION Quartet (PPSA33655) is a PS5 title, but it imports the PS4 Setup: Linux 7.3.5, RX 7900 XTX (RADV), GCC 16.2.1, Release.
So the PR's PS4-library refusal is the stop for this title now. I'm not asking for a change here. The description's measurement is from the PS5 library, and I have no PS4-library measurement to offer. This only records that a released PS5 title takes the PS4 path with modules, in case that matters for scope or a follow-up. The rack it creates, logged by a local print placed just before the PS4-library check (run
Both are modules this PR implements for the PS5 library, with one buffer and no options. I have not checked whether 0x17 with a zero-size state passes AI-assisted: yes Next stop, local experiment only. I let the PS4 library take the module rack, gated behind a private environment variable in a local build, not a proposed change (run |
18501 MarcZX10 CR 5899870291 (14 Nov 00:12Z on cc80b4e): unfounded for this PR
Claim: deferred custom mastering gain (0x40030004) and output (0x40030005) still throw "buffered voice parameter is not implemented".
- Gain: live head 42ab568, core/libs/prx/libSceNgs2.native/src/Voice.cpp:676-682 CaptureParamControl captures SCE_NGS2_CUSTOM_MASTERING_VOICE_PARAM_GAIN when deferring. Not a gap.
- Output: deferred output is not captured for any mastering rack, standard or custom. main has the same code (origin/main Voice.cpp:676 captures only gain, :1182 applies output only immediately). This is pre-existing and not touched by the PR, whose Voice.cpp change is 24/-4 lines for the new 0x17/0x18/0x1a modules.
PASS MED YES by pr-review3 on 42ab568 at 22 Nov 04:07Z, after the CR. Checked at source by pr-review1.
What
A custom mastering rack (0x4003) with modules no longer throws at creation. Modules 0x17 (37 by 37 ChannelMixer matrix), 0x18 (peak meter) and 0x1a (Output) follow kali113's measurement, section A (firmware 13.590.001, console's own libSceNgs2.native, payload process).
0x804A8302/0x804A8301, meter option size 40x804A8092, missingmax_grain_samples0x804A8311,max_channels0x804A8052,max_voices0x804A8309, option size0x5000x804A8013. QueryBufferSize returns the first three module errors; its sizes are not modelled.0x804A8093; GetState accepts 8 and 172 or more bytes, zeros in mode 0.0x40001a02; an id without a render buffer renders silence.0x804A835A);0x40030002..6return0x804A8362;0x30000002/3/4/6return0x804A835A.std::invalid_argumenton a wrong option size (unmeasured; the measurement covers option size 0x500 with modules only, and an option shorter than 0x500 with modules throws too). Limits: payload process measurement, not a title.Tested
Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, on main f57c971.
ngs2_customandngs2_core_custompass 3/3, all 49ngs2tests pass 3/3. Negative control: withsrc/reverted to main,ngs2_customaborts in the new checks.check_test_registration.pyandcheck_conventions.py --base upstream/mainpass. Tests render per-channel impulses through a 6-channel matrix and compare against the measured values.Overlap:
pr_overlap.pyflagged #15946 (debt file lines 53-54, mine edits that entry, trivial merge) and could not compare #1384, #5548, #10249, #14212; their diffs contain none of my symbols (module ids, channel mixer state, mastering checks). #18461 and #18464 touch Voice.cpp mastering params and Ngs2CheckCustomRack for submixers; hunks are disjoint.cc80b4e8a2(merged with upstream/main51790c7533): all 49ngs2tests pass in 3/3 runs;check_test_registration.pyandcheck_conventions.py --base upstream/mainpass. New negative controls: with the old range check a state offset of 0xFFFFFFF0 with size 156 on a 172-byte rack is accepted (ngs2_customfails), and with the old option-size check a rack without modules returns0x804A8013instead of throwing (ngs2_customfails).d73bc635cf:sceNgs2VoiceGetStateon a custom mastering rack no longer builds a host buffer ofstate_size; it writes the header and zeroes the rest in 4 KiB chunks. All 50ngs2tests pass in 3/3 runs;check_conventions.py --base upstream/mainpasses. Negative control: with the previousVoice.cpp, the new guard-page case (state_size0x80000000 andSIZE_MAXon a one-page buffer) failsngs2_custom.a70b1f566c(merged with upstream/main802a0aeb2d): module 0x17 now uses main's ChannelMixer (Ngs2CustomVoiceChannelMixerParam,customChannelMixer,ProcessChannelMixer) instead of a separate mixing matrix; the mastering param-id, short-param and setup checks stay. All 51ngs2tests pass;check_conventions.py --base upstream/mainandcheck_test_registration.pypass.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)