Skip to content

Instantly share code, notes, and snippets.

@uyjulian
Last active December 17, 2025 22:34
Show Gist options
  • Select an option

  • Save uyjulian/99401bab576ae422a76f9004b79b4f82 to your computer and use it in GitHub Desktop.

Select an option

Save uyjulian/99401bab576ae422a76f9004b79b4f82 to your computer and use it in GitHub Desktop.
// Detect jumper position of System 256 if in 246+ or 256 mode
void test(void)
{
uint64_t v4 = 0;
int64_t v5 = 0;
for (int i = 0; i < 10; i += 1)
{
int64_t TimerSystemTime = GetTimerSystemTime();
DelayThread(16666);
v4 += GetTimerSystemTime() - TimerSystemTime;
sceGsSyncV(0);
int64_t v7 = GetTimerSystemTime();
sceGsSyncV(0);
v5 += GetTimerSystemTime() - v7;
}
int64_t v8 = (int)(100 * v5 / v4);
int64_t gClockType = 0;
if ( v8 >= 97 && v8 <= 103 )
gClockType = 100;
else if ( v8 >= 130 && v8 <= 136 )
gClockType = 133;
if ( gClockType <= 100 )
{
// System is in 246+ mode
// e.g. display "SYSTEM256 MODE SETTING ERROR"
}
else
{
// System is in 256 mode
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment