Commit Graph
89 Commits
Author SHA1 Message Date
Dean Galvin acb208b6c2 Merge branch 'main' into feat/ngs2-hevag 2026-11-04 21:00:49 +13:00
Dean Galvin 1e4443ce43 Merge commit 'a644edf30c501a612d06f17d05ef1b7051350cef' into HEAD
# Conflicts:
#	core/libs/prx/libSceNgs2.native/src/Voice.cpp
2026-11-01 23:27:03 +13: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
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 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
nekomancer01andClaude Opus 5.5 c56191baa8 feat(ngs2): parse and decode VAG and HE-VAG waveforms
Parse VAGp headers in sceNgs2ParseWaveformData and sceNgs2ParseWaveformFile
as prosper's reading of the PS5 module describes, including the loop split
from frame flags, and decode submitted type 0x1c blocks with vgmstream's
HE-VAG decoder from the existing submodule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 10:19:41 +11: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 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 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
Kyon bc07113988 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	core/libs/prx/libSceNgs2.native/CMakeLists.txt
#	core/libs/prx/libSceNgs2.native/src/Custom.cpp
#	core/libs/prx/libSceNgs2.native/src/Voice.cpp
#	docs/dev/debt/libSceNgs2.native.md
2026-10-30 02:00:34 +00: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
Adrià 7ec3103f68 Merge remote-tracking branch 'upstream/main' into HEAD 2026-10-28 15:18:57 +01:00
edubox d62e8f42ea feat(ngs2): implement the sampler and submixer peak meter 2026-10-28 09:02:36 +01:00
Kyon cfc143d660 fix(ngs2): reconcile Reverb with current main and public headers 2026-10-27 05:46:12 +00:00
Felipebmaitan 0c3f104067 chore(ngs2): merge current main for audio routing 2026-10-26 09:03:02 -03:00
Kyon 4073fe7cd8 fix(ngs2): validate PitchShift positions before dispatch 2026-10-26 03:31:08 +00:00
Kyon c2cdfc3bad fix(ngs2): reconcile current main and waveform block semantics 2026-10-26 03:31:08 +00:00
Kyon c78e6a1d6a fix(ngs2): correct rack info and detached control storage 2026-10-26 03:31:08 +00:00
Kyon c620e8e264 feat(ngs2): buffer worker events and render parameters 2026-10-26 03:31:08 +00:00
Kyon b3e7819ae0 feat(ngs2): add externally scheduled render jobs
Implement manager lifecycle, dependency batches, the default worker pool and callback/state publication. Keep unsupported worker control buffering and stream routing explicit.
2026-10-26 03:31:08 +00:00
Kyon 92cd244aa3 fix(ngs2): reproduce sampler resampling and startup history 2026-10-26 03:31:08 +00:00
Kyon 188ec5ea15 feat(ngs2): implement custom submixer PitchShift 2026-10-26 03:31:08 +00:00
Dean 346a1be323 Merge pull request #10127 from Felipebmaitan/feat/ngs2-pcm-playback
feat(ngs2): play additional PCM sampler formats
2026-10-26 12:10:04 +13:00
Dean 59bf9480f7 Merge pull request #10432 from JAB-dev/fix/ngs2-pan-ps5
fix(libSceNgs2): return the PS5 pan codes and accept NaN pan inputs
2026-10-26 06:14:03 +13:00
Felipebmaitan 08587dfa7e feat(ngs2): play additional PCM sampler formats 2026-10-25 13:40:18 -03:00
Dean Galvin 54ac175ee3 Merge main into PR branch
Register both new Ngs2 tests: this PR's CustomReverb and main's VoiceEvents.
2026-10-25 22:26:24 +13:00
Adrià 1ca0c5d86c Merge pull request #9926 from JAB-dev/fix/ngs2-play-without-setup
fix(libSceNgs2): return INVALID_VOICE_ACCESS for PLAY on a voice that was never set up
2026-10-25 10:22:17 +01:00
Felipebmaitan 93b887e514 feat(ngs2): route custom submixer buffers through Gain 2026-10-25 01:34:10 -03:00
Kyon b24bea8554 Merge remote-tracking branch 'origin/main' into fix/ngs2-custom-reverb 2026-10-25 02:58:06 +02:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Kyon 022c609f94 feat(ngs2): implement the custom Reverb module 2026-10-24 15:55:07 +02:00
Kapy2003 a25aa36641 feat(libSceNgs2): support custom mastering rack 0x4003
Accept SCE_NGS2_RACK_ID_CUSTOM_MASTERING (0x4003) using the 0x508-byte
custom rack option layout without modules. Channels above NGS2_MAX_CHANNELS
(8) and non-zero module counts throw runtime_error as unsupported. Support
mastering voice control parameters 0x40030000 (setup), 0x40030004 (gain),
and 0x40030005 (output), write active mastering voices to render buffers,
and return voice state flags in sceNgs2VoiceGetState.

