RetroArch
Classes | Macros | Typedefs | Functions | Variables
dvd.c File Reference
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include "asm.h"
#include "processor.h"
#include "cache.h"
#include "lwp.h"
#include "irq.h"
#include "ogcsys.h"
#include "system.h"
#include "dvd.h"
Include dependency graph for dvd.c:

Classes

struct  _dvdcmdl
 
struct  _dvdcmds
 

Macros

#define DVD_BRK   (1<<0)
 
#define DVD_DE_MSK   (1<<1)
 
#define DVD_DE_INT   (1<<2)
 
#define DVD_TC_MSK   (1<<3)
 
#define DVD_TC_INT   (1<<4)
 
#define DVD_BRK_MSK   (1<<5)
 
#define DVD_BRK_INT   (1<<6)
 
#define DVD_CVR_INT   (1<<2)
 
#define DVD_CVR_MSK   (1<<1)
 
#define DVD_CVR_STATE   (1<<0)
 
#define DVD_DI_MODE   (1<<2)
 
#define DVD_DI_DMA   (1<<1)
 
#define DVD_DI_START   (1<<0)
 
#define DVD_DISKIDSIZE   0x20
 
#define DVD_DRVINFSIZE   0x20
 
#define DVD_MAXCOMMANDS   0x12
 
#define DVD_DVDINQUIRY   0x12000000
 
#define DVD_FWSETOFFSET   0x32000000
 
#define DVD_FWENABLEEXT   0x55000000
 
#define DVD_READSECTOR   0xA8000000
 
#define DVD_READDISKID   0xA8000040
 
#define DVD_SEEKSECTOR   0xAB000000
 
#define DVD_REQUESTERROR   0xE0000000
 
#define DVD_AUDIOSTREAM   0xE1000000
 
#define DVD_AUDIOSTATUS   0xE2000000
 
#define DVD_STOPMOTOR   0xE3000000
 
#define DVD_AUDIOCONFIG   0xE4000000
 
#define DVD_FWSETSTATUS   0xEE000000
 
#define DVD_FWWRITEMEM   0xFE010100
 
#define DVD_FWREADMEM   0xFE010000
 
#define DVD_FWCTRLMOTOR   0xFE110000
 
#define DVD_FWFUNCCALL   0xFE120000
 
#define DVD_MODEL04   0x20020402
 
#define DVD_MODEL06   0x20010608
 
#define DVD_MODEL08   0x20020823
 
#define DVD_MODEL08Q   0x20010831
 
#define DVD_FWIRQVECTOR   0x00804c
 
#define DVD_DRIVERESET   0x00000001
 
#define DVD_CHIPPRESENT   0x00000002
 
#define DVD_INTEROPER   0x00000004
 
#define DVD_STATUS(s)   ((u8)((s)>>24))
 
#define DVD_STATUS_READY   0x00
 
#define DVD_STATUS_COVER_OPENED   0x01
 
#define DVD_STATUS_DISK_CHANGE   0x02
 
#define DVD_STATUS_NO_DISK   0x03
 
#define DVD_STATUS_MOTOR_STOP   0x04
 
#define DVD_STATUS_DISK_ID_NOT_READ   0x05
 
#define DVD_ERROR(s)   ((u32)((s)&0x00ffffff))
 
#define DVD_ERROR_NO_ERROR   0x000000
 
#define DVD_ERROR_MOTOR_STOPPED   0x020400
 
#define DVD_ERROR_DISK_ID_NOT_READ   0x020401
 
#define DVD_ERROR_MEDIUM_NOT_PRESENT   0x023a00
 
#define DVD_ERROR_SEEK_INCOMPLETE   0x030200
 
#define DVD_ERROR_UNRECOVERABLE_READ   0x031100
 
#define DVD_ERROR_TRANSFER_PROTOCOL   0x040800
 
#define DVD_ERROR_INVALID_COMMAND   0x052000
 
#define DVD_ERROR_AUDIOBUFFER_NOTSET   0x052001
 
#define DVD_ERROR_BLOCK_OUT_OF_RANGE   0x052100
 
#define DVD_ERROR_INVALID_FIELD   0x052400
 
#define DVD_ERROR_INVALID_AUDIO_CMD   0x052401
 
#define DVD_ERROR_INVALID_CONF_PERIOD   0x052402
 
#define DVD_ERROR_END_OF_USER_AREA   0x056300
 
#define DVD_ERROR_MEDIUM_CHANGED   0x062800
 
#define DVD_ERROR_MEDIUM_CHANGE_REQ   0x0B5A01
 
#define DVD_SPINMOTOR_MASK   0x0000ff00
 
#define cpu_to_le32(x)   (((x>>24)&0x000000ff) | ((x>>8)&0x0000ff00) | ((x<<8)&0x00ff0000) | ((x<<24)&0xff000000))
 
#define dvd_may_retry(s)   (DVD_STATUS(s) == DVD_STATUS_READY || DVD_STATUS(s) == DVD_STATUS_DISK_ID_NOT_READ)
 
#define _SHIFTL(v, s, w)   ((u32) (((u32)(v) & ((0x01 << (w)) - 1)) << (s)))
 
#define _SHIFTR(v, s, w)   ((u32)(((u32)(v) >> (s)) & ((0x01 << (w)) - 1)))
 

Typedefs

typedef void(* dvdcallbacklow) (s32)
 
typedef void(* dvdstatecb) (dvdcmdblk *)
 
typedef struct _dvdcmdl dvdcmdl
 
typedef struct _dvdcmds dvdcmds
 

Functions

static dvddiskid __dvd_tmpid0 ATTRIBUTE_ALIGN (32)
 
void __dvd_statecheckid (void)
 
void __dvd_stategettingerror (void)
 
void __dvd_statecoverclosed (void)
 
void __dvd_stateready (void)
 
void __dvd_statemotorstopped (void)
 
void __dvd_statetimeout (void)
 
void __dvd_stategotoretry (void)
 
void __dvd_stateerror (s32 result)
 
void __dvd_statecoverclosed_cmd (dvdcmdblk *block)
 
void __dvd_statebusy (dvdcmdblk *block)
 
