Add ConfigMem FIRM stuff and GetSystemInfo modes for DDLC

This commit is contained in:
wheremyfoodat 2023-08-11 16:37:51 +03:00
parent 2bb751110b
commit e2b82997ba
4 changed files with 45 additions and 0 deletions

View file

@ -258,6 +258,7 @@ void Kernel::duplicateHandle() {
namespace SystemInfoType {
enum : u32 {
MemoryInformation = 0,
// Gets information related to Citra (We don't implement this, we just report this emulator is not Citra)
CitraInformation = 0x20000,
// Gets information related to this emulator
@ -294,6 +295,22 @@ void Kernel::getSystemInfo() {
regs[0] = Result::Success;
switch (infoType) {
case SystemInfoType::MemoryInformation: {
switch (subtype) {
// Total used memory size in the APPLICATION memory region
case 1:
regs[1] = mem.getUsedUserMem();
regs[2] = 0;
break;
default:
Helpers::panic("GetSystemInfo: Unknown MemoryInformation subtype %x\n", subtype);
regs[0] = Result::FailurePlaceholder;
break;
}
break;
}
case SystemInfoType::CitraInformation: {
switch (subtype) {
case CitraInfoType::IsCitra: