sce_fileio: unrecognized code ff

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
jhirst
Posts: 4
Joined: Thu Jun 03, 2004 7:41 pm
Location: Wales, UK
Contact:

sce_fileio: unrecognized code ff

Post 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.
"Video games don't affect kids, I mean if Pac Man affected us as kids, we'd all run around in a darkened room munching pills and listening to repetitive music."
nicp067
Posts: 15
Joined: Tue Jan 20, 2004 3:48 am
Location: Quebec,Canada

Post 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.
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Re: sce_fileio: unrecognized code ff

Post 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.
jhirst
Posts: 4
Joined: Thu Jun 03, 2004 7:41 pm
Location: Wales, UK
Contact:

Post 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.
"Video games don't affect kids, I mean if Pac Man affected us as kids, we'd all run around in a darkened room munching pills and listening to repetitive music."
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post 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.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post 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...
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Good point. Who knows? :)
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

ooPo wrote:Good point. Who knows? :)
Oh! Oh! I do! I know! I know!
*waves hand impatiently*
Shoot Pixels Not People!
Makeshift Development
jhirst
Posts: 4
Joined: Thu Jun 03, 2004 7:41 pm
Location: Wales, UK
Contact:

Still no luck

Post 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?
"Video games don't affect kids, I mean if Pac Man affected us as kids, we'd all run around in a darkened room munching pills and listening to repetitive music."
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Re: Still no luck

Post 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 ;)
Shoot Pixels Not People!
Makeshift Development
jhirst
Posts: 4
Joined: Thu Jun 03, 2004 7:41 pm
Location: Wales, UK
Contact:

Post 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!
"Video games don't affect kids, I mean if Pac Man affected us as kids, we'd all run around in a darkened room munching pills and listening to repetitive music."
Post Reply