mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-19 18:53:32 +00:00
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:
@@ -517,6 +517,10 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QWidget* parent) {
|
|||||||
PAIR(MemoryLayout, Memory_4Gb, tr("4GB DRAM (Default)")),
|
PAIR(MemoryLayout, Memory_4Gb, tr("4GB DRAM (Default)")),
|
||||||
PAIR(MemoryLayout, Memory_6Gb, tr("6GB DRAM (Unsafe)")),
|
PAIR(MemoryLayout, Memory_6Gb, tr("6GB DRAM (Unsafe)")),
|
||||||
PAIR(MemoryLayout, Memory_8Gb, tr("8GB DRAM (Unsafe)")),
|
PAIR(MemoryLayout, Memory_8Gb, tr("8GB DRAM (Unsafe)")),
|
||||||
|
PAIR(MemoryLayout, Memory_10Gb, tr("10GB DRAM (Unsafe)")),
|
||||||
|
PAIR(MemoryLayout, Memory_12Gb, tr("12GB DRAM (Unsafe)")),
|
||||||
|
PAIR(MemoryLayout, Memory_14Gb, tr("14GB DRAM (Unsafe)")),
|
||||||
|
PAIR(MemoryLayout, Memory_16Gb, tr("16GB DRAM (Unsafe)")),
|
||||||
}});
|
}});
|
||||||
translations->insert({Settings::EnumMetadata<Settings::ConsoleMode>::Index(),
|
translations->insert({Settings::EnumMetadata<Settings::ConsoleMode>::Index(),
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ struct Values {
|
|||||||
SwitchableSetting<MemoryLayout, true> memory_layout_mode{linkage,
|
SwitchableSetting<MemoryLayout, true> memory_layout_mode{linkage,
|
||||||
MemoryLayout::Memory_4Gb,
|
MemoryLayout::Memory_4Gb,
|
||||||
MemoryLayout::Memory_4Gb,
|
MemoryLayout::Memory_4Gb,
|
||||||
MemoryLayout::Memory_8Gb,
|
MemoryLayout::Memory_16Gb,
|
||||||
"memory_layout_mode",
|
"memory_layout_mode",
|
||||||
Category::Core};
|
Category::Core};
|
||||||
SwitchableSetting<bool> use_speed_limit{
|
SwitchableSetting<bool> use_speed_limit{
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ ENUM(CpuBackend, Dynarmic, Nce);
|
|||||||
|
|
||||||
ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid);
|
ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid);
|
||||||
|
|
||||||
ENUM(MemoryLayout, Memory_4Gb, Memory_6Gb, Memory_8Gb);
|
ENUM(MemoryLayout, Memory_4Gb, Memory_6Gb, Memory_8Gb, Memory_10Gb, Memory_12Gb, Memory_14Gb, Memory_16Gb);
|
||||||
|
|
||||||
ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never);
|
ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include <random>
|
#include <random>
|
||||||
@@ -48,6 +49,14 @@ u32 GetMemorySizeForInit() {
|
|||||||
return Smc::MemorySize_6GB;
|
return Smc::MemorySize_6GB;
|
||||||
case Settings::MemoryLayout::Memory_8Gb:
|
case Settings::MemoryLayout::Memory_8Gb:
|
||||||
return Smc::MemorySize_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;
|
return Smc::MemorySize_4GB;
|
||||||
}
|
}
|
||||||
@@ -60,6 +69,14 @@ Smc::MemoryArrangement GetMemoryArrangeForInit() {
|
|||||||
return Smc::MemoryArrangement_6GB;
|
return Smc::MemoryArrangement_6GB;
|
||||||
case Settings::MemoryLayout::Memory_8Gb:
|
case Settings::MemoryLayout::Memory_8Gb:
|
||||||
return Smc::MemoryArrangement_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;
|
return Smc::MemoryArrangement_4GB;
|
||||||
}
|
}
|
||||||
@@ -79,6 +96,14 @@ size_t KSystemControl::Init::GetIntendedMemorySize() {
|
|||||||
return 6_GiB;
|
return 6_GiB;
|
||||||
case Smc::MemorySize_8GB:
|
case Smc::MemorySize_8GB:
|
||||||
return 8_GiB;
|
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:
|
case Smc::MemoryArrangement_8GB:
|
||||||
// Real kernel sets this to 4916_MiB. We are not debugging applets.
|
// Real kernel sets this to 4916_MiB. We are not debugging applets.
|
||||||
return 6547_MiB;
|
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:
|
case Smc::MemoryArrangement_8GB:
|
||||||
//! Real kernel sets this to 2193_MiB. We are not debugging applets.
|
//! Real kernel sets this to 2193_MiB. We are not debugging applets.
|
||||||
return 562_MiB;
|
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
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -9,6 +10,10 @@ enum MemorySize {
|
|||||||
MemorySize_4GB = 0,
|
MemorySize_4GB = 0,
|
||||||
MemorySize_6GB = 1,
|
MemorySize_6GB = 1,
|
||||||
MemorySize_8GB = 2,
|
MemorySize_8GB = 2,
|
||||||
|
MemorySize_10GB = 3,
|
||||||
|
MemorySize_12GB = 4,
|
||||||
|
MemorySize_14GB = 5,
|
||||||
|
MemorySize_16GB = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MemoryArrangement {
|
enum MemoryArrangement {
|
||||||
@@ -18,6 +23,10 @@ enum MemoryArrangement {
|
|||||||
MemoryArrangement_6GB = 3,
|
MemoryArrangement_6GB = 3,
|
||||||
MemoryArrangement_6GBForAppletDev = 4,
|
MemoryArrangement_6GBForAppletDev = 4,
|
||||||
MemoryArrangement_8GB = 5,
|
MemoryArrangement_8GB = 5,
|
||||||
|
MemoryArrangement_10GB = 6,
|
||||||
|
MemoryArrangement_12GB = 7,
|
||||||
|
MemoryArrangement_14GB = 8,
|
||||||
|
MemoryArrangement_16GB = 9,
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Kernel::Board::Nintendo::Nx::Smc
|
} // namespace Kernel::Board::Nintendo::Nx::Smc
|
||||||
|
|||||||
Reference in New Issue
Block a user