Repository navigation
Conversation
|
Local validation on Linux, against the latest main used for the PR: clean Release build of |
|
PPSA15552 creates the 0x4001 rack with one built-in module, |
|
@oneandonlydean @MarcZX100 the I have implemented solution for this in commit 1d5190d You can see and test if it unblock the startup crash, i didnt test it with run the game |
|
Rebase handoff — rebased onto current Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
To pick it up: |
5662961 to
07a6785
Compare
c3f6cb6 to
b0524d0
Compare
|
Thanks for identifying Before carrying it, could you cite the source for the 40-byte parameter layout and the meanings of its A run on |
adriadam10
left a comment
There was a problem hiding this comment.
Checked on Linux: libSceNgs2.native build and its 9 ctest tests pass, ngs2_custom fails to build without the change. The code is scoped and throws on everything it doesn't model. The one open point is the one @oneandonlydean raised:
- The PR body says it addresses the startup stop of #3759, but PPSA15552 creates the 0x4001 rack with module
0x13, andNgs2CheckCustomRackstill throwscustom module id 0x13 is not implemented, so the title stops in the samesceNgs2RackCreate. Either implement0x13from a cited source (see the layout question to @Jnbla6 above: types other than 1 are not covered) with a test, or reword the body/debt line so they don't claim the title gets past this stop. - It also conflicts with
mainindocs/dev/debt/libSceNgs2.native.md(debt line adjacency); please rebase after the above.
Carry the fix for boykopovar#3759 onto current main.
…tests for 0x13 issue case
b0524d0 to
64110c4
Compare
|
Rebased onto current |
Source of the 40-Byte Layout shadPS4 Reference: In shadPS4's src/core/libraries/ngs2/ngs2_custom.h, the struct OrbisNgs2CustomVoiceFilterParam is defined exactly as a 40-byte (0x28) structure. The offsets perfectly align with the static_asserts added in my commit: type at +0x08, channelMask at +0x0c, and the union param at +0x10. Prosper Live Dump: When Dead Cells runs in prosper (which initially misidentified 0x40001300 as a MatrixLevels param), its trace log dumped the payload at these exact offsets. At hle_audio.cpp (around line 3914), the log reads ~1e4 (10000.0f) at +0x14, 0.707f at +0x18, and 1.0f at +0x1c. This perfectly maps to the fcq struct inside the union (frequency at +0x10, q at +0x14, level at +0x18 relative to the struct start).
The direct coefficients (i0, i1, i2, o1, o2) are not activated by type == 0. They are typically mapped to higher enum values (e.g., type == 5 or type == 6 depending on the exact SCE filter implementation). Why this implementation is safe: If you look at AnyPS5's existing standard filter handler in Voice.cpp (Ngs2SetFilter), it explicitly states: if (param.type == 0) { filter = {}; return; }. By falling back to passing type = 0 (or leaving fields zero-initialized when type != 1) to Ngs2SetFilter, we are safely forcing a Clear/Bypass. This is the exact intended and safe behavior for an unsupported or disabled filter type, avoiding garbage direct-coefficient processing while preventing a hard crash. |
|
Thanks, the shadPS4 header is good evidence for the 0x28-byte struct and the The remaining gap is the assertion that type 0 is the console's clear/bypass value (and that other unimplemented types should be passed through as a zero-initialized clear). |
|
Dead Cells (PPSA15552) runtime results are in #4417 (comment). In short, the title sends |
|
New on-title evidence from #4417 changes the filter analysis. The PS5 call uses a 48-byte payload: I have corrected my earlier comment: prosper's |
|
I updated the PR description and technical-debt entry to make the scope explicit: this change covers the bounded rack |
|
Correction after #4417 merged: current |
|
I tested the requested rebase in an isolated worktree. Git skips The captured type-9 call is still a separate gap: current main models a 40-byte filter parameter with type at +0x8 and frequency/Q/level at +0x10, while the title trace reports a 48-byte payload with type at +0x10 and those values at +0x14..+0x1c. Could you share the field interpretation/source for the extra words and the meaning of type 9? I can’t safely implement the type-9 path from the offsets alone. |
|
Closing: the custom sampler rack and the type-1 filter path are on main since #4417, so nothing distinct is left here (as you found when rebasing). |
What
Adds bounded support for the NGS2 custom sampler rack (
0x4001) and carries an experimental custom-filter handler for module0x13using the 40-byte shadPS4 parameter layout and type1. The filter implementation carries Jnbla6’s offered commit with its original author preserved; the rack implementation preserves screamm’s original commit author. New Windows runtime evidence in #4417 shows Dead Cells sends a 48-byte0x40001300parameter with a likely type value of9at+0x10and frequency/Q/level-looking values starting at+0x14. The current 40-byte/type-1 handler does not cover that observed call, so this PR does not claim to unblock Dead Cells; the filter layout and type remain unresolved.Tested
Linux: built
ngs2_custom_testsand passedctest -R '^ngs2_custom$'(1/1). The reported Dead Cells trace was run by another contributor on Windows against #4417 plus #4777; this PR was not applied in that run.Checklist
mainNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)