void DVD_LowReset (u32 reset_mode)
 
s32 DVD_LowSeek (s64 offset, dvdcallbacklow cb)
 
s32 DVD_LowRead (void *buf, u32 len, s64 offset, dvdcallbacklow cb)
 
s32 DVD_LowReadId (dvddiskid *diskID, dvdcallbacklow cb)
 
s32 DVD_LowRequestError (dvdcallbacklow cb)
 
s32 DVD_LowStopMotor (dvdcallbacklow cb)
 
s32 DVD_LowInquiry (dvddrvinfo *info, dvdcallbacklow cb)
 
s32 DVD_LowWaitCoverClose (dvdcallbacklow cb)
 
s32 DVD_LowAudioStream (u32 subcmd, u32 len, s64 offset, dvdcallbacklow cb)
 
s32 DVD_LowAudioBufferConfig (s32 enable, u32 size, dvdcallbacklow cb)
 
s32 DVD_LowRequestAudioStatus (u32 subcmd, dvdcallbacklow cb)
 
s32 DVD_LowEnableExtensions (u8 enable, dvdcallbacklow cb)
 
s32 DVD_LowSpinMotor (u32 mode, dvdcallbacklow cb)
 
s32 DVD_LowSetStatus (u32 status, dvdcallbacklow cb)
 
s32 DVD_LowUnlockDrive (dvdcallbacklow cb)
 
s32 DVD_LowPatchDriveCode (dvdcallbacklow cb)
 
s32 DVD_LowSpinUpDrive (dvdcallbacklow cb)
 
s32 DVD_LowControlMotor (u32 mode, dvdcallbacklow cb)
 
s32 DVD_LowFuncCall (u32 address, dvdcallbacklow cb)
 
s32 DVD_LowReadmem (u32 address, void *buffer, dvdcallbacklow cb)
 
s32 DVD_LowSetGCMOffset (s64 offset, dvdcallbacklow cb)
 
s32 DVD_LowSetOffset (s64 offset, dvdcallbacklow cb)
 
s32 DVD_ReadAbsAsyncPrio (dvdcmdblk *block, void *buf, u32 len, s64 offset, dvdcbcallback cb, s32 prio)
 
s32 DVD_ReadDiskID (dvdcmdblk *block, dvddiskid *id, dvdcbcallback cb)
 
s32 __issuecommand (s32 prio, dvdcmdblk *block)
 
void udelay (int us)
 
u32 diff_msec (unsigned long long start, unsigned long long end)
 
long long gettime (void)
 
void __MaskIrq (u32)
 
void __UnmaskIrq (u32)
 
syssramex__SYS_LockSramEx (void)
 
u32 __SYS_UnlockSramEx (u32 write)
 
static u8 err2num (u32 errorcode)
 
static u8 convert (u32 errorcode)
 
static void __dvd_clearwaitingqueue ()
 
static s32 __dvd_checkwaitingqueue ()
 
static s32 __dvd_pushwaitingqueue (s32 prio, dvdcmdblk *block)
 
static dvdcmdblk__dvd_popwaitingqueueprio (s32 prio)
 
static dvdcmdblk__dvd_popwaitingqueue ()
 
static void __dvd_timeouthandler (syswd_t alarm, void *cbarg)
 
static void __dvd_storeerror (u32 errorcode)
 
static u32 __dvd_categorizeerror (u32 errorcode)
 
static void __SetupTimeoutAlarm (const struct timespec *tp)
 
static void __Read (void *buffer, u32 len, s64 offset, dvdcallbacklow cb)
 
static void __DoRead (void *buffer, u32 len, s64 offset, dvdcallbacklow cb)
 
static u32 __ProcessNextCmd ()
 
static void __DVDLowWATypeSet (u32 workaround, u32 workaroundseek)
 
static void __DVDInitWA ()
 
static s32 __dvd_checkcancel (u32 cancelpt)
 
static void __dvd_stateretrycb (s32 result)
 
static void __dvd_unrecoverederrorretrycb (s32 result)
 
static void __dvd_unrecoverederrorcb (s32 result)
 
static void __dvd_stateerrorcb (s32 result)
 
static void __dvd_stategettingerrorcb (s32 result)
 
static void __dvd_statebusycb (s32 result)
 
static void __dvd_mountsynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_inquirysynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_readsynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_streamatendsynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_seeksynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_spinupdrivesynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_motorcntrlsynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_setgcmsynccb (s32 result, dvdcmdblk *block)
 
static void __dvd_statemotorstoppedcb (s32 result)
 
static void __dvd_statecoverclosedcb (s32 result)
 
static void __dvd_statecheckid1cb (s32 result)
 
static void __dvd_stategotoretrycb (s32 result)
 
static void __dvd_getstatuscb (s32 result)
 
static void __dvd_readmemcb (s32 result)
 
static void __dvd_cntrldrivecb (s32 result)
 
static void __dvd_setgcmoffsetcb (s32 result)
 
static void __dvd_handlespinupcb (s32 result)
 
static void __dvd_fwpatchcb (s32 result)
 
static void __dvd_checkaddonscb (s32 result)
 
static void __dvd_checkaddons (dvdcallbacklow cb)
 
static void __dvd_fwpatchmem (dvdcallbacklow cb)
 
static void __dvd_handlespinup ()
 
static void __dvd_spinupdrivecb (s32 result)
 
static void __dvd_statecoverclosed_spinupcb (s32 result)
 
static void __DVDInterruptHandler (u32 nIrq, void *pCtx)
 
static void __dvd_patchdrivecb (s32 result)
 
static void __dvd_unlockdrivecb (s32 result)
 
void __dvd_resetasync (dvdcbcallback cb)
 
void __dvd_statecheckid2 (dvdcmdblk *block)
 
s32 DVD_LowGetStatus (u32 *status, dvdcallbacklow cb)
 
s32 __DVDAudioBufferConfig (dvdcmdblk *block, u32 enable, u32 size, dvdcbcallback cb)
 
s32 DVD_ReadAbsAsyncForBS (dvdcmdblk *block, void *buf, u32 len, s64 offset, dvdcbcallback cb)
 
