PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
libcdvd-rpc.h
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2004, 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
16
#ifndef __LIBCDVD_RPC_H__
17
#define __LIBCDVD_RPC_H__
18
19
#include <
tamtypes.h
>
20
#include <
libcdvd-common.h
>
21
22
/* S-command parameters */
23
24
struct
cdvdScmdParam
25
{
26
u16 cmdNum;
27
u16 inBuffSize;
28
u8 inBuff[16];
29
};
30
31
struct
cdvdDecSetParam
32
{
33
u8 arg1;
34
u8 arg2;
35
u8 shift;
36
u8 pad;
37
};
38
39
struct
cdvdReadWriteNvmParam
40
{
41
u32 address;
42
u16 value;
43
u16 pad;
44
};
45
46
/* N-command parameters */
47
48
struct
cdvdNcmdParam
49
{
50
u16 cmdNum;
51
u16 inBuffSize;
52
u8 inBuff[16];
53
};
54
55
struct
cdvdReadKeyParam
56
{
57
u32 arg1;
58
u32 arg2;
59
u32 command;
60
};
61
62
/* SIF RPC packet definitions */
63
64
typedef
struct
cdvdfsv_rpc1_inpacket_
65
{
66
int
m_mode;
67
}
cdvdfsv_rpc1_inpacket_t
;
68
69
typedef
struct
cdvdfsv_rpc1_outpacket_
70
{
71
int
m_retres;
72
int
m_cdvdfsv_ver;
73
int
m_cdvdman_ver;
74
int
m_debug_mode;
75
}
cdvdfsv_rpc1_outpacket_t
;
76
77
typedef
struct
cdvdfsv_rpc2_inpacket_
78
{
79
int
m_mode;
80
}
cdvdfsv_rpc2_inpacket_t
;
81
82
typedef
struct
cdvdfsv_rpc2_outpacket_
83
{
84
int
m_retres;
85
}
cdvdfsv_rpc2_outpacket_t
;
86
87
typedef
struct
cdvdfsv_unaligned_data_outpacket_
88
{
89
u32 m_b1len;
90
u32 m_b2len;
91
u32 m_b1dst;
92
u32 m_b2dst;
93
u8 m_pbuf1[64];
94
u8 m_pbuf2[64];
95
}
cdvdfsv_unaligned_data_outpacket_t
;
96
97
typedef
struct
cdvdfsv_rpc4_sz12c_inpacket_
98
{
99
sceCdlFILE
m_fp;
100
int
m_file_attributes;
101
char
m_path[256];
102
uiptr m_eedest;
103
int
m_layer;
104
}
cdvdfsv_rpc4_sz12c_inpacket_t
;
105
106
typedef
struct
cdvdfsv_rpc4_sz128_inpacket_
107
{
108
sceCdlFILE
m_fp;
109
int
m_file_attributes;
110
char
m_path[256];
111
uiptr m_eedest;
112
}
cdvdfsv_rpc4_sz128_inpacket_t
;
113
114
typedef
struct
cdvdfsv_rpc4_sz124_inpacket_
115
{
116
sceCdlFILE
m_fp;
117
char
m_path[256];
118
uiptr m_eedest;
119
}
cdvdfsv_rpc4_sz124_inpacket_t
;
120
121
typedef
union
cdvdfsv_rpc4_inpacket_
122
{
123
cdvdfsv_rpc4_sz12c_inpacket_t
m_pkt_sz12c;
124
cdvdfsv_rpc4_sz128_inpacket_t
m_pkt_sz128;
125
cdvdfsv_rpc4_sz124_inpacket_t
m_pkt_sz124;
126
}
cdvdfsv_rpc4_inpacket_t
;
127
128
typedef
struct
cdvdfsv_rpc4_outpacket_
129
{
130
int
m_retres;
131
int
m_padding[3];
132
}
cdvdfsv_rpc4_outpacket_t
;
133
134
typedef
struct
cdvdfsv_rpc3_05_inpacket_
135
{
136
int
m_param;
137
}
cdvdfsv_rpc3_05_inpacket_t
;
138
139
typedef
struct
cdvdfsv_rpc3_0B_inpacket_
140
{
141
u8 m_cmdNum;
142
u8 m_gap1;
143
u16 m_inBuffSize;
144
u8 m_inBuff[16];
145
}
cdvdfsv_rpc3_0B_inpacket_t
;
146
147
typedef
struct
cdvdfsv_rpc3_15_inpacket_
148
{
149
int
m_mode;
150
}
cdvdfsv_rpc3_15_inpacket_t
;
151
152
typedef
struct
cdvdfsv_rpc3_22_inpacket_
153
{
154
int
m_media;
155
char
m_char4;
156
}
cdvdfsv_rpc3_22_inpacket_t
;
157
158
typedef
struct
cdvdfsv_rpc3_23_inpacket_
159
{
160
int
m_priority;
161
}
cdvdfsv_rpc3_23_inpacket_t
;
162
163
typedef
struct
cdvdfsv_rpc3_25_inpacket_
164
{
165
int
m_param;
166
int
m_timeout;
167
}
cdvdfsv_rpc3_25_inpacket_t
;
168
169
typedef
union
cdvdfsv_rpc3_inpacket_
170
{
171
cdvdfsv_rpc3_05_inpacket_t
m_pkt_05;
172
cdvdfsv_rpc3_0B_inpacket_t
m_pkt_0B;
173
cdvdfsv_rpc3_15_inpacket_t
m_pkt_15;
174
cdvdfsv_rpc3_22_inpacket_t
m_pkt_22;
175
cdvdfsv_rpc3_23_inpacket_t
m_pkt_23;
176
cdvdfsv_rpc3_25_inpacket_t
m_pkt_25;
177
}
cdvdfsv_rpc3_inpacket_t
;
178
179
typedef
struct
cdvdfsv_rpc3_01_outpacket_
180
{
181
int
m_retres;
182
sceCdCLOCK
m_clock;
183
}
cdvdfsv_rpc3_01_outpacket_t
;
184
185
typedef
struct
cdvdfsv_rpc3_05_outpacket_
186
{
187
int
m_retres;
188
u32 m_traychk;
189
}
cdvdfsv_rpc3_05_outpacket_t
;
190
191
typedef
struct
cdvdfsv_rpc3_06_outpacket_
192
{
193
int
m_retres;
194
u32 m_result;
195
u8 m_buffer[8];
196
}
cdvdfsv_rpc3_06_outpacket_t
;
197
198
typedef
struct
cdvdfsv_rpc3_0B_outpacket_
199
{
200
u8 m_outbuf[16];
201
}
cdvdfsv_rpc3_0B_outpacket_t
;
202
203
typedef
struct
cdvdfsv_rpc3_15_outpacket_
204
{
205
int
m_retres;
206
u32 m_status;
207
}
cdvdfsv_rpc3_15_outpacket_t
;
208
209
typedef
struct
cdvdfsv_rpc3_1A_outpacket_
210
{
211
int
m_retres;
212
u32 m_status;
213
char
m_buffer[16];
214
}
cdvdfsv_rpc3_1A_outpacket_t
;
215
216
typedef
struct
cdvdfsv_rpc3_21_outpacket_
217
{
218
int
m_retres;
219
u32 m_result;
220
}
cdvdfsv_rpc3_21_outpacket_t
;
221
222
typedef
struct
cdvdfsv_rpc3_24_outpacket_
223
{
224
int
m_retres;
225
u64 m_guid;
226
}
cdvdfsv_rpc3_24_outpacket_t
;
227
228
typedef
struct
cdvdfsv_rpc3_26_outpacket_
229
{
230
int
m_retres;
231
unsigned
int
m_id;
232
}
cdvdfsv_rpc3_26_outpacket_t
;
233
234
typedef
struct
cdvdfsv_rpc3_27_outpacket_
235
{
236
int
m_retres;
237
int
m_on_dual;
238
unsigned
int
m_layer1_start;
239
}
cdvdfsv_rpc3_27_outpacket_t
;
240
241
typedef
union
cdvdfsv_rpc3_outpacket_
242
{
243
int
m_retres;
244
cdvdfsv_rpc3_01_outpacket_t
m_pkt_01;
245
cdvdfsv_rpc3_05_outpacket_t
m_pkt_05;
246
cdvdfsv_rpc3_06_outpacket_t
m_pkt_06;
247
cdvdfsv_rpc3_0B_outpacket_t
m_pkt_0B;
248
cdvdfsv_rpc3_15_outpacket_t
m_pkt_15;
249
cdvdfsv_rpc3_1A_outpacket_t
m_pkt_1A;
250
cdvdfsv_rpc3_21_outpacket_t
m_pkt_21;
251
cdvdfsv_rpc3_24_outpacket_t
m_pkt_24;
252
cdvdfsv_rpc3_26_outpacket_t
m_pkt_26;
253
cdvdfsv_rpc3_27_outpacket_t
m_pkt_27;
254
}
cdvdfsv_rpc3_outpacket_t
;
255
256
typedef
struct
cdvdfsv_rpc5_01_inpacket_
257
{
258
u32 m_lbn;
259
u32 m_sectors;
260
uiptr m_paddr;
261
sceCdRMode
m_rmodeee;
262
uiptr m_eeremaindest;
263
uiptr m_eedest;
264
u32 m_decval;
265
}
cdvdfsv_rpc5_01_inpacket_t
;
266
267
typedef
struct
cdvdfsv_rpc5_02_inpacket_
268
{
269
u32 m_lbn;
270
u32 m_sectors;
271
uiptr m_buf;
272
sceCdRMode
m_mode;
273
uiptr m_eeremaindest;
274
uiptr m_eedest;
275
}
cdvdfsv_rpc5_02_inpacket_t
;
276
277
typedef
struct
cdvdfsv_rpc5_04_inpacket_
278
{
279
uiptr m_eedest;
280
}
cdvdfsv_rpc5_04_inpacket_t
;
281
282
typedef
struct
cdvdfsv_rpc5_05_inpacket_
283
{
284
u32 m_lbn;
285
}
cdvdfsv_rpc5_05_inpacket_t
;
286
287
typedef
struct
cdvdfsv_rpc5_0C_inpacket_
288
{
289
u8 m_cmdNum;
290
u8 m_gap1;
291
u16 m_inBuffSize;
292
u8 m_inBuff[16];
293
}
cdvdfsv_rpc5_0C_inpacket_t
;
294
295
typedef
struct
cdvdfsv_rpc5_0D_inpacket_
296
{
297
u32 m_lbn;
298
u32 m_sectors;
299
void
*m_buf;
300
sceCdRMode
m_mode;
301
u8 m_unused[4];
302
uiptr m_eedest;
303
}
cdvdfsv_rpc5_0D_inpacket_t
;
304
305
typedef
struct
cdvdfsv_rpc5_0F_inpacket_
306
{
307
sceCdRChain
m_readChain[65];
308
sceCdRMode
m_mode;
309
uiptr m_eedest;
310
}
cdvdfsv_rpc5_0F_inpacket_t
;
311
312
typedef
union
cdvdfsv_rpc5_inpacket_
313
{
314
cdvdfsv_rpc5_01_inpacket_t
m_pkt_01;
315
cdvdfsv_rpc5_02_inpacket_t
m_pkt_02;
316
cdvdfsv_rpc5_04_inpacket_t
m_pkt_04;
317
cdvdfsv_rpc5_05_inpacket_t
m_pkt_05;
318
cdvdfsv_rpc5_0C_inpacket_t
m_pkt_0C;
319
cdvdfsv_rpc5_0D_inpacket_t
m_pkt_0D;
320
cdvdfsv_rpc5_0F_inpacket_t
m_pkt_0F;
321
}
cdvdfsv_rpc5_inpacket_t
;
322
323
typedef
struct
cdvdfsv_rpc5_04_outpacket_
324
{
325
int
m_retres;
326
int
m_isdvd;
327
}
cdvdfsv_rpc5_04_outpacket_t
;
328
329
typedef
struct
cdvdfsv_rpc5_11_outpacket_
330
{
331
int
m_retres;
332
u8 m_diskid[5];
333
}
cdvdfsv_rpc5_11_outpacket_t
;
334
335
typedef
struct
cdvdfsv_rpc5_17_outpacket_
336
{
337
int
m_retres;
338
u32 m_status;
339
}
cdvdfsv_rpc5_17_outpacket_t
;
340
341
typedef
union
cdvdfsv_rpc5_outpacket_
342
{
343
int
m_retres;
344
cdvdfsv_rpc5_04_outpacket_t
m_pkt_04;
345
cdvdfsv_rpc5_11_outpacket_t
m_pkt_11;
346
cdvdfsv_rpc5_17_outpacket_t
m_pkt_17;
347
}
cdvdfsv_rpc5_outpacket_t
;
348
349
#endif
/* _LIBCDVD_RPC_H_ */
libcdvd-common.h
sceCdCLOCK
Definition
libcdvd-common.h:189
sceCdRChain
Definition
libcdvd-common.h:246
sceCdRMode
Definition
libcdvd-common.h:234
sceCdlFILE
Definition
libcdvd-common.h:209
cdvdDecSetParam
Definition
libcdvd-rpc.h:32
cdvdNcmdParam
Definition
libcdvd-rpc.h:49
cdvdReadKeyParam
Definition
libcdvd-rpc.h:56
cdvdReadWriteNvmParam
Definition
libcdvd-rpc.h:40
cdvdScmdParam
Definition
libcdvd-rpc.h:25
cdvdfsv_rpc1_inpacket_
Definition
libcdvd-rpc.h:65
cdvdfsv_rpc1_outpacket_
Definition
libcdvd-rpc.h:70
cdvdfsv_rpc2_inpacket_
Definition
libcdvd-rpc.h:78
cdvdfsv_rpc2_outpacket_
Definition
libcdvd-rpc.h:83
cdvdfsv_rpc3_01_outpacket_
Definition
libcdvd-rpc.h:180
cdvdfsv_rpc3_05_inpacket_
Definition
libcdvd-rpc.h:135
cdvdfsv_rpc3_05_outpacket_
Definition
libcdvd-rpc.h:186
cdvdfsv_rpc3_06_outpacket_
Definition
libcdvd-rpc.h:192
cdvdfsv_rpc3_0B_inpacket_
Definition
libcdvd-rpc.h:140
cdvdfsv_rpc3_0B_outpacket_
Definition
libcdvd-rpc.h:199
cdvdfsv_rpc3_15_inpacket_
Definition
libcdvd-rpc.h:148
cdvdfsv_rpc3_15_outpacket_
Definition
libcdvd-rpc.h:204
cdvdfsv_rpc3_1A_outpacket_
Definition
libcdvd-rpc.h:210
cdvdfsv_rpc3_21_outpacket_
Definition
libcdvd-rpc.h:217
cdvdfsv_rpc3_22_inpacket_
Definition
libcdvd-rpc.h:153
cdvdfsv_rpc3_23_inpacket_
Definition
libcdvd-rpc.h:159
cdvdfsv_rpc3_24_outpacket_
Definition
libcdvd-rpc.h:223
cdvdfsv_rpc3_25_inpacket_
Definition
libcdvd-rpc.h:164
cdvdfsv_rpc3_26_outpacket_
Definition
libcdvd-rpc.h:229
cdvdfsv_rpc3_27_outpacket_
Definition
libcdvd-rpc.h:235
cdvdfsv_rpc4_outpacket_
Definition
libcdvd-rpc.h:129
cdvdfsv_rpc4_sz124_inpacket_
Definition
libcdvd-rpc.h:115
cdvdfsv_rpc4_sz128_inpacket_
Definition
libcdvd-rpc.h:107
cdvdfsv_rpc4_sz12c_inpacket_
Definition
libcdvd-rpc.h:98
cdvdfsv_rpc5_01_inpacket_
Definition
libcdvd-rpc.h:257
cdvdfsv_rpc5_02_inpacket_
Definition
libcdvd-rpc.h:268
cdvdfsv_rpc5_04_inpacket_
Definition
libcdvd-rpc.h:278
cdvdfsv_rpc5_04_outpacket_
Definition
libcdvd-rpc.h:324
cdvdfsv_rpc5_05_inpacket_
Definition
libcdvd-rpc.h:283
cdvdfsv_rpc5_0C_inpacket_
Definition
libcdvd-rpc.h:288
cdvdfsv_rpc5_0D_inpacket_
Definition
libcdvd-rpc.h:296
cdvdfsv_rpc5_0F_inpacket_
Definition
libcdvd-rpc.h:306
cdvdfsv_rpc5_11_outpacket_
Definition
libcdvd-rpc.h:330
cdvdfsv_rpc5_17_outpacket_
Definition
libcdvd-rpc.h:336
cdvdfsv_unaligned_data_outpacket_
Definition
libcdvd-rpc.h:88
cdvdfsv_rpc3_inpacket_
Definition
libcdvd-rpc.h:170
cdvdfsv_rpc3_outpacket_
Definition
libcdvd-rpc.h:242
cdvdfsv_rpc4_inpacket_
Definition
libcdvd-rpc.h:122
cdvdfsv_rpc5_inpacket_
Definition
libcdvd-rpc.h:313
cdvdfsv_rpc5_outpacket_
Definition
libcdvd-rpc.h:342
tamtypes.h
common
include
libcdvd-rpc.h
Generated on Mon Jan 20 2025 17:33:22 for PS2SDK by
1.9.8