RetroArch
Classes | Macros | Typedefs | Functions | Variables
di.h File Reference
#include <stdint.h>
#include <ogc/ipc.h>
#include <ogc/disc_io.h>
Include dependency graph for di.h:

Go to the source code of this file.

Classes

struct  DI_DriveID
 

Macros

#define DVD_IDENTIFY   0x12
 
#define DVD_READ_DISCID   0x70
 
#define DVD_LOW_READ   0x71
 
#define DVD_WAITFORCOVERCLOSE   0x79
 
#define DVD_READ_PHYSICAL   0x80
 
#define DVD_READ_COPYRIGHT   0x81
 
#define DVD_READ_DISCKEY   0x82
 
#define DVD_GETCOVER   0x88
 
#define DVD_RESET   0x8A
 
#define DVD_OPEN_PARTITION   0x8B
 
#define DVD_CLOSE_PARTITION   0x8C
 
#define DVD_READ_UNENCRYPTED   0x8D
 
#define DVD_REPORTKEY   0xA4
 
#define DVD_READ   0xD0
 
#define DVD_READ_CONFIG   0xD1
 
#define DVD_READ_BCA   0xDA
 
#define DVD_GET_ERROR   0xE0
 
#define DVD_SET_MOTOR   0xE3
 
#define DVD_READY   0x1
 
#define DVD_INIT   0x2
 
#define DVD_UNKNOWN   0x4
 
#define DVD_NO_DISC   0x8
 
#define DVD_IOS_ERROR   0x10
 
#define DVD_D0   0x20
 
#define DVD_A8   0x40
 
#define DVD_COVER_DISC_INSERTED   0x02
 
#define LIBDI_MAX_RETRIES   16
 
#define DEVICE_TYPE_WII_DVD   (('W'<<24)|('D'<<16)|('V'<<8)|'D')
 

Typedefs

typedef int(* di_callback) (uint32_t status, uint32_t error)
 
typedef int(* read_func) (void *, uint32_t, uint32_t)
 
typedef int(* read_func_async) (void *, uint32_t, uint32_t, ipccallback)
 

Functions

int DI_Init ()
 
void DI_LoadDVDX (bool load)
 
void DI_UseCache (bool use)
 
void DI_SetInitCallback (di_callback cb)
 
void DI_Mount ()
 
void DI_Close ()
 
int DI_GetStatus ()
 
int DI_Identify (DI_DriveID *id)
 
int DI_CheckDVDSupport ()
 
int DI_ReadDiscID (u64 *id)
 
int DI_GetError (uint32_t *error)
 
int DI_GetCoverRegister (uint32_t *status)
 
int DI_Reset ()
 
int DI_StopMotor ()
 
int DI_Eject ()
 
int DI_KillDrive ()
 
int DI_ReadDVD (void *buf, uint32_t len, uint32_t lba)
 
int DI_ReadDVDAsync (void *buf, uint32_t len, uint32_t lba, ipccallback ipc_cb)
 
int DI_Read (void *buf, u32 size, u32 offset)
 
int DI_UnencryptedRead (void *buf, u32 size, u32 offset)
 
int DI_ReadDVDConfig (uint32_t *val, uint32_t flag)
 
int DI_ReadDVDCopyright (uint32_t *copyright)
 
int DI_ReadDVDDiscKey (void *buf)
 
int DI_ReadDVDPhysical (void *buf)
 
int DI_Read_BCA (void *buf)
 
int DI_ReportKey (int keytype, uint32_t lba, void *buf)
 
int DI_OpenPartition (u32 offset)
 
int DI_ClosePartition (void)
 

Variables

int di_fd
 
const DISC_INTERFACE __io_wiidvd
 

Macro Definition Documentation

◆ DEVICE_TYPE_WII_DVD

#define DEVICE_TYPE_WII_DVD   (('W'<<24)|('D'<<16)|('V'<<8)|'D')

◆ DVD_A8

#define DVD_A8   0x40

◆ DVD_CLOSE_PARTITION

#define DVD_CLOSE_PARTITION   0x8C

◆ DVD_COVER_DISC_INSERTED

#define DVD_COVER_DISC_INSERTED   0x02

◆ DVD_D0

#define DVD_D0   0x20

◆ DVD_GET_ERROR

#define DVD_GET_ERROR   0xE0

◆ DVD_GETCOVER

#define DVD_GETCOVER   0x88

◆ DVD_IDENTIFY

#define DVD_IDENTIFY   0x12

◆ DVD_INIT

#define DVD_INIT   0x2

◆ DVD_IOS_ERROR

