SSBM Decomp
Loading...
Searching...
No Matches
dvd.c File Reference

Data Structures

struct  OSBootInfo
 
struct  _IO
 

Functions

static void cbForCancelAllSync (s32, DVDCommandBlock *)
 
static void cbForCancelStreamSync (s32, DVDCommandBlock *)
 
static void cbForCancelSync (s32, DVDCommandBlock *)
 
static void cbForStateBusy (u32 intType)
 
static void cbForStateCheckID1 (u32 intType)
 
static void cbForStateCheckID2 (u32)
 
static void cbForStateCheckID3 (u32)
 
static void cbForStateCoverClosed (u32 intType)
 
static void cbForStateError (u32 intType)
 
static void cbForStateGettingError (u32 intType)
 
static void cbForStateGoToRetry (u32 intType)
 
static void cbForStateMotorStopped (u32 intType)
 
static void cbForStateReadingFST (u32 intType)
 
static void cbForUnrecoveredError (u32 intType)
 
static void cbForUnrecoveredErrorRetry (u32 intType)
 
static void stateBusy (DVDCommandBlock *)
 
static void stateCheckID2 (DVDCommandBlock *)
 
static void stateCheckID3 (DVDCommandBlock *)
 
static void stateCoverClosed (void)
 
static void stateCoverClosed_CMD (DVDCommandBlock *)
 
static void stateGettingError (void)
 
static void stateGoToRetry (void)
 
static void stateMotorStopped (void)
 
static void stateReady (void)
 
static void stateTimeout (void)
 
volatile struct _IO AT_ADDRESS (0xCC006000)
 
DVDCommandBlock__DVDPopWaitingQueue (void)
 
void DVDInit (void)
 
static void stateReadingFST (DVDCommandBlock *_)
 
void stateError (u32 error)
 
u32 CategorizeError (u32 error)
 
bool CheckCancel (u32 resume)
 
static void stateCheckID (void)
 
static void AlarmHandler (OSAlarm *unused0, OSContext *unused1)
 
static bool issueCommand (s32 prio, DVDCommandBlock *block)
 
bool DVDReadAbsAsyncPrio (DVDCommandBlock *block, void *addr, s32 length, s32 offset, DVDCBCallback callback, s32 prio)
 
