Sys-clk-OC: fix emulator-mode detection
This commit is contained in:
26
README.md
26
README.md
@@ -144,19 +144,11 @@ This project will not be actively maintained or regularly updated along with Atm
|
|||||||
- Fusee will load any kips in `/atmosphere/kips/` automatically.
|
- Fusee will load any kips in `/atmosphere/kips/` automatically.
|
||||||
|
|
||||||
|
|
||||||
|
### Patching sysmodules manually
|
||||||
|
|
||||||
## Build
|
This method is only served as reference.
|
||||||
|
|
||||||
Grab necessary patches from the repo, then compile sys-clk, ReverseNX-RT and Atmosphere loader with devkitpro.
|
Patched sysmodules would be persistent until pcv or ptm was updated in new HOS (usually in `x.0.0`).
|
||||||
|
|
||||||
If you are to install nro forwarders, remove `R_TRY(ValidateAcidSignature(std::addressof(g_original_meta_cache.meta)));` in `Atmosphere/stratosphere/loader/source/ldr_meta.cpp` to make them work again.
|
|
||||||
|
|
||||||
Uncompress the kip to make it work with config editor: `hactool -t kip1 Atmosphere/stratosphere/loader/loader.kip --uncompress=Atmosphere/stratosphere/loader/loader.kip`
|
|
||||||
|
|
||||||
|
|
||||||
### [DEPRECATED] Patching sysmodules manually
|
|
||||||
|
|
||||||
This method is NOT RECOMMENDED and NOT SUPPORTED ANY MORE, only served as reference.
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
@@ -178,6 +170,18 @@ This method is NOT RECOMMENDED and NOT SUPPORTED ANY MORE, only served as refere
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
### Loader KIP
|
||||||
|
|
||||||
|
Grab necessary patches from the repo, then compile sys-clk, ReverseNX-RT and Atmosphere loader with devkitpro.
|
||||||
|
|
||||||
|
If you are to install nro forwarders, remove `R_TRY(ValidateAcidSignature(std::addressof(g_original_meta_cache.meta)));` in `Atmosphere/stratosphere/loader/source/ldr_meta.cpp` to make them work again.
|
||||||
|
|
||||||
|
Uncompress the kip to make it work with config editor: `hactool -t kip1 Atmosphere/stratosphere/loader/loader.kip --uncompress=Atmosphere/stratosphere/loader/loader.kip`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Acknowledgement
|
## Acknowledgement
|
||||||
|
|
||||||
- CTCaer for [Hekate-ipl](https://github.com/CTCaer/hekate) bootloader, RE and hardware research
|
- CTCaer for [Hekate-ipl](https://github.com/CTCaer/hekate) bootloader, RE and hardware research
|
||||||
|
|||||||
@@ -163,22 +163,22 @@ uint32_t ClockManager::GetHz(SysClkModule module)
|
|||||||
|
|
||||||
return this->oc->maxMEMFreq;
|
return this->oc->maxMEMFreq;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Handle Handheld Emulator-Mode limit */
|
/* Handle Handheld Emulator-Mode limit */
|
||||||
if (this->context->realProfile == SysClkProfile_Handheld)
|
if (this->context->realProfile == SysClkProfile_Handheld)
|
||||||
|
{
|
||||||
|
switch (module)
|
||||||
{
|
{
|
||||||
switch (module)
|
case SysClkModule_CPU:
|
||||||
{
|
this->oc->handheldEmulatorMode = (hz > SYSCLK_CPU_HANDHELD_MAX_HZ);
|
||||||
case SysClkModule_CPU:
|
break;
|
||||||
this->oc->handheldEmulatorMode = (hz > SYSCLK_CPU_HANDHELD_MAX_HZ);
|
case SysClkModule_GPU:
|
||||||
break;
|
if (this->oc->handheldEmulatorMode)
|
||||||
case SysClkModule_GPU:
|
hz = std::min(hz, SYSCLK_GPU_HANDHELD_EMULATOR_HZ);
|
||||||
if (this->oc->handheldEmulatorMode)
|
break;
|
||||||
hz = std::min(hz, SYSCLK_GPU_HANDHELD_EMULATOR_HZ);
|
default:
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user