Release: 1.4.1
This commit is contained in:
@@ -120,11 +120,13 @@ Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW.
|
||||
## Build
|
||||
|
||||
<details>
|
||||
|
||||
Grab necessary patches from the repo, then compile sys-clk, ReverseNX-RT and Atmosphere loader with devkitpro.
|
||||
|
||||
Before compiling Atmosphere loader, run `patch.py` in `Atmosphere/stratosphere/loader/source/` to insert oc module into loader sysmodule.
|
||||
|
||||
When compilation is done, uncompress the kip to make it work with configurator: `hactool -t kip1 Atmosphere/stratosphere/loader/out/nintendo_nx_arm64_armv8a/release/loader.kip --uncompress=./loader.kip`
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
@@ -372,10 +372,6 @@ Result MemFreqMax(u32* ptr) {
|
||||
}
|
||||
|
||||
Result MemVoltHandler(u32* ptr) {
|
||||
u32 emc_uv = C.marikoEmcVolt;
|
||||
if (!emc_uv)
|
||||
R_SKIP();
|
||||
|
||||
regulator* entry = reinterpret_cast<regulator *>(reinterpret_cast<u8 *>(ptr) - offsetof(regulator, type_2_3.default_uv));
|
||||
|
||||
constexpr u32 uv_step = 5'000;
|
||||
@@ -386,6 +382,10 @@ Result MemVoltHandler(u32* ptr) {
|
||||
entry->type_2_3.min_uv != uv_min)
|
||||
R_THROW(ldr::ResultInvalidRegulatorEntry());
|
||||
|
||||
u32 emc_uv = C.marikoEmcVolt;
|
||||
if (!emc_uv)
|
||||
R_SKIP();
|
||||
|
||||
if (emc_uv % uv_step)
|
||||
emc_uv = emc_uv / uv_step * uv_step; // rounding
|
||||
|
||||
|
||||
@@ -100,16 +100,18 @@ u8 I2c_BuckConverter_MvOutToMultiplier(const I2c_BuckConverter_Domain* domain, u
|
||||
u32 I2c_BuckConverter_GetMvOut(const I2c_BuckConverter_Domain* domain) {
|
||||
u8 val;
|
||||
Result res;
|
||||
// Retry 3 times if failed or received POR value
|
||||
// Retry 3 times if received POR value
|
||||
for (int i = 0; i < 3; i++) {
|
||||
res = I2cRead_OutU8(domain->device, domain->reg, &val);
|
||||
if (R_FAILED(res) || (domain->por_val && val == domain->por_val)) {
|
||||
svcSleepThread(1000);
|
||||
continue;
|
||||
}
|
||||
return I2c_BuckConverter_MultiplierToMvOut(domain, val & domain->volt_mask);
|
||||
if (R_FAILED(res))
|
||||
return 0u;
|
||||
|
||||
if (!domain->por_val || val != domain->por_val)
|
||||
break;
|
||||
|
||||
svcSleepThread(1000);
|
||||
}
|
||||
return 0u;
|
||||
return I2c_BuckConverter_MultiplierToMvOut(domain, val & domain->volt_mask);
|
||||
}
|
||||
|
||||
Result I2c_BuckConverter_SetMvOut(const I2c_BuckConverter_Domain* domain, u32 mvolt) {
|
||||
|
||||
Reference in New Issue
Block a user