void syspatch_init() { setup_module_handler(); previous = sctrlHENSetStartModuleHandler(&syspatch_module_chain); patch_sceLoaderCore(); patch_sceMemlmd(); patch_sceInterruptManager(); patch_sceSystemMemoryManager(); sync_cache(); }
int module_start(SceSize args, void* argp) { char keypath[128]; int ret; SceIoStat stat; psp_fw_version = sceKernelDevkitVersion(); setup_patch_offset_table(psp_fw_version); psp_model = sceKernelGetModel(); memset(&conf, 0, sizeof(conf)); sctrlSEGetConfig(&conf); printk_init("ms0:/popcorn.txt"); printk("Popcorn: init_file = %s psp_fw_version = 0x%08X psp_model = %d\n", sceKernelInitFileName(), (uint)psp_fw_version, (int)psp_model); get_keypath(keypath, sizeof(keypath)); ret = sceIoGetstat(keypath, &stat); g_keys_bin_found = 0; if(ret == 0) { ret = load_key(keypath, g_keys, sizeof(g_keys)); if(ret == 0) { g_keys_bin_found = 1; printk("keys.bin found\n"); } } g_is_custom_ps1 = is_custom_ps1(); g_icon0_status = get_icon0_status(); if(g_is_custom_ps1) { setup_psx_fw_version(psp_fw_version); } g_previous = sctrlHENSetStartModuleHandler(&popcorn_patch_chain); patch_scePops_Manager(); sync_cache(); return 0; }
int thread_start(SceSize args, void *argp) { previous = sctrlHENSetStartModuleHandler(module_start_handler); return 0; }