Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
dvd.c File Reference

Typedefs

typedef void(* stateFunc) (DVDCommandBlock *block)
 

Functions

static void defaultOptionalCommandChecker ()
 
static void stateReadingFST ()
 
static void cbForStateReadingFST ()
 
static void cbForStateError ()
 
static void stateTimeout ()
 
static void stateGettingError ()
 
static u32 CategorizeError (u32 error)
 
static void cbForStateGettingError ()
 
static void cbForUnrecoveredError ()
 
static void cbForUnrecoveredErrorRetry ()
 
static void stateGoToRetry ()
 
static void cbForStateGoToRetry ()
 
static void stateCheckID ()
 
static void stateCheckID3 ()
 
static void stateCheckID2a ()
 
static void cbForStateCheckID2a ()
 
static void stateCheckID2 ()
 
static void cbForStateCheckID1 ()
 
static void cbForStateCheckID2 ()
 
static void cbForStateCheckID3 ()
 
static void AlarmHandler ()
 
static void stateCoverClosed ()
 
static void stateCoverClosed_CMD ()
 
static void cbForStateCoverClosed ()
 
static void stateMotorStopped ()
 
static void cbForStateMotorStopped ()
 
static void stateReady ()
 
static void stateBusy ()
 
static void cbForStateBusy ()
 
static void cbForCancelSync (s32 result, DVDCommandBlock *block)
 
void __DVDPrepareResetAsync (DVDCBCallback callbac)
 
BOOL __DVDTestAlarm (OSAlarm *alarm)
 
void __DVDInitWA ()
 
void __DVDInterruptHandler (s16 interrupt, OSContext *context)
 
void DVDLowRead ()
 
void DVDLowSeek ()
 
void DVDLowWaitCoverClose ()
 
void DVDLowReadDiskID ()
 
void DVDLowStopMotor ()
 
void DVDLowRequestError ()
 
void DVDLowInquiry ()
 
void DVDLowAudioStream ()
 
void DVDLowRequestAudioStatus ()
 
void DVDLowAudioBufferConfig ()
 
void DVDLowReset ()
 
void DVDLowBreak ()
 
DVDLowCallback DVDLowClearCallback ()
 
BOOL __DVDLowTestAlarm (OSAlarm *alarm)
 
void __DVDFSInit ()
 
void __DVDClearWaitingQueue ()
 
BOOL __DVDPushWaitingQueue ()
 
DVDCommandBlock__DVDPopWaitingQueue ()
 
BOOL __DVDCheckWaitingQueue ()
 
void __DVDDequeueWaitingQueue ()
 
void __DVDStoreErrorCode ()
 
BOOL DVDCompareDiskID (DVDDiskID *, DVDDiskID *)
 
void __DVDPrintFatalMessage ()
 
void __fstLoad ()
 
void DVDInit (void)
 
static DVDBB2 BB2 ALIGN_DECL (32)
 
static void cbForStateReadingFST (u32 intType)
 
static void stateError (u32 error)
 
static void cbForStateError (u32 intType)
 
static BOOL CheckCancel (u32 resume)
 
static void cbForStateGettingError (u32 intType)
 
static void cbForUnrecoveredError (u32 intType)
 
static void cbForUnrecoveredErrorRetry (u32 intType)
 
static void cbForStateGoToRetry (u32 intType)
 
static void cbForStateCheckID2a (u32 intType)
 
static void cbForStateCheckID1 (u32 intType)
 
static void cbForStateCheckID2 (u32 intType)
 
static void cbForStateCheckID3 (u32 intType)
 
static void AlarmHandler (OSAlarm *alarm, OSContext *context)
 
static void stateCoverClosed_CMD (DVDCommandBlock *block)
 
static void cbForStateCoverClosed (u32 intType)
 
static void cbForStateMotorStopped (u32 intType)
 
static void stateBusy (DVDCommandBlock *block)
 
static BOOL IsImmCommandWithResult (u32 command)
 
static BOOL IsDmaCommand (u32 command)
 
static void cbForStateBusy (u32 intType)
 
static BOOL issueCommand (s32 prio, DVDCommandBlock *block)
 
BOOL DVDReadAbsAsyncPrio (DVDCommandBlock *block, void *addr, s32 length, s32 offset, DVDCBCallback callback, s32 prio)
 
BOOL DVDReadAbsAsyncForBS (DVDCommandBlock *block, void *addr, s32 length, s32 offset, DVDCBCallback callback)
 
BOOL DVDReadDiskID (DVDCommandBlock *block, DVDDiskID *diskID, DVDCBCallback callback)
 
BOOL DVDCancelStreamAsync (DVDCommandBlock *block, DVDCBCallback callback)
 
