API & SDK for transferring files into the PSP?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jy_p
Posts: 1
Joined: Thu Nov 09, 2006 2:04 am

API & SDK for transferring files into the PSP?

Post by jy_p »

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
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Re: API & SDK for transferring files into the PSP?

Post by weltall »

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
Fanjita
Posts: 217
Joined: Wed Sep 28, 2005 9:31 am

Post by Fanjita »

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!
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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.
Post Reply