Commit Graph
201 Commits
Author SHA1 Message Date
JAB-dev e402f0086f Merge remote-tracking branch 'origin/main' into fix/ngs2-ps4-port-volume-range-ps5
# Conflicts:
#	core/libs/prx/libSceNgs2.native/tests/Ngs2JobBuffer.cpp
2026-11-01 08:00:02 +02:00
Adrià ebb95e8489 Merge pull request #13857 from JAB-dev/fix/ngs2-waveform-add-codes-main-ps5
fix(libSceNgs2): follow PS5 for waveform add flags and APPEND blocks
2026-11-01 06:40:00 +01:00
JAB-dev e4b9fb91b8 Merge remote-tracking branch 'origin/main' into fix/ngs2-ps4-port-volume-range-ps5
# Conflicts:
#	core/libs/prx/libSceNgs2.native/src/Voice.cpp
#	docs/dev/debt/libSceNgs2.native.md
2026-11-01 07:03:46 +02:00
Adrià 3ab5a11d66 Merge pull request #13851 from JAB-dev/fix/ngs2-rack-waveform-block-limit-ps5
fix(libSceNgs2): reject sampler racks outside 1 to 32 waveform blocks
2026-11-01 06:00:17 +01:00
JAB-devandClaude Sonnet 5.5 8155820bb7 docs(libSceNgs2): say the waveform add results come from the PS5 and PS4 modules run on a PC
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-01 05:45:03 +01:00
JAB-devandClaude Sonnet 5.5 164246490e fix(libSceNgs2): follow PS5 for waveform add flags and APPEND blocks
Waveform adds now follow the PS5 module in cases main threw or answered with
the wrong code: flag bits 0x8, 0x20 and 0x40 and up are ignored in the values
PS5 ran, an add of no blocks with APPEND or RESET|APPEND returns 0 (or the
closed code on a closed waveform), one APPEND block on a mono PCM voice with
nothing queued is queued as a block of no frames (unsigned 8-bit, 16, 24 and
32-bit integer, 32 and 64-bit float), and any add to a never-set-up voice whose
waveform an add of no blocks closed returns the closed code.

The PS4 library shares the sources and returns its own code for a closed
waveform and a full queue, 0x804A0151, as PS4 11.00 does.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-11-01 05:45:02 +01:00
Dean 1526c6aeae Merge pull request #13902 from edubox/feat/ngs2-custom-sampler-gain
feat(ngs2): allow the custom Gain module on custom sampler racks
2026-11-01 15:53:56 +13:00
Adrià 1ffd2b81f5 Merge pull request #13787 from JAB-dev/fix/ngs2-sampler-filter-types-ps5
fix(libSceNgs2): read the PS5 sampler and custom filter params and run filter types 1 to 11
2026-11-01 01:37:59 +01:00
JAB-dev e556054fdc Merge remote-tracking branch 'origin/main' into fix/ngs2-ps4-port-volume-range-ps5
# Conflicts:
#	core/libs/prx/libSceNgs2.native/tests/Ngs2Render.cpp
2026-10-31 21:57:03 +02:00
JAB-devandClaude Sonnet 5.5 7ef0533d08 fix(libSceNgs2): follow the PS4 module for filter sizes, types and the fc clamp
The PS4 11.00 module accepts only header sizes 0x30 (sampler) and 0x28 (custom) and returns 0x804A030A for the rest, runs types 1 to 10 and treats 11 and above as off, takes locations 0 to 17, and raises fc to 0.001 x rate.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 15:11:04 +02:00
JAB-devandClaude Sonnet 5.5 d44c0739b9 fix(libSceNgs2): clamp the PS4 port volume to [-4, 4]
The PS4 11.00 module stores a port volume clamped to [-4, 4] with NaN and -0 kept; the PS4 library used the PS5 range [0, 32].

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 15:00:13 +02:00
Eduardo Ruiz 06a481b208 feat(ngs2): allow the custom Gain module on custom sampler racks
The bundled 12.70 module accepts Gain (0x15) on rack 0x4001, where the
voice parameter index is one higher than the module index (fma-rc's
reading). Creation now passes the rack check, a parameter at index 0 or
beyond the module count returns INVALID_PARAM_ID, and the existing
processing path ramps the module as on a custom submixer.

