SSBM Decomp
Loading...
Searching...
No Matches
dvdlow.c File Reference
#include <placeholder.h>
#include "dvdlow.h"
#include <dolphin/os/OSAlarm.h>
#include <dolphin/os/OSInit.h>

Data Structures

struct  DVDCommand
 

Functions

static void __DVDLowSetWAType (u32 type, u32 location)
 
WEAK void __DVDInitWA (void)
 
static void Read (void *addr, u32 length, u32 offset, DVDLowCallback callback)
 
static bool ProcessNextCommand (void)
 
WEAK 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)
 
bool HitCache (DVDBuffer *cur, 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 timeout)
 
WEAK bool DVDLowRead (void *addr, u32 length, u32 offset, DVDLowCallback callback)
 
WEAK bool DVDLowSeek (u32 offset, DVDLowCallback callback)
 
WEAK bool DVDLowWaitCoverClose (DVDLowCallback callback)
 
WEAK bool DVDLowReadDiskID (DVDDiskID *diskID, DVDLowCallback callback)
 
WEAK bool DVDLowStopMotor (DVDLowCallback callback)
 
WEAK bool DVDLowRequestError (DVDLowCallback callback)
 
WEAK bool DVDLowInquiry (DVDDriveInfo *info, DVDLowCallback callback)
 
WEAK bool DVDLowAudioStream (u32 subcmd, u32 length, u32 offset, DVDLowCallback callback)
 
WEAK bool DVDLowRequestAudioStatus (u32 subcmd, DVDLowCallback callback)
 
WEAK bool DVDLowAudioBufferConfig (bool enable, u32 size, DVDLowCallback callback)
 
WEAK void DVDLowReset (void)
 
WEAK bool DVDLowBreak (void)
 
WEAK DVDLowCallback DVDLowClearCallback (void)
 

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 vu32 ResetOccurred = false
 
static volatile bool WaitingCoverClose = false
 
static bool Breaking = false
 
static vu32 WorkAroundType = 0
 
static u32 WorkAroundSeekLocation = 0
 
static volatile OSTime LastReadFinished = 0
 
static OSTime LastReadIssued = 0
 
static volatile bool LastCommandWasRead = false
 
static vu32 NextCommandNumber = 0
 
static DVDCommand CommandList [3]
 
static OSAlarm AlarmForWA
 
static OSAlarm AlarmForTimeout
 
static OSAlarm AlarmForBreak
 
static DVDBuffer Prev
 
static DVDBuffer Curr
 

Function Documentation

◆ __DVDLowSetWAType()

WEAK void __DVDLowSetWAType ( u32  type,
u32  location 
)
static

◆ __DVDInitWA()

WEAK void __DVDInitWA ( void  )

◆ Read()

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

◆ ProcessNextCommand()

static bool ProcessNextCommand ( void  )
static

◆ __DVDInterruptHandler()

WEAK void __DVDInterruptHandler ( __OSInterrupt  interrupt,
OSContext context 
)

◆ AlarmHandler()

static void AlarmHandler ( OSAlarm alarm,
OSContext context 
)
static

◆ AlarmHandlerForTimeout()

static void AlarmHandlerForTimeout ( OSAlarm alarm,
OSContext context 
)
static

◆ SetTimeoutAlarm()

static void SetTimeoutAlarm ( OSTime  timeout)
static

◆ HitCache()

bool HitCache ( DVDBuffer cur,
DVDBuffer prev 
)

◆ DoJustRead()

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

◆ SeekTwiceBeforeRead()

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

◆ WaitBeforeRead()

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

◆ DVDLowRead()

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

◆ DVDLowSeek()

WEAK bool DVDLowSeek ( u32  offset,
DVDLowCallback  callback 
)

◆ DVDLowWaitCoverClose()

WEAK bool DVDLowWaitCoverClose ( DVDLowCallback  callback)

◆ DVDLowReadDiskID()

WEAK bool DVDLowReadDiskID ( DVDDiskID diskID,
DVDLowCallback  callback 
)

◆ DVDLowStopMotor()

WEAK bool DVDLowStopMotor ( DVDLowCallback  callback)

◆ DVDLowRequestError()

WEAK bool DVDLowRequestError ( DVDLowCallback  callback)

◆ DVDLowInquiry()

WEAK bool DVDLowInquiry ( DVDDriveInfo info,
DVDLowCallback  callback 
)

◆ DVDLowAudioStream()

WEAK bool DVDLowAudioStream ( u32  subcmd,
u32  length,
u32  offset,
DVDLowCallback  callback 
)

◆ DVDLowRequestAudioStatus()

WEAK bool DVDLowRequestAudioStatus ( u32  subcmd,
DVDLowCallback  callback 
)

◆ DVDLowAudioBufferConfig()

WEAK bool DVDLowAudioBufferConfig ( bool  enable,
u32  size,
DVDLowCallback  callback 
)

◆ DVDLowReset()

WEAK void DVDLowReset ( void  )

◆ DVDLowBreak()

WEAK bool DVDLowBreak ( void  )

◆ DVDLowClearCallback()

WEAK DVDLowCallback DVDLowClearCallback ( void  )

Variable Documentation

◆ FirstRead

bool FirstRead = true
static

◆ StopAtNextInt

volatile bool StopAtNextInt = false
static

◆ LastLength

u32 LastLength = 0
static

◆ Callback

DVDLowCallback Callback ( void  ) = NULL
static

◆ ResetCoverCallback

DVDLowCallback ResetCoverCallback = NULL
static

◆ LastResetEnd

volatile OSTime LastResetEnd = 0
static

◆ ResetOccurred

vu32 ResetOccurred = false
static

◆ WaitingCoverClose

volatile bool WaitingCoverClose = false
static

◆ Breaking

bool Breaking = false
static

◆ WorkAroundType

vu32 WorkAroundType = 0
static

◆ WorkAroundSeekLocation

u32 WorkAroundSeekLocation = 0
static

◆ LastReadFinished

volatile OSTime LastReadFinished = 0
static

◆ LastReadIssued

OSTime LastReadIssued = 0
static

◆ LastCommandWasRead

volatile bool LastCommandWasRead = false
static

◆ NextCommandNumber

vu32 NextCommandNumber = 0
static

◆ CommandList

DVDCommand CommandList[3]
static

◆ AlarmForWA

OSAlarm AlarmForWA
static

◆ AlarmForTimeout

OSAlarm AlarmForTimeout
static

◆ AlarmForBreak

OSAlarm AlarmForBreak
static

◆ Prev

DVDBuffer Prev
static

◆ Curr

DVDBuffer Curr
static