#include <gctypes.h>
#include <ogc/lwp_queue.h>
Classes | |
struct | _dvddiskid |
struct | _dvdcmdblk |
struct | _dvddrvinfo |
struct | _dvdfileinfo |
Defines | |
#define | DVD_STATE_FATAL_ERROR -1 |
#define | DVD_STATE_END 0 |
#define | DVD_STATE_BUSY 1 |
#define | DVD_STATE_WAITING 2 |
#define | DVD_STATE_COVER_CLOSED 3 |
#define | DVD_STATE_NO_DISK 4 |
#define | DVD_STATE_COVER_OPEN 5 |
#define | DVD_STATE_WRONG_DISK 6 |
#define | DVD_STATE_MOTOR_STOPPED 7 |
#define | DVD_STATE_IGNORED 8 |
#define | DVD_STATE_CANCELED 10 |
#define | DVD_STATE_RETRY 11 |
#define | DVD_ERROR_OK 0 |
#define | DVD_ERROR_FATAL -1 |
#define | DVD_ERROR_IGNORED -2 |
#define | DVD_ERROR_CANCELED -3 |
#define | DVD_ERROR_COVER_CLOSED -4 |
#define | DVD_RESETHARD 0 |
#define | DVD_RESETSOFT 1 |
#define | DVD_SPINMOTOR_DOWN 0x00000000 |
#define | DVD_SPINMOTOR_UP 0x00000100 |
#define | DVD_SPINMOTOR_ACCEPT 0x00004000 |
#define | DVD_SPINMOTOR_CHECKDISK 0x00008000 |
Typedefs | |
typedef _dvddiskid | dvddiskid |
forward typedef for struct _dvddiskid | |
typedef _dvdcmdblk | dvdcmdblk |
forward typedef for struct _dvdcmdblk | |
typedef void(*) | dvdcbcallback (s32 result, dvdcmdblk *block) |
function pointer typedef for the user's operations callback | |
typedef _dvddrvinfo | dvddrvinfo |
forward typedef for struct _dvddrvinfo | |
typedef _dvdfileinfo | dvdfileinfo |
forward typedef for struct _dvdfileinfo | |
typedef void(*) | dvdcallback (s32 result, dvdfileinfo *info) |
function pointer typedef for the user's DVD operation callback | |
Functions | |
void | DVD_Init () |
Initializes the DVD subsystem. | |
void | DVD_Pause () |
void | DVD_Reset (u32 reset_mode) |
Performs a reset of the drive and FW respectively. | |
s32 | DVD_Mount () |
Mounts the DVD drive. | |
s32 | DVD_GetDriveStatus () |
s32 | DVD_MountAsync (dvdcmdblk *block, dvdcbcallback cb) |
Mounts the DVD drive. | |
s32 | DVD_ControlDrive (dvdcmdblk *block, u32 cmd) |
Controls the drive's motor and behavior. | |
s32 | DVD_ControlDriveAsync (dvdcmdblk *block, u32 cmd, dvdcbcallback cb) |
Controls the drive's motor and behavior. | |
s32 | DVD_SetGCMOffset (dvdcmdblk *block, u32 offset) |
Sets the offset to the GCM. Used for multigame discs. | |
s32 | DVD_SetGCMOffsetAsync (dvdcmdblk *block, u32 offset, dvdcbcallback cb) |
Sets the offset to the GCM. Used for multigame discs. | |
s32 | DVD_GetCmdBlockStatus (dvdcmdblk *block) |
s32 | DVD_SpinUpDrive (dvdcmdblk *block) |
s32 | DVD_SpinUpDriveAsync (dvdcmdblk *block, dvdcbcallback cb) |
s32 | DVD_Inquiry (dvdcmdblk *block, dvddrvinfo *info) |
s32 | DVD_InquiryAsync (dvdcmdblk *block, dvddrvinfo *info, dvdcbcallback cb) |
s32 | DVD_ReadPrio (dvdcmdblk *block, void *buf, u32 len, u32 offset, s32 prio) |
s32 | DVD_ReadAbsAsyncPrio (dvdcmdblk *block, void *buf, u32 len, u32 offset, dvdcbcallback cb, s32 prio) |
s32 | DVD_ReadAbsAsyncForBS (dvdcmdblk *block, void *buf, u32 len, u32 offset, dvdcbcallback cb) |
s32 | DVD_SeekPrio (dvdcmdblk *block, u32 offset, s32 prio) |
s32 | DVD_SeekAbsAsyncPrio (dvdcmdblk *block, u32 offset, dvdcbcallback cb, s32 prio) |
s32 | DVD_CancelAllAsync (dvdcbcallback cb) |
s32 | DVD_StopStreamAtEndAsync (dvdcmdblk *block, dvdcbcallback cb) |
s32 | DVD_StopStreamAtEnd (dvdcmdblk *block) |
s32 | DVD_ReadDiskID (dvdcmdblk *block, dvddiskid *id, dvdcbcallback cb) |
u32 | DVD_SetAutoInvalidation (u32 auto_inv) |
dvddiskid * | DVD_GetCurrentDiskID () |
dvddrvinfo * | DVD_GetDriveInfo () |
void(* dvdcallback)(s32 result, dvdfileinfo *info) |
function pointer typedef for the user's DVD operation callback
[in] | result | error code of last operation |
[in] | info | pointer to user's file info strucutre |
struct _dvdcmdblk dvdcmdblk |
forward typedef for struct _dvdcmdblk
This structure is used internally to control the requested operation.
struct _dvddiskid dvddiskid |
forward typedef for struct _dvddiskid
This structure holds the game vendors copyright informations.
Additionally it holds certain parameters for audiocontrol and
multidisc support.
gamename[4] | vendors game key | |
company[2] | vendors company key | |
disknum | number of disc when multidisc support is used. | |
gamever | version of game | |
streaming | flag to control audio streaming | |
streambufsize | size of buffer used for audio streaming | |
pad[22] | padding |
struct _dvddrvinfo dvddrvinfo |
forward typedef for struct _dvddrvinfo
This structure structure holds the drive version infromation.
Use DVD_Inquiry() to retrieve this information.
rev_leve | revision level | |
dev_code | device code | |
rel_date | release date | |
pad[24] | padding |
struct _dvdfileinfo dvdfileinfo |
forward typedef for struct _dvdfileinfo
This structure is used internally to control the requested file operation.
Controls the drive's motor and behavior.
This is a synchronous version of DVD_ControlDriveAsync().
[in] | block | pointer to a dvdcmdblk structure used to process the operation |
[in] | cmd | command to control the drive. |
s32 DVD_ControlDriveAsync | ( | dvdcmdblk * | block, | |
u32 | cmd, | |||
dvdcbcallback | cb | |||
) |
Controls the drive's motor and behavior.
[in] | block | pointer to a dvdcmdblk structure used to process the operation |
[in] | cmd | command to control the drive. |
[in] | cb | callback to be invoked upon completion of operation. |
void DVD_Init | ( | ) |
Initializes the DVD subsystem.
You must call this function before calling any other DVD function
s32 DVD_Mount | ( | ) |
s32 DVD_MountAsync | ( | dvdcmdblk * | block, | |
dvdcbcallback | cb | |||
) |
Mounts the DVD drive.
You must call this function in order to access the DVD.
Following tasks are performed:
The patch code and procedure was taken from the gc-linux DVD device driver.
[in] | block | pointer to a dvdcmdblk structure used to process the operation |
[in] | cb | callback to be invoked upon completion of operation |
void DVD_Reset | ( | u32 | reset_mode | ) |
Performs a reset of the drive and FW respectively.
[in] | reset_mode | type of reset |
Sets the offset to the GCM. Used for multigame discs.
This is a synchronous version of DVD_SetGCMOffsetAsync().
[in] | block | pointer to a dvdcmdblk structure used to process the operation |
[in] | offset | offset to the GCM on disc. |
s32 DVD_SetGCMOffsetAsync | ( | dvdcmdblk * | block, | |
u32 | offset, | |||
dvdcbcallback | cb | |||
) |
Sets the offset to the GCM. Used for multigame discs.
This is a synchronous version of DVD_SetGCMOffsetAsync().
[in] | block | pointer to a dvdcmdblk structure used to process the operation |
[in] | offset | offset to the GCM on disc. |
[in] | cb | callback to be invoked upon completion of operation. |