Repository navigation
feat(libSceAudioPropagation): implement the no-acoustic-propagation path with recovered signatures - #482
Conversation
…ath with recovered signatures The 22 exports used by PPSA21567 take the call shapes recovered from its call sites (boykopovar#481): destroys take the system and the object, attribute setters take a count, SourceCreate takes only an output handle, UnregisterMaterial only the material. The system lives in the title's CPU memory (16-byte header, no GPU memory) and its handle is that address; rooms, portals, sources and materials are counter handles. Attributes are validated and have no effect; no rays are requested and sources report no audio paths. Non-empty ray results, path calculation and audio paths throw, SourceRender stays unimplemented, and invalid input throws because no error code is known. Objects left when their system is destroyed become unusable; their later destroy or unregister is a no-op. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for writing these up. I recovered the same API from PPSA21564 (the other region of the title you used, PPSA21567) for my integration branch, reading the argument setup at each call site. I also find 27 call sites for the 22 imports, and my call shapes match yours for 20 of the 22. The two where #481 and my branch disagreed are below. Addresses are PPSA21564 eboot vaddrs (text at vaddr 0, file offset +0x4000). SystemUnregisterMaterial:
SourceRender: The RenderInfo layout matches yours. A few details: +0x18 is the source's output buffer, +0x20 is #482 leaves SourceRender throwing, and in PPSA21564 that is reached as soon as a propagated source plays. Reading the code, the call sits in the audio engine's per-voice callback (a std::function that asserts My branch implements SourceRender with no propagation: for each of the |
Progress report (ccd60ce → ac66e70)📈 System libraries: 77.94% (+0.66%, +21 implemented functions) ✅ 21 implemented
|
|
Thanks for cross-checking this against PPSA21564. Both points match PPSA21567. On SourceRender in this PR and your follow-up offer, I'll come back to you shortly. |
|
Yes please, a follow-up on top of #482 for SourceRender would be great. Thanks again for catching the third argument. Your no-propagation version fits this PR's model (silence, with the descriptor and ownership checked), and it has been tested on PPSA21564, so it's better than leaving the export throwing. |
Conflicts resolved: - libSceAudioPropagation/Export.cpp: upstream's boykopovar#482 + boykopovar#489 version taken; it is the same no-propagation model as astrobot's stand-in, with SourceRender and the handle-only UnregisterMaterial already in it. - State.cpp (boykopovar#453): astrobot's resident depth model kept; it already skips the tests of an absent plane (boykopovar#453's test is on astrobot since e087a4f). - Graphics.cpp, State.hpp, ShaderResources.cpp: astrobot's DepthTarget model kept (exportIndex, no DepthSurface.hpp), upstream's ThreadOwned include added. - BdaResources.cpp: astrobot's form with boykopovar#390's message. - VulkanDevice.cpp, Context.hpp, PacketExecution.cpp: both sides kept (calibrated timestamps, host query reset, GDS, memory budget; pipeline stats). - Spirv: astrobot's split-wave rules first, then boykopovar#608's wave-mask ballot and boykopovar#587's host subgroup lane; astrobot's function LDS sizing and boykopovar#573's LDS lock both kept; conditionalDepth kept in the atomic update loops; upstream's buffer atomics (boykopovar#321 boykopovar#332 boykopovar#594) and 64-bit LDS atomics taken. - TechnicalDebt.md: both sides, duplicate lines dropped. Build fixes folded in: the upstream boykopovar#453 test block duplicated next to astrobot's adapted copy removed; a lost closing brace after the host query reset block restored; lookupLog() is a function since boykopovar#590; the duplicate MUTEX_TYPE_ADAPTIVE constant (astrobot's 93b2d0e equals boykopovar#156) removed; the ops boykopovar#596 drops removed from the masked-select list and the BDA test message updated (the gate-batch-2 integ commits 559e4fab6 and 2ec968fb5).
What
Implements
libSceAudioPropagationas an explicit no-acoustic-propagation path, using the call shapes recovered from PPSA21567 (Astro Bot) in #481. Every export either has defined behaviour or throws.Signature corrections to the assumed declarations:
(Handle object)(Handle system, Handle object)(Handle, const void*)(Handle, const Attribute*, u32 count)(Handle, const void* params, Handle* out)(Handle system, Handle* out)(Handle system, u32 id)(Handle material)(Handle, u32, void*)(Handle source, u32 index, Handle* out)(out type assumed)(Handle, const void*)(Handle source, const Ray*, u32 rayCount, u32, void* paths, u32 pathCount)(Handle source, const void*, void*)(Handle system, const RenderInfo*)The other 15 match the existing declarations. Struct descriptor ids and sizes (
{u32 id; size_t size}at +0, written by the title) are checked on entry:SystemMemory0x010107d4/0x30,Material0x010107d1/0x40,PortalParams0x010107d8/0x60.Attributeis 0x20 bytes.Model:
SystemQueryMemoryreports 16 bytes of CPU memory and no GPU memory.SystemCreatekeeps a header in that title-owned memory, and the system handle is its address. The title frees the memory only afterSystemDestroy.GetRaysreports 0) and sources report 0 audio paths. Non-empty ray results, path calculation and audio paths throw, andSourceGetAudioPathreports any index as out of range. A direct path is not reported, because the 0xe0-byte path record layout is unknown.SourceRenderstays unimplemented.eax != 0), so invalid input throwsstd::invalid_argument.SystemDestroy, so the order is not proven for every object.Documented in TechnicalDebt (a silent-stub entry like libSceHmd's, plus the unknowns). Signatures come from the title's own calls, cross-checked as facts against KytyPS5 and sharpemu (no code taken). Repositories that appear to contain decompiled system libraries were not used.
Tested
ctest146/146 onmain+ this branch, including the newguest_audio_propagationtest (lifecycle, descriptor and attribute validation, handle kinds, orphaned destroys, throwing paths).mainwith feat(libSceAgcDriver): back the global data share with driver-owned guest memory #285, feat(agc): host import windows, least-recent eviction under the budget #290 and local changes (not cleanmain): the title previously stopped atsceAudioPropagationSystemQueryMemory not implemented. With this PR, its AudioPropagation calls pass without a throw and it runs on to an unrelated libSceFont export. Audio output was not checked (the runs were on a virtual display).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryRefs #481 (recovered signatures and how they were obtained).
🤖 Generated with Claude Code