s32 DVD_SeekAbsAsyncPrio (dvdcmdblk *block, s64 offset, dvdcbcallback cb, s32 prio)
 
s32 DVD_InquiryAsync (dvdcmdblk *block, dvddrvinfo *info, dvdcbcallback cb)
 
s32 DVD_Inquiry (dvdcmdblk *block, dvddrvinfo *info)
 
s32 DVD_ReadPrio (dvdcmdblk *block, void *buf, u32 len, s64 offset, s32 prio)
 
s32 DVD_SeekPrio (dvdcmdblk *block, s64 offset, s32 prio)
 
s32 DVD_CancelAllAsync (dvdcbcallback cb)
 
s32 DVD_StopStreamAtEndAsync (dvdcmdblk *block, dvdcbcallback cb)
 
s32 DVD_StopStreamAtEnd (dvdcmdblk *block)
 
s32 DVD_SpinUpDriveAsync (dvdcmdblk *block, dvdcbcallback cb)
 
s32 DVD_SpinUpDrive (dvdcmdblk *block)
 
s32 DVD_ControlDriveAsync (dvdcmdblk *block, u32 cmd, dvdcbcallback cb)
 Controls the drive's motor and behavior. More...
 
s32 DVD_ControlDrive (dvdcmdblk *block, u32 cmd)
 Controls the drive's motor and behavior. More...
 
s32 DVD_SetGCMOffsetAsync (dvdcmdblk *block, s64 offset, dvdcbcallback cb)
 
s32 DVD_SetGCMOffset (dvdcmdblk *block, s64 offset)
 
s32 DVD_GetCmdBlockStatus (dvdcmdblk *block)
 
s32 DVD_GetDriveStatus ()
 
void DVD_Pause ()
 
void DVD_Reset (u32 reset_mode)
 Performs a reset of the drive and FW respectively. More...
 
void callback (s32 result, dvdcmdblk *block)
 
s32 DVD_MountAsync (dvdcmdblk *block, dvdcbcallback cb)
 Mounts the DVD drive. More...
 
s32 DVD_Mount ()
 Mounts the DVD drive. More...
 
dvddiskidDVD_GetCurrentDiskID ()
 
dvddrvinfoDVD_GetDriveInfo ()
 
void DVD_Init ()
 Initializes the DVD subsystem. More...
 
u32 DVD_SetAutoInvalidation (u32 auto_inv)
 
static bool dvdio_Startup ()
 
static bool dvdio_IsInserted ()
 
static bool dvdio_ReadSectors (sec_t sector, sec_t numSectors, void *buffer)
 
static bool dvdio_WriteSectors (sec_t sector, sec_t numSectors, const void *buffer)
 
static bool dvdio_ClearStatus ()
 
static bool dvdio_Shutdown ()
 

Variables

static u32 __dvd_initflag = 0
 
static u32 __dvd_stopnextint = 0
 
static vu32 __dvd_resetoccured = 0
 
static u32 __dvd_waitcoverclose = 0
 
static u32 __dvd_breaking = 0
 
static vu32 __dvd_resetrequired = 0
 
static u32 __dvd_canceling = 0
 
static u32 __dvd_pauseflag = 0
 
static u32 __dvd_pausingflag = 0
 
static u64 __dvd_lastresetend = 0
 
static u32 __dvd_ready = 0
 
static u32 __dvd_resumefromhere = 0
 
static u32 __dvd_fatalerror = 0
 
static u32 __dvd_lasterror = 0
 
static u32 __dvd_internalretries = 0
 
static u32 __dvd_autofinishing = 0
 
static u32 __dvd_autoinvalidation = 1
 
static u32 __dvd_cancellasterror = 0
 
static u32 __dvd_drivechecked = 0
 
static u32 __dvd_drivestate = 0
 
static u32 __dvd_extensionsenabled = TRUE
 
static u32 __dvd_lastlen
 
static u32 __dvd_nextcmdnum
 
static u32 __dvd_workaround
 
static u32 __dvd_workaroundseek
 
static u32 __dvd_lastcmdwasread
 
static u32 __dvd_currcmd
 
static u32 __dvd_motorcntrl
 
static lwpq_t __dvd_wait_queue
 
static syswd_t __dvd_timeoutalarm
 
static dvdcmdblk __dvd_block
 
static dvdcmdblk __dvd_dummycmdblk
 
static dvdcallbacklow __dvd_callback = NULL
 
static dvdcallbacklow __dvd_resetcovercb = NULL
 
static dvdcallbacklow __dvd_finalunlockcb = NULL
 
static dvdcallbacklow __dvd_finalreadmemcb = NULL
 
static dvdcallbacklow __dvd_finalsudcb = NULL
 
static dvdcallbacklow __dvd_finalstatuscb = NULL
 
static dvdcallbacklow __dvd_finaladdoncb = NULL
 
static dvdcallbacklow __dvd_finalpatchcb = NULL
 
static dvdcallbacklow __dvd_finaloffsetcb = NULL
 
static dvdcbcallback __dvd_cancelcallback = NULL
 
static dvdcbcallback __dvd_mountusrcb = NULL
 
static dvdstatecb __dvd_laststate = NULL
 
static dvdcmdblk__dvd_executing = NULL
 
static void__dvd_usrdata = NULL
 
static dvddiskid__dvd_diskID = (dvddiskid*)0x80000000
 
static lwp_queue __dvd_waitingqueue [4]
 
static dvdcmdl __dvd_cmdlist [4]
 
static dvdcmds __dvd_cmd_curr
 
static dvdcmds __dvd_cmd_prev
 
static u32 __dvdpatchcode_size = 0
 
static const u8__dvdpatchcode = NULL
 
static const u32 __dvd_patchcode04_size = 448
 
static const u8 __dvd_patchcode04 []
 
static const u32 __dvd_patchcode06_size = 448
 
static const u8 __dvd_patchcode06 []
 
static const u32 __dvd_patchcode08_size = 448
 
static const u8 __dvd_patchcode08 []
 
static const u32 __dvd_patchcodeQ08_size = 448
 
static const u8 __dvd_patchcodeQ08 []
 
