Files
AnyPS5/docs/dev
ntamas94andClaude Opus 5.5 e2096fa49a feat(libSceAjm): run PS4 batch buffer jobs in the console's chunk layout
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]>
2026-10-25 18:10:24 +01:00
..