Help, opening files on UMD
Help, opening files on UMD
Is there a special way to read files from UMD?
I can open the file with either of the following:-
int fd = sceIoOpen("umd0:/UMD_DATA.BIN", O_RDONLY, 0);
int fd = sceIoOpen("disc0:/UMD_DATA.BIN", O_RDONLY, 0);
However, when I try and read the file with:
res = sceIoRead(fd, buf, read_size);
It fails. Is there some special way to Open these files? Anyone done it?
Steddy
I can open the file with either of the following:-
int fd = sceIoOpen("umd0:/UMD_DATA.BIN", O_RDONLY, 0);
int fd = sceIoOpen("disc0:/UMD_DATA.BIN", O_RDONLY, 0);
However, when I try and read the file with:
res = sceIoRead(fd, buf, read_size);
It fails. Is there some special way to Open these files? Anyone done it?
Steddy
Emm... not according to this:-Vampire wrote:umd0 is a block device
http://forums.ps2dev.org/viewtopic.php?t=1646
The Open command succeeds with the full path to the file in there, so I don't think it can be a block device.
Steddy
Really... seems a little odd to me. How long is eventually.
I left it going 2 minutes and it still didn't complete the open.
Steddy
I left it going 2 minutes and it still didn't complete the open.
Code: Select all
/* Now attempt to dump the UMD file passed */
int fd;
do {
int fd = sceIoOpen(fromfile, O_RDONLY, 0);
} while (fd<0);
could you actually read from it then or does that just make the ioopen succeed?steddy wrote:Really... seems a little odd to me. How long is eventually.
I left it going 2 minutes and it still didn't complete the open.
SteddyCode: Select all
/* Now attempt to dump the UMD file passed */ int fd; do { int fd = sceIoOpen(fromfile, O_RDONLY, 0); } while (fd<0);
if it is dma then you probably need to register a callback which is called with the address of the data when it arrives..
-
- Posts: 62
- Joined: Tue May 31, 2005 5:11 am
-
- Posts: 62
- Joined: Tue May 31, 2005 5:11 am
Thanks for offering to try it.
I also haven't got to the read, that above loop never exits.
I boot the device with the Wipeout UMD inserted, then run the code. I have tried ejecting and reinserting also.
I doubt that code running from the UMD needs to do anything special, since its already on the UMD so it must be open. Sony may have made it so the disk needs unlocking in some way when running from another location.
Steddy
I also haven't got to the read, that above loop never exits.
I boot the device with the Wipeout UMD inserted, then run the code. I have tried ejecting and reinserting also.
I doubt that code running from the UMD needs to do anything special, since its already on the UMD so it must be open. Sony may have made it so the disk needs unlocking in some way when running from another location.
Steddy
-
- Posts: 62
- Joined: Tue May 31, 2005 5:11 am
I really thought you had it then and I was being really dumb. I introduced that error when I put the delay in, it wasn't there before.0xdeadface wrote:Steddy,
There's an error in your code.
You redefine fd inside the while loop again, so the value you check as termination is the one defined outside the loop....that one will never change.
Remove the 'int' from the inner loop :)
0xdf
I changed it to this:-
Code: Select all
int fd;
do {
fd = sceIoOpen(fromfile, O_RDONLY, 0);
} while (fd<0);
I am wondering if it doesn't like the '_' in the file name. Mine is a JAP PSP and I wonder if it should be encoded differently.
Steddy
-
- Posts: 62
- Joined: Tue May 31, 2005 5:11 am
-
- Posts: 62
- Joined: Tue May 31, 2005 5:11 am
Okay...
I did have other code in the while to display the result so I could see it change. Because my output macro by default waits for the VBlank, I think that made it work. With the loop as posted above it indeed does not...thread starvation?
However, if you insert a sceDisplayWaitVblankStart() in the while loop.....any better?
0xdf
I did have other code in the while to display the result so I could see it change. Because my output macro by default waits for the VBlank, I think that made it work. With the loop as posted above it indeed does not...thread starvation?
However, if you insert a sceDisplayWaitVblankStart() in the while loop.....any better?
0xdf
Code: Select all
do {
fd = sceIoOpen(fromfile, O_RDONLY, 0);
sceDisplayWaitVblankStart();
} while (fd<0);
As per this ongoing discussion, I'm afraid we can't have threads showing folks how to dump their UMDs.
Vampire I'm a bit surprised you would post that even after the discussion.
steddy if you want to know how to get files off of UMD, you're going to have to find out on your own or somewhere else.
Locked.
Vampire I'm a bit surprised you would post that even after the discussion.
steddy if you want to know how to get files off of UMD, you're going to have to find out on your own or somewhere else.
Locked.