[APT/CFG/Kernel] Smash Bros stuff

This commit is contained in:
wheremyfoodat 2023-03-21 22:34:29 +02:00
parent 327b071efd
commit 1078253f6c
5 changed files with 32 additions and 9 deletions

View file

@ -194,6 +194,13 @@ void Kernel::getProcessInfo() {
}
switch (type) {
// According to 3DBrew: Amount of private (code, data, heap) memory used by the process + total supervisor-mode
// stack size + page-rounded size of the external handle table
case 2:
regs[1] = mem.getUsedUserMem();
regs[2] = 0;
break;
case 20: // Returns 0x20000000 - <linear memory base vaddr for process>
regs[1] = PhysicalAddrs::FCRAM - mem.getLinearHeapVaddr();
regs[2] = 0;