References #8039.
2026-10-24 09:58:09 +05:30
JAB-devandClaude Sonnet 5.5 8da1a2dc0b fix(libSceNgs2): return the PS5 pan codes and accept NaN pan inputs
sceNgs2PanGetVolumeMatrix now returns the PS5 error codes in the PS5 check order instead of throwing, and lets NaN angles and distances through as the PS5 module does. sceNgs2PanInit gives the 7-speaker degree defaults for 0 speakers without angles, stores NaN speaker angles and leaves unused slots untouched. Inputs on which the PS5 library never returns still throw.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 00:51:07 +02:00
Dean 1fc30716fa Merge pull request #10024 from ags-arnab/feat/ngs2-matrix-module-info
feat(libSceNgs2): implement sceNgs2VoiceGetMatrixInfo and sceNgs2CustomRackGetModuleInfo
2026-10-24 01:43:41 +13:00
JAB-devandClaude Sonnet 5.5 45b061fa6c Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/ngs2-play-without-setup
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 13:59:13 +02:00
Federico Marras 012b87293b Merge remote-tracking branch 'upstream/main' into feat/ngs2-render-buffer-codes
# Conflicts:
#	docs/dev/debt/libSceNgs2.native.md
2026-10-23 11:07:02 +02:00
Dean 3d9c01daed Merge pull request #9337 from Th3EvilGod/codex/ngs2-userfx-module-id
fix(ngs2): correct UserFx ids and preserve Delay compatibility
2026-10-23 20:24:20 +13:00
JAB-dev 2cf37664d2 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/ngs2-play-without-setup
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

# Conflicts:
#	core/libs/prx/libSceNgs2.native/include/Ngs2Types.hpp
2026-10-23 08:29:14 +02:00
JAB-devandClaude Sonnet 5.5 9723f7af66 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/ngs2-play-without-setup
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 07:58:53 +02:00
Arnab Ghosh 1f1ddc9e3a feat(libSceNgs2): implement sceNgs2VoiceGetMatrixInfo and sceNgs2CustomRackGetModuleInfo 2026-10-23 10:50:00 +06:00
Federico Marras ad5df50d6d Merge branch 'feat/ngs2-system-option-codes' into feat/ngs2-system-create-arguments
# Conflicts:
#	core/libs/prx/libSceNgs2.native/include/Ngs2Types.hpp
2026-10-23 05:25:39 +02:00
Federico Marras f51eafc9c4 fix(libSceNgs2.native): use main's option size and channel error constants 2026-10-23 05:25:18 +02:00
Federico Marras e03475e92f Merge remote-tracking branch 'upstream/main' into feat/ngs2-system-option-codes
# Conflicts:
#	core/libs/prx/libSceNgs2.native/src/System.cpp
2026-10-23 05:23:59 +02:00
Dean Galvin e51d8c57f0 Merge main into feat/ngs2-render-buffer-codes 2026-10-23 16:23:20 +13:00
Dean Galvin ae913751f0 Merge main into codex/ngs2-userfx-module-id 2026-10-23 15:53:12 +13:00
Dean a1d4803486 Merge pull request #9233 from EdouardSence/feat/ngs2-custom-gain
feat(libSceNgs2): process the custom Gain module
2026-10-23 15:32:08 +13:00
JAB-devandClaude Sonnet 5.5 32cff4e0b3 fix(libSceNgs2): return INVALID_VOICE_ACCESS for PLAY on a voice that was never set up, as the PS5 module does
The PS5 libSceNgs2.native module (firmware 3.20 and 4.03) fails a play event on a voice with no setup with 0x804A8351 on every rack I tried and leaves it idle, so the guard now covers every rack and returns that code.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-23 00:32:00 +02:00