i will access the UMD over USB...
(If this is not allowed in this Forum, i delate it...)
In the "pspumd.h" there is a little sample:
Code: Select all
int i;
i = sceUmdCheckMedium(0);
if(i == 0)
{
sceUmdWaitDriveStat(UMD_WAITFORDISC);
}
sceUmdActivate(1, "disc0:");
sceUmdWaitDriveStat(UMD_WAITFORINIT);
Code: Select all
int fd1,fd2,akt;
fd1 = sceIoOpen("disc0:", PSP_O_RDONLY, 0);
fd2 = sceIoOpen("ms0:/disc0",PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
if(fd1 < 0)
{
printf("Keine Daten gefunden. \n");
}else{
while(1) {
akt = sceIoRead(fd1, buf, BUFSIZE);
if (akt == 0) break;
sceIoWrite(fd2,buf,akt);
}
}
sceIoClose(fd1);
sceIoClose(fd2);
Or must i Assign the UMD?
with:
Code: Select all
sceIoUnassign("disc0:");
sceIoAssign("disc0:", IOASSIGN_RDONLY, NULL, 0);
And with the Flash, i have also some problems...
I have:
Code: Select all
int fd4;
int fd5;
fd4 = sceIoUnassign("flash0:");
fd5 = sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
if(fd4 < 0)
{
printf("Error: sceIoUnassign");
}
if(fd5 < 0)
{
printf("Error: sceIoAssign");
}
sceIoClose(fd4);
sceIoClose(fd5);
sceIoUnassign("flash0:");
sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
It is important, for my project....