feat: Add 10GB, 12GB, 14GB, and 16GB DRAM configuration options

- Extended MemoryLayout enum with new memory size options
- Added corresponding SMC memory size and arrangement constants
- Updated system control functions to handle new memory configurations
- Added appropriate application pool sizes for higher memory modes
- Updated UI translations to display new DRAM options as "Unsafe"
- Increased maximum memory layout setting from 8GB to 16GB

This allows users to configure higher memory amounts for games and
texture mods that require more than the standard 4-8GB configurations.
All new options are marked as "Unsafe" in the UI to indicate they
are experimental features beyond Nintendo's official specifications.

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-05-24 17:10:19 +10:00
parent f3c8a1bfcd
commit fdf1bfc06a
5 changed files with 56 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <random>
@@ -48,6 +49,14 @@ u32 GetMemorySizeForInit() {
return Smc::MemorySize_6GB;
case Settings::MemoryLayout::Memory_8Gb:
return Smc::MemorySize_8GB;
case Settings::MemoryLayout::Memory_10Gb:
return Smc::MemorySize_10GB;
case Settings::MemoryLayout::Memory_12Gb:
return Smc::MemorySize_12GB;
case Settings::MemoryLayout::Memory_14Gb:
return Smc::MemorySize_14GB;
case Settings::MemoryLayout::Memory_16Gb:
return Smc::MemorySize_16GB;
}
return Smc::MemorySize_4GB;
}
@@ -60,6 +69,14 @@ Smc::MemoryArrangement GetMemoryArrangeForInit() {
return Smc::MemoryArrangement_6GB;
case Settings::MemoryLayout::Memory_8Gb:
return Smc::MemoryArrangement_8GB;
case Settings::MemoryLayout::Memory_10Gb:
return Smc::MemoryArrangement_10GB;
case Settings::MemoryLayout::Memory_12Gb:
return Smc::MemoryArrangement_12GB;
case Settings::MemoryLayout::Memory_14Gb:
return Smc::MemoryArrangement_14GB;
case Settings::MemoryLayout::Memory_16Gb:
return Smc::MemoryArrangement_16GB;
}
return Smc::MemoryArrangement_4GB;
}
@@ -79,6 +96,14 @@ size_t KSystemControl::Init::GetIntendedMemorySize() {
return 6_GiB;
case Smc::MemorySize_8GB:
return 8_GiB;
case Smc::MemorySize_10GB:
return 10_GiB;
case Smc::MemorySize_12GB:
return 12_GiB;
case Smc::MemorySize_14GB:
return 14_GiB;
case Smc::MemorySize_16GB:
return 16_GiB;
}
}
@@ -114,6 +139,14 @@ std::size_t KSystemControl::Init::GetApplicationPoolSize() {
case Smc::MemoryArrangement_8GB:
// Real kernel sets this to 4916_MiB. We are not debugging applets.
return 6547_MiB;
case Smc::MemoryArrangement_10GB:
return 8547_MiB; // ~8.35GB app pool
case Smc::MemoryArrangement_12GB:
return 10547_MiB; // ~10.3GB app pool
case Smc::MemoryArrangement_14GB:
return 12547_MiB; // ~12.25GB app pool
case Smc::MemoryArrangement_16GB:
return 14547_MiB; // ~14.2GB app pool
}
}();
@@ -139,6 +172,14 @@ size_t KSystemControl::Init::GetAppletPoolSize() {
case Smc::MemoryArrangement_8GB:
//! Real kernel sets this to 2193_MiB. We are not debugging applets.
return 562_MiB;
case Smc::MemoryArrangement_10GB:
return 562_MiB; // Keep consistent with 8GB
case Smc::MemoryArrangement_12GB:
return 562_MiB; // Keep consistent with 8GB
case Smc::MemoryArrangement_14GB:
return 562_MiB; // Keep consistent with 8GB
case Smc::MemoryArrangement_16GB:
return 562_MiB; // Keep consistent with 8GB
}
}();

View File

@@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -9,6 +10,10 @@ enum MemorySize {
MemorySize_4GB = 0,
MemorySize_6GB = 1,
MemorySize_8GB = 2,
MemorySize_10GB = 3,
MemorySize_12GB = 4,
MemorySize_14GB = 5,
MemorySize_16GB = 6,
};
enum MemoryArrangement {
@@ -18,6 +23,10 @@ enum MemoryArrangement {
MemoryArrangement_6GB = 3,
MemoryArrangement_6GBForAppletDev = 4,
MemoryArrangement_8GB = 5,
MemoryArrangement_10GB = 6,
MemoryArrangement_12GB = 7,
MemoryArrangement_14GB = 8,
MemoryArrangement_16GB = 9,
};
} // namespace Kernel::Board::Nintendo::Nx::Smc