feat(ngs2): implement the firmware-recovered utility exports #12599
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12599"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by edubox on 2026-10-28T22:25:26Z.
What
Implement four
libSceNgs2exports from the decrypted firmware 11.00 module:sceNgs2SystemEnumHandlesandsceNgs2SystemEnumRackHandlesreturn the number of live systems or racks and fill up to the requested count. A null output with a nonzero count returns0x804A0053; an unknown system returns0x804A0230.sceNgs2ParseWaveformUserreads offset 0 through the caller's read handler, takes the RIFF size from the header and parses the bytes with the existing waveform parser. A null handler returns0x804A0408and a null output0x804A0053.sceNgs2FftQuerySizefollows the firmware table: lengths 8..12 select 64, 128, 256, 512 and 1024 samples, bit 1 of the flags halves the count, and the work size is32 * count + 64. Invalid lengths and a null output return-1.Evidence: in the firmware 11.00
libSceNgs2.prx, the enumerators are at0xf270/0xf0d0,sceNgs2ParseWaveformUserat0x10810, andsceNgs2FftQuerySizeat0x430with its five-entry table at0x30b30. The implementations live inSystem.cppbecause that source is built into both the native test library and the guest library without changing the source list. The RIFF size is capped at 256 MiB so a malformed header cannot request an unbounded allocation.sceNgs2FftInitandsceNgs2FftProcessstill throw: their 7.3 KB AVX radix-8 kernel and packed input/output layout are not recovered, and no dump imports these NIDs. The debt entry records what is known.Tested
Linux x86-64 (CachyOS), GCC 16.2.1, Release:
ctest --test-dir build -R '^ngs2_'passes 30/30, including the newngs2_parseandngs2_handleerrorschecks.check_conventions.py --base origin/mainandgit diff --checkare clean. Windows CI will run on the new head.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