forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UMD/Flash over USB?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
_.-noel-._



Joined: 13 Aug 2007
Posts: 49

PostPosted: Sat Sep 15, 2007 7:46 pm    Post subject: UMD/Flash over USB? Reply with quote

Hi,

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:

   int i;
   i = sceUmdCheckMedium(0);
   if(i == 0)
   {
       sceUmdWaitDriveStat(UMD_WAITFORDISC);
   }
   sceUmdActivate(1, "disc0:");
   sceUmdWaitDriveStat(UMD_WAITFORINIT);


but when i will access the "disc0" with:
Code:

   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);

Why?

Or must i Assign the UMD?
with:
Code:

   sceIoUnassign("disc0:");
   sceIoAssign("disc0:", IOASSIGN_RDONLY, NULL, 0);


?

And with the Flash, i have also some problems...
I have:

Code:
   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);


Can somebody help me?
It is important, for my project....
_________________
Sry for my english
Back to top
View user's profile Send private message
_.-noel-._



Joined: 13 Aug 2007
Posts: 49

PostPosted: Sun Sep 16, 2007 3:14 am    Post subject: Reply with quote

has nobody an answer?

Important is the flash0 access...
plZ help me...

-.-
_________________
Sry for my english
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Sun Sep 16, 2007 3:52 am    Post subject: Reply with quote

I dont think either is important and doesn't some of the custom firmwares already provide this support ?
Back to top
View user's profile Send private message
_.-noel-._



Joined: 13 Aug 2007
Posts: 49

PostPosted: Sun Sep 16, 2007 4:50 am    Post subject: Reply with quote

this is important...
and i will code my programm, dont use the "recovery" or someting like this.

because its my first BIGGER project....

I have written litle tools, befor, but here i need help...

and i think, i can geht here help, but it look bad....

:(
_________________
Sry for my english
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Sep 16, 2007 7:16 am    Post subject: Reply with quote

Code:
fd1 = sceIoOpen("disc0:", PSP_O_RDONLY, 0);


"disc0:" isn't a file, it's a device. You can't use the standard file commands on a device, only a file.
Back to top
View user's profile Send private message AIM Address
_.-noel-._



Joined: 13 Aug 2007
Posts: 49

PostPosted: Sun Sep 16, 2007 8:31 pm    Post subject: Reply with quote

and how can i access a device?

its my 1 project with Iofilemaneger...
_________________
Sry for my english
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group