Page 1 of 1

sce_fileio: unrecognized code ff

Posted: Thu Jun 03, 2004 7:53 pm
by jhirst
Help. I am the sole programmer for a company in the UK. We used to have a T10K but it is the other side of the country at the moment. I have all of the Sony files and a renderer made by our sister company. I know that the code that I have works on a T10K. We have a demo that is PC and PS2. I want to burn a demo disk to send out. I have Naplink working (the 3stars demo works). I need to use the code that we already have, and the Sony libraries.

Now the problem:

I am trying to use the Sony function "sceOpen" to open a file (to test that things are working). As soon as I get to the sceOpen call -
sceOpen("d:\Text.txt, SCE_RDONLY); it fails and I get sce_fileio: unrecognized code ff error.

I have tried host0 instead of d but no luck. It obviously does not like the sceOpen but why not?

Sorry if I sound a bit clueless, I am quite new to the PS2 stuff. Any help would be greatly appreciated.

Posted: Thu Jun 03, 2004 11:18 pm
by nicp067
If your code is build with the T10k library, chance are that it will not work properly on a normal PS2. Maybe this is what you are experiencing.

Re: sce_fileio: unrecognized code ff

Posted: Thu Jun 03, 2004 11:41 pm
by mharris
jhirst wrote:I am trying to use the Sony function "sceOpen" to open a file (to test that things are working). As soon as I get to the sceOpen call -
sceOpen("d:\Text.txt, SCE_RDONLY); it fails and I get sce_fileio: unrecognized code ff error.
Obviously you're missing a quotation mark in your post, or it wouldn't compile, but are you using \ instead of / ? If you insist on using backslash, make sure you double it (\\) otherwise C will interpret it as \T which may or may not be the tab character ("\t" is tab).

Using backslashes as directory separators is evil, evil, evil. Get out of that habit, or you'll run into this over and over. Even the MS libraries will accept slashes as directory separators in their libraries so there's absolutely no reason to ever use backslashes.

Posted: Thu Jun 03, 2004 11:55 pm
by jhirst
*Edit* You are correct mharris, but that was only one of the many ways that I have tried. As described below, the sceSifSyncIop function will not exit, even though the Reboot function seems to run. The missing quotation mark was just a typo *


The thing is, at the start of the code I only do a couple of lines to test, namely
sceSifRebootIop("d:\\usr\\local\\sce\\iop\\modules\\ioprp255.img")
and then
sceSifSyncIop()

the sceSifSyncIop function checks to see if the IOP was rebooted (i.e. with sceSifRebootIop

It will not come out of the sceSifSyncIop function, so the IOP is not rebooted.

These two functions should definitely work with a PS2 though.

Posted: Fri Jun 04, 2004 12:05 am
by ooPo
Unless you have a driver of some sort registered to provide file access with a device name of 'd', the PS2 isn't going to know where to find that file. If its located on the host, you'll have to use 'host' as the device name.

Try putting the ioprp255.img file into the same directory you're running the program from and accessing it with:

sceSifRebootIop("host:ioprp255.img");

You should see a message from your client that its trying to access that file.

Posted: Fri Jun 04, 2004 2:31 am
by TyRaNiD
Of course can you reboot the IOP using an IMG from host on a normal PS2 ? I would have thought the image was loaded after reset, i.e. after you have just nuked your ps2link host driver.

Not that I have ever bothered to try so...

Posted: Fri Jun 04, 2004 3:30 am
by ooPo
Good point. Who knows? :)

Posted: Fri Jun 04, 2004 4:09 am
by Drakonite
ooPo wrote:Good point. Who knows? :)
Oh! Oh! I do! I know! I know!
*waves hand impatiently*

Still no luck

Posted: Fri Jun 04, 2004 5:52 pm
by jhirst
Good morning helpful peoples! I think you are all US or Canada so you haven't got up yet (or is it that you are about to go to bed?). Anyway, I am still not getting a return from sceSifSyncIop();

I tried the following (ioprp255.img is in the same directory as the .ELF file, which is the shared directory in NetClient):

sceSifRebootIop("host:ioprp255.img");

Ahhh! So close but yet so far.

Do you really know Drakonite?

Re: Still no luck

Posted: Sat Jun 05, 2004 11:40 am
by Drakonite
jhirst wrote: Do you really know Drakonite?
Yup. I do.

.

.

.

Oh, you wanted me to tell you? ;)

At least with the homebrew setup, host is destroyed when you reboot the IOP.
The order of RebootIOP is to reboot the IOP before opening and loading the IMG file. So no, you can't load an img file from host on a homebrew setup like that ;)

Posted: Mon Jun 07, 2004 6:24 pm
by jhirst
Of course you are correct.

I have go passed that point now, thanks. Bigboss great help! I shouldn't have put Sony code on the forum so I will refrain from doing that any more! One step closer!