I study the possibility to detect the PSP when connected to a PC and write audio or video media directly to the PSP. Do you know if I can found an API or SDK that can be use to do that?
Thanks
API & SDK for transferring files into the PSP?
Re: API & SDK for transferring files into the PSP?
checking for the hidden ms standard files could be a good ideajy_p wrote:I study the possibility to detect the PSP when connected to a PC and write audio or video media directly to the PSP. Do you know if I can found an API or SDK that can be use to do that?
Thanks
AFAIK, there are no APIs available for this sort of thing. But it's not so hard to do, really. Some tips:
There are some hidden files (e.g. memstick.ind or similar names) that in theory can be used to detect the presence of a memory stick attached to the PC via USB mode.
The problem in practice is that those files are only present if the memory stick has been formatted by the PSP from the XMB, which isn't always the case.
It's generally best (IMHO) to use some sort of heuristics based on the standard, visible folders that are pretty much always present. You may need to allow for different firmware version variations in the folder tree, however.
Reliable folders to check for include "/psp" (although that's a pretty likely folder to find on one's hard-drive, too...) and "/psp/game" (much more specific, although perhaps not guaranteed to be present on a memory stick that was not formatted by the PSP, and has not been used for demo downloads or homebrew).
I wouldn't like to guarantee that "/psp/photo" and "/psp/music" are always present these days, since FW 2.80 introduced "/pictures" and "/music" as the new standard location for those, and possibly doesn't create the old folder names any more.
When it comes to writing the actual media, it's pretty much as simple as writing the file to appropriate location on the memory stick, with perhaps these caveats:
There are some hidden files (e.g. memstick.ind or similar names) that in theory can be used to detect the presence of a memory stick attached to the PC via USB mode.
The problem in practice is that those files are only present if the memory stick has been formatted by the PSP from the XMB, which isn't always the case.
It's generally best (IMHO) to use some sort of heuristics based on the standard, visible folders that are pretty much always present. You may need to allow for different firmware version variations in the folder tree, however.
Reliable folders to check for include "/psp" (although that's a pretty likely folder to find on one's hard-drive, too...) and "/psp/game" (much more specific, although perhaps not guaranteed to be present on a memory stick that was not formatted by the PSP, and has not been used for demo downloads or homebrew).
I wouldn't like to guarantee that "/psp/photo" and "/psp/music" are always present these days, since FW 2.80 introduced "/pictures" and "/music" as the new standard location for those, and possibly doesn't create the old folder names any more.
When it comes to writing the actual media, it's pretty much as simple as writing the file to appropriate location on the memory stick, with perhaps these caveats:
- Check for file already existing
- Video is awkward on FW 2.71 or below - some firmwares don't support some codecs, and you need to copy the file with some fairly tight restrictions on filename and extension, as well as copying to the correct folder name depending on the codec. Best to search for existing newbie PSP media tutorials for full details
- Video on 2.80+ is supposedly easier, one single folder ("/video"?) and autodetection of codec.
Got a v2.0-v2.80 firmware PSP? Download the eLoader here to run homebrew on it!
The PSP Homebrew Database needs you!
The PSP Homebrew Database needs you!