sysclk: RETRO super timings till 60hz, improve support
This commit is contained in:
@@ -43,12 +43,17 @@ typedef struct
|
|||||||
uint32_t voltages[HocClkVoltage_EnumMax];
|
uint32_t voltages[HocClkVoltage_EnumMax];
|
||||||
u16 speedos[HorizonOCSpeedo_EnumMax];
|
u16 speedos[HorizonOCSpeedo_EnumMax];
|
||||||
u16 iddq[HorizonOCSpeedo_EnumMax];
|
u16 iddq[HorizonOCSpeedo_EnumMax];
|
||||||
|
|
||||||
|
// Misc stuff
|
||||||
GpuSchedulingMode gpuSchedulingMode;
|
GpuSchedulingMode gpuSchedulingMode;
|
||||||
bool isSysDockInstalled;
|
bool isSysDockInstalled;
|
||||||
bool isSaltyNXInstalled;
|
bool isSaltyNXInstalled;
|
||||||
|
bool isUsingRetroSuper;
|
||||||
u8 maxDisplayFreq;
|
u8 maxDisplayFreq;
|
||||||
u8 dramID;
|
u8 dramID;
|
||||||
bool isDram8GB;
|
bool isDram8GB;
|
||||||
|
|
||||||
|
// FPS / Resolution
|
||||||
u8 fps;
|
u8 fps;
|
||||||
u16 resolutionHeight;
|
u16 resolutionHeight;
|
||||||
} SysClkContext;
|
} SysClkContext;
|
||||||
|
|||||||
@@ -88,12 +88,29 @@ static const DockedTimings g_dockedTimings1080p[] = {
|
|||||||
// technically you can go to 476hz, but in practice, why would you?
|
// technically you can go to 476hz, but in practice, why would you?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// These timings *should* work but are untested
|
||||||
static const HandheldTimings g_handheldTimingsRETRO[] = {
|
static const HandheldTimings g_handheldTimingsRETRO[] = {
|
||||||
{72, 136, 72, 1, 660, 9, 78000},
|
{72, 136, 72, 1, 660, 9, 78000}, // 40Hz
|
||||||
{72, 136, 72, 1, 443, 9, 77985},
|
{72, 136, 72, 1, 612, 9, 77982}, // 41Hz
|
||||||
{72, 136, 72, 1, 270, 9, 78000},
|
{72, 136, 72, 1, 567, 9, 77994}, // 42Hz
|
||||||
{72, 136, 72, 1, 128, 9, 77990},
|
{72, 136, 72, 1, 524, 9, 78002}, // 43Hz
|
||||||
{72, 136, 72, 1, 10, 9, 78000}
|
{72, 136, 72, 1, 483, 9, 78012}, // 44Hz
|
||||||
|
{72, 136, 72, 1, 443, 9, 77985}, // 45Hz
|
||||||
|
{72, 136, 72, 1, 406, 9, 78016}, // 46Hz
|
||||||
|
{72, 136, 72, 1, 370, 9, 78020}, // 47Hz
|
||||||
|
{72, 136, 72, 1, 335, 9, 78000}, // 48Hz
|
||||||
|
{72, 136, 72, 1, 302, 9, 78008}, // 49Hz
|
||||||
|
{72, 136, 72, 1, 270, 9, 78000}, // 50Hz
|
||||||
|
{72, 136, 72, 1, 239, 9, 77979}, // 51Hz
|
||||||
|
{72, 136, 72, 1, 210, 9, 78000}, // 52Hz
|
||||||
|
{72, 136, 72, 1, 182, 9, 78016}, // 53Hz
|
||||||
|
{72, 136, 72, 1, 154, 9, 77976}, // 54Hz
|
||||||
|
{72, 136, 72, 1, 128, 9, 77990}, // 55Hz
|
||||||
|
{72, 136, 72, 1, 103, 9, 78008}, // 56Hz
|
||||||
|
{72, 136, 72, 1, 78, 9, 77976}, // 57Hz
|
||||||
|
{72, 136, 72, 1, 55, 9, 78010}, // 58Hz
|
||||||
|
{72, 136, 72, 1, 32, 9, 77998}, // 59Hz
|
||||||
|
{72, 136, 72, 1, 10, 9, 78000}, // 60Hz
|
||||||
};
|
};
|
||||||
|
|
||||||
static const MinMaxRefreshRate g_handheldModeRefreshRate = {40, 80};
|
static const MinMaxRefreshRate g_handheldModeRefreshRate = {40, 80};
|
||||||
|
|||||||
@@ -601,17 +601,23 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void listUI() override {
|
void listUI() override {
|
||||||
|
BaseMenuGui::refresh(); // get latest context
|
||||||
|
if(!this->context)
|
||||||
|
return;
|
||||||
|
|
||||||
this->listElement->addItem(new tsl::elm::CategoryHeader("Display Settings"));
|
this->listElement->addItem(new tsl::elm::CategoryHeader("Display Settings"));
|
||||||
addConfigToggle(HorizonOCConfigValue_OverwriteRefreshRate, nullptr);
|
addConfigToggle(HorizonOCConfigValue_OverwriteRefreshRate, nullptr);
|
||||||
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
if(!this->context->isUsingRetroSuper) {
|
||||||
renderer->drawString("\uE150 Enabling unsafe display", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
tsl::elm::CustomDrawer* warningText = new tsl::elm::CustomDrawer([](tsl::gfx::Renderer *renderer, s32 x, s32 y, s32 w, s32 h) {
|
||||||
renderer->drawString("refresh rates may cause stress", false, x + 20, y + 50, 18, tsl::style::color::ColorText);
|
renderer->drawString("\uE150 Enabling unsafe display", false, x + 20, y + 30, 18, tsl::style::color::ColorText);
|
||||||
renderer->drawString("or damage to your display! ", false, x + 20, y + 70, 18, tsl::style::color::ColorText);
|
renderer->drawString("refresh rates may cause stress", false, x + 20, y + 50, 18, tsl::style::color::ColorText);
|
||||||
renderer->drawString("Proceed at your own risk!", false, x + 20, y + 90, 18, tsl::style::color::ColorText);
|
renderer->drawString("or damage to your display! ", false, x + 20, y + 70, 18, tsl::style::color::ColorText);
|
||||||
});
|
renderer->drawString("Proceed at your own risk!", false, x + 20, y + 90, 18, tsl::style::color::ColorText);
|
||||||
warningText->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 110);
|
});
|
||||||
this->listElement->addItem(warningText);
|
warningText->setBoundaries(0, 0, tsl::cfg::FramebufferWidth, 110);
|
||||||
addConfigToggle(HorizonOCConfigValue_EnableUnsafeDisplayFreqs, nullptr);
|
this->listElement->addItem(warningText);
|
||||||
|
addConfigToggle(HorizonOCConfigValue_EnableUnsafeDisplayFreqs, nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ static const u32 gpuDvfsArray[] = { 590, 600, 610, 620, 630, 640, 650, 660, 670,
|
|||||||
u32 dvfsTable[6][32] = {};
|
u32 dvfsTable[6][32] = {};
|
||||||
u64 dvfsAddress;
|
u64 dvfsAddress;
|
||||||
u32 ramVmin;
|
u32 ramVmin;
|
||||||
|
bool isRetro = false;
|
||||||
|
|
||||||
const char* Board::GetModuleName(SysClkModule module, bool pretty)
|
const char* Board::GetModuleName(SysClkModule module, bool pretty)
|
||||||
{
|
{
|
||||||
@@ -282,7 +283,7 @@ void Board::Initialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct stat st = {0};
|
struct stat st = {0};
|
||||||
bool isRetro = stat("sdmc:/" FILE_CONFIG_DIR "/retro.flag", &st) == 0;
|
isRetro = (stat("sdmc:/" FILE_CONFIG_DIR "/retro.flag", &st) == 0);
|
||||||
|
|
||||||
u64 clkVirtAddr, dsiVirtAddr, outsize;
|
u64 clkVirtAddr, dsiVirtAddr, outsize;
|
||||||
rc = svcQueryMemoryMapping(&clkVirtAddr, &outsize, 0x60006000, 0x1000);
|
rc = svcQueryMemoryMapping(&clkVirtAddr, &outsize, 0x60006000, 0x1000);
|
||||||
@@ -309,6 +310,10 @@ void Board::Initialize()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Board::IsUsingRetroSuperDisplay() {
|
||||||
|
return isRetro;
|
||||||
|
}
|
||||||
|
|
||||||
void Board::fuseReadSpeedos() {
|
void Board::fuseReadSpeedos() {
|
||||||
|
|
||||||
u64 pid = 0;
|
u64 pid = 0;
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ class Board
|
|||||||
static void SetCpuUvLevel(u32 levelLow, u32 levelHigh, u32 tbreakPoint);
|
static void SetCpuUvLevel(u32 levelLow, u32 levelHigh, u32 tbreakPoint);
|
||||||
static u32 CalculateTbreak(u32 table);
|
static u32 CalculateTbreak(u32 table);
|
||||||
static bool IsHoag();
|
static bool IsHoag();
|
||||||
|
static bool IsUsingRetroSuperDisplay();
|
||||||
protected:
|
protected:
|
||||||
static void FetchHardwareInfos();
|
static void FetchHardwareInfos();
|
||||||
static PcvModule GetPcvModule(SysClkModule sysclkModule);
|
static PcvModule GetPcvModule(SysClkModule sysclkModule);
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ ClockManager::ClockManager()
|
|||||||
this->saltyNXIntegration->LoadSaltyNX();
|
this->saltyNXIntegration->LoadSaltyNX();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->context->isUsingRetroSuper = Board::IsUsingRetroSuperDisplay();
|
||||||
|
|
||||||
threadStart(&cpuGovernorTHREAD);
|
threadStart(&cpuGovernorTHREAD);
|
||||||
threadStart(&gpuGovernorTHREAD);
|
threadStart(&gpuGovernorTHREAD);
|
||||||
|
|||||||
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
Binary file not shown.
BIN
dist/switch/.overlays/Horizon-OC-Monitor.ovl
vendored
BIN
dist/switch/.overlays/Horizon-OC-Monitor.ovl
vendored
Binary file not shown.
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
Binary file not shown.
Reference in New Issue
Block a user