From 2a0d4a7713b0b2af2cece59596854bab7e0c55e3 Mon Sep 17 00:00:00 2001 From: fincs Date: Mon, 29 Jul 2019 21:17:48 +0200 Subject: [PATCH] Add support for UserIdStorage & HosVersion homebrew ABI keys --- source/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/main.c b/source/main.c index 67c9776..7f5125c 100644 --- a/source/main.c +++ b/source/main.c @@ -21,6 +21,8 @@ static bool g_smCloseWorkaround = false; static u64 g_appletHeapSize = 0; static u64 g_appletHeapReservationSize = 0; +static u128 g_userIdStorage; + static u8 g_savedTls[0x100]; // Used by trampoline.s @@ -391,6 +393,8 @@ void loadNro(void) { EntryType_LastLoadResult, 0, {0, 0} }, { EntryType_SyscallAvailableHint, 0, {0xffffffffffffffff, 0x9fc1fff0007ffff} }, { EntryType_RandomSeed, 0, {0, 0} }, + { EntryType_UserIdStorage, 0, {(u64)(uintptr_t)&g_userIdStorage, 0} }, + { EntryType_HosVersion, 0, {0, 0} }, { EntryType_EndOfList, 0, {(u64)(uintptr_t)g_noticeText, sizeof(g_noticeText)} } }; @@ -418,6 +422,8 @@ void loadNro(void) // RandomSeed entries[8].Value[0] = randomGet64(); entries[8].Value[1] = randomGet64(); + // HosVersion + entries[10].Value[0] = hosversionGet(); u64 entrypoint = map_addr;