static vu32 *const _piReg = (u32*)0xCC003000
 
static u8 __dvd_unlockcmd [12] = {0xff,0x01,'M','A','T','S','H','I','T','A',0x02,0x00}
 
static u32 __dvd_errortable []
 
const DISC_INTERFACE __io_gcdvd
 

Macro Definition Documentation

◆ _SHIFTL

#define _SHIFTL (   v,
  s,
  w 
)    ((u32) (((u32)(v) & ((0x01 << (w)) - 1)) << (s)))

◆ _SHIFTR

#define _SHIFTR (   v,
  s,
  w 
)    ((u32)(((u32)(v) >> (s)) & ((0x01 << (w)) - 1)))

◆ cpu_to_le32

#define cpu_to_le32 (   x)    (((x>>24)&0x000000ff) | ((x>>8)&0x0000ff00) | ((x<<8)&0x00ff0000) | ((x<<24)&0xff000000))

◆ DVD_AUDIOCONFIG

#define DVD_AUDIOCONFIG   0xE4000000

◆ DVD_AUDIOSTATUS

#define DVD_AUDIOSTATUS   0xE2000000

◆ DVD_AUDIOSTREAM

#define DVD_AUDIOSTREAM   0xE1000000

◆ DVD_BRK

#define DVD_BRK   (1<<0)

◆ DVD_BRK_INT

#define DVD_BRK_INT   (1<<6)

◆ DVD_BRK_MSK

#define DVD_BRK_MSK   (1<<5)

◆ DVD_CHIPPRESENT

#define DVD_CHIPPRESENT   0x00000002

◆ DVD_CVR_INT

#define DVD_CVR_INT   (1<<2)

◆ DVD_CVR_MSK

#define DVD_CVR_MSK   (1<<1)

◆ DVD_CVR_STATE

#define DVD_CVR_STATE   (1<<0)

◆ DVD_DE_INT

#define DVD_DE_INT   (1<<2)

◆ DVD_DE_MSK

#define DVD_DE_MSK   (1<<1)

◆ DVD_DI_DMA

#define DVD_DI_DMA   (1<<1)

◆ DVD_DI_MODE

#define DVD_DI_MODE   (1<<2)

◆ DVD_DI_START

#define DVD_DI_START   (1<<0)

◆ DVD_DISKIDSIZE

#define DVD_DISKIDSIZE   0x20

◆ DVD_DRIVERESET

#define DVD_DRIVERESET   0x00000001

◆ DVD_DRVINFSIZE

#define DVD_DRVINFSIZE   0x20

◆ DVD_DVDINQUIRY

#define DVD_DVDINQUIRY   0x12000000

◆ DVD_ERROR

#define DVD_ERROR (   s)    ((u32)((s)&0x00ffffff))

◆ DVD_ERROR_AUDIOBUFFER_NOTSET

#define DVD_ERROR_AUDIOBUFFER_NOTSET   0x052001

◆ DVD_ERROR_BLOCK_OUT_OF_RANGE

#define DVD_ERROR_BLOCK_OUT_OF_RANGE   0x052100

◆ DVD_ERROR_DISK_ID_NOT_READ

#define DVD_ERROR_DISK_ID_NOT_READ   0x020401

◆ DVD_ERROR_END_OF_USER_AREA

#define DVD_ERROR_END_OF_USER_AREA   0x056300

◆ DVD_ERROR_INVALID_AUDIO_CMD

#define DVD_ERROR_INVALID_AUDIO_CMD   0x052401

◆ DVD_ERROR_INVALID_COMMAND

#define DVD_ERROR_INVALID_COMMAND   0x052000

◆ DVD_ERROR_INVALID_CONF_PERIOD

#define DVD_ERROR_INVALID_CONF_PERIOD   0x052402

◆ DVD_ERROR_INVALID_FIELD

#define DVD_ERROR_INVALID_FIELD   0x052400

◆ DVD_ERROR_MEDIUM_CHANGE_REQ

#define DVD_ERROR_MEDIUM_CHANGE_REQ   0x0B5A01

◆ DVD_ERROR_MEDIUM_CHANGED

#define DVD_ERROR_MEDIUM_CHANGED   0x062800

◆ DVD_ERROR_MEDIUM_NOT_PRESENT

#define DVD_ERROR_MEDIUM_NOT_PRESENT   0x023a00

◆ DVD_ERROR_MOTOR_STOPPED

#define DVD_ERROR_MOTOR_STOPPED   0x020400

◆ DVD_ERROR_NO_ERROR

#define DVD_ERROR_NO_ERROR   0x000000

◆ DVD_ERROR_SEEK_INCOMPLETE

#define DVD_ERROR_SEEK_INCOMPLETE   0x030200

◆ DVD_ERROR_TRANSFER_PROTOCOL

#define DVD_ERROR_TRANSFER_PROTOCOL   0x040800

◆ DVD_ERROR_UNRECOVERABLE_READ

#define DVD_ERROR_UNRECOVERABLE_READ   0x031100

◆ DVD_FWCTRLMOTOR

#define DVD_FWCTRLMOTOR   0xFE110000

◆ DVD_FWENABLEEXT

#define DVD_FWENABLEEXT   0x55000000

◆ DVD_FWFUNCCALL

#define DVD_FWFUNCCALL   0xFE120000

◆ DVD_FWIRQVECTOR

#define DVD_FWIRQVECTOR   0x00804c

◆ DVD_FWREADMEM

#define DVD_FWREADMEM   0xFE010000

◆ DVD_FWSETOFFSET

#define DVD_FWSETOFFSET   0x32000000

◆ DVD_FWSETSTATUS

#define DVD_FWSETSTATUS   0xEE000000

◆ DVD_FWWRITEMEM

#define DVD_FWWRITEMEM   0xFE010100

◆ DVD_INTEROPER

#define DVD_INTEROPER   0x00000004

◆ DVD_MAXCOMMANDS

#define DVD_MAXCOMMANDS   0x12

◆ dvd_may_retry

#define dvd_may_retry (   s)    (DVD_STATUS(s) == DVD_STATUS_READY || DVD_STATUS(s) == DVD_STATUS_DISK_ID_NOT_READ)