BOOL DVDInquiryAsync (DVDCommandBlock *block, DVDDriveInfo *info, DVDCBCallback callback)
 
void DVDReset (void)
 
s32 DVDGetCommandBlockStatus (const DVDCommandBlock *block)
 
s32 DVDGetDriveStatus ()
 
BOOL DVDSetAutoInvalidation (BOOL autoInval)
 
void DVDResume (void)
 
BOOL DVDCancelAsync (DVDCommandBlock *block, DVDCBCallback callback)
 
s32 DVDCancel (DVDCommandBlock *block)
 
DVDDiskIDDVDGetCurrentDiskID (void)
 
BOOL DVDCheckDisk (void)
 
void DVDPause (void)
 
BOOL DVDCancelAllAsync (DVDCBCallback callback)
 

Variables

static char__DVDVersion = "<< Dolphin SDK - DVD\trelease build: Apr 5 2004 04:14:51 (0x2301) >>"
 
OSThreadQueue __DVDThreadQueue
 
static DVDCommandBlockexecuting
 
static DVDDiskIDIDShouldBe
 
static OSBootInfobootInfo
 
static volatile BOOL PauseFlag
 
static volatile BOOL PausingFlag
 
static volatile BOOL AutoFinishing
 
static volatile BOOL FatalErrorFlag
 
static volatile u32 CurrCommand
 
static volatile u32 Canceling
 
static DVDCBCallback CancelCallback
 
static volatile u32 ResumeFromHere
 
static volatile u32 CancelLastError
 
static volatile u32 LastError
 
static volatile s32 NumInternalRetry
 
static volatile BOOL ResetRequired
 
static volatile BOOL FirstTimeInBootrom
 
static u32 MotorState
 
static BOOL DVDInitialized
 
static BOOL autoInvalidation = TRUE
 
static DVDOptionalCommandChecker checkOptionalCommand = defaultOptionalCommandChecker
 
static stateFunc LastState
 
static DVDCommandBlock DummyCommandBlock
 
static OSAlarm ResetAlarm
 
static u32 ImmCommand [] = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
 
static u32 DmaCommand [] = {0xFFFFFFFF}
 
static char string_DVDChangeDiskAsyncMsg []
 

Typedef Documentation

◆ stateFunc

typedef void(* stateFunc) (DVDCommandBlock *block)

Function Documentation

◆ __DVDCheckWaitingQueue()

BOOL __DVDCheckWaitingQueue ( void  )

◆ __DVDClearWaitingQueue()

void __DVDClearWaitingQueue ( void  )

◆ __DVDDequeueWaitingQueue()

void __DVDDequeueWaitingQueue ( )

◆ __DVDFSInit()

void __DVDFSInit ( )

◆ __DVDInitWA()

void __DVDInitWA ( )

◆ __DVDInterruptHandler()

void __DVDInterruptHandler ( s16  interrupt,
OSContext context 
)

◆ __DVDLowTestAlarm()

BOOL __DVDLowTestAlarm ( OSAlarm alarm)

◆ __DVDPopWaitingQueue()

DVDCommandBlock * __DVDPopWaitingQueue ( void  )

◆ __DVDPrepareResetAsync()

void __DVDPrepareResetAsync ( DVDCBCallback  callbac)

◆ __DVDPrintFatalMessage()

void __DVDPrintFatalMessage ( )

◆ __DVDPushWaitingQueue()

BOOL __DVDPushWaitingQueue ( )

◆ __DVDStoreErrorCode()

void __DVDStoreErrorCode ( )

◆ __DVDTestAlarm()

BOOL __DVDTestAlarm ( OSAlarm alarm)

◆ __fstLoad()

void __fstLoad ( )

◆ AlarmHandler() [1/2]

static void AlarmHandler ( )
static

◆ AlarmHandler() [2/2]

static void AlarmHandler ( OSAlarm alarm,
OSContext context 
)
static

◆ ALIGN_DECL()

static DVDDiskID CurrDiskID ALIGN_DECL ( 32  )
static

◆ CategorizeError()

static u32 CategorizeError ( u32  error)
static

◆ cbForCancelSync()

static void cbForCancelSync ( s32  result,
DVDCommandBlock block 
)
static

◆ cbForStateBusy() [1/2]

static void cbForStateBusy ( )
static

◆ cbForStateBusy() [2/2]

static void cbForStateBusy ( u32  intType)
static

◆ cbForStateCheckID1() [1/2]

static void cbForStateCheckID1 ( )
static

◆ cbForStateCheckID1() [2/2]

static void cbForStateCheckID1 ( u32  intType)
static

◆ cbForStateCheckID2() [1/2]

