void kstuffGetMoboVersions(int* baryon, int* tachyon) { u32 by, ty; int k; k = pspSdkSetK1(0); ty = sceSysreg_driver_E2A5D1EE(); sceSyscon_driver_7EC5A957(&by); pspSdkSetK1(k); (*baryon) = by; (*tachyon) = ty; }
// 75F0 int sceLcdcInit() { SceLcdcHwController *hwCtl = (SceLcdcHwController*)(0xBE140000); memset(&g_lcdc, 0, sizeof(g_lcdc)); g_lcdc.v3_0 = 1; int v = sub_0768(); sub_0A80(); int model = sceSysreg_driver_E2A5D1EE(); g_lcdc.mobo = model; // patch for newer versions if (model > 0x4FFFFF) { // 76B0 if (model > 0x7FFFFF) { // 7720 hwCtl = (SceLcdcHwController*)(0xBE140100); if (v == 0) { *(int*)(0xBE140000) = 0; *(int*)(0xBE140200) = 1; } // 7740 g_lcdcDispModeList[8].clk[1] = 2; g_lcdc.v3_8 = 1; g_lcdcDispModeList[3].id = -1; g_lcdcDispModeList[6].clk[1] = 4; g_lcdc.scale = 1; g_lcdcDispModeList[1].clk[0] = 2; g_lcdcDispModeList[1].clk[1] = 2; g_lcdcDispModeList[2].id = -1; g_lcdcDispModeList[4].clk[0] = 2; g_lcdcDispModeList[4].clk[1] = 4; g_lcdcDispModeList[5].clk[0] = 2; g_lcdcDispModeList[5].clk[1] = 4; g_lcdcDispModeList[6].clk[0] = 2; *(int*)(0xBE140170) = 1; } else { hwCtl = (SceLcdcHwController*)(0xBE140000); g_lcdc.scale = 3; g_lcdc.v3_8 = 1; g_lcdcDispModeList[3].id = -1; g_lcdcDispModeList[8].clk[1] = 1; *(int*)(0xBE140070) = 1; g_lcdcDispModeList[0].clk[1] = 1; g_lcdcDispModeList[1].clk[0] = 1; g_lcdcDispModeList[1].clk[1] = 1; g_lcdcDispModeList[2].id = -1; g_lcdcDispModeList[4].clk[0] = 1; g_lcdcDispModeList[4].clk[1] = 1; g_lcdcDispModeList[5].clk[0] = 1; g_lcdcDispModeList[5].clk[1] = 1; g_lcdcDispModeList[6].clk[0] = 1; g_lcdcDispModeList[6].clk[1] = 1; g_lcdcDispModeList[7].clk[1] = 1; g_lcdcDispModeList[8].clk[0] = 1; } } else g_lcdc.scale = 1; // 766C g_lcdc.hwCtl = hwCtl; sceLcdc_driver_901B9073(); g_lcdc.hwCtl->v2_0 |= 3; sceKernelRegisterSysEventHandler(&lcdcEvent); return 0; }