mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-30 12:25:49 +00:00
The twelve AMM kernel writers record into a caller buffer the command their libSceAmpr command buffer sibling appends, built with the shared encoder: sceKernelWriteMapCommand, sceKernelWriteMapWithGpuMaskIdCommand, sceKernelWriteMapDirectCommand, sceKernelWriteMapDirectWithGpuMaskIdCommand, sceKernelWriteUnmapCommand, sceKernelWriteRemapCommand, sceKernelWriteRemapWithGpuMaskIdCommand, sceKernelWriteMultiMapCommand, sceKernelWriteMultiMapWithGpuMaskIdCommand, sceKernelWriteModifyProtectCommand, sceKernelWriteModifyProtectWithGpuMaskIdCommand and sceKernelWriteModifyMtypeProtectWithGpuMaskIdCommand. The signatures follow ampr_emu's libkernel hook targets: the sibling's arguments as 64-bit values between the destination and the size output. A null destination only reports the size and a null size output only writes, as for sceKernelWriteModifyMtypeProtectCommand. Invalid ranges, offsets and protections return the sibling's SCE_KERNEL_ERROR_EINVAL and write nothing; protection or mask bits above 32 are rejected too. guest_kernel_sys compares each writer with its sibling on valid and invalid arguments, in both modes.