add quick luma detection getinfo

This commit is contained in:
TuxSH 2020-04-28 10:42:30 +01:00
parent 5924f60d06
commit c7a3a0278c
2 changed files with 22 additions and 8 deletions

View File

@ -83,6 +83,7 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
break; break;
default: default:
*out = 0;
res = 0xF8C007F4; // not implemented res = 0xF8C007F4; // not implemented
break; break;
} }
@ -105,13 +106,16 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
*out = L2C_CTRL & 1; *out = L2C_CTRL & 1;
break; break;
default: default:
*out = 0;
res = 0xF8C007F4; res = 0xF8C007F4;
break; break;
} }
} }
else else
{
*out = 0;
res = 0xF8C007F4; res = 0xF8C007F4;
}
break; break;
} }
@ -128,7 +132,10 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
if((u32)param <= getNumberOfCores()) if((u32)param <= getNumberOfCores())
*out = L1MMUTableAddrs[param - 1]; *out = L1MMUTableAddrs[param - 1];
else else
{
*out = 0;
res = 0xF8C007F4; res = 0xF8C007F4;
}
break; break;
} }
@ -136,6 +143,13 @@ Result GetSystemInfoHook(s64 *out, s32 type, s32 param)
break; break;
} }
case 0x20000:
{
*out = 0;
return 1;
}
default: default:
GetSystemInfo(out, type, param); GetSystemInfo(out, type, param);
break; break;

View File

@ -29,18 +29,18 @@ static inline void loadCFWInfo(void)
{ {
s64 out; s64 out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 3)); if(svcGetSystemInfo(&out, 0x20000, 0) != 1) panic(0xDEADCAFE);
svcGetSystemInfo(&out, 0x10000, 3);
config = (u32)out; config = (u32)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 4)); svcGetSystemInfo(&out, 0x10000, 4);
multiConfig = (u32)out; multiConfig = (u32)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 5)); svcGetSystemInfo(&out, 0x10000, 5);
bootConfig = (u32)out; bootConfig = (u32)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 0x201)); svcGetSystemInfo(&out, 0x10000, 0x201);
isN3DS = (bool)out; isN3DS = (bool)out;
//assertSuccess(svcGetSystemInfo(&out, 0x10000, 0x202)); svcGetSystemInfo(&out, 0x10000, 0x203);
//needToInitSd = (bool)out;
assertSuccess(svcGetSystemInfo(&out, 0x10000, 0x203));
isSdMode = (bool)out; isSdMode = (bool)out;
} }