Release: 1.4.1
This commit is contained in:
@@ -120,11 +120,13 @@ Overclocking suite for Horizon OS (HOS) running on Atmosphere CFW.
|
|||||||
## Build
|
## Build
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
Grab necessary patches from the repo, then compile sys-clk, ReverseNX-RT and Atmosphere loader with devkitpro.
|
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.
|
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`
|
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>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -372,10 +372,6 @@ Result MemFreqMax(u32* ptr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result MemVoltHandler(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));
|
regulator* entry = reinterpret_cast<regulator *>(reinterpret_cast<u8 *>(ptr) - offsetof(regulator, type_2_3.default_uv));
|
||||||
|
|
||||||
constexpr u32 uv_step = 5'000;
|
constexpr u32 uv_step = 5'000;
|
||||||
@@ -386,6 +382,10 @@ Result MemVoltHandler(u32* ptr) {
|
|||||||
entry->type_2_3.min_uv != uv_min)
|
entry->type_2_3.min_uv != uv_min)
|
||||||
R_THROW(ldr::ResultInvalidRegulatorEntry());
|
R_THROW(ldr::ResultInvalidRegulatorEntry());
|
||||||
|
|
||||||
|
u32 emc_uv = C.marikoEmcVolt;
|
||||||
|
if (!emc_uv)
|
||||||
|
R_SKIP();
|
||||||
|
|
||||||
if (emc_uv % uv_step)
|
if (emc_uv % uv_step)
|
||||||
emc_uv = emc_uv / uv_step * uv_step; // rounding
|
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) {
|
u32 I2c_BuckConverter_GetMvOut(const I2c_BuckConverter_Domain* domain) {
|
||||||
u8 val;
|
u8 val;
|
||||||
Result res;
|
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++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
res = I2cRead_OutU8(domain->device, domain->reg, &val);
|
res = I2cRead_OutU8(domain->device, domain->reg, &val);
|
||||||
if (R_FAILED(res) || (domain->por_val && val == domain->por_val)) {
|
if (R_FAILED(res))
|
||||||
svcSleepThread(1000);
|
return 0u;
|
||||||
continue;
|
|
||||||
}
|
if (!domain->por_val || val != domain->por_val)
|
||||||
return I2c_BuckConverter_MultiplierToMvOut(domain, val & domain->volt_mask);
|
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) {
|
Result I2c_BuckConverter_SetMvOut(const I2c_BuckConverter_Domain* domain, u32 mvolt) {
|
||||||
|
|||||||
Reference in New Issue
Block a user