The test covers creation, the ramped gain over two grains, and the
parameter index bounds. Initialization and lifecycle remain unverified:
processing after a setup or stop still throws.
2026-10-31 13:09:47 +01:00
JAB-devandClaude Sonnet 5.5 2ae97dfe26 docs(libSceNgs2): say the rack block limit was measured on the PS5 module run on a PC
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 12:25:20 +02:00
JAB-devandClaude Sonnet 5.5 9c009622b5 fix(libSceNgs2): reject sampler racks outside 1 to 32 waveform blocks
A sampler rack or a custom sampler rack whose max_waveform_blocks is 0 or above
32 now returns 0x804A8053 from sceNgs2RackQueryBufferSize, sceNgs2RackCreate
and sceNgs2RackCreateWithAllocator, checked before the peak meter and buffer
count checks as the PS5 module does. Main checked only a custom sampler rack
with 0 and accepted any count for a sampler rack, taking 0 as 1.

The PS4 build keeps main's behaviour: no limit for sampler racks, and 0x804A8053
for a custom sampler rack with 0. PS4 11.00 takes 1 to 16 on sampler racks and
returns 0x804A0106, but the PS4 library reads the PS5 rack option layout, so it
cannot apply that.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 11:08:00 +02:00
JAB-devandClaude Sonnet 5.5 97a16f9a09 fix(libSceNgs2): read the PS4 sampler filter param in shadPS4's layout
Under APS5_NGS2_PS4_LIBRARY the sampler filter param 0x1000000a is parsed as
shadPS4's OrbisNgs2SamplerVoiceFilterParam (index 0x8, location 0xC, type
0x10, 32-bit channel mask 0x14, fc, q and level from 0x18, size 0x30), the
way the custom param 0x40001300 already is, and goes through the new filter
code. main read KytyPS5's layout (type 0x10, 64-bit mask 0x18); neither is
measured on PS4 11.00. Types 0 and 1 at location 1 are accepted, anything
else throws as on main. Raw-byte tests in ngs2_core_render cover the layout.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 09:50:43 +02:00
JAB-devandClaude Sonnet 5.5 f8ce8aade3 fix(libSceNgs2): keep the PS4 sampler filter layout and name the measurement source
Under APS5_NGS2_PS4_LIBRARY the sampler filter param 0x1000000a is parsed in
the layout main used (type at 0x10, 64-bit mask at 0x18, fc at 0x20) instead
of the PS5 layout, as the custom param 0x40001300 already is, and goes
through the new filter code. Raw-byte tests in ngs2_core_render cover it.

