Hoc-clk Overlay: raise max HF vmin to 900mv
This commit is contained in:
@@ -13,9 +13,9 @@
|
|||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "misc_gui.h"
|
#include "misc_gui.h"
|
||||||
#include "fatal_gui.h"
|
#include "fatal_gui.h"
|
||||||
@@ -60,8 +60,8 @@ void MiscGui::addConfigToggle(SysClkConfigValue configVal, const char* altName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
||||||
const char* altName,
|
const char* altName,
|
||||||
const ValueRange& range,
|
const ValueRange& range,
|
||||||
const std::string& categoryName,
|
const std::string& categoryName,
|
||||||
const ValueThresholds* thresholds,
|
const ValueThresholds* thresholds,
|
||||||
@@ -86,7 +86,7 @@ void MiscGui::addConfigButton(SysClkConfigValue configVal,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foundNamedValue) {
|
if (!foundNamedValue) {
|
||||||
uint64_t displayValue = currentValue / range.divisor;
|
uint64_t displayValue = currentValue / range.divisor;
|
||||||
if (!range.suffix.empty()) {
|
if (!range.suffix.empty()) {
|
||||||
@@ -256,22 +256,22 @@ void MiscGui::listUI()
|
|||||||
{2091000000, "Unsafe Max"},
|
{2091000000, "Unsafe Max"},
|
||||||
{2295000000, "Absolute Max"},
|
{2295000000, "Absolute Max"},
|
||||||
};
|
};
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Settings"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("Settings"));
|
||||||
|
|
||||||
addConfigToggle(HocClkConfigValue_UncappedClocks, nullptr);
|
addConfigToggle(HocClkConfigValue_UncappedClocks, nullptr);
|
||||||
addConfigToggle(HocClkConfigValue_OverwriteBoostMode, nullptr);
|
addConfigToggle(HocClkConfigValue_OverwriteBoostMode, nullptr);
|
||||||
addConfigToggle(HocClkConfigValue_KipEditing, nullptr);
|
addConfigToggle(HocClkConfigValue_KipEditing, nullptr);
|
||||||
addConfigToggle(HocClkConfigValue_ThermalThrottle, nullptr);
|
addConfigToggle(HocClkConfigValue_ThermalThrottle, nullptr);
|
||||||
addConfigToggle(HocClkConfigValue_HandheldTDP, nullptr);
|
addConfigToggle(HocClkConfigValue_HandheldTDP, nullptr);
|
||||||
|
|
||||||
std::map<uint32_t, std::string> labels_pwr_r = {
|
std::map<uint32_t, std::string> labels_pwr_r = {
|
||||||
{8600, "Official Rating"}
|
{8600, "Official Rating"}
|
||||||
};
|
};
|
||||||
std::map<uint32_t, std::string> labels_pwr_l = {
|
std::map<uint32_t, std::string> labels_pwr_l = {
|
||||||
{6400, "Official Rating"}
|
{6400, "Official Rating"}
|
||||||
};
|
};
|
||||||
|
|
||||||
ValueThresholds tdpThresholds(8600, 9500);
|
ValueThresholds tdpThresholds(8600, 9500);
|
||||||
addConfigButton(
|
addConfigButton(
|
||||||
HocClkConfigValue_HandheldTDPLimit,
|
HocClkConfigValue_HandheldTDPLimit,
|
||||||
@@ -373,7 +373,7 @@ void MiscGui::listUI()
|
|||||||
this->listElement->addItem(gpuSubmenu);
|
this->listElement->addItem(gpuSubmenu);
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Experimental"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("Experimental"));
|
||||||
|
|
||||||
std::vector<NamedValue> chargerCurrents = {
|
std::vector<NamedValue> chargerCurrents = {
|
||||||
NamedValue("Disabled", 0),
|
NamedValue("Disabled", 0),
|
||||||
NamedValue("1024mA", 1024),
|
NamedValue("1024mA", 1024),
|
||||||
@@ -386,9 +386,9 @@ void MiscGui::listUI()
|
|||||||
NamedValue("2816mA", 2816),
|
NamedValue("2816mA", 2816),
|
||||||
NamedValue("3072mA", 3072),
|
NamedValue("3072mA", 3072),
|
||||||
};
|
};
|
||||||
|
|
||||||
ValueThresholds chargerThresholds(2048, 2560);
|
ValueThresholds chargerThresholds(2048, 2560);
|
||||||
|
|
||||||
addConfigButton(
|
addConfigButton(
|
||||||
HorizonOCConfigValue_BatteryChargeCurrent,
|
HorizonOCConfigValue_BatteryChargeCurrent,
|
||||||
"Charge Current Override",
|
"Charge Current Override",
|
||||||
@@ -407,16 +407,16 @@ void MiscGui::listUI()
|
|||||||
class RamSubmenuGui : public MiscGui {
|
class RamSubmenuGui : public MiscGui {
|
||||||
public:
|
public:
|
||||||
RamSubmenuGui() { }
|
RamSubmenuGui() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
ValueThresholds thresholdsDisabled(0, 0);
|
ValueThresholds thresholdsDisabled(0, 0);
|
||||||
std::vector<NamedValue> noNamedValues = {};
|
std::vector<NamedValue> noNamedValues = {};
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("RAM Settings"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("RAM Settings"));
|
||||||
|
|
||||||
addConfigToggle(KipConfigValue_hpMode, "HP Mode");
|
addConfigToggle(KipConfigValue_hpMode, "HP Mode");
|
||||||
|
|
||||||
std::vector<NamedValue> marikoMaxEmcClock = {
|
std::vector<NamedValue> marikoMaxEmcClock = {
|
||||||
NamedValue("1600MHz", 1600000),
|
NamedValue("1600MHz", 1600000),
|
||||||
NamedValue("1633MHz", 1633000),
|
NamedValue("1633MHz", 1633000),
|
||||||
@@ -507,7 +507,7 @@ protected:
|
|||||||
NamedValue("2366MHz (high power draw!)", 2366000),
|
NamedValue("2366MHz (high power draw!)", 2366000),
|
||||||
NamedValue("2400MHz (high power draw!)", 2400000),
|
NamedValue("2400MHz (high power draw!)", 2400000),
|
||||||
};
|
};
|
||||||
|
|
||||||
if(IsErista()) {
|
if(IsErista()) {
|
||||||
addConfigButton(
|
addConfigButton(
|
||||||
KipConfigValue_eristaEmcMaxClock,
|
KipConfigValue_eristaEmcMaxClock,
|
||||||
@@ -531,7 +531,7 @@ protected:
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<uint32_t, std::string> emc_voltage_label = {
|
std::map<uint32_t, std::string> emc_voltage_label = {
|
||||||
{1100000, "Default (Mariko)"},
|
{1100000, "Default (Mariko)"},
|
||||||
{1125000, "Default (Erista)"},
|
{1125000, "Default (Erista)"},
|
||||||
@@ -552,7 +552,7 @@ protected:
|
|||||||
noNamedValues,
|
noNamedValues,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
if(IsMariko()) {
|
if(IsMariko()) {
|
||||||
addConfigButton(
|
addConfigButton(
|
||||||
KipConfigValue_marikoEmcVddqVolt,
|
KipConfigValue_marikoEmcVddqVolt,
|
||||||
@@ -565,7 +565,7 @@ protected:
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
addConfigButton(
|
addConfigButton(
|
||||||
KipConfigValue_emcDvbShift,
|
KipConfigValue_emcDvbShift,
|
||||||
"DVB Shift",
|
"DVB Shift",
|
||||||
@@ -576,7 +576,7 @@ protected:
|
|||||||
{},
|
{},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
tsl::elm::ListItem* timingsSubmenu = new tsl::elm::ListItem("Memory Timings");
|
tsl::elm::ListItem* timingsSubmenu = new tsl::elm::ListItem("Memory Timings");
|
||||||
timingsSubmenu->setClickListener([](u64 keys) {
|
timingsSubmenu->setClickListener([](u64 keys) {
|
||||||
if (keys & HidNpadButton_A) {
|
if (keys & HidNpadButton_A) {
|
||||||
@@ -586,7 +586,7 @@ protected:
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
this->listElement->addItem(timingsSubmenu);
|
this->listElement->addItem(timingsSubmenu);
|
||||||
|
|
||||||
tsl::elm::ListItem* latenciesSubmenu = new tsl::elm::ListItem("Memory Latencies");
|
tsl::elm::ListItem* latenciesSubmenu = new tsl::elm::ListItem("Memory Latencies");
|
||||||
latenciesSubmenu->setClickListener([](u64 keys) {
|
latenciesSubmenu->setClickListener([](u64 keys) {
|
||||||
if (keys & HidNpadButton_A) {
|
if (keys & HidNpadButton_A) {
|
||||||
@@ -602,13 +602,13 @@ protected:
|
|||||||
class RamTimingsSubmenuGui : public MiscGui {
|
class RamTimingsSubmenuGui : public MiscGui {
|
||||||
public:
|
public:
|
||||||
RamTimingsSubmenuGui() { }
|
RamTimingsSubmenuGui() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
ValueThresholds thresholdsDisabled(0, 0);
|
ValueThresholds thresholdsDisabled(0, 0);
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Memory Timings"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("Memory Timings"));
|
||||||
|
|
||||||
addConfigButton(KipConfigValue_t1_tRCD, "t1 tRCD", ValueRange(0, 8, 1, "", 1), "tRCD", &thresholdsDisabled, {}, {}, false);
|
addConfigButton(KipConfigValue_t1_tRCD, "t1 tRCD", ValueRange(0, 8, 1, "", 1), "tRCD", &thresholdsDisabled, {}, {}, false);
|
||||||
addConfigButton(KipConfigValue_t2_tRP, "t2 tRP", ValueRange(0, 8, 1, "", 1), "tRP", &thresholdsDisabled, {}, {}, false);
|
addConfigButton(KipConfigValue_t2_tRP, "t2 tRP", ValueRange(0, 8, 1, "", 1), "tRP", &thresholdsDisabled, {}, {}, false);
|
||||||
addConfigButton(KipConfigValue_t3_tRAS, "t3 tRAS", ValueRange(0, 10, 1, "", 1), "tRAS", &thresholdsDisabled, {}, {}, false);
|
addConfigButton(KipConfigValue_t3_tRAS, "t3 tRAS", ValueRange(0, 10, 1, "", 1), "tRAS", &thresholdsDisabled, {}, {}, false);
|
||||||
@@ -623,13 +623,13 @@ protected:
|
|||||||
class RamLatenciesSubmenuGui : public MiscGui {
|
class RamLatenciesSubmenuGui : public MiscGui {
|
||||||
public:
|
public:
|
||||||
RamLatenciesSubmenuGui() { }
|
RamLatenciesSubmenuGui() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
ValueThresholds thresholdsDisabled(0, 0);
|
ValueThresholds thresholdsDisabled(0, 0);
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Memory Latencies"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("Memory Latencies"));
|
||||||
|
|
||||||
std::vector<NamedValue> rlLabels = {
|
std::vector<NamedValue> rlLabels = {
|
||||||
NamedValue("1600BL", 0),
|
NamedValue("1600BL", 0),
|
||||||
NamedValue("1866BL", 4),
|
NamedValue("1866BL", 4),
|
||||||
@@ -669,11 +669,11 @@ protected:
|
|||||||
class CpuSubmenuGui : public MiscGui {
|
class CpuSubmenuGui : public MiscGui {
|
||||||
public:
|
public:
|
||||||
CpuSubmenuGui() { }
|
CpuSubmenuGui() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
ValueThresholds thresholdsDisabled(0, 0);
|
ValueThresholds thresholdsDisabled(0, 0);
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("CPU Settings"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("CPU Settings"));
|
||||||
|
|
||||||
if(IsErista()) {
|
if(IsErista()) {
|
||||||
@@ -747,7 +747,7 @@ protected:
|
|||||||
{},
|
{},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
std::vector<NamedValue> maxClkOptions = {
|
std::vector<NamedValue> maxClkOptions = {
|
||||||
NamedValue("1963MHz", 1963000),
|
NamedValue("1963MHz", 1963000),
|
||||||
NamedValue("2397MHz", 2397000),
|
NamedValue("2397MHz", 2397000),
|
||||||
@@ -766,7 +766,7 @@ protected:
|
|||||||
maxClkOptions,
|
maxClkOptions,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
addConfigButton(
|
addConfigButton(
|
||||||
KipConfigValue_marikoCpuLowVmin,
|
KipConfigValue_marikoCpuLowVmin,
|
||||||
"CPU Low VMIN",
|
"CPU Low VMIN",
|
||||||
@@ -781,14 +781,14 @@ protected:
|
|||||||
addConfigButton(
|
addConfigButton(
|
||||||
KipConfigValue_marikoCpuHighVmin,
|
KipConfigValue_marikoCpuHighVmin,
|
||||||
"CPU High VMIN",
|
"CPU High VMIN",
|
||||||
ValueRange(650, 850, 5, "mV", 1),
|
ValueRange(650, 900, 5, "mV", 1),
|
||||||
"CPU VMIN",
|
"CPU VMIN",
|
||||||
&thresholdsDisabled,
|
&thresholdsDisabled,
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
ValueThresholds mCpuVoltThresholds(1160, 1180);
|
ValueThresholds mCpuVoltThresholds(1160, 1180);
|
||||||
addConfigButton(
|
addConfigButton(
|
||||||
KipConfigValue_marikoCpuMaxVolt,
|
KipConfigValue_marikoCpuMaxVolt,
|
||||||
@@ -807,12 +807,12 @@ protected:
|
|||||||
class GpuSubmenuGui : public MiscGui {
|
class GpuSubmenuGui : public MiscGui {
|
||||||
public:
|
public:
|
||||||
GpuSubmenuGui() { }
|
GpuSubmenuGui() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
ValueThresholds thresholdsDisabled(0, 0);
|
ValueThresholds thresholdsDisabled(0, 0);
|
||||||
std::vector<NamedValue> noNamedValues = {};
|
std::vector<NamedValue> noNamedValues = {};
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("GPU Settings"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("GPU Settings"));
|
||||||
|
|
||||||
std::vector<NamedValue> gpuUvConf = {
|
std::vector<NamedValue> gpuUvConf = {
|
||||||
@@ -888,7 +888,7 @@ protected:
|
|||||||
{},
|
{},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
tsl::elm::ListItem* customTableSubmenu = new tsl::elm::ListItem("GPU Custom Table");
|
tsl::elm::ListItem* customTableSubmenu = new tsl::elm::ListItem("GPU Custom Table");
|
||||||
customTableSubmenu->setClickListener([](u64 keys) {
|
customTableSubmenu->setClickListener([](u64 keys) {
|
||||||
if (keys & HidNpadButton_A) {
|
if (keys & HidNpadButton_A) {
|
||||||
@@ -898,7 +898,7 @@ protected:
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
this->listElement->addItem(customTableSubmenu);
|
this->listElement->addItem(customTableSubmenu);
|
||||||
|
|
||||||
addConfigToggle(KipConfigValue_marikoGpuFullUnlock, "GPU Full Unlock");
|
addConfigToggle(KipConfigValue_marikoGpuFullUnlock, "GPU Full Unlock");
|
||||||
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
||||||
renderer->drawString("\uE150 GPU Full Unlock can cause", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
renderer->drawString("\uE150 GPU Full Unlock can cause", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||||
@@ -915,14 +915,14 @@ protected:
|
|||||||
class GpuCustomTableSubmenuGui : public MiscGui {
|
class GpuCustomTableSubmenuGui : public MiscGui {
|
||||||
public:
|
public:
|
||||||
GpuCustomTableSubmenuGui() { }
|
GpuCustomTableSubmenuGui() { }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("GPU Custom Table (mV)"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("GPU Custom Table (mV)"));
|
||||||
|
|
||||||
ValueThresholds MgpuVmaxThresholds(800, 850);
|
ValueThresholds MgpuVmaxThresholds(800, 850);
|
||||||
ValueThresholds EgpuVmaxThresholds(950, 975);
|
ValueThresholds EgpuVmaxThresholds(950, 975);
|
||||||
|
|
||||||
std::vector<NamedValue> mGpuVolts = {
|
std::vector<NamedValue> mGpuVolts = {
|
||||||
NamedValue("Disabled", 2000),
|
NamedValue("Disabled", 2000),
|
||||||
NamedValue("Auto", 0),
|
NamedValue("Auto", 0),
|
||||||
@@ -1044,18 +1044,18 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static std::string getValueDisplayText(uint64_t currentValue,
|
static std::string getValueDisplayText(uint64_t currentValue,
|
||||||
const ValueRange& range,
|
const ValueRange& range,
|
||||||
const std::vector<NamedValue>& namedValues)
|
const std::vector<NamedValue>& namedValues)
|
||||||
{
|
{
|
||||||
char valueText[32];
|
char valueText[32];
|
||||||
|
|
||||||
for (const auto& namedValue : namedValues) {
|
for (const auto& namedValue : namedValues) {
|
||||||
if (currentValue == namedValue.value) {
|
if (currentValue == namedValue.value) {
|
||||||
return namedValue.name;
|
return namedValue.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentValue == 0) {
|
if (currentValue == 0) {
|
||||||
snprintf(valueText, sizeof(valueText), "%s", VALUE_DEFAULT_TEXT);
|
snprintf(valueText, sizeof(valueText), "%s", VALUE_DEFAULT_TEXT);
|
||||||
} else {
|
} else {
|
||||||
@@ -1082,14 +1082,14 @@ void MiscGui::refresh() {
|
|||||||
for (const auto& [configVal, button] : this->configButtons) {
|
for (const auto& [configVal, button] : this->configButtons) {
|
||||||
uint64_t currentValue = this->configList->values[configVal];
|
uint64_t currentValue = this->configList->values[configVal];
|
||||||
const ValueRange& range = this->configRanges[configVal];
|
const ValueRange& range = this->configRanges[configVal];
|
||||||
|
|
||||||
auto namedValuesIt = this->configNamedValues.find(configVal);
|
auto namedValuesIt = this->configNamedValues.find(configVal);
|
||||||
const std::vector<NamedValue>& namedValues = (namedValuesIt != this->configNamedValues.end())
|
const std::vector<NamedValue>& namedValues = (namedValuesIt != this->configNamedValues.end())
|
||||||
? namedValuesIt->second
|
? namedValuesIt->second
|
||||||
: std::vector<NamedValue>();
|
: std::vector<NamedValue>();
|
||||||
|
|
||||||
char valueText[32];
|
char valueText[32];
|
||||||
|
|
||||||
bool foundNamedValue = false;
|
bool foundNamedValue = false;
|
||||||
for (const auto& namedValue : namedValues) {
|
for (const auto& namedValue : namedValues) {
|
||||||
if (currentValue == namedValue.value) {
|
if (currentValue == namedValue.value) {
|
||||||
@@ -1098,7 +1098,7 @@ void MiscGui::refresh() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foundNamedValue) {
|
if (!foundNamedValue) {
|
||||||
uint64_t displayValue = currentValue / range.divisor;
|
uint64_t displayValue = currentValue / range.divisor;
|
||||||
if (!range.suffix.empty()) {
|
if (!range.suffix.empty()) {
|
||||||
@@ -1107,8 +1107,8 @@ void MiscGui::refresh() {
|
|||||||
snprintf(valueText, sizeof(valueText), "%lu", displayValue);
|
snprintf(valueText, sizeof(valueText), "%lu", displayValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
button->setValue(valueText);
|
button->setValue(valueText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user