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

Classes

struct  dvdContext
 

Typedefs

typedef enum callbackType callbackType_t
 
typedef struct dvdContext dvdContext_t
 

Enumerations

enum  callbackType { BOGUS_TYPE = 0 , TRANSACTION_CB , COVER_CB , COVER_REG_CB }
 

Functions

static u32 registerBuf[8] ATTRIBUTE_ALIGN (32)
 
static void * ddrAllocAligned32 (const int size)
 
static BOOL allocateStructures (void)
 
static void initDvdContexts (void)
 
IOSError doTransactionCallback (IOSError ret, void *context)
 
IOSError doCoverCallback (IOSError err, void *context)
 
IOSError doPrepareCoverRegisterCallback (IOSError err, void *context)
 
static void nextCommandBuf (int *bufNum)
 
static dvdContext_tnewContext (const DVDLowCallback callback, const callbackType_t type)
 
BOOL DVDLowFinalize (void)
 
BOOL DVDLowInit (void)
 
BOOL DVDLowReadDiskID (DVDDiskID *diskID, DVDLowCallback callback)
 
BOOL DVDLowOpenPartition (const u32 partitionWordOffset, const ESTicket *const eTicket, const u32 numCertBytes, const u8 *const certificates, ESTitleMeta *tmd, DVDLowCallback callback)
 
BOOL DVDLowOpenPartitionWithTmdAndTicket ()
 
BOOL DVDLowOpenPartitionWithTmdAndTicketView (const u32 partitionWordOffset, const ESTicketView *const eTicketView, const u32 numTmdBytes, const ESTitleMeta *const tmd, const u32 numCertBytes, const u8 *const certificates, DVDLowCallback callback)
 
BOOL DVDLowGetNoDiscBufferSizes (const u32 partitionWordOffset, u32 *numTmdBytes, u32 *numCertBytes, DVDLowCallback callback)
 
BOOL DVDLowGetNoDiscOpenPartitionParams (const u32 partitionWordOffset, ESTicket *eTicket, u32 *numTmdBytes, ESTitleMeta *tmd, u32 *numCertBytes, u8 *certificates, u32 *dataWordOffset, u8 *h3HashPtr, DVDLowCallback callback)
 
BOOL DVDLowNoDiscOpenPartition ()
 
BOOL DVDLowClosePartition (DVDLowCallback callback)
 
BOOL DVDLowUnencryptedRead (void *destAddr, u32 length, u32 wordOffset, DVDLowCallback callback)
 
BOOL DVDLowStopMotor (u8 eject, u8 saving, DVDLowCallback callback)
 
BOOL DVDLowWaitForCoverClose ()
 
BOOL DVDLowInquiry (DVDDriveInfo *info, DVDLowCallback callback)
 
BOOL DVDLowRequestError (DVDLowCallback callback)
 
BOOL DVDLowSetSpinupFlag (u32 spinUp)
 
BOOL DVDLowNotifyReset ()
 
BOOL DVDLowReset (DVDLowCallback callback)
 
BOOL DVDLowAudioBufferConfig (u8 enable, u32 size, DVDLowCallback callback)
 
u32 DVDLowGetCoverStatus ()
 
u32 DVDLowReadDVD ()
 
BOOL DVDLowReadDVDConfig ()
 
BOOL DVDLowReadDvdCopyright ()
 
BOOL DVDLowReadDvdPhysical ()
 
BOOL DVDLowReadDvdDiscKey ()
 
BOOL DVDLowReportKey (DVDVideoReportKey *reportKey, u32 format, u32 lsn, DVDLowCallback callback)
 
BOOL DVDLowOffset ()
 
BOOL DVDLowStopLaser ()
 
BOOL DVDLowReadDiskBca ()
 
BOOL DVDLowSerMeasControl ()
 
BOOL DVDLowRequestDiscStatus ()
 
BOOL DVDLowRequestRetryNumber ()
 
BOOL DVDLowSetMaximumRotation (u32 subcmd, DVDLowCallback callback)
 
BOOL DVDLowRead (void *destAddr, u32 length, u32 wordOffset, DVDLowCallback callback)
 
BOOL DVDLowSeek (u32 wordOffset, DVDLowCallback callback)
 
BOOL DVDLowGetCoverReg ()
 
u32 DVDLowGetCoverRegister (void)
 
u32 DVDLowGetStatusRegister (void)
 
u32 DVDLowGetControlRegister (void)
 
BOOL DVDLowPrepareCoverRegister (DVDLowCallback callback)
 
BOOL DVDLowPrepareStatusRegister (DVDLowCallback callback)
 
BOOL DVDLowPrepareControlRegister (DVDLowCallback callback)
 
