summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-02-21 21:37:59 +0100
committerbunnei <bunneidev@gmail.com>2022-02-21 22:07:19 +0100
commit71f62a346d8987302624873b75d1c64903341aa3 (patch)
treed01deaa232fd591b436368db0dab3e8457b3be2d /src/core/hle/kernel
parentcore: device_memory: Use memory size reported by KSystemControl. (diff)
downloadyuzu-71f62a346d8987302624873b75d1c64903341aa3.tar
yuzu-71f62a346d8987302624873b75d1c64903341aa3.tar.gz
yuzu-71f62a346d8987302624873b75d1c64903341aa3.tar.bz2
yuzu-71f62a346d8987302624873b75d1c64903341aa3.tar.lz
yuzu-71f62a346d8987302624873b75d1c64903341aa3.tar.xz
yuzu-71f62a346d8987302624873b75d1c64903341aa3.tar.zst
yuzu-71f62a346d8987302624873b75d1c64903341aa3.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
index 6f335c251..702cacffc 100644
--- a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
+++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
@@ -5,6 +5,7 @@
#include <random>
#include "common/literals.h"
+#include "common/settings.h"
#include "core/hle/kernel/board/nintendo/nx/k_system_control.h"
#include "core/hle/kernel/board/nintendo/nx/secure_monitor.h"
@@ -28,30 +29,13 @@ namespace {
using namespace Common::Literals;
-u32 GetMemoryModeForInit() {
- return 0x01;
-}
-
u32 GetMemorySizeForInit() {
- return 0;
+ return Settings::values.use_extended_memory_layout ? Smc::MemorySize_6GB : Smc::MemorySize_4GB;
}
Smc::MemoryArrangement GetMemoryArrangeForInit() {
- switch (GetMemoryModeForInit() & 0x3F) {
- case 0x01:
- default:
- return Smc::MemoryArrangement_4GB;
- case 0x02:
- return Smc::MemoryArrangement_4GBForAppletDev;
- case 0x03:
- return Smc::MemoryArrangement_4GBForSystemDev;
- case 0x11:
- return Smc::MemoryArrangement_6GB;
- case 0x12:
- return Smc::MemoryArrangement_6GBForAppletDev;
- case 0x21:
- return Smc::MemoryArrangement_8GB;
- }
+ return Settings::values.use_extended_memory_layout ? Smc::MemoryArrangement_6GB
+ : Smc::MemoryArrangement_4GB;
}
} // namespace