diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 280a4b4b..f5dc05d6 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -22,6 +22,7 @@ /* Never edit these. */ #define AUTO 0 +#define AUTO_RAM 0 #define ENABLED 1 #define DISABLED 0 #define DEACTIVATED_GPU_FREQ 2000 diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp index d9e1d793..d8beb55b 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp @@ -51,6 +51,48 @@ namespace ams::ldr::oc::pcv::mariko { } /* Note: EOS (probably?) has a bug in this function that always results in high vmin, this is fixed here. */ + + static unsigned int ramBrackets[][22] = + { + { 2133, 2200, 2266, 2300, 2366, 2400, 2433, 2466, 2533, 2566, 2600, 2633, 2700, 2733, 2766, 2833, 2866, 2900, 2933, 3033, 3066, 3100, }, + { 2300, 2366, 2433, 2466, 2533, 2566, 2633, 2700, 2733, 2800, 2833, 2900, 2933, 2966, 3033, 3066, 3100, 3133, 3166, 3200, 3233, 3266, }, + { 2433, 2466, 2533, 2600, 2666, 2733, 2766, 2800, 2833, 2866, 2933, 2966, 3033, 3066, 3100, 3133, 3166, 3200, 3233, 3300, 3333, 3366, }, + { 2500, 2533, 2600, 2633, 2666, 2733, 2800, 2866, 2900, 2966, 3033, 3100, 3166, 3200, 3233, 3266, 3300, 3333, 3366, 3400, 3400, 3400, } + }; + + unsigned int gpuDvfsArray[] = { 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800}; + + int GetSpeedoBracket (int speedo) + { + int speedoBracket = 3; + if ((speedo < 1754) && (speedoBracket = 2, speedo < 1690)) { + speedoBracket = !!(1625 < speedo); + } + + return speedoBracket; + } + + unsigned int GetGpuVoltage (unsigned int freq, int speedo) + { + long int lVar1; + int bracket = GetSpeedoBracket(speedo); + + if (freq < 1601) + return 0; + + lVar1 = 0; + do + { + if (freq <= ramBrackets[bracket][lVar1])//*(unsigned int *)((ulong)DAT_001491e0 * 0x58 + 1280960 + lVar1 * 4)) + return gpuDvfsArray[lVar1];//*(undefined4 *)((long)(int)lVar1 * 4 + 1281312); + + lVar1++; + } while (lVar1 != 22); + + return 800; + } + + u32 GetAutoVoltage() { u32 voltage = GetGpuVminVoltage(); voltage = GetRamVminAdjustment(voltage); @@ -85,7 +127,7 @@ namespace ams::ldr::oc::pcv::mariko { /* C.marikoGpuVmin is zero, auto voltage is applied. */ /* Get vmin depending on speedo and ram clock. */ - u32 autoVmin = GetAutoVoltage(); + u32 autoVmin = C.marikoGpuVmin == 0 ? GetAutoVoltage() : GetGpuVoltage(C.marikoEmcMaxClock / 1000, C.gpuSpeedo); PATCH_OFFSET(ptr, autoVmin); R_SUCCEED(); } diff --git a/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp b/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp index 3133adb4..ed2cadc5 100644 --- a/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp +++ b/Source/sys-clk/overlay/src/ui/gui/misc_gui.cpp @@ -937,7 +937,7 @@ protected: }; std::vector mGpuVoltsVmin = { - NamedValue("Auto", 0), + NamedValue("Auto", 0), NamedValue("Auto (RAM)", 1), NamedValue("480mV", 480), NamedValue("485mV", 485), NamedValue("490mV", 490), NamedValue("495mV", 495), NamedValue("500mV", 500), NamedValue("505mV", 505), NamedValue("510mV", 510), NamedValue("515mV", 515), NamedValue("520mV", 520), diff --git a/Source/sys-clk/sysmodule/src/process_management.cpp b/Source/sys-clk/sysmodule/src/process_management.cpp index 94ffe798..6c0f6953 100644 --- a/Source/sys-clk/sysmodule/src/process_management.cpp +++ b/Source/sys-clk/sysmodule/src/process_management.cpp @@ -28,6 +28,7 @@ #include "process_management.h" #include "file_utils.h" #include "errors.h" +#define IS_QLAUNCH 0x20f void ProcessManagement::Initialize() { @@ -47,7 +48,7 @@ void ProcessManagement::WaitForQLaunch() do { rc = pmdmntGetProcessId(&pid, PROCESS_MANAGEMENT_QLAUNCH_TID); - svcSleepThread(500000000ULL); + svcSleepThread(50 * 1000000ULL); // 50ms } while (R_FAILED(rc)); } @@ -58,7 +59,7 @@ std::uint64_t ProcessManagement::GetCurrentApplicationId() std::uint64_t tid = 0; rc = pmdmntGetApplicationProcessId(&pid); - if (rc == 0x20f) + if (rc == IS_QLAUNCH) { return PROCESS_MANAGEMENT_QLAUNCH_TID; } @@ -67,7 +68,7 @@ std::uint64_t ProcessManagement::GetCurrentApplicationId() rc = pminfoGetProgramId(&tid, pid); - if (rc == 0x20f) + if (rc == IS_QLAUNCH) { return PROCESS_MANAGEMENT_QLAUNCH_TID; } diff --git a/dist/HOC_AUTO_RAM_TEST.zip b/dist/HOC_AUTO_RAM_TEST.zip new file mode 100644 index 00000000..cd086a1e Binary files /dev/null and b/dist/HOC_AUTO_RAM_TEST.zip differ diff --git a/dist/README.md b/dist/README.md index e2008ca6..ec7e6659 100644 --- a/dist/README.md +++ b/dist/README.md @@ -41,10 +41,8 @@ It enables advanced CPU, GPU, and RAM tuning with user-friendly configuration to * Built-in configurator * Compatible with most homebrew -> *Higher (potentially dangerous) frequencies are unlockable via configuration.* -> *Erista and Mariko units can usually push a bit further fully safely with a bit of undervolting, however this may not work on all units.* -> *The exact maximum overclock possible varies per console, although most consoles should be able to do this safely.* -> *You may refer to the Clock Table to see clocks in more detail* +> It is reccomended to read the [guide](https://rentry.co/howtoget60fps) before proceeding, as this can help you get a *significant* performance boost over the default settings, often times with less power draw and heat output + --- ## Installation @@ -98,8 +96,8 @@ Refer to COMPILATION.md ### CPU clocks * 2601 → mariko absolute max, very dangerous * 2499 -* 2397 -* 2295 → mariko safe max with UV (low speedo) +* 2397 → mariko safe max with UV (low speedo) +* 2295 * 2193 * 2091 * 1963 → mariko no UV max clock diff --git a/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp b/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp index 0882b2b2..63e94c8d 100644 Binary files a/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp and b/dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp differ diff --git a/dist/atmosphere/kips/hoc.kip b/dist/atmosphere/kips/hoc.kip index 8774f3de..4d8668fb 100644 Binary files a/dist/atmosphere/kips/hoc.kip and b/dist/atmosphere/kips/hoc.kip differ diff --git a/dist/switch/.overlays/horizon-oc-overlay.ovl b/dist/switch/.overlays/horizon-oc-overlay.ovl index 507ff76f..138540ba 100644 Binary files a/dist/switch/.overlays/horizon-oc-overlay.ovl and b/dist/switch/.overlays/horizon-oc-overlay.ovl differ