Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class ConfigEntry {
static ConfigEntry<int> volumeSlider(100);
static ConfigEntry<bool> isNeo(false);
static ConfigEntry<bool> isDevKit(false);
static ConfigEntry<int> extraDmemInMbytes = 0;
static ConfigEntry<bool> isPSNSignedIn(false);
static ConfigEntry<bool> isTrophyPopupDisabled(false);
static ConfigEntry<double> trophyNotificationDuration(6.0);
Expand Down Expand Up @@ -258,6 +259,14 @@ bool isDevKitConsole() {
return isDevKit.get();
}

int GetExtraDmemInMbytes() {
return extraDmemInMbytes.get();
}

void SetExtraDmemInMbytes(int value) {
extraDmemInMbytes.base_value = value;
}

bool getIsFullscreen() {
return isFullscreen.get();
}
Expand Down Expand Up @@ -775,6 +784,7 @@ void load(const std::filesystem::path& path, bool is_game_specific) {
volumeSlider.setFromToml(general, "volumeSlider", is_game_specific);
isNeo.setFromToml(general, "isPS4Pro", is_game_specific);
isDevKit.setFromToml(general, "isDevKit", is_game_specific);
extraDmemInMbytes.setFromToml(general, "extraDmemInMbytes", is_game_specific);
isPSNSignedIn.setFromToml(general, "isPSNSignedIn", is_game_specific);
isTrophyPopupDisabled.setFromToml(general, "isTrophyPopupDisabled", is_game_specific);
trophyNotificationDuration.setFromToml(general, "trophyNotificationDuration",
Expand Down Expand Up @@ -959,6 +969,7 @@ void save(const std::filesystem::path& path) {
data["General"]["volumeSlider"] = volumeSlider.base_value;
data["General"]["isPS4Pro"] = isNeo.base_value;
data["General"]["isDevKit"] = isDevKit.base_value;
data["General"]["extraDmemInMbytes"] = extraDmemInMbytes.base_value;
data["General"]["isPSNSignedIn"] = isPSNSignedIn.base_value;
data["General"]["isTrophyPopupDisabled"] = isTrophyPopupDisabled.base_value;
data["General"]["trophyNotificationDuration"] = trophyNotificationDuration.base_value;
Expand Down Expand Up @@ -1063,6 +1074,7 @@ void setDefaultValues() {
volumeSlider = 100;
isNeo = false;
isDevKit = false;
extraDmemInMbytes = 0;
isPSNSignedIn = false;
isTrophyPopupDisabled = false;
trophyNotificationDuration = 6.0;
Expand Down
2 changes: 2 additions & 0 deletions src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ bool isNeoModeConsole();
void setNeoMode(bool enable); // no ui setting
bool isDevKitConsole(); // no set
bool vkValidationGpuEnabled(); // no set
int GetExtraDmemInMbytes();
void SetExtraDmemInMbytes(int value);
bool getIsMotionControlsEnabled();
void setIsMotionControlsEnabled(bool use);
std::string getDefaultControllerID();
Expand Down
7 changes: 7 additions & 0 deletions src/core/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ void MemoryManager::SetupMemoryRegions(u64 flexible_size, bool use_extended_mem1
LOG_WARNING(Kernel_Vmm, "Old Direct Size: {:#x} -> New Direct Size: {:#x}", old_size,
total_size);
}
s32 extra_dmem = Config::GetExtraDmemInMbytes();
if (Config::GetExtraDmemInMbytes() != 0) {
LOG_WARNING(Kernel_Vmm,
"extraDmemInMbytes is {} MB! Old Direct Size: {:#x} -> New Direct Size: {:#x}",
extra_dmem, total_size, total_size + extra_dmem * 1_MB);
total_size += extra_dmem * 1_MB;
}
if (!use_extended_mem1 && is_neo) {
total_size -= 256_MB;
}
Expand Down