u32 DVDLowGetImmBufferReg (void)
 
BOOL DVDLowUnmaskStatusInterrupts (void)
 
BOOL DVDLowMaskCoverInterrupt (void)
 
BOOL DVDLowClearCoverInterrupt (DVDLowCallback callback)
 
BOOL __DVDLowTestAlarm (const OSAlarm *)
 
BOOL DVDLowEnableDvdVideo ()
 

Variables

IOSFd DiFD = -1
 
static volatile u8 requestInProgress = FALSE
 
static u8 breakRequested
 
static u8 callbackInProgress
 
static u32 readLength
 
static u32 spinUpValue
 
static u8 DVDLowInitCalled = FALSE
 
static int freeCommandBuf = 0
 
static diCommand_tdiCommand
 
static char * pathBuf
 
static int freeDvdContext = 0
 
static u8 dvdContextsInited = FALSE
 

Typedef Documentation

◆ callbackType_t

◆ dvdContext_t

typedef struct dvdContext dvdContext_t

Enumeration Type Documentation

◆ callbackType

Enumerator
BOGUS_TYPE 
TRANSACTION_CB 
COVER_CB 
COVER_REG_CB 

Function Documentation

◆ __DVDLowTestAlarm()

BOOL __DVDLowTestAlarm ( const OSAlarm * alarm)

◆ allocateStructures()

static BOOL allocateStructures ( void )
static

◆ ATTRIBUTE_ALIGN()

static u32 registerBuf[8] ATTRIBUTE_ALIGN ( 32 )
static

◆ ddrAllocAligned32()

static void * ddrAllocAligned32 ( const int size)
static

◆ doCoverCallback()

IOSError doCoverCallback ( IOSError err,
void * context )

◆ doPrepareCoverRegisterCallback()

IOSError doPrepareCoverRegisterCallback ( IOSError err,
void * context )

◆ doTransactionCallback()

IOSError doTransactionCallback ( IOSError ret,
void * context )

◆ DVDLowAudioBufferConfig()

BOOL DVDLowAudioBufferConfig ( u8 enable,
u32 size,
DVDLowCallback callback )

◆ DVDLowClearCoverInterrupt()

BOOL DVDLowClearCoverInterrupt ( DVDLowCallback callback)

◆ DVDLowClosePartition()

BOOL DVDLowClosePartition ( DVDLowCallback callback)

◆ DVDLowEnableDvdVideo()

BOOL DVDLowEnableDvdVideo ( )

◆ DVDLowFinalize()

BOOL DVDLowFinalize ( void )

◆ DVDLowGetControlRegister()

u32 DVDLowGetControlRegister ( void )

◆ DVDLowGetCoverReg()

BOOL DVDLowGetCoverReg ( )

◆ DVDLowGetCoverRegister()

u32 DVDLowGetCoverRegister ( void )

◆ DVDLowGetCoverStatus()

u32 DVDLowGetCoverStatus ( void )

◆ DVDLowGetImmBufferReg()

u32 DVDLowGetImmBufferReg ( void )

◆ DVDLowGetNoDiscBufferSizes()

BOOL DVDLowGetNoDiscBufferSizes ( const u32 partitionWordOffset,
u32 * numTmdBytes,
u32 * numCertBytes,
DVDLowCallback callback )

◆ DVDLowGetNoDiscOpenPartitionParams()

BOOL DVDLowGetNoDiscOpenPartitionParams ( const u32 partitionWordOffset,
ESTicket * eTicket,
u32 * numTmdBytes,
ESTitleMeta * tmd,
u32 * numCertBytes,
u8 * certificates,
u32 * dataWordOffset,
u8 * h3HashPtr,
DVDLowCallback callback )

◆ DVDLowGetStatusRegister()

u32 DVDLowGetStatusRegister ( void )

◆ DVDLowInit()

BOOL DVDLowInit ( void )

◆ DVDLowInquiry()

BOOL DVDLowInquiry ( DVDDriveInfo * info,
DVDLowCallback callback )

◆ DVDLowMaskCoverInterrupt()

BOOL DVDLowMaskCoverInterrupt ( void )

◆ DVDLowNoDiscOpenPartition()

BOOL DVDLowNoDiscOpenPartition ( )

◆ DVDLowNotifyReset()

BOOL DVDLowNotifyReset ( )

◆ DVDLowOffset()

BOOL DVDLowOffset ( )

◆ DVDLowOpenPartition()

BOOL DVDLowOpenPartition ( const u32 partitionWordOffset,
const ESTicket *const eTicket,
const u32 numCertBytes,
const u8 *const certificates,
ESTitleMeta * tmd,
DVDLowCallback callback )

