From f4aba71c1b1d9776b78969dabf3769e44cf0d3c1 Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Thu, 22 Jan 2026 15:27:55 +0100 Subject: [PATCH 1/5] add sysmem partition structs --- src/kernel/pspsysmem_kernel.h | 40 ++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/kernel/pspsysmem_kernel.h b/src/kernel/pspsysmem_kernel.h index 05349ae6bd..27d36a5b47 100644 --- a/src/kernel/pspsysmem_kernel.h +++ b/src/kernel/pspsysmem_kernel.h @@ -31,13 +31,13 @@ extern "C" { #endif -typedef struct _PspSysmemPartitionInfo +typedef struct _PspPspSysMemPartitionInfo { SceSize size; unsigned int startaddr; unsigned int memsize; unsigned int attr; -} PspSysmemPartitionInfo; +} PspPspSysMemPartitionInfo; typedef struct SceGameInfo { u32 size; // 0 @@ -78,28 +78,48 @@ struct _uidControlBlock { typedef struct _uidControlBlock SceUidControlBlock; typedef struct _uidControlBlock uidControlBlock; // for compat reasons -typedef struct PspPartitionData { +typedef struct { + u32 addr; + u32 size; +} SceSysmemPartInfo; + +typedef struct { + u32 memSize; + u32 unk4; + u32 unk8; + SceSysmemPartInfo other1; // 12 + SceSysmemPartInfo other2; // 20 + SceSysmemPartInfo vshell; // 28 + SceSysmemPartInfo scUser; // 36 + SceSysmemPartInfo meUser; // 44 + SceSysmemPartInfo extSc2Kernel; // 52 + SceSysmemPartInfo extScKernel; // 60 + SceSysmemPartInfo extMeKernel; // 68 + SceSysmemPartInfo extVshell; // 76 +} SceSysmemPartTable; + +typedef struct PspPspPartitionData { u32 unk[5]; u32 size; -} PspPartitionData; +} PspPspPartitionData; -typedef struct PspSysMemPartition { - struct PspSysMemPartition *next; +typedef struct PspPspSysMemPartition { + struct PspPspSysMemPartition *next; u32 address; u32 size; u32 attributes; - PspPartitionData *data; -} PspSysMemPartition; + PspPspPartitionData *data; +} PspPspSysMemPartition; /** * Query the parition information * * @param pid - The partition id - * @param info - Pointer to the ::PspSysmemPartitionInfo structure + * @param info - Pointer to the ::PspPspSysMemPartitionInfo structure * * @return 0 on success. */ -int sceKernelQueryMemoryPartitionInfo(int pid, PspSysmemPartitionInfo *info); +int sceKernelQueryMemoryPartitionInfo(int pid, PspPspSysMemPartitionInfo *info); /** * Get the total amount of free memory. From 06812b94f6c75ecb8ba199c11272b93a5a1915fc Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Thu, 22 Jan 2026 15:28:35 +0100 Subject: [PATCH 2/5] cleanup/fix --- src/kernel/pspsysmem_kernel.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kernel/pspsysmem_kernel.h b/src/kernel/pspsysmem_kernel.h index 27d36a5b47..b1ce9d538c 100644 --- a/src/kernel/pspsysmem_kernel.h +++ b/src/kernel/pspsysmem_kernel.h @@ -98,18 +98,18 @@ typedef struct { SceSysmemPartInfo extVshell; // 76 } SceSysmemPartTable; -typedef struct PspPspPartitionData { +typedef struct PspPartitionData { u32 unk[5]; u32 size; -} PspPspPartitionData; +} PspPartitionData; -typedef struct PspPspSysMemPartition { - struct PspPspSysMemPartition *next; +typedef struct PspSysMemPartition { + struct PspSysMemPartition *next; u32 address; u32 size; u32 attributes; - PspPspPartitionData *data; -} PspPspSysMemPartition; + PspPartitionData *data; +} PspSysMemPartition; /** * Query the parition information From 70f3b385e5b6210cd38276556f8d8cbe7a467688 Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Thu, 22 Jan 2026 15:29:48 +0100 Subject: [PATCH 3/5] fix --- src/kernel/pspsysmem_kernel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/pspsysmem_kernel.h b/src/kernel/pspsysmem_kernel.h index b1ce9d538c..b4cc9fab9d 100644 --- a/src/kernel/pspsysmem_kernel.h +++ b/src/kernel/pspsysmem_kernel.h @@ -31,13 +31,13 @@ extern "C" { #endif -typedef struct _PspPspSysMemPartitionInfo +typedef struct _PspSysMemPartitionInfo { SceSize size; unsigned int startaddr; unsigned int memsize; unsigned int attr; -} PspPspSysMemPartitionInfo; +} PspSysMemPartitionInfo; typedef struct SceGameInfo { u32 size; // 0 From 538528baa5f5ffd2115a51b3d2657e117319ea20 Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Thu, 22 Jan 2026 15:30:41 +0100 Subject: [PATCH 4/5] fix --- src/kernel/pspsysmem_kernel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/pspsysmem_kernel.h b/src/kernel/pspsysmem_kernel.h index b4cc9fab9d..fb7b9fd1fc 100644 --- a/src/kernel/pspsysmem_kernel.h +++ b/src/kernel/pspsysmem_kernel.h @@ -31,13 +31,13 @@ extern "C" { #endif -typedef struct _PspSysMemPartitionInfo +typedef struct _PspSysmemPartitionInfo { SceSize size; unsigned int startaddr; unsigned int memsize; unsigned int attr; -} PspSysMemPartitionInfo; +} PspSysmemPartitionInfo; typedef struct SceGameInfo { u32 size; // 0 From 7c0fa55efdbe14bb1ff4cd97d8d905e356aa43e8 Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Thu, 22 Jan 2026 15:31:13 +0100 Subject: [PATCH 5/5] fix --- src/kernel/pspsysmem_kernel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/pspsysmem_kernel.h b/src/kernel/pspsysmem_kernel.h index fb7b9fd1fc..beed1918f1 100644 --- a/src/kernel/pspsysmem_kernel.h +++ b/src/kernel/pspsysmem_kernel.h @@ -115,11 +115,11 @@ typedef struct PspSysMemPartition { * Query the parition information * * @param pid - The partition id - * @param info - Pointer to the ::PspPspSysMemPartitionInfo structure + * @param info - Pointer to the ::PspSysmemPartitionInfo structure * * @return 0 on success. */ -int sceKernelQueryMemoryPartitionInfo(int pid, PspPspSysMemPartitionInfo *info); +int sceKernelQueryMemoryPartitionInfo(int pid, PspSysmemPartitionInfo *info); /** * Get the total amount of free memory.