bool DVDSeekAbsAsyncPrio (DVDCommandBlock *block, u32 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 DVDPrepareStreamAbsAsync (DVDCommandBlock *block, u32 length, u32 offset, DVDCBCallback callback)
 
bool DVDCancelStreamAsync (DVDCommandBlock *block, DVDCBCallback callback)
 
int DVDCancelStream (DVDCommandBlock *block)
 
bool DVDStopStreamAtEndAsync (DVDCommandBlock *block, DVDCBCallback callback)
 
bool DVDInquiryAsync (DVDCommandBlock *block, void *addr, DVDCBCallback callback)
 
void DVDReset (void)
 
s32 DVDGetCommandBlockStatus (const DVDCommandBlock *block)
 
s32 DVDGetDriveStatus (void)
 
bool DVDSetAutoInvalidation (bool autoInval)
 
void DVDPause (void)
 
void DVDResume (void)
 
bool DVDCancelAsync (DVDCommandBlock *block, DVDCBCallback callback)
 
s32 DVDCancel (DVDCommandBlock *block)
 
bool DVDCancelAllAsync (DVDCBCallback callback)
 
int DVDCancelAll (void)
 
DVDDiskIDDVDGetCurrentDiskID (void)
 
bool DVDCheckDisk (void)
 
void __DVDPrepareResetAsync (DVDCBCallback callback)
 

Variables

u32 unk0
 
u32 unk4
 
u32 x8 [6]
 
u32 error
 
static DVDBuffer tmpBuffer
 
static u8 _ [0x60]
 
DVDCommandBlock DummyCommandBlock
 
OSAlarm ResetAlarm
 
static DVDCommandBlockexecuting
 
static DVDDiskIDcurrID
 
static OSBootInfobootInfo
 
static volatile bool PauseFlag
 
static volatile bool PausingFlag
 
static bool AutoFinishing
 
static volatile bool FatalErrorFlag
 
static vu32 CurrCommand
 
static vu32 Canceling
 
static DVDCBCallback CancelCallback
 
static vu32 ResumeFromHere
 
static vu32 CancelLastError
 
static vu32 LastError
 
static vs32 NumInternalRetry
 
static volatile bool ResetRequired
 
static volatile bool CancelAllSyncComplete
 
static bool FirstTimeInBootrom
 
static bool DVDInitialized
 
static void(* LastState )(DVDCommandBlock *)
 
static bool autoInvalidation = true
 
OSThreadQueue __DVDThreadQueue
 

Function Documentation

◆ cbForCancelAllSync()

static void cbForCancelAllSync ( s32  result,
DVDCommandBlock block 
)
static

◆ cbForCancelStreamSync()

static void cbForCancelStreamSync ( s32  result,
DVDCommandBlock block 
)
static

◆ cbForCancelSync()

static void cbForCancelSync ( s32  result,
DVDCommandBlock block 
)
static

◆ cbForStateBusy()

static void cbForStateBusy ( u32  intType)
static

◆ cbForStateCheckID1()

static void cbForStateCheckID1 ( u32  intType)
static

◆ cbForStateCheckID2()

static void cbForStateCheckID2 ( u32  intType)
static

◆ cbForStateCheckID3()

static void cbForStateCheckID3 ( u32  intType)
static

◆ cbForStateCoverClosed()

static void cbForStateCoverClosed ( u32  intType)
static

◆ cbForStateError()

static void cbForStateError ( u32  intType)
static

◆ cbForStateGettingError()

static void cbForStateGettingError ( u32  intType)
static

◆ cbForStateGoToRetry()

static void cbForStateGoToRetry ( u32  intType)
static

◆ cbForStateMotorStopped()

static void cbForStateMotorStopped ( u32  intType)
static

◆ cbForStateReadingFST()

static void cbForStateReadingFST ( u32  intType)
static

◆ cbForUnrecoveredError()

static void cbForUnrecoveredError ( u32  intType)
static

◆ cbForUnrecoveredErrorRetry()

static void cbForUnrecoveredErrorRetry ( u32  intType)
static

◆ stateBusy()

static void stateBusy ( DVDCommandBlock block)
static

◆ stateCheckID2()

static void stateCheckID2 ( DVDCommandBlock _)
static

◆ stateCheckID3()

static void stateCheckID3 ( DVDCommandBlock _)
static

◆ stateCoverClosed()

static void stateCoverClosed ( void  )
static

◆ stateCoverClosed_CMD()

static void stateCoverClosed_CMD ( DVDCommandBlock block)
static
Todo:
Incorrect cast.

◆ stateGettingError()

static void stateGettingError ( void  )
static

◆ stateGoToRetry()

static void stateGoToRetry ( void  )
static

◆ stateMotorStopped()

static void stateMotorStopped ( void  )
static

◆ stateReady()

static void stateReady ( void  )
static

◆ stateTimeout()

static void stateTimeout ( void  )
static

◆ AT_ADDRESS()

volatile struct _IO AT_ADDRESS ( 0xCC006000  )
extern

◆ __DVDPopWaitingQueue()

DVDCommandBlock * __DVDPopWaitingQueue ( void  )

◆ DVDInit()

void DVDInit ( void  )

◆ stateReadingFST()

static void stateReadingFST ( DVDCommandBlock _)
static

◆ stateError()

void stateError ( u32  error)
inline

◆ CategorizeError()

u32 CategorizeError ( u32  error)

◆ CheckCancel()

bool CheckCancel ( u32  resume)
inline

◆ stateCheckID()

static void stateCheckID ( void  )
static

◆ AlarmHandler()

static void AlarmHandler ( OSAlarm unused0,
OSContext unused1 
)
static

◆ issueCommand()

static bool issueCommand ( s32  prio,
DVDCommandBlock block 
)
inlinestatic

◆ DVDReadAbsAsyncPrio()

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

◆ DVDSeekAbsAsyncPrio()

bool DVDSeekAbsAsyncPrio ( DVDCommandBlock block,
u32  offset,
DVDCBCallback  callback,
s32  prio 
)

◆ DVDReadAbsAsyncForBS()

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

◆ DVDReadDiskID()

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

◆ DVDPrepareStreamAbsAsync()

bool DVDPrepareStreamAbsAsync ( DVDCommandBlock block,
u32  length,
u32  offset,
DVDCBCallback  callback 
)

◆ DVDCancelStreamAsync()

bool DVDCancelStreamAsync ( DVDCommandBlock block,
DVDCBCallback  callback 
)

◆ DVDCancelStream()

int DVDCancelStream ( DVDCommandBlock block)

◆ DVDStopStreamAtEndAsync()

bool DVDStopStreamAtEndAsync ( DVDCommandBlock block,
DVDCBCallback  callback 
)

◆ DVDInquiryAsync()

bool DVDInquiryAsync ( DVDCommandBlock block,
void *  addr,
DVDCBCallback  callback 
)

◆ DVDReset()

void DVDReset ( void  )

◆ DVDGetCommandBlockStatus()

s32 DVDGetCommandBlockStatus ( const DVDCommandBlock block)

◆ DVDGetDriveStatus()

s32 DVDGetDriveStatus ( void  )

◆ DVDSetAutoInvalidation()

bool DVDSetAutoInvalidation ( bool  autoInval)

◆ DVDPause()

void DVDPause ( void  )
inline

◆ DVDResume()

void DVDResume ( void  )
inline

◆ DVDCancelAsync()

bool DVDCancelAsync ( DVDCommandBlock block,
DVDCBCallback  callback 
)

◆ DVDCancel()

s32 DVDCancel ( DVDCommandBlock block)

◆ DVDCancelAllAsync()

bool DVDCancelAllAsync ( DVDCBCallback  callback)
inline

◆ DVDCancelAll()

int DVDCancelAll ( void  )

◆ DVDGetCurrentDiskID()

DVDDiskID * DVDGetCurrentDiskID ( void  )

◆ DVDCheckDisk()

bool DVDCheckDisk ( void  )

◆ __DVDPrepareResetAsync()

void __DVDPrepareResetAsync ( DVDCBCallback  callback)

Variable Documentation

◆ unk0

u32 unk0

◆ unk4

u32 unk4

◆ x8

UNK_T x8

◆ error

u32 error

◆ tmpBuffer

DVDBuffer tmpBuffer
static

◆ _

u8 _[0x60]
static
Todo:
Unused .bss.

◆ DummyCommandBlock

DVDCommandBlock DummyCommandBlock

◆ ResetAlarm

OSAlarm ResetAlarm

◆ executing

DVDCommandBlock* executing
static

◆ currID

DVDDiskID* currID
static

◆ bootInfo

OSBootInfo* bootInfo
static

◆ PauseFlag

volatile bool PauseFlag
static

◆ PausingFlag

volatile bool PausingFlag
static

◆ AutoFinishing

bool AutoFinishing
static

◆ FatalErrorFlag

volatile bool FatalErrorFlag
static

◆ CurrCommand

vu32 CurrCommand
static

◆ Canceling

vu32 Canceling
static

◆ CancelCallback

DVDCBCallback CancelCallback
static

◆ ResumeFromHere

vu32 ResumeFromHere
static

◆ CancelLastError

vu32 CancelLastError
static

◆ LastError

vu32 LastError
static

◆ NumInternalRetry

vs32 NumInternalRetry
static

◆ ResetRequired

volatile bool ResetRequired
static

◆ CancelAllSyncComplete

volatile bool CancelAllSyncComplete
static

◆ FirstTimeInBootrom

bool FirstTimeInBootrom
static

◆ DVDInitialized

bool DVDInitialized
static

◆ LastState

void(* LastState) (DVDCommandBlock *) ( DVDCommandBlock )
static

◆ autoInvalidation

bool autoInvalidation = true
static

◆ __DVDThreadQueue

OSThreadQueue __DVDThreadQueue
extern