mirror of
https://notabug.org/litucks/torzu.git
synced 2025-04-28 09:35:26 +00:00
Add 12gb DRAM option (#90)
This adds the option to allow the emulator to use 12gb of RAM for something like really big texture packs. Co-authored-by: smiRaphi <neogt404@gmail.com> Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/90 Co-authored-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost> Co-committed-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost>
This commit is contained in:
parent
a04ba7cd1e
commit
86f6184375
@ -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_12Gb,
|
||||||
"memory_layout_mode",
|
"memory_layout_mode",
|
||||||
Category::Core};
|
Category::Core};
|
||||||
SwitchableSetting<bool> use_speed_limit{
|
SwitchableSetting<bool> use_speed_limit{
|
||||||
|
@ -134,7 +134,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_12Gb);
|
||||||
|
|
||||||
ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never);
|
ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never);
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ 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_12Gb:
|
||||||
|
return Smc::MemorySize_12GB;
|
||||||
}
|
}
|
||||||
return Smc::MemorySize_4GB;
|
return Smc::MemorySize_4GB;
|
||||||
}
|
}
|
||||||
@ -60,6 +62,8 @@ 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_12Gb:
|
||||||
|
return Smc::MemoryArrangement_12GB;
|
||||||
}
|
}
|
||||||
return Smc::MemoryArrangement_4GB;
|
return Smc::MemoryArrangement_4GB;
|
||||||
}
|
}
|
||||||
@ -79,6 +83,8 @@ 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_12GB:
|
||||||
|
return 12_GiB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,6 +120,8 @@ 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_12GB:
|
||||||
|
return 9809_MiB;
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
@ -139,6 +147,8 @@ 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_12GB:
|
||||||
|
return 562_MiB;
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ enum MemorySize {
|
|||||||
MemorySize_4GB = 0,
|
MemorySize_4GB = 0,
|
||||||
MemorySize_6GB = 1,
|
MemorySize_6GB = 1,
|
||||||
MemorySize_8GB = 2,
|
MemorySize_8GB = 2,
|
||||||
|
MemorySize_12GB = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MemoryArrangement {
|
enum MemoryArrangement {
|
||||||
@ -18,6 +19,7 @@ enum MemoryArrangement {
|
|||||||
MemoryArrangement_6GB = 3,
|
MemoryArrangement_6GB = 3,
|
||||||
MemoryArrangement_6GBForAppletDev = 4,
|
MemoryArrangement_6GBForAppletDev = 4,
|
||||||
MemoryArrangement_8GB = 5,
|
MemoryArrangement_8GB = 5,
|
||||||
|
MemoryArrangement_12GB = 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Kernel::Board::Nintendo::Nx::Smc
|
} // namespace Kernel::Board::Nintendo::Nx::Smc
|
||||||
|
@ -25,7 +25,7 @@ constexpr std::size_t GetMaximumOverheadSize(std::size_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
constexpr std::size_t MainMemorySize = 4_GiB;
|
constexpr std::size_t MainMemorySize = 4_GiB;
|
||||||
constexpr std::size_t MainMemorySizeMax = 8_GiB;
|
constexpr std::size_t MainMemorySizeMax = 12_GiB;
|
||||||
|
|
||||||
constexpr std::size_t ReservedEarlyDramSize = 384_KiB;
|
constexpr std::size_t ReservedEarlyDramSize = 384_KiB;
|
||||||
constexpr std::size_t DramPhysicalAddress = 0x80000000;
|
constexpr std::size_t DramPhysicalAddress = 0x80000000;
|
||||||
|
@ -535,6 +535,7 @@ 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_12Gb, tr("12GB DRAM (Unsafe)")),
|
||||||
}});
|
}});
|
||||||
translations->insert({Settings::EnumMetadata<Settings::ConsoleMode>::Index(),
|
translations->insert({Settings::EnumMetadata<Settings::ConsoleMode>::Index(),
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user