PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
psxcdrom.h
Go to the documentation of this file.
1 #ifndef _PSXCDROM_H
2 #define _PSXCDROM_H
3 
4 #define CDSTATUS_PLAY 0x80
5 #define CDSTATUS_SEEK 0x40
6 #define CDSTATUS_SHELLOPEN 0x10
7 
8 // Command names
9 
10 enum
11 {
12  CdlSync = 0,
13  CdlNop = 1, CdlGetstat = 1,
14  CdlSetloc = 2,
15  CdlPlay = 3,
16  CdlForward = 4,
18  CdlReadN = 6,
20  CdlStop = 8,
21  CdlPause = 9,
22  CdlInit = 10,
23  CdlMute = 11,
24  CdlDemute = 12,
26  CdlSetmode = 14,
28  CdlGetlocL = 16,
29  CdlGetlocP = 17,
30  CdlCmd18 = 18,
31  CdlGetTN = 19,
32  CdlGetTD = 20,
33  CdlSeekL = 21,
34  CdlSeekP = 22,
35  CdlCmd23 = 23,
36  CdlCmd24 = 24,
37  CdlTest = 25,
38  CdlID = 26,
39  CdlReadS = 27,
40  CdlReset = 28,
41  CdlCmd29 = 29,
43 };
44 
45 /*
46  * Send a low-level CDROM command
47  * cmd = command number
48  * num = number of arguments
49  * ... = arguments
50  */
51 
52 void CdSendCommand(int cmd, int num, ...);
53 
63 int CdReadResults(unsigned char *out, int max);
64 
70 int CdGetStatus(void);
71 
77 int CdPlayTrack(unsigned int track);
78 
79 unsigned char CdRamRead(unsigned short addr);
80 
81 
82 #endif