PS2SDK
PS2 Homebrew Libraries
accdvd.h
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
11 #ifndef _ACCDVD_H
12 #define _ACCDVD_H
13 
14 #include <accore.h>
15 #include <cdvdman.h>
16 
17 typedef enum ac_cdvdsif_id
18 {
19  AC_CDVDSIF_ID_NOP = 0x0,
20  AC_CDVDSIF_ID_BREAK = 0x1,
21  AC_CDVDSIF_ID_READY = 0x2,
22  AC_CDVDSIF_ID_TYPE = 0x3,
23  AC_CDVDSIF_ID_ERROR = 0x4,
24  AC_CDVDSIF_ID_GETPOS = 0x5,
25  AC_CDVDSIF_ID_READTOC = 0x6,
26  AC_CDVDSIF_ID_INIT = 0x7,
27  AC_CDVDSIF_ID_PAUSE = 0x8,
28  AC_CDVDSIF_ID_READ = 0x9,
29  AC_CDVDSIF_ID_READI = 0xA,
30  AC_CDVDSIF_ID_SYNC = 0xB,
31  AC_CDVDSIF_ID_LOOKUP = 0xC,
32  AC_CDVDSIF_ID_SEEK = 0xD,
33  AC_CDVDSIF_ID_STANDBY = 0xE,
34  AC_CDVDSIF_ID_STAT = 0xF,
35  AC_CDVDSIF_ID_STOP = 0x10,
36  AC_CDVDSIF_ID_TRAY = 0x11,
37  AC_CDVDSIF_ID_INITS = 0x12,
38  AC_CDVDSIF_ID_READS = 0x13,
39  AC_CDVDSIF_ID_SEEKS = 0x14,
40  AC_CDVDSIF_ID_STARTS = 0x15,
41  AC_CDVDSIF_ID_STATS = 0x16,
42  AC_CDVDSIF_ID_STOPS = 0x17,
43  AC_CDVDSIF_ID_PAUSES = 0x18,
44  AC_CDVDSIF_ID_RESUMES = 0x19,
45  AC_CDVDSIF_ID_READRTC = 0x1A,
46  AC_CDVDSIF_ID_STREAM = 0x1B,
47  AC_CDVDSIF_ID_LAST = 0x1B,
48 } acCdvdsifId;
49 
50 enum cdc_xfer_dir
51 {
52  CDC_XFER_SYNC = 0x0,
53  CDC_XFER_IN = 0x1,
54  CDC_XFER_OUT = 0x2,
55 };
56 
57 typedef int (*cdc_xfer_t)(void *dst, void *src, int len, enum cdc_xfer_dir dir);
58 
59 typedef void (*cdc_done_t)(int eveid);
60 
61 extern int acCdvdModuleRestart(int argc, char **argv);
62 extern int acCdvdModuleStart(int argc, char **argv);
63 extern int acCdvdModuleStatus();
64 extern int acCdvdModuleStop();
65 extern int cdc_module_restart(int argc, char **argv);
66 extern int cdc_module_start(int argc, char **argv);
67 extern int cdc_module_status();
68 extern int cdc_module_stop();
69 extern int cdc_geterrno();
70 extern int cdc_getfno();
71 extern int cdc_seterrno(int ret);
72 extern int cdc_xfer(void *dst, void *src, int len, enum cdc_xfer_dir dir);
73 extern int cdc_error();
74 extern int cdc_lookup(sceCdlFILE *fp, const char *name, int namlen, cdc_xfer_t xfer);
75 extern int cdc_medium();
76 extern int cdc_readtoc(unsigned char *toc, cdc_xfer_t xfer);
77 extern int cdc_ready(int nonblocking);
78 extern int cdc_sync(int nonblocking);
79 extern int cdc_pause(cdc_done_t done);
80 extern int cdc_standby(cdc_done_t done);
81 extern int cdc_stat();
82 extern int cdc_stop(cdc_done_t done);
83 extern int cdc_tray(int mode, u32 *traycnt);
84 extern int cdc_seek(unsigned int lsn, cdc_done_t done);
85 extern int cdc_read(unsigned int lsn, void *buf, int sectors, const sceCdRMode *mode, cdc_xfer_t xfer, cdc_done_t done);
86 extern int cdc_getpos();
87 extern int cdc_inits(void *buf, unsigned int size, unsigned int bsize);
88 extern int cdc_seeks(unsigned int lsn);
89 extern int cdc_reads(void *buf, int sectors, int mode, int *errp, cdc_xfer_t xfer);
90 extern int cdc_starts(unsigned int lsn, const sceCdRMode *mode);
91 extern int cdc_stats();
92 extern int cdc_stops();
93 extern int cdc_pauses();
94 extern int cdc_resumes();
95 
96 #ifdef I_sceCdSearchFile
97 #undef I_sceCdSearchFile
98 #endif
99 #ifdef I_sceCdRead
100 #undef I_sceCdRead
101 #endif
102 #ifdef I_sceCdCallback
103 #undef I_sceCdCallback
104 #endif
105 #ifdef I_sceCdTrayReq
106 #undef I_sceCdTrayReq
107 #endif
108 #ifdef I_sceCdGetReadPos
109 #undef I_sceCdGetReadPos
110 #endif
111 #ifdef I_sceCdSync
112 #undef I_sceCdSync
113 #endif
114 #ifdef I_sceCdInit
115 #undef I_sceCdInit
116 #endif
117 #ifdef I_sceCdDiskReady
118 #undef I_sceCdDiskReady
119 #endif
120 #ifdef I_sceCdGetError
121 #undef I_sceCdGetError
122 #endif
123 #ifdef I_sceCdGetDiskType
124 #undef I_sceCdGetDiskType
125 #endif
126 #ifdef I_sceCdStatus
127 #undef I_sceCdStatus
128 #endif
129 #ifdef I_sceCdGetToc
130 #undef I_sceCdGetToc
131 #endif
132 #ifdef I_sceCdSeek
133 #undef I_sceCdSeek
134 #endif
135 #ifdef I_sceCdStandby
136 #undef I_sceCdStandby
137 #endif
138 #ifdef I_sceCdStop
139 #undef I_sceCdStop
140 #endif
141 #ifdef I_sceCdPause
142 #undef I_sceCdPause
143 #endif
144 #ifdef I_sceCdStInit
145 #undef I_sceCdStInit
146 #endif
147 #ifdef I_sceCdStStart
148 #undef I_sceCdStStart
149 #endif
150 #ifdef I_sceCdStSeek
151 #undef I_sceCdStSeek
152 #endif
153 #ifdef I_sceCdStStop
154 #undef I_sceCdStStop
155 #endif
156 #ifdef I_sceCdStRead
157 #undef I_sceCdStRead
158 #endif
159 #ifdef I_sceCdStStat
160 #undef I_sceCdStStat
161 #endif
162 #ifdef I_sceCdStPause
163 #undef I_sceCdStPause
164 #endif
165 #ifdef I_sceCdStResume
166 #undef I_sceCdStResume
167 #endif
168 #ifdef I_sceCdMmode
169 #undef I_sceCdMmode
170 #endif
171 
172 #define accdvd_IMPORTS_start DECLARE_IMPORT_TABLE(accdvd, 1, 1)
173 #define accdvd_IMPORTS_end END_IMPORT_TABLE
174 
175 #define I_acCdvdModuleRestart DECLARE_IMPORT(4, acCdvdModuleRestart)
176 #define I_acCdvdModuleStart DECLARE_IMPORT(5, acCdvdModuleStart)
177 #define I_acCdvdModuleStatus DECLARE_IMPORT(6, acCdvdModuleStatus)
178 #define I_acCdvdModuleStop DECLARE_IMPORT(7, acCdvdModuleStop)
179 #define I_sceCdSearchFile DECLARE_IMPORT(10, sceCdSearchFile)
180 #define I_sceCdRead DECLARE_IMPORT(11, sceCdRead)
181 #define I_sceCdCallback DECLARE_IMPORT(13, sceCdCallback)
182 #define I_sceCdTrayReq DECLARE_IMPORT(14, sceCdTrayReq)
183 #define I_sceCdGetReadPos DECLARE_IMPORT(15, sceCdGetReadPos)
184 #define I_sceCdSync DECLARE_IMPORT(16, sceCdSync)
185 #define I_sceCdInit DECLARE_IMPORT(17, sceCdInit)
186 #define I_sceCdDiskReady DECLARE_IMPORT(19, sceCdDiskReady)
187 #define I_sceCdGetError DECLARE_IMPORT(20, sceCdGetError)
188 #define I_sceCdGetDiskType DECLARE_IMPORT(21, sceCdGetDiskType)
189 #define I_sceCdStatus DECLARE_IMPORT(22, sceCdStatus)
190 #define I_sceCdGetToc DECLARE_IMPORT(24, sceCdGetToc)
191 #define I_sceCdSeek DECLARE_IMPORT(25, sceCdSeek)
192 #define I_sceCdStandby DECLARE_IMPORT(26, sceCdStandby)
193 #define I_sceCdStop DECLARE_IMPORT(27, sceCdStop)
194 #define I_sceCdPause DECLARE_IMPORT(28, sceCdPause)
195 #define I_sceCdStInit DECLARE_IMPORT(29, sceCdStInit)
196 #define I_sceCdStStart DECLARE_IMPORT(30, sceCdStStart)
197 #define I_sceCdStSeek DECLARE_IMPORT(31, sceCdStSeek)
198 #define I_sceCdStStop DECLARE_IMPORT(32, sceCdStStop)
199 #define I_sceCdStRead DECLARE_IMPORT(33, sceCdStRead)
200 #define I_sceCdStStat DECLARE_IMPORT(34, sceCdStStat)
201 #define I_sceCdStPause DECLARE_IMPORT(35, sceCdStPause)
202 #define I_sceCdStResume DECLARE_IMPORT(36, sceCdStResume)
203 #define I_sceCdMmode DECLARE_IMPORT(37, sceCdMmode)
204 #define I_cdc_module_restart DECLARE_IMPORT(41, cdc_module_restart)
205 #define I_cdc_module_start DECLARE_IMPORT(42, cdc_module_start)
206 #define I_cdc_module_status DECLARE_IMPORT(43, cdc_module_status)
207 #define I_cdc_module_stop DECLARE_IMPORT(44, cdc_module_stop)
208 #define I_cdc_geterrno DECLARE_IMPORT(45, cdc_geterrno)
209 #define I_cdc_getfno DECLARE_IMPORT(46, cdc_getfno)
210 #define I_cdc_seterrno DECLARE_IMPORT(47, cdc_seterrno)
211 #define I_cdc_xfer DECLARE_IMPORT(48, cdc_xfer)
212 #define I_cdc_error DECLARE_IMPORT(49, cdc_error)
213 #define I_cdc_lookup DECLARE_IMPORT(50, cdc_lookup)
214 #define I_cdc_medium DECLARE_IMPORT(51, cdc_medium)
215 #define I_cdc_readtoc DECLARE_IMPORT(52, cdc_readtoc)
216 #define I_cdc_ready DECLARE_IMPORT(53, cdc_ready)
217 #define I_cdc_sync DECLARE_IMPORT(54, cdc_sync)
218 #define I_cdc_pause DECLARE_IMPORT(55, cdc_pause)
219 #define I_cdc_standby DECLARE_IMPORT(56, cdc_standby)
220 #define I_cdc_stat DECLARE_IMPORT(57, cdc_stat)
221 #define I_cdc_stop DECLARE_IMPORT(58, cdc_stop)
222 #define I_cdc_tray DECLARE_IMPORT(59, cdc_tray)
223 #define I_cdc_seek DECLARE_IMPORT(60, cdc_seek)
224 #define I_cdc_read DECLARE_IMPORT(61, cdc_read)
225 #define I_cdc_getpos DECLARE_IMPORT(62, cdc_getpos)
226 #define I_cdc_inits DECLARE_IMPORT(63, cdc_inits)
227 #define I_cdc_seeks DECLARE_IMPORT(64, cdc_seeks)
228 #define I_cdc_reads DECLARE_IMPORT(65, cdc_reads)
229 #define I_cdc_starts DECLARE_IMPORT(66, cdc_starts)
230 #define I_cdc_stats DECLARE_IMPORT(67, cdc_stats)
231 #define I_cdc_stops DECLARE_IMPORT(68, cdc_stops)
232 #define I_cdc_pauses DECLARE_IMPORT(69, cdc_pauses)
233 #define I_cdc_resumes DECLARE_IMPORT(70, cdc_resumes)
234 
235 #endif
toc
static cdda_toc toc
Definition: cdrom.c:52
sceCdlFILE
Definition: libcdvd-common.h:208
cdvdman.h
sceCdRMode
Definition: libcdvd-common.h:233