diff --git a/Core/HLE/sceKernelHeap.cpp b/Core/HLE/sceKernelHeap.cpp index 7b99eca184..1fc08f1a57 100644 --- a/Core/HLE/sceKernelHeap.cpp +++ b/Core/HLE/sceKernelHeap.cpp @@ -87,6 +87,9 @@ 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 }, }; void Register_SysMemForKernel() { diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index 40cccaa03d..41ccd6d82a 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -969,7 +969,7 @@ static u32 sceKernelTotalFreeMemSize() return retVal; } -static int sceKernelAllocPartitionMemory(int partition, const char *name, int type, u32 size, u32 addr) +int sceKernelAllocPartitionMemory(int partition, const char *name, int type, u32 size, u32 addr) { if (name == NULL) { @@ -1019,14 +1019,14 @@ static int sceKernelAllocPartitionMemory(int partition, const char *name, int ty return uid; } -static int sceKernelFreePartitionMemory(SceUID id) +int sceKernelFreePartitionMemory(SceUID id) { DEBUG_LOG(SCEKERNEL,"sceKernelFreePartitionMemory(%d)",id); return kernelObjects.Destroy(id); } -static u32 sceKernelGetBlockHeadAddr(SceUID id) +u32 sceKernelGetBlockHeadAddr(SceUID id) { u32 error; PartitionMemoryBlock *block = kernelObjects.Get(id, error); diff --git a/Core/HLE/sceKernelMemory.h b/Core/HLE/sceKernelMemory.h index dce6df77e0..29d7356d00 100644 --- a/Core/HLE/sceKernelMemory.h +++ b/Core/HLE/sceKernelMemory.h @@ -67,3 +67,7 @@ int sceKernelFreeTlspl(SceUID uid); int sceKernelReferTlsplStatus(SceUID uid, u32 infoPtr); void Register_SysMemUserForUser(); + +int sceKernelAllocPartitionMemory(int partition, const char *name, int type, u32 size, u32 addr); +int sceKernelFreePartitionMemory(SceUID id); +u32 sceKernelGetBlockHeadAddr(SceUID id); diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 431870fc45..bc8f91acec 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -2546,6 +2546,7 @@ const HLEFunction ModuleMgrForKernel[] = {0xA1A78C58, &WrapU_CUU, "sceKernelLoadModuleForLoadExecVSHDisc", 'x', "sxx", HLE_KERNEL_SYSCALL }, //fix for tiger x dragon {0x748CBED9, &WrapU_UU, "sceKernelQueryModuleInfo", 'x', "xx", HLE_KERNEL_SYSCALL }, {0x644395E2, &WrapU_UUU, "sceKernelGetModuleIdList", 'x', "xxx", HLE_KERNEL_SYSCALL }, + {0X2E0911AA, &WrapU_U, "sceKernelUnloadModule", 'x', "x" , HLE_KERNEL_SYSCALL }, }; void Register_ModuleMgrForUser()