There were 4 reports of Nyx hanging or UMS and backup verification failing because of low binned Erista SoC.
This change reduces clock for hekate main and Nyx will now automatically try and find a working one.
In case Nyx hangs it will reduce it on next inject.
If Nyx works and user still has issues with UMS/Verification, manually editing nyx.ini and setting `bpmpclock=2` will fix that.
- Refactor various variables and functions
- Flush whole cache when full
- Allow cache to be disabled
- Add support for raw emuMMC in nyx contenxt
- Use partition names for keys (to avoid issues with different ordering)
- Add deinit function that flushes the whole cache
- Change bis lookup address
- Halve cache size to 256MB in order to support 512MB ramdisk also.
Co-Authored-By: shchmue <7903403+shchmue@users.noreply.github.com>
BDK will allow developers to use the full collection of drivers,
with limited editing, if any, for making payloads for Nintendo Switch.
Using a single source for everything will also help decoupling
Switch specific code and easily port it to other Tegra X1/X1+ platforms.
And maybe even to lower targets.
Everything is now centrilized into bdk folder.
Every module or project can utilize it by simply including it.
This is just the start and it will continue to improve.
gcc 10 no longer lets you get away with not externing global variables in header files. This adds the necessary extern and adds defines in appropriate c files
hekate main always runs in compatibility mode (SDR82).
This ensures speed on boot process.
Nyx will first try SDR104.
If the sd card is a sandisk U1 and fails, it will try the compatibility mode.
After that it fallbacks to lower bus speeds.
Both support 1bit mode for broken sd card readers.
Having the new error checking in the sdmmc driver, allows for all that to work.
It can now fail instead of continuing, like how HOS reacts.