Page 1 of 1

cd dir list with fileXioDopen

Posted: Mon Jan 03, 2005 12:05 pm
by bbraun
Iʻve just started playing with PS2 development with the ps2sdk this weekend, and have had success while experimenting with libpad. Iʻve decided to move on to file manipulation, now that I feel reasonably comfortable with controller interaction, and have run into some trouble.
I wanted to do basic directory listings and file manipulation. However, I cannot seem to get fileXioDopen("cdrom0:\\"); to return. Here is the problematic code:

Code: Select all

   cdInit(CDVD_INIT_INIT);
   cdSetMediaMode(CDVD_MEDIA_MODE_CD);
   d = fileXioDopen("cdrom0:\\");
I do not seem to get past fileXioDopen(); The cdInit() and cdSetMediaMode() are in there as suggested by a previous post in a different forum.
Am I doing something wrong here?
Having just started out, I am also a little confused by the relationship between fileXio and fio. Reading some posts here, they seem to overlap in functionality, but not 100%. Some devices work in one, and others do not?

Posted: Mon Jan 03, 2005 1:52 pm
by bbraun
Ah, I just learned about loading the fileXio.irx file to get this functionality. Iʻm getting a little closer to it working now.

Posted: Tue Jan 04, 2005 8:31 am
by bbraun
After talking to a few people on #ps2dev, it seems there is no filesystem driver for cdrom0 to use fioDopen() or fileXioDopen(). It was suggested I look at hiryuʻs libcdvd at http://ps2dev.org/kb.x?T=996 for doing cdrom directory lists.