| View previous topic :: View next topic |
| Author |
Message |
jy_p
Joined: 09 Nov 2006 Posts: 1
|
Posted: Thu Nov 09, 2006 2:12 am Post subject: API & SDK for transferring files into the PSP? |
|
|
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 |
|
| Back to top |
|
 |
weltall
Joined: 20 Feb 2004 Posts: 310
|
Posted: Thu Nov 09, 2006 4:00 am Post subject: Re: API & SDK for transferring files into the PSP? |
|
|
| jy_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 |
checking for the hidden ms standard files could be a good idea |
|
| Back to top |
|
 |
Fanjita
Joined: 28 Sep 2005 Posts: 217
|
Posted: Sat Nov 11, 2006 3:27 am Post subject: |
|
|
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:
- 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! |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sat Nov 11, 2006 6:28 pm Post subject: |
|
|
| What you could do I guess is enumerate the USB devices on a system and when a mass storage device appears which indicates it is a PSP Type A then you know a PSP has been plugged in and you can copy files to it. |
|
| Back to top |
|
 |
|