homebrew to query clkrst registers, requires rebuilding nx-hbloader to allow access; emc pllm(b) divm accepts 1/2/4 only
This commit is contained in:
@@ -3,7 +3,7 @@ export CC := g++-11
|
||||
all: test
|
||||
|
||||
test:
|
||||
$(CC) ldr_oc_suite.cpp test.cpp -o ./test -O2 -std=c++20 -DOC_TEST
|
||||
$(CC) ldr_oc_suite.cpp test.cpp -o ./test -O2 -std=c++20
|
||||
|
||||
clean:
|
||||
rm ./test
|
||||
|
||||
@@ -29,7 +29,7 @@ static const volatile CustomizeTable C = {
|
||||
|
||||
/* Mariko EMC:
|
||||
* - RAM Clock in kHz:
|
||||
* Values should be > 1600000, and divided evenly by 9600 or 12800.
|
||||
* Values should be > 1600000, and divided evenly by 9600.
|
||||
* [WARNING]
|
||||
* RAM overclock could be UNSTABLE if timing parameters are not suitable for your DRAM:
|
||||
* - Graphical glitches
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//#define EXPERIMENTAL
|
||||
|
||||
#ifdef OC_TEST
|
||||
#ifndef ATMOSPHERE_IS_STRATOSPHERE
|
||||
#include "ldr_oc_suite_test.hpp"
|
||||
#else
|
||||
#include <stratosphere.hpp>
|
||||
@@ -170,7 +170,7 @@ namespace ams::ldr::oc {
|
||||
} pllmb_div;
|
||||
|
||||
constexpr pllmb_div div[] = {
|
||||
{3, 4}, {2, 3}, {1, 2}, {1, 3}, {1, 4}, {0, 1}
|
||||
{3, 4}, {1, 2}, {1, 4}, {0, 1}
|
||||
};
|
||||
|
||||
constexpr u32 pll_osc_in = 38400;
|
||||
@@ -1124,7 +1124,7 @@ namespace ams::ldr::oc {
|
||||
void Patch(uintptr_t mapped_nso, size_t nso_size) {
|
||||
SafetyCheck();
|
||||
|
||||
#ifdef OC_TEST
|
||||
#ifndef ATMOSPHERE_IS_STRATOSPHERE
|
||||
void* buf = malloc(nso_size);
|
||||
uintptr_t mapped_exe = reinterpret_cast<uintptr_t>(buf);
|
||||
std::memcpy(buf, reinterpret_cast<void *>(mapped_nso), nso_size);
|
||||
@@ -1144,7 +1144,7 @@ namespace ams::ldr::oc {
|
||||
|
||||
namespace ptm {
|
||||
void Patch(uintptr_t mapped_nso, size_t nso_size) {
|
||||
#ifndef OC_TEST
|
||||
#ifdef ATMOSPHERE_IS_STRATOSPHERE
|
||||
bool isMariko = (spl::GetSocType() == spl::SocType_Mariko);
|
||||
if (!isMariko)
|
||||
return;
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace ams::ldr::oc {
|
||||
|
||||
inline Result ResultFailure() { return -1; }
|
||||
|
||||
#ifndef OC_TEST
|
||||
#ifdef ATMOSPHERE_IS_STRATOSPHERE
|
||||
#define LOGGING(fmt, ...) ((void)0)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifdef OC_TEST
|
||||
#ifndef ATMOSPHERE_IS_STRATOSPHERE
|
||||
#include <iostream>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef OC_TEST
|
||||
#ifndef ATMOSPHERE_IS_STRATOSPHERE
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
|
||||
Reference in New Issue
Block a user