#define DVD_IOS_ERROR   0x10

◆ DVD_LOW_READ

#define DVD_LOW_READ   0x71

◆ DVD_NO_DISC

#define DVD_NO_DISC   0x8

◆ DVD_OPEN_PARTITION

#define DVD_OPEN_PARTITION   0x8B

◆ DVD_READ

#define DVD_READ   0xD0

◆ DVD_READ_BCA

#define DVD_READ_BCA   0xDA

◆ DVD_READ_CONFIG

#define DVD_READ_CONFIG   0xD1

◆ DVD_READ_COPYRIGHT

#define DVD_READ_COPYRIGHT   0x81

◆ DVD_READ_DISCID

#define DVD_READ_DISCID   0x70

◆ DVD_READ_DISCKEY

#define DVD_READ_DISCKEY   0x82

◆ DVD_READ_PHYSICAL

#define DVD_READ_PHYSICAL   0x80

◆ DVD_READ_UNENCRYPTED

#define DVD_READ_UNENCRYPTED   0x8D

◆ DVD_READY

#define DVD_READY   0x1

◆ DVD_REPORTKEY

#define DVD_REPORTKEY   0xA4

◆ DVD_RESET

#define DVD_RESET   0x8A

◆ DVD_SET_MOTOR

#define DVD_SET_MOTOR   0xE3

◆ DVD_UNKNOWN

#define DVD_UNKNOWN   0x4

◆ DVD_WAITFORCOVERCLOSE

#define DVD_WAITFORCOVERCLOSE   0x79

◆ LIBDI_MAX_RETRIES

#define LIBDI_MAX_RETRIES   16

Typedef Documentation

◆ di_callback

typedef int(* di_callback) (uint32_t status, uint32_t error)

◆ read_func

typedef int(* read_func) (void *, uint32_t, uint32_t)

◆ read_func_async

typedef int(* read_func_async) (void *, uint32_t, uint32_t, ipccallback)

Function Documentation

◆ DI_CheckDVDSupport()

int DI_CheckDVDSupport ( )

◆ DI_Close()

void DI_Close ( )

◆ DI_ClosePartition()

int DI_ClosePartition ( void  )

◆ DI_Eject()

int DI_Eject ( )

◆ DI_GetCoverRegister()

int DI_GetCoverRegister ( uint32_t status)

◆ DI_GetError()

int DI_GetError ( uint32_t error)

◆ DI_GetStatus()

int DI_GetStatus ( )

◆ DI_Identify()

int DI_Identify ( DI_DriveID id)

◆ DI_Init()

int DI_Init ( )

◆ DI_KillDrive()

int DI_KillDrive ( )

◆ DI_LoadDVDX()

void DI_LoadDVDX ( bool  load)

◆ DI_Mount()

void DI_Mount ( )

◆ DI_OpenPartition()

int DI_OpenPartition ( u32  offset)

◆ DI_Read()

int DI_Read ( void buf,
u32  size,
u32  offset 
)

◆ DI_Read_BCA()

int DI_Read_BCA ( void buf)

◆ DI_ReadDiscID()

int DI_ReadDiscID ( u64 id)

◆ DI_ReadDVD()

int DI_ReadDVD ( void buf,
uint32_t  len,
uint32_t  lba 
)

◆ DI_ReadDVDAsync()

int DI_ReadDVDAsync ( void buf,
uint32_t  len,
uint32_t  lba,
ipccallback  ipc_cb 
)

◆ DI_ReadDVDConfig()

int DI_ReadDVDConfig ( uint32_t val,
uint32_t  flag 
)

◆ DI_ReadDVDCopyright()

int DI_ReadDVDCopyright ( uint32_t copyright)

◆ DI_ReadDVDDiscKey()

int DI_ReadDVDDiscKey ( void buf)

◆ DI_ReadDVDPhysical()

int DI_ReadDVDPhysical ( void buf)

◆ DI_ReportKey()

int DI_ReportKey ( int  keytype,
uint32_t  lba,
void buf 
)

◆ DI_Reset()

int DI_Reset ( )

◆ DI_SetInitCallback()

void DI_SetInitCallback ( di_callback  cb)

◆ DI_StopMotor()

int DI_StopMotor ( )

◆ DI_UnencryptedRead()

int DI_UnencryptedRead ( void buf,
u32  size,
u32  offset 
)

◆ DI_UseCache()

void DI_UseCache ( bool  use)

Variable Documentation

◆ __io_wiidvd

const DISC_INTERFACE __io_wiidvd

◆ di_fd

int di_fd