PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Enumerations | Functions
psxcdrom.h File Reference

Go to the source code of this file.

Macros

#define CDSTATUS_PLAY   0x80
 
#define CDSTATUS_SEEK   0x40
 
#define CDSTATUS_SHELLOPEN   0x10
 

Enumerations

enum  {
  CdlSync = 0, CdlNop = 1, CdlGetstat = 1, CdlSetloc = 2,
  CdlPlay = 3, CdlForward = 4, CdlBackward = 5, CdlReadN = 6,
  CdlStandby = 7, CdlStop = 8, CdlPause = 9, CdlInit = 10,
  CdlMute = 11, CdlDemute = 12, CdlSetfilter = 13, CdlSetmode = 14,
  CdlSetparam = 15, CdlGetlocL = 16, CdlGetlocP = 17, CdlCmd18 = 18,
  CdlGetTN = 19, CdlGetTD = 20, CdlSeekL = 21, CdlSeekP = 22,
  CdlCmd23 = 23, CdlCmd24 = 24, CdlTest = 25, CdlID = 26,
  CdlReadS = 27, CdlReset = 28, CdlCmd29 = 29, CdlReadTOC = 30
}
 

Functions

void CdSendCommand (int cmd, int num,...)
 
int CdReadResults (unsigned char *out, int max)
 Reads the results of a low-level CDROM command.
 
int CdGetStatus (void)
 Gets CDROM drive status.
 
int CdPlayTrack (unsigned int track)
 Play an Audio CD track.
 
unsigned char CdRamRead (unsigned short addr)
 

Macro Definition Documentation

#define CDSTATUS_PLAY   0x80
#define CDSTATUS_SEEK   0x40
#define CDSTATUS_SHELLOPEN   0x10

Enumeration Type Documentation

anonymous enum
Enumerator:
CdlSync 
CdlNop 
CdlGetstat 
CdlSetloc 
CdlPlay 
CdlForward 
CdlBackward 
CdlReadN 
CdlStandby 
CdlStop 
CdlPause 
CdlInit 
CdlMute 
CdlDemute 
CdlSetfilter 
CdlSetmode 
CdlSetparam 
CdlGetlocL 
CdlGetlocP 
CdlCmd18 
CdlGetTN 
CdlGetTD 
CdlSeekL 
CdlSeekP 
CdlCmd23 
CdlCmd24 
CdlTest 
CdlID 
CdlReadS 
CdlReset 
CdlCmd29 
CdlReadTOC 

Function Documentation

int CdGetStatus ( void  )

Gets CDROM drive status.

Returns
CDROM drive status bitmask
int CdPlayTrack ( unsigned int  track)

Play an Audio CD track.

Returns
1 on success, 0 on failure
unsigned char CdRamRead ( unsigned short  addr)
int CdReadResults ( unsigned char *  out,
int  max 
)

Reads the results of a low-level CDROM command.

Parameters
outPointer to array of chars where the output will be stored
maxMaximum number of bytes to store

Return value: number of results.

void CdSendCommand ( int  cmd,
int  num,
  ... 
)