◆ DVDLowOpenPartitionWithTmdAndTicket()

BOOL DVDLowOpenPartitionWithTmdAndTicket ( )

◆ DVDLowOpenPartitionWithTmdAndTicketView()

BOOL DVDLowOpenPartitionWithTmdAndTicketView ( const u32 partitionWordOffset,
const ESTicketView *const eTicketView,
const u32 numTmdBytes,
const ESTitleMeta *const tmd,
const u32 numCertBytes,
const u8 *const certificates,
DVDLowCallback callback )

◆ DVDLowPrepareControlRegister()

BOOL DVDLowPrepareControlRegister ( DVDLowCallback callback)

◆ DVDLowPrepareCoverRegister()

BOOL DVDLowPrepareCoverRegister ( DVDLowCallback callback)

◆ DVDLowPrepareStatusRegister()

BOOL DVDLowPrepareStatusRegister ( DVDLowCallback callback)

◆ DVDLowRead()

BOOL DVDLowRead ( void * destAddr,
u32 length,
u32 wordOffset,
DVDLowCallback callback )

◆ DVDLowReadDiskBca()

BOOL DVDLowReadDiskBca ( )

◆ DVDLowReadDiskID()

BOOL DVDLowReadDiskID ( DVDDiskID * diskID,
DVDLowCallback callback )

◆ DVDLowReadDVD()

u32 DVDLowReadDVD ( )

◆ DVDLowReadDVDConfig()

BOOL DVDLowReadDVDConfig ( )

◆ DVDLowReadDvdCopyright()

BOOL DVDLowReadDvdCopyright ( )

◆ DVDLowReadDvdDiscKey()

BOOL DVDLowReadDvdDiscKey ( )

◆ DVDLowReadDvdPhysical()

BOOL DVDLowReadDvdPhysical ( )

◆ DVDLowReportKey()

BOOL DVDLowReportKey ( DVDVideoReportKey * reportKey,
u32 format,
u32 lsn,
DVDLowCallback callback )

◆ DVDLowRequestDiscStatus()

BOOL DVDLowRequestDiscStatus ( )

◆ DVDLowRequestError()

BOOL DVDLowRequestError ( DVDLowCallback callback)

◆ DVDLowRequestRetryNumber()

BOOL DVDLowRequestRetryNumber ( )

◆ DVDLowReset()

BOOL DVDLowReset ( DVDLowCallback callback)

◆ DVDLowSeek()

BOOL DVDLowSeek ( u32 wordOffset,
DVDLowCallback callback )

◆ DVDLowSerMeasControl()

BOOL DVDLowSerMeasControl ( )

◆ DVDLowSetMaximumRotation()

BOOL DVDLowSetMaximumRotation ( u32 subcmd,
DVDLowCallback callback )

◆ DVDLowSetSpinupFlag()

BOOL DVDLowSetSpinupFlag ( u32 spinUp)

◆ DVDLowStopLaser()

BOOL DVDLowStopLaser ( )

◆ DVDLowStopMotor()

BOOL DVDLowStopMotor ( u8 eject,
u8 saving,
DVDLowCallback callback )

◆ DVDLowUnencryptedRead()

BOOL DVDLowUnencryptedRead ( void * destAddr,
u32 length,
u32 wordOffset,
DVDLowCallback callback )

◆ DVDLowUnmaskStatusInterrupts()

BOOL DVDLowUnmaskStatusInterrupts ( void )

◆ DVDLowWaitForCoverClose()

BOOL DVDLowWaitForCoverClose ( )

◆ initDvdContexts()

static void initDvdContexts ( void )
static

◆ newContext()

static dvdContext_t * newContext ( const DVDLowCallback callback,
const callbackType_t type )
inlinestatic

◆ nextCommandBuf()

static void nextCommandBuf ( int * bufNum)
inlinestatic

Variable Documentation

◆ breakRequested

u8 breakRequested
static

◆ callbackInProgress

u8 callbackInProgress
static

◆ diCommand

diCommand_t* diCommand
static

◆ DiFD

IOSFd DiFD = -1

◆ dvdContextsInited

u8 dvdContextsInited = FALSE
static

◆ DVDLowInitCalled

u8 DVDLowInitCalled = FALSE
static

◆ freeCommandBuf

int freeCommandBuf = 0
static

◆ freeDvdContext

int freeDvdContext = 0
static

◆ pathBuf

char* pathBuf
static

◆ readLength

u32 readLength
static

◆ requestInProgress

volatile u8 requestInProgress = FALSE
static

◆ spinUpValue

u32 spinUpValue
static