fioDread

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

Moderators: cheriff, Herben

Post Reply
methos3
Posts: 89
Joined: Fri Feb 01, 2008 3:21 am

fioDread

Post by methos3 »

Hello again!
Someone know why we can use the fio functions (fioDread, fioOpen, etc etc) whihout using the fioInit() finction!? Even thought those functions, called from EE, are called by RPC?

And from what module is required to use those functions (looks like they come from nowhere, lol )

Thanks : )
User avatar
jbit
Site Admin
Posts: 293
Joined: Sat May 28, 2005 3:11 am
Location: København, Danmark
Contact:

Post by jbit »

The SDK is open source you know... If you just looked at the top of the functions you'd see:

ps2sdk/ee/kernel/src/fileio.c

Code: Select all

int fioDread(int fd, fio_dirent_t *buf)
{
    struct _fio_dread_arg arg;
    int res;
    if &#40;&#40;res = fioInit&#40;&#41;&#41; < 0&#41;
        return res;
The functions init the fio library themselves....
If I remember correctly the IRX which hosts the RPC server for these functions is called "FILEIO", but not 100% sure and can't check right now.
methos3
Posts: 89
Joined: Fri Feb 01, 2008 3:21 am

Post by methos3 »

Mmm...
Sorry, I looked the "fileio.c" file, including the fioDread() function, but didn't see this line before, sorry for that :(
I've looked into uLaunchelf code and it never loads a IRX called FILEIO, neither from EE memory or from "rom0:"; on the ps2sdk there is a IRX called fileXIO, but it doesn't seem to be needed for the fio functions. I was thinking if it's automatically loaded when the IOP is reset?
User avatar
jbit
Site Admin
Posts: 293
Joined: Sat May 28, 2005 3:11 am
Location: København, Danmark
Contact:

Post by jbit »

Yes, FILEIO and related modules are almost always loaded on IOP reboot...
methos3
Posts: 89
Joined: Fri Feb 01, 2008 3:21 am

Post by methos3 »

Oh, I didn't know that IOP loads modules on reboot (maybe that's why I created this ttis topic :D )
Ok then, very thanks! In no time I will be posting here a network a MC dumper/flasher that I am developing using HDProject's mcdump.irx module.

Thanks and cya!
Post Reply