2019-03-29 18:23:52 +01:00
|
|
|
#include <3ds.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "luma.h"
|
|
|
|
|
#include "util.h"
|
|
|
|
|
|
2023-01-24 22:05:57 +00:00
|
|
|
u32 config, multiConfig, bootConfig;
|
|
|
|
|
|
|
|
|
|
void readLumaConfig(void)
|
|
|
|
|
{
|
|
|
|
|
s64 out = 0;
|
|
|
|
|
bool isLumaWithKext = svcGetSystemInfo(&out, 0x20000, 0) == 1;
|
|
|
|
|
if (isLumaWithKext)
|
|
|
|
|
{
|
|
|
|
|
svcGetSystemInfo(&out, 0x10000, 3);
|
|
|
|
|
config = (u32)out;
|
|
|
|
|
svcGetSystemInfo(&out, 0x10000, 4);
|
|
|
|
|
multiConfig = (u32)out;
|
|
|
|
|
svcGetSystemInfo(&out, 0x10000, 5);
|
|
|
|
|
bootConfig = (u32)out;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-18 01:15:44 +01:00
|
|
|
bool hasKExt(void)
|
|
|
|
|
{
|
|
|
|
|
s64 val;
|
|
|
|
|
return svcGetSystemInfo(&val, 0x20000, 0) == 1;
|
|
|
|
|
}
|
|
|
|
|
|
2019-03-29 18:23:52 +01:00
|
|
|
u32 getKExtSize(void)
|
|
|
|
|
{
|
|
|
|
|
s64 val;
|
2020-05-18 01:15:44 +01:00
|
|
|
svcGetSystemInfo(&val, 0x10000, 0x300);
|
|
|
|
|
return (u32)val;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u32 getStolenSystemMemRegionSize(void)
|
|
|
|
|
{
|
|
|
|
|
s64 val;
|
|
|
|
|
svcGetSystemInfo(&val, 0x10000, 0x301);
|
|
|
|
|
return (u32)val;
|
2019-03-29 18:23:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool isTitleLaunchPrevented(u64 titleId)
|
|
|
|
|
{
|
|
|
|
|
s64 numKips = 0;
|
|
|
|
|
|
|
|
|
|
svcGetSystemInfo(&numKips, 26, 0);
|
2020-05-02 18:08:24 +01:00
|
|
|
return numKips >= 6 && (titleId & ~(N3DS_TID_MASK | 1)) == 0x0004003000008A02ULL; // ErrDisp
|
|
|
|
|
}
|