UMD Kernel Library


Typedefs

typedef int(*) UmdCallback (int unknown, int event)
 UMD Callback function.

Enumerations

enum  UmdDriveStat { UMD_WAITFORDISC = 2, UMD_WAITFORINIT = 0x20 }
 Enumeration for UMD stats. More...

Functions

int sceUmdCheckMedium (int a)
 Check whether there is a disc in the UMD drive.
int sceUmdActivate (int unit, const char *drive)
 Activates the UMD drive.
int sceUmdWaitDriveStat (int stat)
 Wait for a drive to reach a certain state.
int sceUmdRegisterUMDCallBack (int cbid)
 Register a callback for the UMD drive.


Typedef Documentation

typedef int(*) UmdCallback(int unknown, int event)

UMD Callback function.


Enumeration Type Documentation

enum UmdDriveStat

Enumeration for UMD stats.

Enumerator:
UMD_WAITFORDISC  Wait for disc to be inserted.
UMD_WAITFORINIT  Wait for the UMD to be initialised so it can be accessed from the mapped drive.


Function Documentation

int sceUmdActivate ( int  unit,
const char *  drive 
)

Activates the UMD drive.

Parameters:
unit - The unit to initialise (probably). Should be set to 1.
drive - A prefix string for the fs device to mount the UMD on (e.g. "disc0:")
Returns:
< 0 on error
Example:
 // Wait for disc and mount to filesystem
 int i;
 i = sceUmdCheckMedium(0);
 if(i == 0)
 {
    sceUmdWaitDriveStat(UMD_WAITFORDISC);
 }
 sceUmdActivate(1, "disc0:"); // Mount UMD to disc0: file system
 sceUmdWaitDriveStat(UMD_WAITFORINIT);
 // Now you can access the UMD using standard sceIo functions

int sceUmdCheckMedium ( int  a  ) 

Check whether there is a disc in the UMD drive.

Parameters:
a - Unknown function, set to 0
Returns:
Returns 0 if no disc present, anything else indicates a disc is inserted.

int sceUmdRegisterUMDCallBack ( int  cbid  ) 

Register a callback for the UMD drive.

Note:
Callback is of type UmdCallback
Parameters:
cbid - A callback ID created from sceKernelCreateCallback
Returns:
< 0 on error
Example:
 cbid = sceKernelCreateCallback("UMD Callback", umd_callback);
 sceUmdRegisterUMDCallback(cbid);

int sceUmdWaitDriveStat ( int  stat  ) 

Wait for a drive to reach a certain state.

Parameters:
stat - The drive stat to wait for.
Returns:
< 0 on error


Generated on Tue Jul 24 15:21:27 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2