 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
kouky

Joined: 25 Sep 2007 Posts: 48 Location: London
|
Posted: Sun Jun 08, 2008 4:42 am Post subject: usb_mass read dir issue |
|
|
Hello, I'm trying to find a way to read directories on a usb stick.
I'm using the usb_mass example, the moduels are said to be correctly loaded, but...
the function:
listDirectory("/");
| Code: |
void listDirectory(char* path) {
int ret;
fat_dir_record record;
int counter = 0;
TWIN_PRINTF("DIRECTORY LIST path=%s \n", path);
TWIN_PRINTF("------------------------------------ \n");
/* list the root directory */
ret = usb_mass_getFirstDirentry(path, &record);
while (ret > 0 ) {
counter++;
listDirRecord(&record);
ret = usb_mass_getNextDirentry(&record);
}
if (counter == 0) {
TWIN_PRINTF("no files in root directory ? \n");
}
}
|
always return the "no files in root directory ?" error...
I've tried with "/", "mass:/", "mass0:/", "mass://" but always the same error...
any help ?
Hint: I'm using the pink slim PS2, I'm booting with Swap magic, and I'm running the mass_example.elf from the same usb stick I'm triying to read thre directories from. _________________ softwares for artists on video game systems - http://www.pikilipita.com |
|
| Back to top |
|
 |
Lukasz

Joined: 19 Jan 2004 Posts: 248 Location: Denmark
|
Posted: Fri Jun 13, 2008 6:11 pm Post subject: |
|
|
I'm getting the same results for my usb pendrive, there are files on the pendrive, however the usb mass example does not list them. _________________ Lukasz.dk |
|
| Back to top |
|
 |
cosmito
Joined: 04 Mar 2007 Posts: 314 Location: Portugal
|
Posted: Fri Jun 13, 2008 8:56 pm Post subject: |
|
|
Hmm interesting. It worked on particular conditions... Could it be an init issue?
My load procedure : Boot from Datel Memory Plus 64 using lukasz loader http://lukasz.dk/2008/04/22/datel-memory-plus-64-mb which loads uLE as mc0:/BESLES-00000 MP/EXECUTE1.ELF, launch PS2Link1.51, launch mass_example.elf : And I get the same results as you.
But, if I do the same boot procedure as above but boot the PS2 with the USB pen inserted (although uLE is still loaded from the memory card, not from USB), the example works fine.
@kouky,
Also look at oggplayerbeta01 from CarelessWhisper. It reads dir and loads (ogg) files from USB just fine :
http://www.ps2-scene.org/forums/ps2-homebrew-dev-emu-scene/50393-ogg-vorbis-player-demo.html?highlight=Ogg |
|
| Back to top |
|
 |
kouky

Joined: 25 Sep 2007 Posts: 48 Location: London
|
Posted: Sun Jun 15, 2008 4:09 am Post subject: |
|
|
Just tried the oggplayerbeta01 and it works :)
I'll try to investigate its source now.
Thanks for your help! _________________ softwares for artists on video game systems - http://www.pikilipita.com |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|