From 0e834ec00404d0c4e2b5ae756bfb4a561877c5e8 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sun, 19 Apr 2020 18:22:09 +0100 Subject: [PATCH] hbloader: allow launching 3dsx apps on < 8.x where Rosalina is supported (4.x+) Fix kernel caps --- sysmodules/rosalina/source/hbloader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sysmodules/rosalina/source/hbloader.c b/sysmodules/rosalina/source/hbloader.c index 2d23e54..f4c70be 100644 --- a/sysmodules/rosalina/source/hbloader.c +++ b/sysmodules/rosalina/source/hbloader.c @@ -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 {