From 2dd9933621fc87e618353e79ba4548d3b2d3c342 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sun, 13 Aug 2023 18:18:12 +0300 Subject: [PATCH] Print console region when loading NCSD --- src/core/loader/ncsd.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/loader/ncsd.cpp b/src/core/loader/ncsd.cpp index 99930e5d..8e8a5839 100644 --- a/src/core/loader/ncsd.cpp +++ b/src/core/loader/ncsd.cpp @@ -11,8 +11,11 @@ bool Memory::mapCXI(NCSD& ncsd, NCCH& cxi) { printf("Data address = %08X, size = %08X\n", cxi.data.address, cxi.data.size); printf("Stack size: %08X\n", cxi.stackSize); + static constexpr std::array regionNames = {"Japan", "North America", "Europe", "Australia", "China", "Korea", "Taiwan" }; + // Set autodetected 3DS region to one of the values allowed by the CXI's SMDH region = cxi.region.value(); + printf("Console region autodetected to: %s\n", regionNames[static_cast(region)]); if (!isAligned(cxi.stackSize)) { Helpers::warn("CXI has a suspicious stack size of %08X which is not a multiple of 4KB", cxi.stackSize);