simple dir list

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

Moderators: cheriff, Herben

Post Reply
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

simple dir list

Post by radad »

Hi I have got a simple dir list working with the fio* functions but when I try the same with the fileXio* functions it hangs on the first fileXio* call.

Is it true that the fio* functions are part of the ps2sdk kernel and therefore do not need an irx? Whereas the fileXio* need the fileXio.irx?

I am running this through ps2link which loads fileXio.irx so I don't need to load it in my elf, right?

Thanks.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

fileXio.irx isn't loaded by ps2link, thus needs to be loaded by you. Otherwise, all your other assumptions are 'basically' right.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

Thanks for the quick response. I loaded fileXio.irx and it now attempts to do the dir listing. The mode and size values work correctly but the name entry is always empty. Btw this is using the fileXioDread function.
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

And when I use the fileXioGetdir function, the name is again empty but the properties are also all zero. The filesize seems to be correct though.
Any ideas as to what I am doing wrong?
radad
Posts: 246
Joined: Wed May 19, 2004 4:54 pm
Location: Melbourne, Australia

Post by radad »

I tried my dir program using mc0:/ as the path and it lists correctly (using the fio* functions) but when I try it with cdrom0:/ as the path I get this output (none of which is in my code):

dopen name cdrom0:/
nulldev calldopen fd = 2
nulldev callnulldev call

the fioDread returns 0 on the first call indicating the directory is empty. The cd is a PS1 cd, does that matter? I don't have a PS2 cd.
Post Reply