The two filter debt entries name the module and firmware versions measured,
say the runs were on a PC with host math imports and not on a console, point
to the result records, and keep the PS4 differences gap-first. The title is
left out of the debt text; only the title ID stays.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 09:45:38 +02:00
JAB-devandClaude Sonnet 5.5 52be0d5b23 fix(libSceNgs2): read the PS5 sampler and custom filter params and run filter types 1 to 11
The sampler filter param (0x1000000a) and the custom filter param
(0x40001300) read their fields in a layout PS5 titles do not use, so a
low-pass was read as off. Both now use the SDK layout and filter types 1 to
11 as the PS5 module does: float coefficients, outputs in blocks of four
frames from the first frame of each render, clamps, level, masks, locations,
the error order, a zero history when the voice starts again, a history that
decays over zero input while a voice is paused, a restart from the first
block when a filtered voice is played again, and no tail past the render in
which a block voice ends. The PS4 library keeps main's 40-byte custom param.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 08:23:38 +02:00
JAB-devandClaude Sonnet 5.5 107954e355 fix(libSceNgs2): use the PS5 default map for 3, 4, 5 and 7 channels
PS5 firmware 3.20 and 4.03 have their own default port map rows for every source and destination pair with 3, 4, 5 or 7 channels on either side, and a mastering voice of those counts maps its channels into a render buffer of the same count through them. Ours threw for a port into such a voice, used the PS4 fold-down from one, and copied the channels of a 3, 5 or 7 channel mastering voice unchanged. A mastering voice into a buffer of another count still throws when either count is 3, 4, 5 or 7. The PS4 library, the reverb conversion and Pan keep the PS4 rows. The routing tests that rendered 3, 5 and 7 channel mastering voices now expect those rows, and the render tests expect the sampler startup delay.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 02:48:40 +02:00
JAB-dev 0ad239feea Merge origin/main into fix/ngs2-default-port-map-ps5
# Conflicts:
#	docs/dev/debt/libSceNgs2.native.md
2026-10-30 23:54:48 +02:00
Adrià e1b563a8fc Merge pull request #13488 from JAB-dev/fix/ngs2-i16-render-conversion-ps5
fix(libSceNgs2): convert PCM_I16L render output as the PS5 module does
2026-10-30 22:42:02 +01:00
JAB-devandClaude Sonnet 5.5 f35ab1ccf2 docs(libSceNgs2): record how the PCM_I16L render conversion was measured and what was not
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 19:24:51 +02:00
JAB-devandClaude Sonnet 5.5 e9c8069804 fix(libSceNgs2): use the PS5 default channel map for ports and mastering output
PS5 firmware 3.20 and 4.03 fold 6 and 8 channel sources into stereo and mono with different surround and back gains than the PS4 rows, and fold a mastering voice into a render buffer of another channel count through the same default map. Ours used the PS4 rows and threw on a channel count mismatch other than stereo into 6 or 8. The PS4 library, the reverb conversion and Pan matrices keep the PS4 rows.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 19:20:35 +02:00
JAB-devandClaude Sonnet 5.5 a9c4e82299 docs(libSceNgs2): say the port volume measurements ran on the PS5 module on a PC
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 18:55:55 +02:00
JAB-devandClaude Sonnet 5.5 8c1291efdb docs(libSceNgs2): put the mastering gain gaps first and drop the stale nonfinite integer render sentence
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 18:51:59 +02:00
JAB-devandClaude Sonnet 5.5 8ae66c36b3 fix(libSceNgs2): convert PCM_I16L render output as the PS5 module does
PS5 firmware 3.20 and 4.03 write trunc(clamp(x * 32767.0f, -32767, 32767)) into a PCM_I16L render buffer, with the product in float, NaN written as 0 and -32768 never written; ours rounded x * 32768 to nearest, wrote -32768 for -1 and threw on a nonfinite sample. Combined with the sampler's exact x / 32768 input, an I16 source now comes back one step toward zero, so the existing render, stream and gain tests expect that, and a new sweep checks the measured values on 1, 2, 6 and 8 channels.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 18:37:47 +02:00
JAB-devandClaude Sonnet 5 26833d555f docs(libSceNgs2): list every unmeasured port volume case in the debt entry
Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-10-30 18:36:52 +02:00
JAB-devandClaude Sonnet 5.5 eb81f61955 docs(libSceNgs2): scope the port volume debt entry to what was measured
The clamp was measured on a sampler voice's ports only, so the entry now says that a port past the count on another rack's voice and sceNgs2VoiceGetPortInfo still throw, and it no longer repeats the port gain ramp, which a separate change implements.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 18:21:43 +02:00
JAB-devandClaude Sonnet 5.5 0dc600e7fa fix(libSceNgs2): clamp the port volume to [0, 32] as the PS5 module does
PS5 firmware 3.20 and 4.03 clamp the port volume of VoiceControl param 0x2 and RunCommands command 6 to [0, 32], keeping NaN and -0, and return 0 for every value. Command 6 reads the low 32 bits of its value as a float whatever the value type and ignores numValues and flags, and a batch of port volumes naming a port past an 8-port rack returns 0x804A8357 without applying any of them. Ours stored the value raw, threw on a value type other than float and threw on the bad port after applying the earlier commands; other command ids and the unmeasured bad-port cases keep their old behaviour.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-30 18:21:43 +02:00
Adrià f0a7231d62 Merge pull request #13099 from Queuse/codex/ngs2-grain-validation-20261029
fix(ngs2): validate grain size in 64-sample units
2026-10-30 11:58:53 +01:00
Adrià a1782bdc02 Merge pull request #12995 from hugodearaujo/fix/ngs2-buffer-setup-controls
fix(ngs2): buffer voice setups, waveform blocks and patches sent during processing
2026-10-30 10:55:38 +01:00
Adrià 42d992b02a Merge pull request #12302 from edubox/feat/ngs2-pcm-frame-info
feat(ngs2): report the frame info of every supported PCM type
2026-10-30 06:41:18 +01:00
Adrià d7513debfe Merge pull request #12960 from ntamas94/fix/ps4-ngs2-voice-state-errors
fix(ngs2): answer PS4 voice state errors as measured in libSceNgs2
2026-10-30 06:31:58 +01:00
Queuze 152bc0b80b fix(ngs2): validate grain size in 64-sample units 2026-10-29 22:14:04 -03:00
edubox 9b07b8e969 feat(ngs2): report the frame info of every supported PCM type 2026-10-29 22:10:36 +01:00
ntamas94andClaude Opus 5.5 ad8bd09342 fix(ngs2): answer PS4 voice state errors as measured in libSceNgs2
On a PS4 firmware 10.71 console, libSceNgs2.sprx answers
sceNgs2VoiceGetState with 0x804A0054 for a state size below 4 before it
resolves the voice and 0x804A0300 for an invalid voice, and
sceNgs2VoiceGetStateFlags writes 0 and returns 0x804A0300 for an invalid
voice. The libSceNgs2 target now does the same; libSceNgs2.native keeps
the PS5 module values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 18:28:42 +01:00
hugodearaujo 2c87f46961 fix(ngs2): buffer voice setups, waveform blocks and patches sent during processing 2026-10-29 13:37:08 -03:00
Adrià df1b77626b fix(ngs2): drop the matrix info guard main's wider output already covers 2026-10-29 14:05:31 +01:00
Eduardo Ruiz 55ed30d1aa docs(ngs2): shorten the custom rack debt entries 2026-10-29 13:59:33 +01:00
Eduardo Ruiz 114ae92449 fix(ngs2): reject matrices that do not fit the matrix info output 2026-10-29 13:59:33 +01:00
Eduardo Ruiz 4c4a4932e0 fix(ngs2): keep wide custom submixer voices and matrixless maps unsupported 2026-10-29 13:59:05 +01:00
Adrià 7ec3103f68 Merge remote-tracking branch 'upstream/main' into HEAD 2026-10-28 15:18:57 +01:00
AdriàandClaude Sonnet 5.5 95a002bab9 fix(ngs2): accept sampler setup flags as before
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-28 14:52:11 +01:00
edubox d62e8f42ea feat(ngs2): implement the sampler and submixer peak meter 2026-10-28 09:02:36 +01:00
Kyon aea8616433 Merge remote-tracking branch 'origin/main' into feat/ngs2-custom-pitchshift 2026-10-27 12:20:30 +00:00
Dean 5d52b06ff3 Merge pull request #9324 from MarrasFederico/feat/ngs2-parse-format-codes
fix(libSceNgs2.native): return 0x804A8432 for waveform formats the module does not parse
2026-10-27 21:35:03 +13:00
Kyon 7ab4c61f37 docs(ngs2): condense sampler reference limitations 2026-10-27 06:00:26 +00:00
Kyon 48140166ec docs(ngs2): record sampler flag and PitchShift mask limits 2026-10-27 05:58:37 +00:00
Kyon 5ca3aa5a7a fix(ngs2): reconcile scheduler with current rendering contracts 2026-10-27 05:55:34 +00:00
Dean 21d428eb74 Merge pull request #10851 from Felipebmaitan/feat/ngs2-audio-engine
feat(ngs2): route custom submixer buffers through Gain
2026-10-27 10:55:08 +13:00
Adrià 1992ec073f Merge pull request #10037 from xXPBSXx/docs/debt-ngs2-rackgetinfo-title
docs(debt): note the buffer size a title passes to sceNgs2RackGetInfo
2026-10-26 14:59:58 +01:00