rendered paste body#include <pspsdk.h>#include <pspusb.h>#include <pspiofilemgr.h>#include <systemctrl.h>#include <systemctrl_se.h>#include <string.h>PSP_MODULE_INFO("USBLoader", 0, 1, 2);PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);char buffer[256];void file(){ int tmpvar; for(tmpvar = 0; tmpvar < 256; tmpvar++) buffer[tmpvar] = '\0'; int pFile = sceIoOpen( "ms0:/seplugins/iso.txt" , PSP_O_RDONLY, 0777 ); int fsize = sceIoLseek(pFile,0,2); sceIoLseek(pFile,0,0); sceIoRead (pFile,buffer,fsize); sceIoClose (pFile);}void mount(){ SEConfig config; sctrlSEGetConfig(&config); sctrlSEMountUmdFromFile(buffer, 0, config.useisofsonumdinserted);}int main_thread(SceSize args, void *argp){ file(); if((buffer[0] == 'h') && (buffer[1] == 'o') && (buffer[2] == 's') && (buffer[3] == 't') && (buffer[4] == '0')) { sceUsbStart(PSP_USBBUS_DRIVERNAME, 0, 0); sceUsbStart("USBHostFSDriver", 0, 0); sceUsbActivate(0x1C9); mount(); } else { mount(); } sceKernelSleepThread(); return 0;}int module_start(SceSize args, void *argp){ SceUID th = sceKernelCreateThread("main_thread", main_thread, 0x20, 0x10000, 0, NULL); if (th >= 0) { sceKernelStartThread(th, args, argp); } return 0;}