◆ DVD_MODEL04

#define DVD_MODEL04   0x20020402

◆ DVD_MODEL06

#define DVD_MODEL06   0x20010608

◆ DVD_MODEL08

#define DVD_MODEL08   0x20020823

◆ DVD_MODEL08Q

#define DVD_MODEL08Q   0x20010831

◆ DVD_READDISKID

#define DVD_READDISKID   0xA8000040

◆ DVD_READSECTOR

#define DVD_READSECTOR   0xA8000000

◆ DVD_REQUESTERROR

#define DVD_REQUESTERROR   0xE0000000

◆ DVD_SEEKSECTOR

#define DVD_SEEKSECTOR   0xAB000000

◆ DVD_SPINMOTOR_MASK

#define DVD_SPINMOTOR_MASK   0x0000ff00

◆ DVD_STATUS

#define DVD_STATUS (   s)    ((u8)((s)>>24))

◆ DVD_STATUS_COVER_OPENED

#define DVD_STATUS_COVER_OPENED   0x01

◆ DVD_STATUS_DISK_CHANGE

#define DVD_STATUS_DISK_CHANGE   0x02

◆ DVD_STATUS_DISK_ID_NOT_READ

#define DVD_STATUS_DISK_ID_NOT_READ   0x05

◆ DVD_STATUS_MOTOR_STOP

#define DVD_STATUS_MOTOR_STOP   0x04

◆ DVD_STATUS_NO_DISK

#define DVD_STATUS_NO_DISK   0x03

◆ DVD_STATUS_READY

#define DVD_STATUS_READY   0x00

◆ DVD_STOPMOTOR

#define DVD_STOPMOTOR   0xE3000000

◆ DVD_TC_INT

#define DVD_TC_INT   (1<<4)

◆ DVD_TC_MSK

#define DVD_TC_MSK   (1<<3)

Typedef Documentation

◆ dvdcallbacklow

typedef void(* dvdcallbacklow) (s32)

◆ dvdcmdl

typedef struct _dvdcmdl dvdcmdl

◆ dvdcmds

typedef struct _dvdcmds dvdcmds

◆ dvdstatecb

typedef void(* dvdstatecb) (dvdcmdblk *)

Function Documentation

◆ __DoRead()

