diff options
| author | 2022-02-21 12:37:59 -0800 | |
|---|---|---|
| committer | 2022-02-21 13:07:19 -0800 | |
| commit | 71f62a346d8987302624873b75d1c64903341aa3 (patch) | |
| tree | d01deaa232fd591b436368db0dab3e8457b3be2d | |
| parent | core: device_memory: Use memory size reported by KSystemControl. (diff) | |
| download | yuzu-71f62a346d8987302624873b75d1c64903341aa3.tar.gz yuzu-71f62a346d8987302624873b75d1c64903341aa3.tar.xz yuzu-71f62a346d8987302624873b75d1c64903341aa3.zip | |
hle: kernel: KSystemControl: Use 6GB memory layout when "use_extended_memory_layout" setting is enabled.
- This uses a larger 6GB DRAM memory layout, which is useful for some mods that require more memory.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp | 24 |
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 @@ | |||
| 5 | #include <random> | 5 | #include <random> |
| 6 | 6 | ||
| 7 | #include "common/literals.h" | 7 | #include "common/literals.h" |
| 8 | #include "common/settings.h" | ||
| 8 | 9 | ||
| 9 | #include "core/hle/kernel/board/nintendo/nx/k_system_control.h" | 10 | #include "core/hle/kernel/board/nintendo/nx/k_system_control.h" |
| 10 | #include "core/hle/kernel/board/nintendo/nx/secure_monitor.h" | 11 | #include "core/hle/kernel/board/nintendo/nx/secure_monitor.h" |
| @@ -28,30 +29,13 @@ namespace { | |||
| 28 | 29 | ||
| 29 | using namespace Common::Literals; | 30 | using namespace Common::Literals; |
| 30 | 31 | ||
| 31 | u32 GetMemoryModeForInit() { | ||
| 32 | return 0x01; | ||
| 33 | } | ||
| 34 | |||
| 35 | u32 GetMemorySizeForInit() { | 32 | u32 GetMemorySizeForInit() { |
| 36 | return 0; | 33 | return Settings::values.use_extended_memory_layout ? Smc::MemorySize_6GB : Smc::MemorySize_4GB; |
| 37 | } | 34 | } |
| 38 | 35 | ||
| 39 | Smc::MemoryArrangement GetMemoryArrangeForInit() { | 36 | Smc::MemoryArrangement GetMemoryArrangeForInit() { |
| 40 | switch (GetMemoryModeForInit() & 0x3F) { | 37 | return Settings::values.use_extended_memory_layout ? Smc::MemoryArrangement_6GB |
| 41 | case 0x01: | 38 | : Smc::MemoryArrangement_4GB; |
| 42 | default: | ||
| 43 | return Smc::MemoryArrangement_4GB; | ||
| 44 | case 0x02: | ||
| 45 | return Smc::MemoryArrangement_4GBForAppletDev; | ||
| 46 | case 0x03: | ||
| 47 | return Smc::MemoryArrangement_4GBForSystemDev; | ||
| 48 | case 0x11: | ||
| 49 | return Smc::MemoryArrangement_6GB; | ||
| 50 | case 0x12: | ||
| 51 | return Smc::MemoryArrangement_6GBForAppletDev; | ||
| 52 | case 0x21: | ||
| 53 | return Smc::MemoryArrangement_8GB; | ||
| 54 | } | ||
| 55 | } | 39 | } |
| 56 | } // namespace | 40 | } // namespace |
| 57 | 41 | ||