mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 15:00:30 +02:00
Map the PSP-2000 extra RAM for homebrew PBPs, outside the user partition
Homebrew written for a PSP-2000+ under custom firmware can use the top 32MB of RAM directly without setting MEMSIZE, which leaves the user partition at its normal size. NJEMU's slim builds do this (#8925). Previously we didn't map that memory at all for PBPs; MEMSIZE=1 isn't a workaround either, since it grows the partition and the heap and stacks land where the program writes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c9a631c336
commit
3062ffd695
5 files changed
+29
-3
No files matched your search
@@ -321,7 +321,7 @@ void __KernelMemoryInit()
|
||||
{
|
||||
MemBlockInfoInit();
|
||||
kernelMemory.Init(PSP_GetKernelMemoryBase(), PSP_GetKernelMemoryEnd() - PSP_GetKernelMemoryBase(), false);
|
||||
userMemory.Init(PSP_GetUserMemoryBase(), PSP_GetUserMemoryEnd() - PSP_GetUserMemoryBase(), false);
|
||||
userMemory.Init(PSP_GetUserMemoryBase(), PSP_GetUserPartitionEnd() - PSP_GetUserMemoryBase(), false);
|
||||
volatileMemory.Init(PSP_GetVolatileMemoryStart(), PSP_GetVolatileMemoryEnd() - PSP_GetVolatileMemoryStart(), false);
|
||||
|
||||
Memory::Memset(PSP_GetKernelMemoryBase(), 0, PSP_GetKernelMemoryEnd() - PSP_GetKernelMemoryBase());
|
||||
@@ -1712,7 +1712,8 @@ static u32 SysMemUserForUser_D8DE5C1E() {
|
||||
// Real name per uofw's src/kd/sysmem/exports.exp: sceKernelTotalMemSize - the total size (not
|
||||
// free size, see sceKernelMaxFreeMemSize above) of the user memory partition.
|
||||
static u32 sceKernelTotalMemSize() {
|
||||
return hleLogDebug(Log::sceKernel, PSP_GetUserMemoryEnd() - PSP_GetUserMemoryBase());
|
||||
// The partition's own range, which survives savestates (see PSP_GetUserPartitionEnd).
|
||||
return hleLogDebug(Log::sceKernel, userMemory.GetRangeSize());
|
||||
}
|
||||
|
||||
static u32 SysMemUserForUser_945E45DA() {
|
||||
|
||||
Reference in new issue
Block a user