Plugin APIs: Restored pDsp, renamed to pDisplay for clarity (Though arcum42's right and about needing documentation). Renamed PADinit for psx emulator compatibility. Played around a bit with SIO api, thinking for simplicity best to just use one plugin of each type (SIO PAD/MTAP, remote, and memcard. Could even be separate types, but no real need for it). Added PADFreeze() and its friend SIOFreeze().

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@779 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
mattmenke 2009-03-14 02:12:17 +00:00
parent 17298b7e6b
commit 04b49b108e
8 changed files with 47 additions and 38 deletions

View File

@ -36,7 +36,7 @@
// Basic functions.
EXPORT_C_(s32) CDVDinit(char *configpath);
EXPORT_C_(s32) CDVDopen(const char* pTitleFilename);
EXPORT_C_(s32) CDVDopen(void *pDisplay, const char* pTitleFilename);
EXPORT_C_(void) CDVDclose();
EXPORT_C_(void) CDVDshutdown();
EXPORT_C_(s32) CDVDreadTrack(u32 lsn, int mode);

View File

@ -38,7 +38,7 @@ typedef int (*DEV9handler)(void);
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
EXPORT_C_(s32) DEV9init(char *configpath);
EXPORT_C_(s32) DEV9open();
EXPORT_C_(s32) DEV9open(void *pDisplay);
EXPORT_C_(void) DEV9close();
EXPORT_C_(void) DEV9shutdown();
EXPORT_C_(u8) DEV9read8(u32 addr);

View File

@ -38,7 +38,7 @@
// NOTE: The read/write functions CANNOT use XMM/MMX regs
// If you want to use them, need to save and restore current ones
EXPORT_C_(s32) CALLBACK FWinit(char *configpath);
EXPORT_C_(s32) CALLBACK FWopen();
EXPORT_C_(s32) CALLBACK FWopen(void *pDisplay);
EXPORT_C_(void) CALLBACK FWclose();
EXPORT_C_(void) CALLBACK FWshutdown();
EXPORT_C_(u32) CALLBACK FWread32(u32 addr);

View File

@ -38,7 +38,7 @@ typedef struct _GSdriverInfo {
// Basic functions.
EXPORT_C_(s32) GSinit(char *configpath);
EXPORT_C_(s32) GSopen(char *Title, bool multithread);
EXPORT_C_(s32) GSopen(void *pDisplay, char *Title, bool multithread);
EXPORT_C_(void) GSclose();
EXPORT_C_(void) GSshutdown();
EXPORT_C_(void) GSvsync(int field);

View File

@ -35,8 +35,8 @@
/* So obsolete that everyone uses it. */
// Basic functions.
EXPORT_C_(s32) CALLBACK PADinit(char *configpath, u32 flags);
EXPORT_C_(s32) CALLBACK PADopen();
EXPORT_C_(s32) CALLBACK PADinitEx(char *configpath);
EXPORT_C_(s32) CALLBACK PADopen(void *pDsp);
EXPORT_C_(void) CALLBACK PADclose();
EXPORT_C_(void) CALLBACK PADshutdown();
// PADkeyEvent is called every vsync (return NULL if no event)
@ -58,6 +58,7 @@ EXPORT_C_(u8) CALLBACK PADquery();
EXPORT_C_(void) CALLBACK PADupdate(u8 pad);
// Extended functions
EXPORT_C_(s32) CALLBACK PADfreeze(int mode, freezeData *data);
EXPORT_C_(void) CALLBACK PADgsDriverInfo(GSdriverInfo *info);
EXPORT_C_(void) CALLBACK PADconfigure();
EXPORT_C_(void) CALLBACK PADabout();

View File

@ -35,12 +35,20 @@
// basic funcs
s32 CALLBACK SIOinit(char *configpath, u32 port, u32 slot, SIOchangeSlotCB f);
s32 CALLBACK SIOopen();
// Single plugin can only be PAD, MTAP, RM, or MC. Only load one plugin of each type,
// but not both a PAD and MTAP. Simplifies plugin selection and interface, as well
// as API.
s32 CALLBACK SIOinit(char *configpath);
s32 CALLBACK SIOopen(void *pDisplay);
void CALLBACK SIOclose();
void CALLBACK SIOshutdown();
u8 CALLBACK SIOstartPoll(u8 value);
u8 CALLBACK SIOpoll(u8 value);
// Returns 0 if device doesn't exist. Simplifies things. Also means you don't
// have to distinguish between MTAP and PAD SIO plugins.
s32 CALLBACK SIOstartPoll(u8 deviceType, u32 port, u32 slot, u8 *returnValue);
// Returns 0 on the last output byte.
s32 CALLBACK SIOpoll(u8 value, u8 *returnValue);
EXPORT_C_(keyEvent*) CALLBACK SIOkeyEvent();
// returns: SIO_TYPE_{PAD,MTAP,RM,MC}
u32 CALLBACK SIOquery();

View File

@ -32,7 +32,7 @@
#include "Pcsx2Api.h"
EXPORT_C_(s32) SPU2init(char *configpath);
EXPORT_C_(s32) SPU2open();
EXPORT_C_(s32) SPU2open(void *pDisplay);
EXPORT_C_(void) SPU2close();
EXPORT_C_(void) SPU2shutdown();
EXPORT_C_(void) SPU2write(u32 mem, u16 value);

View File

@ -36,7 +36,7 @@ typedef int (*USBhandler)(void);
// Basic functions.
EXPORT_C_(s32) CALLBACK USBinit(char *configpath);
EXPORT_C_(s32) CALLBACK USBopen();
EXPORT_C_(s32) CALLBACK USBopen(void *pDisplay);
EXPORT_C_(void) CALLBACK USBclose();
EXPORT_C_(void) CALLBACK USBshutdown();
EXPORT_C_(u8) CALLBACK USBread8(u32 addr);