Loading [MathJax]/extensions/tex2jax.js
Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
dvdlow.c File Reference

Classes

struct  DVDBuffer
 
struct  DVDCommand
 

Functions

static void Read (void *address, u32 length, u32 offset, DVDLowCallback callback)
 
static void SetBreakAlarm (OSTime timeout)
 
void __DVDInitWA (void)
 
static BOOL ProcessNextCommand (void)
 
void __DVDInterruptHandler (__OSInterrupt interrupt, OSContext *context)
 
static void AlarmHandler (OSAlarm *alarm, OSContext *context)
 
static void AlarmHandlerForTimeout (OSAlarm *alarm, OSContext *context)
 
static void SetTimeoutAlarm (OSTime timeout)
 
static BOOL AudioBufferOn (void)
 
static BOOL HitCache (DVDBuffer *curr, DVDBuffer *prev)
 
static void DoJustRead (void *addr, u32 length, u32 offset, DVDLowCallback callback)
 
static void SeekTwiceBeforeRead (void *addr, u32 length, u32 offset, DVDLowCallback callback)
 
static void WaitBeforeRead (void *addr, u32 length, u32 offset, DVDLowCallback callback, OSTime wait)
 
BOOL DVDLowRead (void *addr, u32 length, u32 offset, DVDLowCallback callback)
 
BOOL DVDLowSeek (u32 offset, DVDLowCallback callback)
 
BOOL DVDLowWaitCoverClose (DVDLowCallback callback)
 
BOOL DVDLowReadDiskID (DVDDiskID *diskID, DVDLowCallback callback)
 
BOOL DVDLowStopMotor (DVDLowCallback callback)
 
BOOL DVDLowRequestError (DVDLowCallback callback)
 
BOOL DVDLowInquiry (DVDDriveInfo *info, DVDLowCallback callback)
 
BOOL DVDLowAudioStream (u32 subcmd, u32 length, u32 offset, DVDLowCallback callback)
 
BOOL DVDLowRequestAudioStatus (u32 subcmd, DVDLowCallback callback)
 
BOOL DVDLowAudioBufferConfig (BOOL enable, u32 size, DVDLowCallback callback)
 
void DVDLowReset (void)
 
DVDLowCallback DVDLowSetResetCoverCallback (DVDLowCallback callback)
 
static void DoBreak (void)
 
static void AlarmHandlerForBreak (OSAlarm *alarm, OSContext *context)
 
BOOL DVDLowBreak (void)
 
DVDLowCallback DVDLowClearCallback (void)
 
u32 DVDLowGetCoverStatus (void)
 
void __DVDLowSetWAType (u32 type, s32 seekLoc)
 
int __DVDLowTestAlarm (const OSAlarm *alarm)
 

Variables

static BOOL FirstRead = TRUE
 
static volatile BOOL StopAtNextInt = FALSE
 
static u32 LastLength = 0
 
static DVDLowCallback Callback = NULL
 
static DVDLowCallback ResetCoverCallback = NULL
 
static volatile OSTime LastResetEnd = 0
 
static volatile u32 ResetOccurred = FALSE
 
static volatile BOOL WaitingCoverClose = FALSE
 
static volatile BOOL Breaking = FALSE
 
static volatile u32 WorkAroundType = 0
 
static u32 WorkAroundSeekLocation = 0
 
static volatile OSTime LastReadFinished = 0
 
static OSTime LastReadIssued = 0
 
static volatile BOOL LastCommandWasRead = FALSE
 
static volatile u32 NextCommandNumber = 0
 
static DVDCommand CommandList [3]
 
static OSAlarm AlarmForWA
 
static OSAlarm AlarmForTimeout
 
static OSAlarm AlarmForBreak
 
static DVDBuffer Prev
 
static DVDBuffer Curr
 

Function Documentation

◆ __DVDInitWA()

void __DVDInitWA ( void )

◆ __DVDInterruptHandler()

void __DVDInterruptHandler ( __OSInterrupt interrupt,
OSContext * context )

◆ __DVDLowSetWAType()

void __DVDLowSetWAType ( u32 type,
s32 seekLoc )

◆ __DVDLowTestAlarm()

int __DVDLowTestAlarm ( const OSAlarm * alarm)

◆ AlarmHandler()

static void AlarmHandler ( OSAlarm * alarm,
OSContext * context )
static

◆ AlarmHandlerForBreak()

static void AlarmHandlerForBreak ( OSAlarm * alarm,
OSContext * context )
static

◆ AlarmHandlerForTimeout()