static void cbForStateCheckID2 ( )
static

◆ cbForStateCheckID2() [2/2]

static void cbForStateCheckID2 ( u32  intType)
static

◆ cbForStateCheckID2a() [1/2]

static void cbForStateCheckID2a ( )
static

◆ cbForStateCheckID2a() [2/2]

static void cbForStateCheckID2a ( u32  intType)
static

◆ cbForStateCheckID3() [1/2]

static void cbForStateCheckID3 ( )
static

◆ cbForStateCheckID3() [2/2]

static void cbForStateCheckID3 ( u32  intType)
static

◆ cbForStateCoverClosed() [1/2]

static void cbForStateCoverClosed ( )
static

◆ cbForStateCoverClosed() [2/2]

static void cbForStateCoverClosed ( u32  intType)
static

◆ cbForStateError() [1/2]

static void cbForStateError ( )
static

◆ cbForStateError() [2/2]

static void cbForStateError ( u32  intType)
static

◆ cbForStateGettingError() [1/2]

static void cbForStateGettingError ( )
static

◆ cbForStateGettingError() [2/2]

static void cbForStateGettingError ( u32  intType)
static

◆ cbForStateGoToRetry() [1/2]

static void cbForStateGoToRetry ( )
static

◆ cbForStateGoToRetry() [2/2]

static void cbForStateGoToRetry ( u32  intType)
static

◆ cbForStateMotorStopped() [1/2]

static void cbForStateMotorStopped ( )
static

◆ cbForStateMotorStopped() [2/2]

static void cbForStateMotorStopped ( u32  intType)
static

◆ cbForStateReadingFST() [1/2]

static void cbForStateReadingFST ( )
static

◆ cbForStateReadingFST() [2/2]

static void cbForStateReadingFST ( u32  intType)
static

◆ cbForUnrecoveredError() [1/2]

static void cbForUnrecoveredError ( )
static

◆ cbForUnrecoveredError() [2/2]

static void cbForUnrecoveredError ( u32  intType)
static

◆ cbForUnrecoveredErrorRetry() [1/2]

static void cbForUnrecoveredErrorRetry ( )
static

◆ cbForUnrecoveredErrorRetry() [2/2]

static void cbForUnrecoveredErrorRetry ( u32  intType)
static

◆ CheckCancel()

static BOOL CheckCancel ( u32  resume)
static

◆ defaultOptionalCommandChecker()

static void defaultOptionalCommandChecker ( )
static

◆ DVDCancel()

s32 DVDCancel ( DVDCommandBlock block)

◆ DVDCancelAllAsync()

BOOL DVDCancelAllAsync ( DVDCBCallback  callback)

◆ DVDCancelAsync()

BOOL DVDCancelAsync ( DVDCommandBlock block,
DVDCBCallback  callback 
)

◆ DVDCancelStreamAsync()

BOOL DVDCancelStreamAsync ( DVDCommandBlock block,
DVDCBCallback  callback 
)

◆ DVDCheckDisk()

BOOL DVDCheckDisk ( void  )

◆ DVDCompareDiskID()

BOOL DVDCompareDiskID ( DVDDiskID id1,
DVDDiskID id2 
)

◆ DVDGetCommandBlockStatus()

s32 DVDGetCommandBlockStatus ( const DVDCommandBlock block)

◆ DVDGetCurrentDiskID()

DVDDiskID * DVDGetCurrentDiskID ( void  )

◆ DVDGetDriveStatus()

s32 DVDGetDriveStatus ( void  )

◆ DVDInit()

void DVDInit ( void  )

◆ DVDInquiryAsync()

BOOL DVDInquiryAsync ( DVDCommandBlock block,
DVDDriveInfo info,
DVDCBCallback  callback 
)

◆ DVDLowAudioBufferConfig()

void DVDLowAudioBufferConfig ( )

◆ DVDLowAudioStream()

void DVDLowAudioStream ( )

◆ DVDLowBreak()

BOOL DVDLowBreak ( )

◆ DVDLowClearCallback()

DVDLowCallback DVDLowClearCallback ( )

◆ DVDLowInquiry()

void DVDLowInquiry ( )

◆ DVDLowRead()

void DVDLowRead ( )

◆ DVDLowReadDiskID()

void DVDLowReadDiskID ( )

◆ DVDLowRequestAudioStatus()

void DVDLowRequestAudioStatus ( )

◆ DVDLowRequestError()

void DVDLowRequestError ( )

◆ DVDLowReset()

void DVDLowReset ( )

◆ DVDLowSeek()

void DVDLowSeek ( )

◆ DVDLowStopMotor()

void DVDLowStopMotor ( )

