PSPSDK 2025-03-30
Loading...
Searching...
No Matches
pspumd.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspumd.h - Prototypes for the sceUmd library.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 *
12 */
13#ifndef __UMD_H__
14#define __UMD_H__
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
28typedef struct pspUmdInfo
29{
31 unsigned int size;
33 unsigned int type;
34
36
44
55
64
66typedef int (*UmdCallback)(int unknown, int event);
67
74
83
107int sceUmdActivate(int unit, const char *drive);
108
118int sceUmdDeactivate(int unit, const char *drive);
119
128
138int sceUmdWaitDriveStatWithTimer(int stat, unsigned int timeout);
139
149int sceUmdWaitDriveStatCB(int stat, unsigned int timeout);
150
157
164
171
189
198
205
212
215#ifdef __cplusplus
216}
217#endif
218
219#endif
int sceUmdCheckMedium(void)
Check whether there is a disc in the UMD drive.
int sceUmdGetErrorStat(void)
Get the error code associated with a failed event.
int sceUmdUnRegisterUMDCallBack(int cbid)
Un-register a callback for the UMD drive.
int sceUmdGetDiscInfo(pspUmdInfo *info)
Get the disc info.
int sceUmdWaitDriveStatCB(int stat, unsigned int timeout)
Wait for the UMD drive to reach a certain state (plus callback)
int sceUmdGetDriveStat(void)
Get (poll) the current state of the UMD drive.
int sceUmdReplacePermit(void)
Permit UMD disc being replaced.
pspUmdTypes
Enumeration for UMD types.
Definition pspumd.h:39
int sceUmdRegisterUMDCallBack(int cbid)
Register a callback for the UMD drive.
int sceUmdReplaceProhibit(void)
Prohibit UMD disc being replaced.
UmdDriveStat
Enumeration for UMD stats (legacy)
Definition pspumd.h:58
pspUmdState
Enumeration for UMD drive state.
Definition pspumd.h:47
int sceUmdWaitDriveStatWithTimer(int stat, unsigned int timeout)
Wait for the UMD drive to reach a certain state.
int sceUmdActivate(int unit, const char *drive)
Activates the UMD drive.
struct pspUmdInfo pspUmdInfo
UMD Info struct.
int(* UmdCallback)(int unknown, int event)
UMD Callback function.
Definition pspumd.h:66
int sceUmdWaitDriveStat(int stat)
Wait for the UMD drive to reach a certain state.
int sceUmdDeactivate(int unit, const char *drive)
Deativates the UMD drive.
int sceUmdCancelWaitDriveStat(void)
Cancel a sceUmdWait* call.
@ PSP_UMD_TYPE_GAME
Definition pspumd.h:40
@ PSP_UMD_TYPE_VIDEO
Definition pspumd.h:41
@ PSP_UMD_TYPE_AUDIO
Definition pspumd.h:42
@ UMD_WAITFORINIT
Wait for the UMD to be initialised so it can be accessed from the mapped drive.
Definition pspumd.h:62
@ UMD_WAITFORDISC
Wait for disc to be inserted.
Definition pspumd.h:60
@ PSP_UMD_PRESENT
Definition pspumd.h:49
@ PSP_UMD_CHANGED
Definition pspumd.h:50
@ PSP_UMD_READY
Definition pspumd.h:53
@ PSP_UMD_NOT_PRESENT
Definition pspumd.h:48
@ PSP_UMD_INITED
Definition pspumd.h:52
@ PSP_UMD_INITING
Definition pspumd.h:51
UMD Info struct.
Definition pspumd.h:29
unsigned int size
Set to sizeof(pspUmdInfo)
Definition pspumd.h:31
unsigned int type
One or more of pspUmdTypes.
Definition pspumd.h:33