static void AlarmHandlerForTimeout ( OSAlarm * alarm,
OSContext * context )
static

◆ AudioBufferOn()

static BOOL AudioBufferOn ( void )
static

◆ DoBreak()

static void DoBreak ( void )
static

◆ DoJustRead()

static void DoJustRead ( void * addr,
u32 length,
u32 offset,
DVDLowCallback callback )
static

◆ DVDLowAudioBufferConfig()

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

◆ DVDLowAudioStream()

BOOL DVDLowAudioStream ( u32 subcmd,
u32 length,
u32 offset,
DVDLowCallback callback )

◆ DVDLowBreak()

BOOL DVDLowBreak ( void )

◆ DVDLowClearCallback()

DVDLowCallback DVDLowClearCallback ( void )

◆ DVDLowGetCoverStatus()

u32 DVDLowGetCoverStatus ( void )

◆ DVDLowInquiry()

BOOL DVDLowInquiry ( DVDDriveInfo * info,
DVDLowCallback callback )

◆ DVDLowRead()

BOOL DVDLowRead ( void * addr,
u32 length,
u32 offset,
DVDLowCallback callback )

◆ DVDLowReadDiskID()

BOOL DVDLowReadDiskID ( DVDDiskID * diskID,
DVDLowCallback callback )

◆ DVDLowRequestAudioStatus()

BOOL DVDLowRequestAudioStatus ( u32 subcmd,
DVDLowCallback callback )

◆ DVDLowRequestError()

BOOL DVDLowRequestError ( DVDLowCallback callback)

◆ DVDLowReset()

void DVDLowReset ( void )

◆ DVDLowSeek()

BOOL DVDLowSeek ( u32 offset,
DVDLowCallback callback )

◆ DVDLowSetResetCoverCallback()

DVDLowCallback DVDLowSetResetCoverCallback ( DVDLowCallback callback)

◆ DVDLowStopMotor()

BOOL DVDLowStopMotor ( DVDLowCallback callback)

◆ DVDLowWaitCoverClose()

BOOL DVDLowWaitCoverClose ( DVDLowCallback callback)

◆ HitCache()

static BOOL HitCache ( DVDBuffer * curr,
DVDBuffer * prev )
static

◆ ProcessNextCommand()

static BOOL ProcessNextCommand ( void )
static

◆ Read()

static void Read ( void * address,
u32 length,
u32 offset,
DVDLowCallback callback )
static

◆ SeekTwiceBeforeRead()

static void SeekTwiceBeforeRead ( void * addr,
u32 length,
u32 offset,
DVDLowCallback callback )
static

◆ SetBreakAlarm()

static void SetBreakAlarm ( OSTime timeout)
static

◆ SetTimeoutAlarm()

static void SetTimeoutAlarm ( OSTime timeout)
static

◆ WaitBeforeRead()

static void WaitBeforeRead ( void * addr,
u32 length,
u32 offset,
DVDLowCallback callback,
OSTime wait )
static

Variable Documentation

◆ AlarmForBreak

OSAlarm AlarmForBreak
static

◆ AlarmForTimeout

OSAlarm AlarmForTimeout
static

◆ AlarmForWA

OSAlarm AlarmForWA
static

◆ Breaking

volatile BOOL Breaking = FALSE
static

◆ Callback

DVDLowCallback Callback = NULL
static

◆ CommandList

DVDCommand CommandList[3]
static

◆ Curr

DVDBuffer Curr
static

◆ FirstRead

BOOL FirstRead = TRUE
static

◆ LastCommandWasRead

volatile BOOL LastCommandWasRead = FALSE
static

◆ LastLength

u32 LastLength = 0
static

◆ LastReadFinished

volatile OSTime LastReadFinished = 0
static

◆ LastReadIssued

OSTime LastReadIssued = 0
static

◆ LastResetEnd

volatile OSTime LastResetEnd = 0
static

◆ NextCommandNumber

volatile u32 NextCommandNumber = 0
static

◆ Prev

DVDBuffer Prev
static

◆ ResetCoverCallback

DVDLowCallback ResetCoverCallback = NULL
static

◆ ResetOccurred

volatile u32 ResetOccurred = FALSE
static

◆ StopAtNextInt

volatile BOOL StopAtNextInt = FALSE
static

◆ WaitingCoverClose

volatile BOOL WaitingCoverClose = FALSE
static

◆ WorkAroundSeekLocation

u32 WorkAroundSeekLocation = 0
static

◆ WorkAroundType

volatile u32 WorkAroundType = 0
static