diff --git a/Core/HLE/sceKernelHeap.cpp b/Core/HLE/sceKernelHeap.cpp index 1fc08f1a57..a7385d537c 100644 --- a/Core/HLE/sceKernelHeap.cpp +++ b/Core/HLE/sceKernelHeap.cpp @@ -83,13 +83,29 @@ static int sceKernelDeleteHeap(int heapId) { } } +static u32 sceKernelPartitionTotalFreeMemSize(int partitionId) { + ERROR_LOG(SCEKERNEL, "UNIMP sceKernelPartitionTotalFreeMemSize(%d)", partitionId); + //Need more work #13021 + ///We ignore partitionId for now + return userMemory.GetTotalFreeBytes(); +} + +static u32 sceKernelPartitionMaxFreeMemSize(int partitionId) { + ERROR_LOG(SCEKERNEL, "UNIMP sceKernelPartitionMaxFreeMemSize(%d)", partitionId); + //Need more work #13021 + ///We ignore partitionId for now + return userMemory.GetLargestFreeBlockSize(); +} + const HLEFunction SysMemForKernel[] = { - { 0X636C953B, &WrapI_II, "sceKernelAllocHeapMemory", 'x', "ii" }, - { 0XC9805775, &WrapI_I, "sceKernelDeleteHeap", 'i', "i" }, - { 0X1C1FBFE7, &WrapI_IIIC, "sceKernelCreateHeap", 'i', "iixs" }, - { 0X237DBD4F, &WrapI_ICIUU, "sceKernelAllocPartitionMemory", 'i', "isixx",HLE_KERNEL_SYSCALL }, - { 0XB6D61D02, &WrapI_I, "sceKernelFreePartitionMemory", 'i', "i",HLE_KERNEL_SYSCALL }, - { 0X9D9A5BA1, &WrapU_I, "sceKernelGetBlockHeadAddr", 'x', "i",HLE_KERNEL_SYSCALL }, + { 0X636C953B, &WrapI_II, "sceKernelAllocHeapMemory", 'x', "ii", HLE_KERNEL_SYSCALL }, + { 0XC9805775, &WrapI_I, "sceKernelDeleteHeap", 'i', "i" , HLE_KERNEL_SYSCALL }, + { 0X1C1FBFE7, &WrapI_IIIC, "sceKernelCreateHeap", 'i', "iixs", HLE_KERNEL_SYSCALL }, + { 0X237DBD4F, &WrapI_ICIUU, "sceKernelAllocPartitionMemory", 'i', "isixx", HLE_KERNEL_SYSCALL }, + { 0XB6D61D02, &WrapI_I, "sceKernelFreePartitionMemory", 'i', "i", HLE_KERNEL_SYSCALL }, + { 0X9D9A5BA1, &WrapU_I, "sceKernelGetBlockHeadAddr", 'x', "i", HLE_KERNEL_SYSCALL }, + { 0x9697CD32, &WrapU_I, "sceKernelPartitionTotalFreeMemSize", 'x', "i",HLE_KERNEL_SYSCALL }, + { 0xE6581468, &WrapU_I, "sceKernelPartitionMaxFreeMemSize", 'x', "i",HLE_KERNEL_SYSCALL }, }; void Register_SysMemForKernel() {