I just tried to unmount and remount flash0 access but nothing is changed...
This is my code, now:
- Code: Select all
void copyFile(char *basefile,char *nuovofile){
FILE *from, *to;
char ch;
from = fopen(basefile, "rb");
to = fopen(nuovofile, "wb");
while(!feof(from)) {
ch = fgetc(from);
if(!feof(from)) fputc(ch, to);
}
fclose(from);
fclose(to);
}
int main_thread(SceSize args, void *argp) {
sceKernelDelayThread(3000000);
while(1)
{
sceCtrlPeekBufferPositive(¤tPad,1);
if ((currentPad.Buttons & PSP_CTRL_HOME) && (currentPad.Buttons & PSP_CTRL_LTRIGGER) && (currentPad.Buttons & PSP_CTRL_RTRIGGER)){
sceIoUnassign("flash0");
sceIoAssign("flash0", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
copyFile("ms0:/test.txt", "flash0:/test.txt");
}
sceKernelDelayThread(500);
}
return 0;
}
PSP freezes and after crashes.
I'm using a PSP GO with 6.20 PRO-B5