hbloader: allow launching 3dsx apps on < 8.x where Rosalina is supported (4.x+)

Fix kernel caps
This commit is contained in:
TuxSH 2020-04-19 18:22:09 +01:00
parent 26454dc832
commit 0e834ec004

View File

@ -111,7 +111,7 @@ static const u64 dependencyList[] =
static const u32 kernelCaps[] =
{
0xFC00022C, // Kernel release version: 8.0 (necessary for using the new linear mapping)
0xFC00022C, // Kernel release version 8.0 is necessary for using the new linear mapping. Modified below.
0xFF81FF50, // RW static mapping: 0x1FF50000
0xFF81FF58, // RW static mapping: 0x1FF58000
0xFF81FF70, // RW static mapping: 0x1FF70000
@ -295,6 +295,9 @@ void HBLDR_HandleCommands(void *ctx)
memset(kcaps0->descriptors, 0xFF, sizeof(kcaps0->descriptors));
memcpy(kcaps0->descriptors, kernelCaps, sizeof(kernelCaps));
// Set kernel release version to the current kernel version
kcaps0->descriptors[0] = 0xFC000000 | (osGetKernelVersion() >> 16);
u64 lastdep = sizeof(dependencyList)/8;
if (osGetFirmVersion() >= SYSTEM_VERSION(2,50,0)) // 9.6+ FIRM
{