static void __DoRead ( void buffer,
u32  len,
s64  offset,
dvdcallbacklow  cb 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_categorizeerror()

static u32 __dvd_categorizeerror ( u32  errorcode)
static
Here is the caller graph for this function:

◆ __dvd_checkaddons()

static void __dvd_checkaddons ( dvdcallbacklow  cb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_checkaddonscb()

static void __dvd_checkaddonscb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_checkcancel()

static s32 __dvd_checkcancel ( u32  cancelpt)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_checkwaitingqueue()

static s32 __dvd_checkwaitingqueue ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_clearwaitingqueue()

static void __dvd_clearwaitingqueue ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_cntrldrivecb()

static void __dvd_cntrldrivecb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_fwpatchcb()

static void __dvd_fwpatchcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_fwpatchmem()

static void __dvd_fwpatchmem ( dvdcallbacklow  cb)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_getstatuscb()

static void __dvd_getstatuscb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_handlespinup()

static void __dvd_handlespinup ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_handlespinupcb()

static void __dvd_handlespinupcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_inquirysynccb()

static void __dvd_inquirysynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_motorcntrlsynccb()

static void __dvd_motorcntrlsynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_mountsynccb()

static void __dvd_mountsynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_patchdrivecb()

static void __dvd_patchdrivecb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_popwaitingqueue()

static dvdcmdblk* __dvd_popwaitingqueue ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_popwaitingqueueprio()

static dvdcmdblk* __dvd_popwaitingqueueprio ( s32  prio)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_pushwaitingqueue()

static s32 __dvd_pushwaitingqueue ( s32  prio,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_readmemcb()

static void __dvd_readmemcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_readsynccb()

static void __dvd_readsynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_resetasync()

void __dvd_resetasync ( dvdcbcallback  cb)
Here is the call graph for this function:

◆ __dvd_seeksynccb()

static void __dvd_seeksynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_setgcmoffsetcb()

static void __dvd_setgcmoffsetcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_setgcmsynccb()

static void __dvd_setgcmsynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_spinupdrivecb()

static void __dvd_spinupdrivecb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_spinupdrivesynccb()

static void __dvd_spinupdrivesynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statebusy()

void __dvd_statebusy ( dvdcmdblk block)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statebusycb()

static void __dvd_statebusycb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statecheckid()

void __dvd_statecheckid ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statecheckid1cb()

static void __dvd_statecheckid1cb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statecheckid2()

void __dvd_statecheckid2 ( dvdcmdblk block)
Here is the caller graph for this function:

◆ __dvd_statecoverclosed()

void __dvd_statecoverclosed ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statecoverclosed_cmd()

void __dvd_statecoverclosed_cmd ( dvdcmdblk block)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statecoverclosed_spinupcb()

static void __dvd_statecoverclosed_spinupcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statecoverclosedcb()

static void __dvd_statecoverclosedcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stateerror()

void __dvd_stateerror ( s32  result)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stateerrorcb()

static void __dvd_stateerrorcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stategettingerror()

void __dvd_stategettingerror ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stategettingerrorcb()

static void __dvd_stategettingerrorcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stategotoretry()

void __dvd_stategotoretry ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stategotoretrycb()

static void __dvd_stategotoretrycb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statemotorstopped()

void __dvd_statemotorstopped ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statemotorstoppedcb()

static void __dvd_statemotorstoppedcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stateready()

void __dvd_stateready ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_stateretrycb()

static void __dvd_stateretrycb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_statetimeout()

void __dvd_statetimeout ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_storeerror()

static void __dvd_storeerror ( u32  errorcode)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_streamatendsynccb()

static void __dvd_streamatendsynccb ( s32  result,
dvdcmdblk block 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_timeouthandler()

static void __dvd_timeouthandler ( syswd_t  alarm,
void cbarg 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_unlockdrivecb()

static void __dvd_unlockdrivecb ( s32  result)
static
Here is the caller graph for this function:

◆ __dvd_unrecoverederrorcb()

static void __dvd_unrecoverederrorcb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __dvd_unrecoverederrorretrycb()

static void __dvd_unrecoverederrorretrycb ( s32  result)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __DVDAudioBufferConfig()

s32 __DVDAudioBufferConfig ( dvdcmdblk block,
u32  enable,
u32  size,
dvdcbcallback  cb 
)
Here is the call graph for this function:

◆ __DVDInitWA()

static void __DVDInitWA ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __DVDInterruptHandler()

static void __DVDInterruptHandler ( u32  nIrq,
void pCtx 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __DVDLowWATypeSet()

static void __DVDLowWATypeSet ( u32  workaround,
u32  workaroundseek 
)
static
Here is the caller graph for this function:

◆ __issuecommand()

s32 __issuecommand ( s32  prio,
dvdcmdblk block 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __MaskIrq()

void __MaskIrq ( u32  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __ProcessNextCmd()

static u32 __ProcessNextCmd ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __Read()

static void __Read ( void buffer,
u32  len,
s64  offset,
dvdcallbacklow  cb 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __SetupTimeoutAlarm()

static void __SetupTimeoutAlarm ( const struct timespec *  tp)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __SYS_LockSramEx()

syssramex* __SYS_LockSramEx ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __SYS_UnlockSramEx()

u32 __SYS_UnlockSramEx ( u32  write)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __UnmaskIrq()

void __UnmaskIrq ( u32  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ATTRIBUTE_ALIGN()

static dvddiskid __dvd_tmpid0 ATTRIBUTE_ALIGN ( 32  )
static

◆ callback()

void callback ( s32  result,
dvdcmdblk block 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert()

static u8 convert ( u32  errorcode)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ diff_msec()

u32 diff_msec ( unsigned long long  start,
unsigned long long  end 
)
Here is the caller graph for this function:

◆ DVD_CancelAllAsync()

s32 DVD_CancelAllAsync ( dvdcbcallback  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_ControlDrive()

s32 DVD_ControlDrive ( dvdcmdblk block,
u32  cmd 
)

Controls the drive's motor and behavior.

   This is a synchronous version of DVD_ControlDriveAsync().
Parameters
[in]blockpointer to a dvdcmdblk structure used to process the operation
[in]cmdcommand to control the drive.
Returns
none
Here is the call graph for this function:

◆ DVD_ControlDriveAsync()

s32 DVD_ControlDriveAsync ( dvdcmdblk block,
u32  cmd,
dvdcbcallback  cb 
)

Controls the drive's motor and behavior.

Parameters
[in]blockpointer to a dvdcmdblk structure used to process the operation
[in]cmdcommand to control the drive.
[in]cbcallback to be invoked upon completion of operation.
Returns
none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_GetCmdBlockStatus()

s32 DVD_GetCmdBlockStatus ( dvdcmdblk block)
Here is the caller graph for this function:

◆ DVD_GetCurrentDiskID()

dvddiskid* DVD_GetCurrentDiskID ( )

◆ DVD_GetDriveInfo()

dvddrvinfo* DVD_GetDriveInfo ( )

◆ DVD_GetDriveStatus()

s32 DVD_GetDriveStatus ( )
Here is the call graph for this function:

◆ DVD_Init()

void DVD_Init ( )

Initializes the DVD subsystem.

   You must call this function before calling any other DVD function
Returns
none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_Inquiry()

s32 DVD_Inquiry ( dvdcmdblk block,
dvddrvinfo info 
)
Here is the call graph for this function:

◆ DVD_InquiryAsync()

s32 DVD_InquiryAsync ( dvdcmdblk block,
dvddrvinfo info,
dvdcbcallback  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowAudioBufferConfig()

s32 DVD_LowAudioBufferConfig ( s32  enable,
u32  size,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowAudioStream()

s32 DVD_LowAudioStream ( u32  subcmd,
u32  len,
s64  offset,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowControlMotor()

s32 DVD_LowControlMotor ( u32  mode,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowEnableExtensions()

s32 DVD_LowEnableExtensions ( u8  enable,
dvdcallbacklow  cb 
)
Here is the caller graph for this function:

◆ DVD_LowFuncCall()

s32 DVD_LowFuncCall ( u32  address,
dvdcallbacklow  cb 
)
Here is the caller graph for this function:

◆ DVD_LowGetStatus()

s32 DVD_LowGetStatus ( u32 status,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowInquiry()

s32 DVD_LowInquiry ( dvddrvinfo info,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowPatchDriveCode()

s32 DVD_LowPatchDriveCode ( dvdcallbacklow  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowRead()

s32 DVD_LowRead ( void buf,
u32  len,
s64  offset,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowReadId()

s32 DVD_LowReadId ( dvddiskid diskID,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowReadmem()

s32 DVD_LowReadmem ( u32  address,
void buffer,
dvdcallbacklow  cb 
)
Here is the call graph for this function:

◆ DVD_LowRequestAudioStatus()

s32 DVD_LowRequestAudioStatus ( u32  subcmd,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowRequestError()

s32 DVD_LowRequestError ( dvdcallbacklow  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowReset()

void DVD_LowReset ( u32  reset_mode)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowSeek()

s32 DVD_LowSeek ( s64  offset,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowSetGCMOffset()

s32 DVD_LowSetGCMOffset ( s64  offset,
dvdcallbacklow  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowSetOffset()

s32 DVD_LowSetOffset ( s64  offset,
dvdcallbacklow  cb 
)
Here is the caller graph for this function:

◆ DVD_LowSetStatus()

s32 DVD_LowSetStatus ( u32  status,
dvdcallbacklow  cb 
)
Here is the caller graph for this function:

◆ DVD_LowSpinMotor()

s32 DVD_LowSpinMotor ( u32  mode,
dvdcallbacklow  cb 
)
Here is the caller graph for this function:

◆ DVD_LowSpinUpDrive()

s32 DVD_LowSpinUpDrive ( dvdcallbacklow  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowStopMotor()

s32 DVD_LowStopMotor ( dvdcallbacklow  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowUnlockDrive()

s32 DVD_LowUnlockDrive ( dvdcallbacklow  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_LowWaitCoverClose()

s32 DVD_LowWaitCoverClose ( dvdcallbacklow  cb)
Here is the caller graph for this function:

◆ DVD_Mount()

s32 DVD_Mount ( )

Mounts the DVD drive.

   This is a synchronous version of DVD_MountAsync().
Returns
none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_MountAsync()

s32 DVD_MountAsync ( dvdcmdblk block,
dvdcbcallback  cb 
)

Mounts the DVD drive.

   You <b>must</b> call this function in order to access the DVD.

   Following tasks are performed:
 - Issue a hard reset to the drive.
 - Turn on drive's debug mode.
 - Patch drive's FW.
 - Enable extensions.
 - Read disc ID

   The patch code and procedure was taken from the gc-linux DVD device driver.
Parameters
[in]blockpointer to a dvdcmdblk structure used to process the operation
[in]cbcallback to be invoked upon completion of operation
Returns
none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_Pause()

void DVD_Pause ( )
Here is the caller graph for this function:

◆ DVD_ReadAbsAsyncForBS()

s32 DVD_ReadAbsAsyncForBS ( dvdcmdblk block,
void buf,
u32  len,
s64  offset,
dvdcbcallback  cb 
)
Here is the call graph for this function:

◆ DVD_ReadAbsAsyncPrio()

s32 DVD_ReadAbsAsyncPrio ( dvdcmdblk block,
void buf,
u32  len,
s64  offset,
dvdcbcallback  cb,
s32  prio 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_ReadDiskID()

s32 DVD_ReadDiskID ( dvdcmdblk block,
dvddiskid id,
dvdcbcallback  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_ReadPrio()

s32 DVD_ReadPrio ( dvdcmdblk block,
void buf,
u32  len,
s64  offset,
s32  prio 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_Reset()

void DVD_Reset ( u32  reset_mode)

Performs a reset of the drive and FW respectively.

Parameters
[in]reset_modetype of reset
Returns
none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_SeekAbsAsyncPrio()

s32 DVD_SeekAbsAsyncPrio ( dvdcmdblk block,
s64  offset,
dvdcbcallback  cb,
s32  prio 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_SeekPrio()

s32 DVD_SeekPrio ( dvdcmdblk block,
s64  offset,
s32  prio 
)
Here is the call graph for this function:

◆ DVD_SetAutoInvalidation()

u32 DVD_SetAutoInvalidation ( u32  auto_inv)

◆ DVD_SetGCMOffset()

s32 DVD_SetGCMOffset ( dvdcmdblk block,
s64  offset 
)
Here is the call graph for this function:

◆ DVD_SetGCMOffsetAsync()

s32 DVD_SetGCMOffsetAsync ( dvdcmdblk block,
s64  offset,
dvdcbcallback  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_SpinUpDrive()

s32 DVD_SpinUpDrive ( dvdcmdblk block)
Here is the call graph for this function:

◆ DVD_SpinUpDriveAsync()

s32 DVD_SpinUpDriveAsync ( dvdcmdblk block,
dvdcbcallback  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DVD_StopStreamAtEnd()

s32 DVD_StopStreamAtEnd ( dvdcmdblk block)
Here is the call graph for this function:

◆ DVD_StopStreamAtEndAsync()

s32 DVD_StopStreamAtEndAsync ( dvdcmdblk block,
dvdcbcallback  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dvdio_ClearStatus()

static bool dvdio_ClearStatus ( )
static

◆ dvdio_IsInserted()

static bool dvdio_IsInserted ( )
static
Here is the call graph for this function:

◆ dvdio_ReadSectors()

static bool dvdio_ReadSectors ( sec_t  sector,
sec_t  numSectors,
void buffer 
)
static
Here is the call graph for this function:

◆ dvdio_Shutdown()

static bool dvdio_Shutdown ( )
static

◆ dvdio_Startup()

static bool dvdio_Startup ( )
static
Here is the call graph for this function:

◆ dvdio_WriteSectors()

static bool dvdio_WriteSectors ( sec_t  sector,
sec_t  numSectors,
const void buffer 
)
static

◆ err2num()

static u8 err2num ( u32  errorcode)
static
Here is the caller graph for this function:

◆ gettime()

long long gettime ( void  )
Here is the caller graph for this function:

◆ udelay()

void udelay ( int  us)
Here is the caller graph for this function:

Variable Documentation

◆ __dvd_autofinishing

u32 __dvd_autofinishing = 0
static

◆ __dvd_autoinvalidation

u32 __dvd_autoinvalidation = 1
static

◆ __dvd_block

dvdcmdblk __dvd_block
static

◆ __dvd_breaking

u32 __dvd_breaking = 0
static

◆ __dvd_callback

dvdcallbacklow __dvd_callback = NULL
static

◆ __dvd_cancelcallback

dvdcbcallback __dvd_cancelcallback = NULL
static

◆ __dvd_canceling

u32 __dvd_canceling = 0
static

◆ __dvd_cancellasterror

u32 __dvd_cancellasterror = 0
static

◆ __dvd_cmd_curr

dvdcmds __dvd_cmd_curr
static

◆ __dvd_cmd_prev

dvdcmds __dvd_cmd_prev
static

◆ __dvd_cmdlist

dvdcmdl __dvd_cmdlist[4]
static

◆ __dvd_currcmd

u32 __dvd_currcmd
static

◆ __dvd_diskID

dvddiskid* __dvd_diskID = (dvddiskid*)0x80000000
static

◆ __dvd_drivechecked

u32 __dvd_drivechecked = 0
static

◆ __dvd_drivestate

u32 __dvd_drivestate = 0
static

◆ __dvd_dummycmdblk

dvdcmdblk __dvd_dummycmdblk
static

◆ __dvd_errortable

u32 __dvd_errortable[]
static
Initial value:
= {
0x00000000, 0x00023a00, 0x00062800, 0x00030200,
0x00031100, 0x00052000, 0x00052001, 0x00052100,
0x00052400, 0x00052401, 0x00052402, 0x000B5A01,
0x00056300, 0x00020401, 0x00020400, 0x00040800,
0x00100007, 0x00000000
}

◆ __dvd_executing

dvdcmdblk* __dvd_executing = NULL
static

◆ __dvd_extensionsenabled

u32 __dvd_extensionsenabled = TRUE
static

◆ __dvd_fatalerror

u32 __dvd_fatalerror = 0
static

◆ __dvd_finaladdoncb

dvdcallbacklow __dvd_finaladdoncb = NULL
static

◆ __dvd_finaloffsetcb

dvdcallbacklow __dvd_finaloffsetcb = NULL
static

◆ __dvd_finalpatchcb

dvdcallbacklow __dvd_finalpatchcb = NULL
static

◆ __dvd_finalreadmemcb

dvdcallbacklow __dvd_finalreadmemcb = NULL
static

◆ __dvd_finalstatuscb

dvdcallbacklow __dvd_finalstatuscb = NULL
static

◆ __dvd_finalsudcb

dvdcallbacklow __dvd_finalsudcb = NULL
static

◆ __dvd_finalunlockcb

dvdcallbacklow __dvd_finalunlockcb = NULL
static

◆ __dvd_initflag

u32 __dvd_initflag = 0
static

◆ __dvd_internalretries

u32 __dvd_internalretries = 0
static

◆ __dvd_lastcmdwasread

u32 __dvd_lastcmdwasread
static

◆ __dvd_lasterror

u32 __dvd_lasterror = 0
static

◆ __dvd_lastlen

u32 __dvd_lastlen
static

◆ __dvd_lastresetend

u64 __dvd_lastresetend = 0
static

◆ __dvd_laststate

dvdstatecb __dvd_laststate = NULL
static

◆ __dvd_motorcntrl

u32 __dvd_motorcntrl
static

◆ __dvd_mountusrcb

dvdcbcallback __dvd_mountusrcb = NULL
static

◆ __dvd_nextcmdnum

u32 __dvd_nextcmdnum
static

◆ __dvd_patchcode04

const u8 __dvd_patchcode04[]
static

◆ __dvd_patchcode04_size

const u32 __dvd_patchcode04_size = 448
static

◆ __dvd_patchcode06

const u8 __dvd_patchcode06[]
static

◆ __dvd_patchcode06_size

const u32 __dvd_patchcode06_size = 448
static

◆ __dvd_patchcode08

const u8 __dvd_patchcode08[]
static

◆ __dvd_patchcode08_size

const u32 __dvd_patchcode08_size = 448
static

◆ __dvd_patchcodeQ08

const u8 __dvd_patchcodeQ08[]
static

◆ __dvd_patchcodeQ08_size

const u32 __dvd_patchcodeQ08_size = 448
static

◆ __dvd_pauseflag

u32 __dvd_pauseflag = 0
static

◆ __dvd_pausingflag

u32 __dvd_pausingflag = 0
static

◆ __dvd_ready

u32 __dvd_ready = 0
static

◆ __dvd_resetcovercb

dvdcallbacklow __dvd_resetcovercb = NULL
static

◆ __dvd_resetoccured

vu32 __dvd_resetoccured = 0
static

◆ __dvd_resetrequired

vu32 __dvd_resetrequired = 0
static

◆ __dvd_resumefromhere

u32 __dvd_resumefromhere = 0
static

◆ __dvd_stopnextint

u32 __dvd_stopnextint = 0
static

◆ __dvd_timeoutalarm

syswd_t __dvd_timeoutalarm
static

◆ __dvd_unlockcmd

static u8 __dvd_unlockcmd = {0xff,0x01,'M','A','T','S','H','I','T','A',0x02,0x00}
static

◆ __dvd_usrdata

void* __dvd_usrdata = NULL
static

◆ __dvd_wait_queue

lwpq_t __dvd_wait_queue
static

◆ __dvd_waitcoverclose

u32 __dvd_waitcoverclose = 0
static

◆ __dvd_waitingqueue

lwp_queue __dvd_waitingqueue[4]
static

◆ __dvd_workaround

u32 __dvd_workaround
static

◆ __dvd_workaroundseek

u32 __dvd_workaroundseek
static

◆ __dvdpatchcode

const u8* __dvdpatchcode = NULL
static

◆ __dvdpatchcode_size

u32 __dvdpatchcode_size = 0
static

◆ __io_gcdvd

const DISC_INTERFACE __io_gcdvd
Initial value:
= {
}
static bool dvdio_Shutdown()
Definition: dvd.c:2418
bool(* FN_MEDIUM_WRITESECTORS)(uint32_t sector, uint32_t numSectors, const void *buffer)
Definition: iosuhax_disc_interface.h:48
bool(* FN_MEDIUM_ISINSERTED)(void)
Definition: iosuhax_disc_interface.h:46
static bool dvdio_ReadSectors(sec_t sector, sec_t numSectors, void *buffer)
Definition: dvd.c:2398
#define FEATURE_GAMECUBE_DVD
Definition: disc_io.h:41
static bool dvdio_Startup()
Definition: dvd.c:2371
bool(* FN_MEDIUM_SHUTDOWN)(void)
Definition: iosuhax_disc_interface.h:50
bool(* FN_MEDIUM_STARTUP)(void)
Definition: iosuhax_disc_interface.h:45
static bool dvdio_WriteSectors(sec_t sector, sec_t numSectors, const void *buffer)
Definition: dvd.c:2408
bool(* FN_MEDIUM_READSECTORS)(uint32_t sector, uint32_t numSectors, void *buffer)
Definition: iosuhax_disc_interface.h:47
static bool dvdio_ClearStatus()
Definition: dvd.c:2413
static bool dvdio_IsInserted()
Definition: dvd.c:2387
bool(* FN_MEDIUM_CLEARSTATUS)(void)
Definition: iosuhax_disc_interface.h:49
#define FEATURE_MEDIUM_CANREAD
Definition: iosuhax_disc_interface.h:42
#define DEVICE_TYPE_GAMECUBE_DVD
Definition: dvd.h:362

◆ _piReg

vu32* const _piReg = (u32*)0xCC003000
static