/[pcsx2_0.9.7]/trunk/plugins/CDVDpeops/PS2Edefs.h
ViewVC logotype

Contents of /trunk/plugins/CDVDpeops/PS2Edefs.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 23237 byte(s)
committing r3113 initial commit again...
1 #ifndef __PS2EDEFS_H__
2 #define __PS2EDEFS_H__
3
4 /*
5 * PS2E Definitions v0.6.2 (beta)
6 *
7 * Author: linuzappz@hotmail.com
8 * shadowpcsx2@yahoo.gr
9 * florinsasu@hotmail.com
10 */
11
12 /*
13 Notes:
14 * Since this is still beta things may change.
15
16 * OSflags:
17 __LINUX__ (linux OS)
18 __WIN32__ (win32 OS)
19
20 * common return values (for ie. GSinit):
21 0 - success
22 -1 - error
23
24 * reserved keys:
25 F1 to F10 are reserved for the emulator
26
27 * plugins should NOT change the current
28 working directory.
29 (on win32, add flag OFN_NOCHANGEDIR for
30 GetOpenFileName)
31
32 */
33
34 #include "PS2Etypes.h"
35
36 #ifdef __LINUX__
37 #define CALLBACK
38 #else
39 #include <windows.h>
40 #endif
41
42 /* common defines */
43
44 #if defined(GSdefs) || defined(PADdefs) || defined(SIOdefs) || \
45 defined(SPU2defs) || defined(CDVDdefs) || defined(DEV9defs) || \
46 defined(USBdefs) || defined(FWdefs)
47 #define COMMONdefs
48 #endif
49
50 // PS2EgetLibType returns (may be OR'd)
51 #define PS2E_LT_GS 0x01
52 #define PS2E_LT_PAD 0x02 // -=[ OBSOLETE ]=-
53 #define PS2E_LT_SPU2 0x04
54 #define PS2E_LT_CDVD 0x08
55 #define PS2E_LT_DEV9 0x10
56 #define PS2E_LT_USB 0x20
57 #define PS2E_LT_FW 0x40
58 #define PS2E_LT_SIO 0x80
59
60 // PS2EgetLibVersion2 (high 16 bits)
61 #define PS2E_GS_VERSION 0x0006
62 #define PS2E_PAD_VERSION 0x0002 // -=[ OBSOLETE ]=-
63 #define PS2E_SPU2_VERSION 0x0004
64 #define PS2E_CDVD_VERSION 0x0005
65 #define PS2E_DEV9_VERSION 0x0003
66 #define PS2E_USB_VERSION 0x0003
67 #define PS2E_FW_VERSION 0x0002
68 #define PS2E_SIO_VERSION 0x0001
69 #ifdef COMMONdefs
70
71 u32 CALLBACK PS2EgetLibType(void);
72 u32 CALLBACK PS2EgetLibVersion2(u32 type);
73 char* CALLBACK PS2EgetLibName(void);
74
75 #endif
76
77 // key values:
78 /* key values must be OS dependant:
79 win32: the VK_XXX will be used (WinUser)
80 linux: the XK_XXX will be used (XFree86)
81 */
82
83 // event values:
84 #define KEYPRESS 1
85 #define KEYRELEASE 2
86
87 typedef struct {
88 u32 key;
89 u32 event;
90 } keyEvent;
91
92 // plugin types
93 #define SIO_TYPE_PAD 0x00000001
94 #define SIO_TYPE_MTAP 0x00000004
95 #define SIO_TYPE_RM 0x00000040
96 #define SIO_TYPE_MC 0x00000100
97
98 typedef int (CALLBACK * SIOchangeSlotCB)(int slot);
99
100 typedef struct {
101 u8 ctrl:4; // control and mode bits
102 u8 mode:4; // control and mode bits
103 u8 trackNum; // current track number (1 to 99)
104 u8 trackIndex; // current index within track (0 to 99)
105 u8 trackM; // current minute location on the disc (BCD encoded)
106 u8 trackS; // current sector location on the disc (BCD encoded)
107 u8 trackF; // current frame location on the disc (BCD encoded)
108 u8 pad; // unused
109 u8 discM; // current minute offset from first track (BCD encoded)
110 u8 discS; // current sector offset from first track (BCD encoded)
111 u8 discF; // current frame offset from first track (BCD encoded)
112 } cdvdSubQ;
113
114 typedef struct { // NOT bcd coded
115 u32 lsn;
116 u8 type;
117 } cdvdTD;
118
119 typedef struct {
120 u8 strack; //number of the first track (usually 1)
121 u8 etrack; //number of the last track
122 } cdvdTN;
123
124 // CDVDreadTrack mode values:
125 #define CDVD_MODE_2352 0 // full 2352 bytes
126 #define CDVD_MODE_2340 1 // skip sync (12) bytes
127 #define CDVD_MODE_2328 2 // skip sync+head+sub (24) bytes
128 #define CDVD_MODE_2048 3 // skip sync+head+sub (24) bytes
129 #define CDVD_MODE_2368 4 // full 2352 bytes + 16 subq
130
131 // CDVDgetDiskType returns:
132 #define CDVD_TYPE_ILLEGAL 0xff // Illegal Disc
133 #define CDVD_TYPE_DVDV 0xfe // DVD Video
134 #define CDVD_TYPE_CDDA 0xfd // Audio CD
135 #define CDVD_TYPE_PS2DVD 0x14 // PS2 DVD
136 #define CDVD_TYPE_PS2CDDA 0x13 // PS2 CD (with audio)
137 #define CDVD_TYPE_PS2CD 0x12 // PS2 CD
138 #define CDVD_TYPE_PSCDDA 0x11 // PS CD (with audio)
139 #define CDVD_TYPE_PSCD 0x10 // PS CD
140 #define CDVD_TYPE_UNKNOWN 0x05 // Unknown
141 #define CDVD_TYPE_DETCTDVDD 0x04 // Detecting Dvd Dual Sided
142 #define CDVD_TYPE_DETCTDVDS 0x03 // Detecting Dvd Single Sided
143 #define CDVD_TYPE_DETCTCD 0x02 // Detecting Cd
144 #define CDVD_TYPE_DETCT 0x01 // Detecting
145 #define CDVD_TYPE_NODISC 0x00 // No Disc
146
147 // CDVDgetTrayStatus returns:
148 #define CDVD_TRAY_CLOSE 0x00
149 #define CDVD_TRAY_OPEN 0x01
150
151 // cdvdTD.type (track types for cds)
152 #define CDVD_AUDIO_TRACK 0x01
153 #define CDVD_MODE1_TRACK 0x41
154 #define CDVD_MODE2_TRACK 0x61
155
156 #define CDVD_AUDIO_MASK 0x00
157 #define CDVD_DATA_MASK 0x40
158 // CDROM_DATA_TRACK 0x04 //do not enable this! (from linux kernel)
159
160 typedef void (*DEV9callback)(int cycles);
161 typedef int (*DEV9handler)(void);
162
163 typedef void (*USBcallback)(int cycles);
164 typedef int (*USBhandler)(void);
165
166 // freeze modes:
167 #define FREEZE_LOAD 0
168 #define FREEZE_SAVE 1
169 #define FREEZE_SIZE 2
170
171 typedef struct {
172 int size;
173 s8 *data;
174 } freezeData;
175
176 typedef struct {
177 char name[8];
178 void *common;
179 } GSdriverInfo;
180
181 #ifdef __WIN32__
182 typedef struct { // unsupported values must be set to zero
183 HWND hWnd;
184 HMENU hMenu;
185 HWND hStatusWnd;
186 } winInfo;
187 #endif
188
189 /* GS plugin API */
190
191 // if this file is included with this define
192 // the next api will not be skipped by the compiler
193 #ifdef GSdefs
194
195 // basic funcs
196
197 s32 CALLBACK GSinit();
198 s32 CALLBACK GSopen(void *pDsp, char *Title);
199 void CALLBACK GSclose();
200 void CALLBACK GSshutdown();
201 void CALLBACK GSvsync();
202 void CALLBACK GSgifTransfer1(u32 *pMem, u32 addr);
203 void CALLBACK GSgifTransfer2(u32 *pMem, u32 size);
204 void CALLBACK GSgifTransfer3(u32 *pMem, u32 size);
205 void CALLBACK GSwrite8(u32 mem, u8 value);
206 void CALLBACK GSwrite16(u32 mem, u16 value);
207 void CALLBACK GSwrite32(u32 mem, u32 value);
208 void CALLBACK GSwrite64(u32 mem, u64 value);
209 u8 CALLBACK GSread8(u32 mem);
210 u16 CALLBACK GSread16(u32 mem);
211 u32 CALLBACK GSread32(u32 mem);
212 u64 CALLBACK GSread64(u32 mem);
213 void CALLBACK GSreadFIFO(u64 *mem);
214
215 // extended funcs
216
217 // GSkeyEvent gets called when there is a keyEvent from the PAD plugin
218 void CALLBACK GSkeyEvent(keyEvent *ev);
219 void CALLBACK GSmakeSnapshot(char *path);
220 void CALLBACK GSirqCallback(void (*callback)());
221 void CALLBACK GSprintf(int timeout, char *fmt, ...);
222 void CALLBACK GSsetCSR(u64 *csr);
223 void CALLBACK GSgetDriverInfo(GSdriverInfo *info);
224 #ifdef __WIN32__
225 s32 CALLBACK GSsetWindowInfo(winInfo *info);
226 #endif
227 s32 CALLBACK GSfreeze(int mode, freezeData *data);
228 void CALLBACK GSconfigure();
229 void CALLBACK GSabout();
230 s32 CALLBACK GStest();
231
232 #endif
233
234 /* PAD plugin API -=[ OBSOLETE ]=- */
235
236 // if this file is included with this define
237 // the next api will not be skipped by the compiler
238 #ifdef PADdefs
239
240 // basic funcs
241
242 s32 CALLBACK PADinit(u32 flags);
243 s32 CALLBACK PADopen(void *pDsp);
244 void CALLBACK PADclose();
245 void CALLBACK PADshutdown();
246 // PADkeyEvent is called every vsync (return NULL if no event)
247 keyEvent* CALLBACK PADkeyEvent();
248 u8 CALLBACK PADstartPoll(int pad);
249 u8 CALLBACK PADpoll(u8 value);
250 // returns: 1 if supported pad1
251 // 2 if supported pad2
252 // 3 if both are supported
253 u32 CALLBACK PADquery();
254
255 // extended funcs
256
257 void CALLBACK PADgsDriverInfo(GSdriverInfo *info);
258 void CALLBACK PADconfigure();
259 void CALLBACK PADabout();
260 s32 CALLBACK PADtest();
261
262 #endif
263
264 /* SIO plugin API */
265
266 // if this file is included with this define
267 // the next api will not be skipped by the compiler
268 #ifdef SIOdefs
269
270 // basic funcs
271
272 s32 CALLBACK SIOinit(u32 port, u32 slot, SIOchangeSlotCB f);
273 s32 CALLBACK SIOopen(void *pDsp);
274 void CALLBACK SIOclose();
275 void CALLBACK SIOshutdown();
276 u8 CALLBACK SIOstartPoll(u8 value);
277 u8 CALLBACK SIOpoll(u8 value);
278 // returns: SIO_TYPE_{PAD,MTAP,RM,MC}
279 u32 CALLBACK SIOquery();
280
281 // extended funcs
282
283 void CALLBACK SIOconfigure();
284 void CALLBACK SIOabout();
285 s32 CALLBACK SIOtest();
286
287 #endif
288
289 /* SPU2 plugin API */
290
291 // if this file is included with this define
292 // the next api will not be skipped by the compiler
293 #ifdef SPU2defs
294
295 // basic funcs
296
297 s32 CALLBACK SPU2init();
298 s32 CALLBACK SPU2open(void *pDsp);
299 void CALLBACK SPU2close();
300 void CALLBACK SPU2shutdown();
301 void CALLBACK SPU2write(u32 mem, u16 value);
302 u16 CALLBACK SPU2read(u32 mem);
303 void CALLBACK SPU2readDMA4Mem(u16 *pMem, int size);
304 void CALLBACK SPU2writeDMA4Mem(u16 *pMem, int size);
305 void CALLBACK SPU2interruptDMA4();
306 void CALLBACK SPU2readDMA7Mem(u16* pMem, int size);
307 void CALLBACK SPU2writeDMA7Mem(u16 *pMem, int size);
308 void CALLBACK SPU2interruptDMA7();
309 void CALLBACK SPU2irqCallback(void (*callback)());
310
311 // extended funcs
312
313 void CALLBACK SPU2async(u32 cycles);
314 s32 CALLBACK SPU2freeze(int mode, freezeData *data);
315 void CALLBACK SPU2configure();
316 void CALLBACK SPU2about();
317 s32 CALLBACK SPU2test();
318
319 #endif
320
321 /* CDVD plugin API */
322
323 // if this file is included with this define
324 // the next api will not be skipped by the compiler
325 #ifdef CDVDdefs
326
327 // basic funcs
328
329 s32 CALLBACK CDVDinit();
330 s32 CALLBACK CDVDopen();
331 void CALLBACK CDVDclose();
332 void CALLBACK CDVDshutdown();
333 s32 CALLBACK CDVDreadTrack(u32 lsn, int mode);
334
335 // return can be NULL (for async modes)
336 u8* CALLBACK CDVDgetBuffer();
337
338 s32 CALLBACK CDVDreadSubQ(u32 lsn, cdvdSubQ* subq);//read subq from disc (only cds have subq data)
339 s32 CALLBACK CDVDgetTN(cdvdTN *Buffer); //disk information
340 s32 CALLBACK CDVDgetTD(u8 Track, cdvdTD *Buffer); //track info: min,sec,frame,type
341 s32 CALLBACK CDVDgetTOC(void* toc); //gets ps2 style toc from disc
342 s32 CALLBACK CDVDgetDiskType(); //CDVD_TYPE_xxxx
343 s32 CALLBACK CDVDgetTrayStatus(); //CDVD_TRAY_xxxx
344 s32 CALLBACK CDVDctrlTrayOpen(); //open disc tray
345 s32 CALLBACK CDVDctrlTrayClose(); //close disc tray
346
347 // extended funcs
348
349 void CALLBACK CDVDconfigure();
350 void CALLBACK CDVDabout();
351 s32 CALLBACK CDVDtest();
352 void CALLBACK CDVDnewDiskCB(void (*callback)());
353
354 #endif
355
356 /* DEV9 plugin API */
357
358 // if this file is included with this define
359 // the next api will not be skipped by the compiler
360 #ifdef DEV9defs
361
362 // basic funcs
363
364 s32 CALLBACK DEV9init();
365 s32 CALLBACK DEV9open(void *pDsp);
366 void CALLBACK DEV9close();
367 void CALLBACK DEV9shutdown();
368 u8 CALLBACK DEV9read8(u32 addr);
369 u16 CALLBACK DEV9read16(u32 addr);
370 u32 CALLBACK DEV9read32(u32 addr);
371 void CALLBACK DEV9write8(u32 addr, u8 value);
372 void CALLBACK DEV9write16(u32 addr, u16 value);
373 void CALLBACK DEV9write32(u32 addr, u32 value);
374 void CALLBACK DEV9readDMA8Mem(u32 *pMem, int size);
375 void CALLBACK DEV9writeDMA8Mem(u32 *pMem, int size);
376 // cycles = IOP cycles before calling callback,
377 // if callback returns 1 the irq is triggered, else not
378 void CALLBACK DEV9irqCallback(DEV9callback callback);
379 DEV9handler CALLBACK DEV9irqHandler(void);
380
381 // extended funcs
382
383 s32 CALLBACK DEV9freeze(int mode, freezeData *data);
384 void CALLBACK DEV9configure();
385 void CALLBACK DEV9about();
386 s32 CALLBACK DEV9test();
387
388 #endif
389
390 /* USB plugin API */
391
392 // if this file is included with this define
393 // the next api will not be skipped by the compiler
394 #ifdef USBdefs
395
396 // basic funcs
397
398 s32 CALLBACK USBinit();
399 s32 CALLBACK USBopen(void *pDsp);
400 void CALLBACK USBclose();
401 void CALLBACK USBshutdown();
402 u8 CALLBACK USBread8(u32 addr);
403 u16 CALLBACK USBread16(u32 addr);
404 u32 CALLBACK USBread32(u32 addr);
405 void CALLBACK USBwrite8(u32 addr, u8 value);
406 void CALLBACK USBwrite16(u32 addr, u16 value);
407 void CALLBACK USBwrite32(u32 addr, u32 value);
408 // cycles = IOP cycles before calling callback,
409 // if callback returns 1 the irq is triggered, else not
410 void CALLBACK USBirqCallback(USBcallback callback);
411 USBhandler CALLBACK USBirqHandler(void);
412 void CALLBACK USBsetRAM(void *mem);
413
414 // extended funcs
415
416 s32 CALLBACK USBfreeze(int mode, freezeData *data);
417 void CALLBACK USBconfigure();
418 void CALLBACK USBabout();
419 s32 CALLBACK USBtest();
420
421 #endif
422
423 /* FW plugin API */
424
425 // if this file is included with this define
426 // the next api will not be skipped by the compiler
427 #ifdef FWdefs
428 // basic funcs
429
430 s32 CALLBACK FWinit();
431 s32 CALLBACK FWopen(void *pDsp);
432 void CALLBACK FWclose();
433 void CALLBACK FWshutdown();
434 u32 CALLBACK FWread32(u32 addr);
435 void CALLBACK FWwrite32(u32 addr, u32 value);
436 void CALLBACK FWirqCallback(void (*callback)());
437
438 // extended funcs
439
440 s32 CALLBACK FWfreeze(int mode, freezeData *data);
441 void CALLBACK FWconfigure();
442 void CALLBACK FWabout();
443 s32 CALLBACK FWtest();
444 #endif
445
446 // might be useful for emulators
447 #ifdef PLUGINtypedefs
448
449 typedef u32 (CALLBACK* _PS2EgetLibType)(void);
450 typedef u32 (CALLBACK* _PS2EgetLibVersion2)(u32 type);
451 typedef char*(CALLBACK* _PS2EgetLibName)(void);
452
453 // GS
454 typedef s32 (CALLBACK* _GSinit)();
455 typedef s32 (CALLBACK* _GSopen)(void *pDsp, char *Title);
456 typedef void (CALLBACK* _GSclose)();
457 typedef void (CALLBACK* _GSshutdown)();
458 typedef void (CALLBACK* _GSvsync)();
459 typedef void (CALLBACK* _GSwrite8)(u32 mem, u8 value);
460 typedef void (CALLBACK* _GSwrite16)(u32 mem, u16 value);
461 typedef void (CALLBACK* _GSwrite32)(u32 mem, u32 value);
462 typedef void (CALLBACK* _GSwrite64)(u32 mem, u64 value);
463 typedef u8 (CALLBACK* _GSread8)(u32 mem);
464 typedef u16 (CALLBACK* _GSread16)(u32 mem);
465 typedef u32 (CALLBACK* _GSread32)(u32 mem);
466 typedef u64 (CALLBACK* _GSread64)(u32 mem);
467 typedef void (CALLBACK* _GSgifTransfer1)(u32 *pMem, u32 addr);
468 typedef void (CALLBACK* _GSgifTransfer2)(u32 *pMem, u32 size);
469 typedef void (CALLBACK* _GSgifTransfer3)(u32 *pMem, u32 size);
470 typedef void (CALLBACK* _GSreadFIFO)(u64 *pMem);
471
472 typedef void (CALLBACK* _GSkeyEvent)(keyEvent* ev);
473 typedef void (CALLBACK* _GSirqCallback)(void (*callback)());
474 typedef void (CALLBACK* _GSprintf)(int timeout, char *fmt, ...);
475 typedef void (CALLBACK* _GSsetCSR)(u64 * csr);
476 typedef void (CALLBACK* _GSgetDriverInfo)(GSdriverInfo *info);
477 #ifdef __WIN32__
478 typedef s32 (CALLBACK* _GSsetWindowInfo)(winInfo *info);
479 #endif
480 typedef void (CALLBACK* _GSmakeSnapshot)(char *path);
481 typedef s32 (CALLBACK* _GSfreeze)(int mode, freezeData *data);
482 typedef void (CALLBACK* _GSconfigure)();
483 typedef s32 (CALLBACK* _GStest)();
484 typedef void (CALLBACK* _GSabout)();
485
486 // PAD
487 typedef s32 (CALLBACK* _PADinit)(u32 flags);
488 typedef s32 (CALLBACK* _PADopen)(void *pDsp);
489 typedef void (CALLBACK* _PADclose)();
490 typedef void (CALLBACK* _PADshutdown)();
491 typedef keyEvent* (CALLBACK* _PADkeyEvent)();
492 typedef u8 (CALLBACK* _PADstartPoll)(int pad);
493 typedef u8 (CALLBACK* _PADpoll)(u8 value);
494 typedef u32 (CALLBACK* _PADquery)();
495
496 typedef void (CALLBACK* _PADgsDriverInfo)(GSdriverInfo *info);
497 typedef void (CALLBACK* _PADconfigure)();
498 typedef s32 (CALLBACK* _PADtest)();
499 typedef void (CALLBACK* _PADabout)();
500
501 // SIO
502 typedef s32 (CALLBACK* _SIOinit)(u32 port, u32 slot, SIOchangeSlotCB f);
503 typedef s32 (CALLBACK* _SIOopen)(void *pDsp);
504 typedef void (CALLBACK* _SIOclose)();
505 typedef void (CALLBACK* _SIOshutdown)();
506 typedef u8 (CALLBACK* _SIOstartPoll)(u8 value);
507 typedef u8 (CALLBACK* _SIOpoll)(u8 value);
508 typedef u32 (CALLBACK* _SIOquery)();
509
510 typedef void (CALLBACK* _SIOconfigure)();
511 typedef s32 (CALLBACK* _SIOtest)();
512 typedef void (CALLBACK* _SIOabout)();
513
514 // SPU2
515 typedef s32 (CALLBACK* _SPU2init)();
516 typedef s32 (CALLBACK* _SPU2open)(void *pDsp);
517 typedef void (CALLBACK* _SPU2close)();
518 typedef void (CALLBACK* _SPU2shutdown)();
519 typedef void (CALLBACK* _SPU2write)(u32 mem, u16 value);
520 typedef u16 (CALLBACK* _SPU2read)(u32 mem);
521 typedef void (CALLBACK* _SPU2readDMA4Mem)(u16 *pMem, int size);
522 typedef void (CALLBACK* _SPU2writeDMA4Mem)(u16 *pMem, int size);
523 typedef void (CALLBACK* _SPU2interruptDMA4)();
524 typedef void (CALLBACK* _SPU2readDMA7Mem)(u16 *pMem, int size);
525 typedef void (CALLBACK* _SPU2writeDMA7Mem)(u16 *pMem, int size);
526 typedef void (CALLBACK* _SPU2interruptDMA7)();
527 typedef void (CALLBACK* _SPU2irqCallback)(void (*callback)());
528
529 typedef void (CALLBACK* _SPU2async)(u32 cycles);
530 typedef s32 (CALLBACK* _SPU2freeze)(int mode, freezeData *data);
531 typedef void (CALLBACK* _SPU2configure)();
532 typedef s32 (CALLBACK* _SPU2test)();
533 typedef void (CALLBACK* _SPU2about)();
534
535 // CDVD
536 typedef s32 (CALLBACK* _CDVDinit)();
537 typedef s32 (CALLBACK* _CDVDopen)();
538 typedef void (CALLBACK* _CDVDclose)();
539 typedef void (CALLBACK* _CDVDshutdown)();
540 typedef s32 (CALLBACK* _CDVDreadTrack)(u32 lsn, int mode);
541 typedef u8* (CALLBACK* _CDVDgetBuffer)();
542 typedef s32 (CALLBACK* _CDVDreadSubQ)(u32 lsn, cdvdSubQ* subq);
543 typedef s32 (CALLBACK* _CDVDgetTN)(cdvdTN *Buffer);
544 typedef s32 (CALLBACK* _CDVDgetTD)(u8 Track, cdvdTD *Buffer);
545 typedef s32 (CALLBACK* _CDVDgetTOC)(void* toc);
546 typedef s32 (CALLBACK* _CDVDgetDiskType)();
547 typedef s32 (CALLBACK* _CDVDgetTrayStatus)();
548 typedef s32 (CALLBACK* _CDVDctrlTrayOpen)();
549 typedef s32 (CALLBACK* _CDVDctrlTrayClose)();
550
551 typedef void (CALLBACK* _CDVDconfigure)();
552 typedef s32 (CALLBACK* _CDVDtest)();
553 typedef void (CALLBACK* _CDVDabout)();
554 typedef void (CALLBACK* _CDVDnewDiskCB)(void (*callback)());
555
556 // DEV9
557 typedef s32 (CALLBACK* _DEV9init)();
558 typedef s32 (CALLBACK* _DEV9open)(void *pDsp);
559 typedef void (CALLBACK* _DEV9close)();
560 typedef void (CALLBACK* _DEV9shutdown)();
561 typedef u8 (CALLBACK* _DEV9read8)(u32 mem);
562 typedef u16 (CALLBACK* _DEV9read16)(u32 mem);
563 typedef u32 (CALLBACK* _DEV9read32)(u32 mem);
564 typedef void (CALLBACK* _DEV9write8)(u32 mem, u8 value);
565 typedef void (CALLBACK* _DEV9write16)(u32 mem, u16 value);
566 typedef void (CALLBACK* _DEV9write32)(u32 mem, u32 value);
567 typedef void (CALLBACK* _DEV9readDMA8Mem)(u32 *pMem, int size);
568 typedef void (CALLBACK* _DEV9writeDMA8Mem)(u32 *pMem, int size);
569 typedef void (CALLBACK* _DEV9irqCallback)(DEV9callback callback);
570 typedef DEV9handler (CALLBACK* _DEV9irqHandler)(void);
571
572 typedef s32 (CALLBACK* _DEV9freeze)(int mode, freezeData *data);
573 typedef void (CALLBACK* _DEV9configure)();
574 typedef s32 (CALLBACK* _DEV9test)();
575 typedef void (CALLBACK* _DEV9about)();
576
577 // USB
578 typedef s32 (CALLBACK* _USBinit)();
579 typedef s32 (CALLBACK* _USBopen)(void *pDsp);
580 typedef void (CALLBACK* _USBclose)();
581 typedef void (CALLBACK* _USBshutdown)();
582 typedef u8 (CALLBACK* _USBread8)(u32 mem);
583 typedef u16 (CALLBACK* _USBread16)(u32 mem);
584 typedef u32 (CALLBACK* _USBread32)(u32 mem);
585 typedef void (CALLBACK* _USBwrite8)(u32 mem, u8 value);
586 typedef void (CALLBACK* _USBwrite16)(u32 mem, u16 value);
587 typedef void (CALLBACK* _USBwrite32)(u32 mem, u32 value);
588 typedef void (CALLBACK* _USBirqCallback)(USBcallback callback);
589 typedef USBhandler (CALLBACK* _USBirqHandler)(void);
590 typedef void (CALLBACK* _USBsetRAM)(void *mem);
591
592 typedef s32 (CALLBACK* _USBfreeze)(int mode, freezeData *data);
593 typedef void (CALLBACK* _USBconfigure)();
594 typedef s32 (CALLBACK* _USBtest)();
595 typedef void (CALLBACK* _USBabout)();
596
597 //FW
598 typedef s32 (CALLBACK* _FWinit)();
599 typedef s32 (CALLBACK* _FWopen)(void *pDsp);
600 typedef void (CALLBACK* _FWclose)();
601 typedef void (CALLBACK* _FWshutdown)();
602 typedef u32 (CALLBACK* _FWread32)(u32 mem);
603 typedef void (CALLBACK* _FWwrite32)(u32 mem, u32 value);
604 typedef void (CALLBACK* _FWirqCallback)(void (*callback)());
605
606 typedef s32 (CALLBACK* _FWfreeze)(int mode, freezeData *data);
607 typedef void (CALLBACK* _FWconfigure)();
608 typedef s32 (CALLBACK* _FWtest)();
609 typedef void (CALLBACK* _FWabout)();
610
611 #endif
612
613 #ifdef PLUGINfuncs
614
615 // GS
616 _GSinit GSinit;
617 _GSopen GSopen;
618 _GSclose GSclose;
619 _GSshutdown GSshutdown;
620 _GSvsync GSvsync;
621 _GSwrite8 GSwrite8;
622 _GSwrite16 GSwrite16;
623 _GSwrite32 GSwrite32;
624 _GSwrite64 GSwrite64;
625 _GSread8 GSread8;
626 _GSread16 GSread16;
627 _GSread32 GSread32;
628 _GSread64 GSread64;
629 _GSgifTransfer1 GSgifTransfer1;
630 _GSgifTransfer2 GSgifTransfer2;
631 _GSgifTransfer3 GSgifTransfer3;
632 _GSreadFIFO GSreadFIFO;
633
634 _GSkeyEvent GSkeyEvent;
635 _GSmakeSnapshot GSmakeSnapshot;
636 _GSirqCallback GSirqCallback;
637 _GSprintf GSprintf;
638 _GSsetCSR GSsetCSR;
639 _GSgetDriverInfo GSgetDriverInfo;
640 #ifdef __WIN32__
641 _GSsetWindowInfo GSsetWindowInfo;
642 #endif
643 _GSfreeze GSfreeze;
644 _GSconfigure GSconfigure;
645 _GStest GStest;
646 _GSabout GSabout;
647
648 // PAD1
649 _PADinit PAD1init;
650 _PADopen PAD1open;
651 _PADclose PAD1close;
652 _PADshutdown PAD1shutdown;
653 _PADkeyEvent PAD1keyEvent;
654 _PADstartPoll PAD1startPoll;
655 _PADpoll PAD1poll;
656 _PADquery PAD1query;
657
658 _PADgsDriverInfo PAD1gsDriverInfo;
659 _PADconfigure PAD1configure;
660 _PADtest PAD1test;
661 _PADabout PAD1about;
662
663 // PAD2
664 _PADinit PAD2init;
665 _PADopen PAD2open;
666 _PADclose PAD2close;
667 _PADshutdown PAD2shutdown;
668 _PADkeyEvent PAD2keyEvent;
669 _PADstartPoll PAD2startPoll;
670 _PADpoll PAD2poll;
671 _PADquery PAD2query;
672
673 _PADgsDriverInfo PAD2gsDriverInfo;
674 _PADconfigure PAD2configure;
675 _PADtest PAD2test;
676 _PADabout PAD2about;
677
678 // SIO[2]
679 _SIOinit SIOinit[2][9];
680 _SIOopen SIOopen[2][9];
681 _SIOclose SIOclose[2][9];
682 _SIOshutdown SIOshutdown[2][9];
683 _SIOstartPoll SIOstartPoll[2][9];
684 _SIOpoll SIOpoll[2][9];
685 _SIOquery SIOquery[2][9];
686
687 _SIOconfigure SIOconfigure[2][9];
688 _SIOtest SIOtest[2][9];
689 _SIOabout SIOabout[2][9];
690
691 // SPU2
692 _SPU2init SPU2init;
693 _SPU2open SPU2open;
694 _SPU2close SPU2close;
695 _SPU2shutdown SPU2shutdown;
696 _SPU2write SPU2write;
697 _SPU2read SPU2read;
698 _SPU2readDMA4Mem SPU2readDMA4Mem;
699 _SPU2writeDMA4Mem SPU2writeDMA4Mem;
700 _SPU2interruptDMA4 SPU2interruptDMA4;
701 _SPU2readDMA7Mem SPU2readDMA7Mem;
702 _SPU2writeDMA7Mem SPU2writeDMA7Mem;
703 _SPU2interruptDMA7 SPU2interruptDMA7;
704 _SPU2irqCallback SPU2irqCallback;
705
706 _SPU2async SPU2async;
707 _SPU2freeze SPU2freeze;
708 _SPU2configure SPU2configure;
709 _SPU2test SPU2test;
710 _SPU2about SPU2about;
711
712 // CDVD
713 _CDVDinit CDVDinit;
714 _CDVDopen CDVDopen;
715 _CDVDclose CDVDclose;
716 _CDVDshutdown CDVDshutdown;
717 _CDVDreadTrack CDVDreadTrack;
718 _CDVDgetBuffer CDVDgetBuffer;
719 _CDVDreadSubQ CDVDreadSubQ;
720 _CDVDgetTN CDVDgetTN;
721 _CDVDgetTD CDVDgetTD;
722 _CDVDgetTOC CDVDgetTOC;
723 _CDVDgetDiskType CDVDgetDiskType;
724 _CDVDgetTrayStatus CDVDgetTrayStatus;
725 _CDVDctrlTrayOpen CDVDctrlTrayOpen;
726 _CDVDctrlTrayClose CDVDctrlTrayClose;
727
728 _CDVDconfigure CDVDconfigure;
729 _CDVDtest CDVDtest;
730 _CDVDabout CDVDabout;
731 _CDVDnewDiskCB CDVDnewDiskCB;
732
733 // DEV9
734 _DEV9init DEV9init;
735 _DEV9open DEV9open;
736 _DEV9close DEV9close;
737 _DEV9shutdown DEV9shutdown;
738 _DEV9read8 DEV9read8;
739 _DEV9read16 DEV9read16;
740 _DEV9read32 DEV9read32;
741 _DEV9write8 DEV9write8;
742 _DEV9write16 DEV9write16;
743 _DEV9write32 DEV9write32;
744 _DEV9readDMA8Mem DEV9readDMA8Mem;
745 _DEV9writeDMA8Mem DEV9writeDMA8Mem;
746 _DEV9irqCallback DEV9irqCallback;
747 _DEV9irqHandler DEV9irqHandler;
748
749 _DEV9configure DEV9configure;
750 _DEV9freeze DEV9freeze;
751 _DEV9test DEV9test;
752 _DEV9about DEV9about;
753
754 // USB
755 _USBinit USBinit;
756 _USBopen USBopen;
757 _USBclose USBclose;
758 _USBshutdown USBshutdown;
759 _USBread8 USBread8;
760 _USBread16 USBread16;
761 _USBread32 USBread32;
762 _USBwrite8 USBwrite8;
763 _USBwrite16 USBwrite16;
764 _USBwrite32 USBwrite32;
765 _USBirqCallback USBirqCallback;
766 _USBirqHandler USBirqHandler;
767 _USBsetRAM USBsetRAM;
768
769 _USBconfigure USBconfigure;
770 _USBfreeze USBfreeze;
771 _USBtest USBtest;
772 _USBabout USBabout;
773
774 // FW
775 _FWinit FWinit;
776 _FWopen FWopen;
777 _FWclose FWclose;
778 _FWshutdown FWshutdown;
779 _FWread32 FWread32;
780 _FWwrite32 FWwrite32;
781 _FWirqCallback FWirqCallback;
782
783 _FWconfigure FWconfigure;
784 _FWfreeze FWfreeze;
785 _FWtest FWtest;
786 _FWabout FWabout;
787 #endif
788
789 #endif /* __PS2EDEFS_H__ */

  ViewVC Help
Powered by ViewVC 1.1.22