mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
PS4 titles build AJM batches with the SDK's inline helpers, which call sceAjmBatchJobControlBufferRa, sceAjmBatchJobRunBufferRa and sceAjmBatchJobRunSplitBufferRa and start the buffer with sceAjmBatchStartBuffer. The buffer belongs to the title, so it has to use the console's chunk layout rather than this library's private records. The builders write console jobs (job, return address, buffer and flags chunks) and return the position after them. StartBuffer checks the context, walks the chunks, skips inline data and runs each job as the library's existing control, run or statistics job. Chunk headers are read as the console's builders write them: bits 0-3 the kind, bit 4 a buffer's output direction, bits 6-25 the payload; the other bits keep a reused buffer's old bytes on a PS4. Malformed batches return MALFORMED_BATCH, unknown chunk kinds and unimplemented control flags throw. An ATRAC9 run with RUN_MULTIPLE_FRAMES reports which side ran out as a PS4 does (0x8 input, 0x10 room, 0x18 both), and the ATRAC9 format reports the frame's bitrate; both were measured on a PS4 with Knowledge is Power: Decades (Wwise) batch dumps and probe runs. The vibration test's exact-fit run expects 0x18 accordingly. The throwing stubs in libSceAjm and the libSceAjmi copy of sceAjmBatchJobRunBufferRa are dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]>