mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
[Memory] Implement APPMEMALLOC
This commit is contained in:
parent
db48d08c34
commit
0b2e22ca6d
2 changed files with 8 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
|||
namespace ConfigMem {
|
||||
enum : u32 {
|
||||
KernelVersionMinor = 0x1FF80002,
|
||||
KernelVersionMajor = 0x1FF80003
|
||||
KernelVersionMajor = 0x1FF80003,
|
||||
AppMemAlloc = 0x1FF80040
|
||||
};
|
||||
}
|
|
@ -84,7 +84,12 @@ u32 Memory::read32(u32 vaddr) {
|
|||
if (pointer != 0) [[likely]] {
|
||||
return *(u32*)(pointer + offset);
|
||||
} else {
|
||||
Helpers::panic("Unimplemented 32-bit read, addr: %08X", vaddr);
|
||||
switch (vaddr) {
|
||||
case ConfigMem::AppMemAlloc: return appResourceLimits.maxCommit;
|
||||
default:
|
||||
Helpers::panic("Unimplemented 32-bit read, addr: %08X", vaddr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue