Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

DVD Functions

Functions


Function Documentation

u32 DVD_GetCurrentOffset void   ) 
 

Get current DVD position.

Returns the current DVD position.

See also:
DVD_Seek()
DVD_SeekSector()

u32 DVD_GetCurrentSector void   ) 
 

Get current DVD sector position.

Returns the current sector position.
CurrentSector = CurrentOffset/SectorLength;

See also:
DVD_Seek()
DVD_GetCurrentOffset()

void DVD_GetDriveInfo DVD_DRIVEINFO pDVDDriveInfo  ) 
 

Get DVD drive information.

Parameters:
pDVDDriveInfo Pointer to a DVD_DRIVEINFO structure which will hold, after calling this function, the required information

u32 DVD_GetErrorCode void   ) 
 

Return DVD ErrorCode.

Returns the last DVD errorcode.

Todo:
Not tested yet

u32 DVD_GetLastCommands void   ) 
 

Returns the last command sent.

Returns the value which is stored in the command register. This should be the very last command sent.

This is in the following format:

  • 0xAABBCCC

Where ...

  • AA is the Command.
  • BB is the SubCommand.
  • CCCC is the SubCommand2.

u32 DVD_GetStatus u8  StatusNo  ) 
 

Get value from status register 1 or 2.

Parameters:
StatusNo From which status register you want to get the status from.
This can be one of these:

void DVD_Init void   ) 
 

Initialize DVD drive.

Bug:
This function actually makes nothing. I thought it should start the motor again, but it doesn't. Seems to be incorrect?!? Any infos in this?

u8 DVD_IsCoverOpen void   ) 
 

Checks if the DVD cover is open.

Returns:
  • TRUE when it is open
  • FALSE when it is closed

Todo:
Doesn't work 100%

void DVD_Read void *  pDstBuffer,
u32  Count,
u32  Offset
 

Read a buffer from an Offset.

Parameters:
pDstBuffer Pointer to the destination-buffer
Count Total count in bytes to read. (Please see notes)
Offset Offset you want to start reading from. (Please see notes)
Note:
Offset must be multiple 4!
Count must be multiple 32!

void DVD_ReadSector void *  pDstBuffer,
u32  Sector
 

Read a sector.

Reads one sector (2048 bytes), stores it in pDstBuffer and sets the dvd position to the next sector.

Parameters:
pDstBuffer Pointer to the destinationbuffer
Sector The sector you want to read in.
Note:
pDstBuffer must be an allocated buffer of 2048 bytes (1 sector=2048 bytes)

void DVD_RequestError void   ) 
 

Request an error.

Requests the last DVD errorcode.
After calling this function, the errorcode register contains the last errorcode.

Todo:
Not tested yet. Is the describtion ok?

void DVD_Seek u32  Offset,
u8  Whence
 

Set DVD position.

Parameters:
Offset Signifies the number of bytes to seek from the given whence position and must be multiple 4
Whence The argument Whence can be:
Sets the position of the DVD to the given Offset.

void DVD_SeekSector u32  Sector,
u8  Whence
 

Set DVD position to a given Sector.

Parameters:
Sector Signifies the Sector to seek from the given whence position
Whence The argument Whence can be:
Sets the position of the DVD to the given Sector.

See also:
DVD_Seek()
DVD_GetCurrentOffset()

void DVD_SetAudio u8  Value  ) 
 

Enable/Disable DVD Audio.

Parameters:
Value What you would like to set, Enable or Disable.

This can be one of these defines:

Todo:
Not tested yet. Please let me know if it works ...

void DVD_SetCommand u8  Command  ) 
 

Set DVD command.

Parameters:
Command The command to set.
See also:
DVD_SetSubCommand()
DVD_SetSubCommand2()

void DVD_SetCommands u8  Command,
u8  SubCommand,
u16  SubCommand2
 

Set commands.

Parameters:
Command Command to set
SubCommand SubCommand to set
SubCommand2 SubCommand2 to set
See also:
DVD_SetCommand()
DVD_SetSubCommand()
DVD_SetSubCommand2()

void DVD_SetSubCommand u8  SubCommand  ) 
 

Set DVD sub-command.

Parameters:
SubCommand The sub-command to set
See also:
DVD_SetCommand()
DVD_SetSubCommand2()

void DVD_SetSubCommand2 u16  SubCommand2  ) 
 

Set DVD sub-command2.

Parameters:
SubCommand2 The sub-command2 to set
See also:
DVD_SetCommand()
DVD_SetSubCommand()

void DVD_Stop void   ) 
 

Stop DVD drive.

Stops the DVD drive motor


Generated on Sun Jul 6 20:03:37 2003 for Open GC Library by doxygen1.3