◆ DVDLowWaitCoverClose()

void DVDLowWaitCoverClose ( )

◆ DVDPause()

void DVDPause ( void  )

◆ DVDReadAbsAsyncForBS()

BOOL DVDReadAbsAsyncForBS ( DVDCommandBlock block,
void addr,
s32  length,
s32  offset,
DVDCBCallback  callback 
)

◆ DVDReadAbsAsyncPrio()

BOOL DVDReadAbsAsyncPrio ( DVDCommandBlock block,
void addr,
s32  length,
s32  offset,
DVDCBCallback  callback,
s32  prio 
)

◆ DVDReadDiskID()

BOOL DVDReadDiskID ( DVDCommandBlock block,
DVDDiskID diskID,
DVDCBCallback  callback 
)

◆ DVDReset()

void DVDReset ( void  )

◆ DVDResume()

void DVDResume ( void  )

◆ DVDSetAutoInvalidation()

BOOL DVDSetAutoInvalidation ( BOOL  autoInval)

◆ IsDmaCommand()

static BOOL IsDmaCommand ( u32  command)
static

◆ IsImmCommandWithResult()

static BOOL IsImmCommandWithResult ( u32  command)
static

◆ issueCommand()

static BOOL issueCommand ( s32  prio,
DVDCommandBlock block 
)
static

◆ stateBusy() [1/2]

static void stateBusy ( )
static

◆ stateBusy() [2/2]

static void stateBusy ( DVDCommandBlock block)
static

◆ stateCheckID()

static void stateCheckID ( void  )
static

◆ stateCheckID2()

static void stateCheckID2 ( )
static

◆ stateCheckID2a()

static void stateCheckID2a ( void  )
static

◆ stateCheckID3()

static void stateCheckID3 ( void  )
static

◆ stateCoverClosed()

static void stateCoverClosed ( void  )
static

◆ stateCoverClosed_CMD() [1/2]

static void stateCoverClosed_CMD ( )
static

◆ stateCoverClosed_CMD() [2/2]

static void stateCoverClosed_CMD ( DVDCommandBlock block)
static

◆ stateError()

static void stateError ( u32  error)
static

◆ stateGettingError()

static void stateGettingError ( void  )
static

◆ stateGoToRetry()

static void stateGoToRetry ( void  )
static

◆ stateMotorStopped()

static void stateMotorStopped ( void  )
static

◆ stateReadingFST()

void stateReadingFST ( )
static

◆ stateReady()

static void stateReady ( )
static

◆ stateTimeout()

static void stateTimeout ( void  )
static

Variable Documentation

◆ __DVDThreadQueue

OSThreadQueue __DVDThreadQueue
extern

◆ __DVDVersion

char* __DVDVersion = "<< Dolphin SDK - DVD\trelease build: Apr 5 2004 04:14:51 (0x2301) >>"
static

◆ AutoFinishing

volatile BOOL AutoFinishing
static

◆ autoInvalidation

BOOL autoInvalidation = TRUE
static

◆ bootInfo

OSBootInfo* bootInfo
static

◆ CancelCallback

DVDCBCallback CancelCallback
static

◆ Canceling

volatile u32 Canceling
static

◆ CancelLastError

volatile u32 CancelLastError
static

◆ checkOptionalCommand

◆ CurrCommand

volatile u32 CurrCommand
static

◆ DmaCommand

u32 DmaCommand[] = {0xFFFFFFFF}
static

◆ DummyCommandBlock

DVDCommandBlock DummyCommandBlock
static

◆ DVDInitialized

BOOL DVDInitialized
static

◆ executing

DVDCommandBlock* executing
static

◆ FatalErrorFlag

volatile BOOL FatalErrorFlag
static

◆ FirstTimeInBootrom

volatile BOOL FirstTimeInBootrom
static

◆ IDShouldBe

DVDDiskID* IDShouldBe
static

◆ ImmCommand

u32 ImmCommand[] = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
static

◆ LastError

volatile u32 LastError
static

◆ LastState

stateFunc LastState
static

◆ MotorState

u32 MotorState
static

◆ NumInternalRetry

volatile s32 NumInternalRetry
static

◆ PauseFlag

volatile BOOL PauseFlag
static

◆ PausingFlag

volatile BOOL PausingFlag
static

◆ ResetAlarm

OSAlarm ResetAlarm
static

◆ ResetRequired

volatile BOOL ResetRequired
static

◆ ResumeFromHere

volatile u32 ResumeFromHere
static

◆ string_DVDChangeDiskAsyncMsg

char string_DVDChangeDiskAsyncMsg[]
static
Initial value:
=
"DVDChangeDiskAsync(): You can't specify NULL to company name. \n"