SSBM Decomp
Loading...
Searching...
No Matches
dvd.c File Reference
#include <dolphin.h>
#include "__dvd.h"
#include "os/__os.h"
#include <dolphin/dvd.h>
#include <dolphin/os.h>

Functions

static unsigned char *tmpBuffer[32] ATTRIBUTE_ALIGN (32)
static void stateReadingFST ()
static void cbForStateReadingFST (unsigned long intType)
static void stateError ()
static void stateGettingError ()
static unsigned long CategorizeError (unsigned long error)
static int ResetWorkAround (unsigned long error)
static void cbForStateGettingError (unsigned long intType)
static void stateGoToRetry ()
static void cbForStateGoToRetry (unsigned long intType)
static void stateCheckID ()
static void stateCheckID3 ()
static void stateCheckID2 ()
static void cbForStateCheckID1 (unsigned long intType)
static void cbForStateCheckID2 (unsigned long intType)
static void cbForStateCheckID3 (unsigned long intType)
static void stateCoverClosed ()
static void stateCoverClosed_CMD ()
static void cbForStateCoverClosed (unsigned long intType)
static void stateMotorStopped ()
static void cbForStateMotorStopped (unsigned long intType)
static void stateReady ()
static void stateBusy (struct DVDCommandBlock *block)
static void cbForStateBusy (unsigned long intType)
static int issueCommand (long prio, struct DVDCommandBlock *block)
static void cbForCancelStreamSync (long result, struct DVDCommandBlock *block)
static void cbForStopStreamAtEndSync (long result, struct DVDCommandBlock *block)
static void cbForGetStreamErrorStatusSync (long result, struct DVDCommandBlock *block)
static void cbForGetStreamPlayAddrSync (long result, struct DVDCommandBlock *block)
static void cbForGetStreamStartAddrSync (long result, struct DVDCommandBlock *block)
static void cbForGetStreamLengthSync (long result, struct DVDCommandBlock *block)
static void cbForChangeDiskSync ()
static void cbForInquirySync (long result, struct DVDCommandBlock *block)
static void cbForCancelSync ()
static void cbForCancelAllSync ()
void DVDInit ()
static void stateError (int code)
static void cbForStateError (unsigned long intType)
static void stateTimeout (void)
static BOOL cancel_inline (int resume)
static void cbForUnrecoveredError (unsigned long intType)
static void cbForUnrecoveredErrorRetry (unsigned long intType)
static void AlarmHandler (OSAlarm *, OSContext *)
int DVDReadAbsAsyncPrio (struct DVDCommandBlock *block, void *addr, long length, long offset, void(*callback)(long, struct DVDCommandBlock *), long prio)
int DVDSeekAbsAsyncPrio (struct DVDCommandBlock *block, long offset, void(*callback)(long, struct DVDCommandBlock *), long prio)
int DVDReadAbsAsyncForBS (struct DVDCommandBlock *block, void *addr, long length, long offset, void(*callback)(long, struct DVDCommandBlock *))
int DVDReadDiskID (struct DVDCommandBlock *block, struct DVDDiskID *diskID, void(*callback)(long, struct DVDCommandBlock *))
int DVDPrepareStreamAbsAsync (struct DVDCommandBlock *block, unsigned long length, unsigned long offset, void(*callback)(long, struct DVDCommandBlock *))
int DVDCancelStreamAsync (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
long DVDCancelStream (struct DVDCommandBlock *block)
int DVDStopStreamAtEndAsync (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
long DVDStopStreamAtEnd (struct DVDCommandBlock *block)
int DVDGetStreamErrorStatusAsync (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
long DVDGetStreamErrorStatus (struct DVDCommandBlock *block)
int DVDGetStreamPlayAddrAsync (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
long DVDGetStreamPlayAddr (struct DVDCommandBlock *block)
int DVDGetStreamStartAddrAsync (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
long DVDGetStreamStartAddr (struct DVDCommandBlock *block)
int DVDGetStreamLengthAsync (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
long DVDGetStreamLength (struct DVDCommandBlock *block)
void __DVDAudioBufferConfig (struct DVDCommandBlock *block, unsigned long enable, unsigned long size, void(*callback)(long, struct DVDCommandBlock *))
int DVDChangeDiskAsyncForBS (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
int DVDChangeDiskAsync (struct DVDCommandBlock *block, struct DVDDiskID *id, void(*callback)(long, struct DVDCommandBlock *))
long DVDChangeDisk (struct DVDCommandBlock *block, struct DVDDiskID *id)
int DVDInquiryAsync (struct DVDCommandBlock *block, struct DVDDriveInfo *info, void(*callback)(long, struct DVDCommandBlock *))
long DVDInquiry (struct DVDCommandBlock *block, struct DVDDriveInfo *info)
void DVDReset ()
int DVDResetRequired ()
long DVDGetCommandBlockStatus (struct DVDCommandBlock *block)
long DVDGetDriveStatus ()
int DVDSetAutoInvalidation (int autoInval)
void DVDPause ()
void DVDResume ()
int DVDCancelAsync (struct DVDCommandBlock *block, void(*callback)(long, struct DVDCommandBlock *))
long DVDCancel (volatile struct DVDCommandBlock *block)
int DVDCancelAllAsync (DVDCBCallback callback)
long DVDCancelAll (void)
struct DVDDiskIDDVDGetCurrentDiskID ()
BOOL DVDCheckDisk (void)
void __DVDPrepareResetAsync (DVDCBCallback callback)

Variables

OSThreadQueue __DVDThreadQueue
static struct DVDCommandBlock DummyCommandBlock
static OSAlarm alarm
static int autoInvalidation = 1
static struct DVDCommandBlockexecuting
static void * tmp
static struct DVDDiskIDcurrID
static struct OSBootInfo_s * bootInfo
static volatile int PauseFlag
static volatile int PausingFlag
static int AutoFinishing
static BOOL FatalErrorFlag
static volatile unsigned long CurrCommand
static volatile unsigned long Canceling
static struct DVDCommandBlockCancelingCommandBlock
static void(* CancelCallback )(long, struct DVDCommandBlock *)
static volatile unsigned long ResumeFromHere
static volatile unsigned long CancelLastError
static unsigned long LastError
static volatile long NumInternalRetry
static int ResetRequired
static int CancelAllSyncComplete
static volatile unsigned long ResetCount
static int FirstTimeInBootrom
static long ResultForSyncCommand
static int DVDInitialized
void(* LastState )(struct DVDCommandBlock *)

Function Documentation

◆ ATTRIBUTE_ALIGN()

unsigned char *tmpBuffer[32] ATTRIBUTE_ALIGN ( 32 )
static

◆ stateReadingFST()

void stateReadingFST ( )
static

◆ cbForStateReadingFST()

void cbForStateReadingFST ( unsigned long intType)
static

◆ stateError() [1/2]

void stateError ( )
static

◆ stateGettingError()

void stateGettingError ( )
static

◆ CategorizeError()

unsigned long CategorizeError ( unsigned long error)
static

◆ ResetWorkAround()

int ResetWorkAround ( unsigned long error)
static

◆ cbForStateGettingError()

void cbForStateGettingError ( unsigned long intType)
static

◆ stateGoToRetry()

void stateGoToRetry ( )
static

◆ cbForStateGoToRetry()

void cbForStateGoToRetry ( unsigned long intType)
static

◆ stateCheckID()

void stateCheckID ( )
static

◆ stateCheckID3()

void stateCheckID3 ( )
static

◆ stateCheckID2()

void stateCheckID2 ( )
static

◆ cbForStateCheckID1()

void cbForStateCheckID1 ( unsigned long intType)
static

◆ cbForStateCheckID2()

void cbForStateCheckID2 ( unsigned long intType)
static

◆ cbForStateCheckID3()

void cbForStateCheckID3 ( unsigned long intType)
static

◆ stateCoverClosed()

void stateCoverClosed ( )
static

◆ stateCoverClosed_CMD()

void stateCoverClosed_CMD ( )
static

◆ cbForStateCoverClosed()

void cbForStateCoverClosed ( unsigned long intType)
static

◆ stateMotorStopped()

void stateMotorStopped ( )
static

◆ cbForStateMotorStopped()

void cbForStateMotorStopped ( unsigned long intType)
static

◆ stateReady()

void stateReady ( )
static

◆ stateBusy()

void stateBusy ( struct DVDCommandBlock * block)
static

◆ cbForStateBusy()

void cbForStateBusy ( unsigned long intType)
static

◆ issueCommand()

int issueCommand ( long prio,
struct DVDCommandBlock * block )
static

◆ cbForCancelStreamSync()

void cbForCancelStreamSync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForStopStreamAtEndSync()

void cbForStopStreamAtEndSync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForGetStreamErrorStatusSync()

void cbForGetStreamErrorStatusSync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForGetStreamPlayAddrSync()

void cbForGetStreamPlayAddrSync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForGetStreamStartAddrSync()

void cbForGetStreamStartAddrSync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForGetStreamLengthSync()

void cbForGetStreamLengthSync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForChangeDiskSync()

void cbForChangeDiskSync ( )
static

◆ cbForInquirySync()

void cbForInquirySync ( long result,
struct DVDCommandBlock * block )
static

◆ cbForCancelSync()

void cbForCancelSync ( )
static

◆ cbForCancelAllSync()

void cbForCancelAllSync ( )
static

◆ DVDInit()

void DVDInit ( )

◆ stateError() [2/2]

void stateError ( int code)
static

◆ cbForStateError()

void cbForStateError ( unsigned long intType)
static

◆ stateTimeout()

void stateTimeout ( void )
static

◆ cancel_inline()

BOOL cancel_inline ( int resume)
inlinestatic

◆ cbForUnrecoveredError()

void cbForUnrecoveredError ( unsigned long intType)
static

◆ cbForUnrecoveredErrorRetry()

void cbForUnrecoveredErrorRetry ( unsigned long intType)
static

◆ AlarmHandler()

void AlarmHandler ( OSAlarm * ,
OSContext *  )
static

◆ DVDReadAbsAsyncPrio()

int DVDReadAbsAsyncPrio ( struct DVDCommandBlock * block,
void * addr,
long length,
long offset,
void(* callback )(long, struct DVDCommandBlock *),
long prio )

◆ DVDSeekAbsAsyncPrio()

int DVDSeekAbsAsyncPrio ( struct DVDCommandBlock * block,
long offset,
void(* callback )(long, struct DVDCommandBlock *),
long prio )

◆ DVDReadAbsAsyncForBS()

int DVDReadAbsAsyncForBS ( struct DVDCommandBlock * block,
void * addr,
long length,
long offset,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDReadDiskID()

int DVDReadDiskID ( struct DVDCommandBlock * block,
struct DVDDiskID * diskID,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDPrepareStreamAbsAsync()

int DVDPrepareStreamAbsAsync ( struct DVDCommandBlock * block,
unsigned long length,
unsigned long offset,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDCancelStreamAsync()

int DVDCancelStreamAsync ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDCancelStream()

long DVDCancelStream ( struct DVDCommandBlock * block)

◆ DVDStopStreamAtEndAsync()

int DVDStopStreamAtEndAsync ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDStopStreamAtEnd()

long DVDStopStreamAtEnd ( struct DVDCommandBlock * block)

◆ DVDGetStreamErrorStatusAsync()

int DVDGetStreamErrorStatusAsync ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDGetStreamErrorStatus()

long DVDGetStreamErrorStatus ( struct DVDCommandBlock * block)

◆ DVDGetStreamPlayAddrAsync()

int DVDGetStreamPlayAddrAsync ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDGetStreamPlayAddr()

long DVDGetStreamPlayAddr ( struct DVDCommandBlock * block)

◆ DVDGetStreamStartAddrAsync()

int DVDGetStreamStartAddrAsync ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDGetStreamStartAddr()

long DVDGetStreamStartAddr ( struct DVDCommandBlock * block)

◆ DVDGetStreamLengthAsync()

int DVDGetStreamLengthAsync ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDGetStreamLength()

long DVDGetStreamLength ( struct DVDCommandBlock * block)

◆ __DVDAudioBufferConfig()

void __DVDAudioBufferConfig ( struct DVDCommandBlock * block,
unsigned long enable,
unsigned long size,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDChangeDiskAsyncForBS()

int DVDChangeDiskAsyncForBS ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDChangeDiskAsync()

int DVDChangeDiskAsync ( struct DVDCommandBlock * block,
struct DVDDiskID * id,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDChangeDisk()

long DVDChangeDisk ( struct DVDCommandBlock * block,
struct DVDDiskID * id )

◆ DVDInquiryAsync()

int DVDInquiryAsync ( struct DVDCommandBlock * block,
struct DVDDriveInfo * info,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDInquiry()

long DVDInquiry ( struct DVDCommandBlock * block,
struct DVDDriveInfo * info )

◆ DVDReset()

void DVDReset ( void )

◆ DVDResetRequired()

int DVDResetRequired ( )

◆ DVDGetCommandBlockStatus()

long DVDGetCommandBlockStatus ( struct DVDCommandBlock * block)

◆ DVDGetDriveStatus()

long DVDGetDriveStatus ( )

◆ DVDSetAutoInvalidation()

int DVDSetAutoInvalidation ( int autoInval)

◆ DVDPause()

void DVDPause ( )

◆ DVDResume()

void DVDResume ( )

◆ DVDCancelAsync()

int DVDCancelAsync ( struct DVDCommandBlock * block,
void(* callback )(long, struct DVDCommandBlock *) )

◆ DVDCancel()

long DVDCancel ( volatile struct DVDCommandBlock * block)

◆ DVDCancelAllAsync()

int DVDCancelAllAsync ( DVDCBCallback callback)

◆ DVDCancelAll()

long DVDCancelAll ( void )

◆ DVDGetCurrentDiskID()

struct DVDDiskID * DVDGetCurrentDiskID ( void )

◆ DVDCheckDisk()

BOOL DVDCheckDisk ( void )

◆ __DVDPrepareResetAsync()

void __DVDPrepareResetAsync ( DVDCBCallback callback)

Variable Documentation

◆ __DVDThreadQueue

OSThreadQueue __DVDThreadQueue
extern

◆ DummyCommandBlock

struct DVDCommandBlock DummyCommandBlock
static

◆ alarm

OSAlarm alarm
static

◆ autoInvalidation

int autoInvalidation = 1
static

◆ executing

struct DVDCommandBlock* executing
static

◆ tmp

void* tmp
static

◆ currID

struct DVDDiskID* currID
static

◆ bootInfo

struct OSBootInfo_s* bootInfo
static

◆ PauseFlag

volatile int PauseFlag
static

◆ PausingFlag

volatile int PausingFlag
static

◆ AutoFinishing

int AutoFinishing
static

◆ FatalErrorFlag

BOOL FatalErrorFlag
static

◆ CurrCommand

volatile unsigned long CurrCommand
static

◆ Canceling

volatile unsigned long Canceling
static

◆ CancelingCommandBlock

struct DVDCommandBlock* CancelingCommandBlock
static

◆ CancelCallback

void(* CancelCallback) (long, struct DVDCommandBlock *) ( long ,
struct DVDCommandBlock *  )
static

◆ ResumeFromHere

volatile unsigned long ResumeFromHere
static

◆ CancelLastError

volatile unsigned long CancelLastError
static

◆ LastError

unsigned long LastError
static

◆ NumInternalRetry

volatile long NumInternalRetry
static

◆ ResetRequired

int ResetRequired
static

◆ CancelAllSyncComplete

int CancelAllSyncComplete
static

◆ ResetCount

volatile unsigned long ResetCount
static

◆ FirstTimeInBootrom

int FirstTimeInBootrom
static

◆ ResultForSyncCommand

long ResultForSyncCommand
static

◆ DVDInitialized

int DVDInitialized
static

◆ LastState

void(* LastState) (struct DVDCommandBlock *) ( struct DVDCommandBlock * )