mirror of https://github.com/PCSX2/pcsx2.git
Deleted assorted unused headers and functions. (#4138)
This commit is contained in:
parent
18da716016
commit
34f665dc7e
|
@ -22,7 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Include", "Include", "{0FAD
|
|||
common\include\Pcsx2Defs.h = common\include\Pcsx2Defs.h
|
||||
common\include\Pcsx2Types.h = common\include\Pcsx2Types.h
|
||||
common\include\PluginCallbacks.h = common\include\PluginCallbacks.h
|
||||
common\include\PS2Etypes.h = common\include\PS2Etypes.h
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wx", "wx", "{62BF822E-6A12-49A8-BE8C-C55A9BCA24DA}"
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// This file is just for backwards compatibility.
|
||||
|
||||
#ifndef __PS2ETYPES_H__
|
||||
#define __PS2ETYPES_H__
|
||||
|
||||
// This brings in both all the things that used to be in PS2types.h that weren't type related,
|
||||
// and also brings Pcsx2Types in.
|
||||
#include "Pcsx2Defs.h"
|
||||
|
||||
#endif /* __PS2ETYPES_H__ */
|
|
@ -1,158 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __CDVDAPI_H__
|
||||
#define __CDVDAPI_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
/* CDVD plugin API */
|
||||
|
||||
// Basic functions.
|
||||
|
||||
EXPORT_C_(s32)
|
||||
CDVDinit();
|
||||
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);
|
||||
|
||||
// return can be NULL (for async modes)
|
||||
EXPORT_C_(u8 *)
|
||||
CDVDgetBuffer();
|
||||
|
||||
EXPORT_C_(s32)
|
||||
CDVDreadSubQ(u32 lsn, cdvdSubQ *subq); //read subq from disc (only cds have subq data)
|
||||
EXPORT_C_(s32)
|
||||
CDVDgetTN(cdvdTN *Buffer); //disk information
|
||||
EXPORT_C_(s32)
|
||||
CDVDgetTD(u8 Track, cdvdTD *Buffer); //track info: min,sec,frame,type
|
||||
EXPORT_C_(s32)
|
||||
CDVDgetTOC(void *toc); //gets ps2 style toc from disc
|
||||
EXPORT_C_(s32)
|
||||
CDVDgetDiskType(); //CDVD_TYPE_xxxx
|
||||
EXPORT_C_(s32)
|
||||
CDVDgetTrayStatus(); //CDVD_TRAY_xxxx
|
||||
EXPORT_C_(s32)
|
||||
CDVDctrlTrayOpen(); //open disc tray
|
||||
EXPORT_C_(s32)
|
||||
CDVDctrlTrayClose(); //close disc tray
|
||||
|
||||
// Extended functions
|
||||
|
||||
EXPORT_C_(void)
|
||||
CDVDkeyEvent(keyEvent *ev);
|
||||
EXPORT_C_(void)
|
||||
CDVDconfigure();
|
||||
EXPORT_C_(s32)
|
||||
CDVDfreeze(u8 mode, freezeData *data);
|
||||
EXPORT_C_(void)
|
||||
CDVDabout();
|
||||
EXPORT_C_(s32)
|
||||
CDVDtest();
|
||||
EXPORT_C_(void)
|
||||
CDVDnewDiskCB(void (*callback)());
|
||||
|
||||
typedef struct _cdvdSubQ
|
||||
{
|
||||
u8 ctrl : 4; // control and mode bits
|
||||
u8 mode : 4; // control and mode bits
|
||||
u8 trackNum; // current track number (1 to 99)
|
||||
u8 trackIndex; // current index within track (0 to 99)
|
||||
u8 trackM; // current minute location on the disc (BCD encoded)
|
||||
u8 trackS; // current sector location on the disc (BCD encoded)
|
||||
u8 trackF; // current frame location on the disc (BCD encoded)
|
||||
u8 pad; // unused
|
||||
u8 discM; // current minute offset from first track (BCD encoded)
|
||||
u8 discS; // current sector offset from first track (BCD encoded)
|
||||
u8 discF; // current frame offset from first track (BCD encoded)
|
||||
} cdvdSubQ;
|
||||
|
||||
typedef struct _cdvdTD
|
||||
{ // NOT bcd coded
|
||||
u32 lsn;
|
||||
u8 type;
|
||||
} cdvdTD;
|
||||
|
||||
typedef struct _cdvdTN
|
||||
{
|
||||
u8 strack; //number of the first track (usually 1)
|
||||
u8 etrack; //number of the last track
|
||||
} cdvdTN;
|
||||
|
||||
// CDVDreadTrack mode values:
|
||||
enum {
|
||||
CDVD_MODE_2352 0, // full 2352 bytes
|
||||
CDVD_MODE_2340 1, // skip sync (12) bytes
|
||||
CDVD_MODE_2328 2, // skip sync+head+sub (24) bytes
|
||||
CDVD_MODE_2048 3, // skip sync+head+sub (24) bytes
|
||||
CDVD_MODE_2368 4 // full 2352 bytes + 16 subq
|
||||
} TrackModes
|
||||
|
||||
// CDVDgetDiskType returns:
|
||||
enum {
|
||||
CDVD_TYPE_ILLEGAL = 0xff, // Illegal Disc
|
||||
CDVD_TYPE_DVDV = 0xfe, // DVD Video
|
||||
CDVD_TYPE_CDDA = 0xfd, // Audio CD
|
||||
CDVD_TYPE_PS2DVD = 0x14, // PS2 DVD
|
||||
CDVD_TYPE_PS2CDDA = 0x13, // PS2 CD (with audio)
|
||||
CDVD_TYPE_PS2CD = 0x12, // PS2 CD
|
||||
CDVD_TYPE_PSCDDA = 0x11, // PS CD (with audio)
|
||||
CDVD_TYPE_PSCD = 0x10, // PS CD
|
||||
CDVD_TYPE_UNKNOWN = 0x05, // Unknown
|
||||
CDVD_TYPE_DETCTDVDD = 0x04, // Detecting Dvd Dual Sided
|
||||
CDVD_TYPE_DETCTDVDS = 0x03, // Detecting Dvd Single Sided
|
||||
CDVD_TYPE_DETCTCD = 0x02, // Detecting Cd
|
||||
CDVD_TYPE_DETCT = 0x01, // Detecting
|
||||
CDVD_TYPE_NODISC = 0x00 // No Disc
|
||||
} DiskType;
|
||||
|
||||
// CDVDgetTrayStatus returns:
|
||||
enum {
|
||||
CDVD_TRAY_CLOSE = 0x00,
|
||||
CDVD_TRAY_OPEN = 0x01
|
||||
} TrayStatus;
|
||||
|
||||
// cdvdTD.type (track types for cds)
|
||||
enum {
|
||||
CDVD_AUDIO_TRACK = 0x01,
|
||||
CDVD_MODE1_TRACK = 0x41,
|
||||
CDVD_MODE2_TRACK = 0x61
|
||||
} CDVDTDType;
|
||||
|
||||
enum {
|
||||
CDVD_AUDIO_MASK = 0x00,
|
||||
CDVD_DATA_MASK = 0x40
|
||||
// CDROM_DATA_TRACK 0x04 //do not enable this! (from linux kernel)
|
||||
} CDVD_Masks;
|
||||
|
||||
#endif // __CDVDAPI_H__
|
|
@ -1,85 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __DEV9API_H__
|
||||
#define __DEV9API_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
* linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
typedef void (*DEV9callback)(int cycles);
|
||||
typedef int (*DEV9handler)(void);
|
||||
|
||||
// Basic functions.
|
||||
// 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();
|
||||
|
||||
// pDisplay normally is passed a handle to the GS plugins window.
|
||||
EXPORT_C_(s32)
|
||||
DEV9open(void *pDisplay);
|
||||
EXPORT_C_(void)
|
||||
DEV9close();
|
||||
EXPORT_C_(void)
|
||||
DEV9shutdown();
|
||||
EXPORT_C_(u8)
|
||||
DEV9read8(u32 addr);
|
||||
EXPORT_C_(u16)
|
||||
DEV9read16(u32 addr);
|
||||
EXPORT_C_(u32)
|
||||
DEV9read32(u32 addr);
|
||||
EXPORT_C_(void)
|
||||
DEV9write8(u32 addr, u8 value);
|
||||
EXPORT_C_(void)
|
||||
DEV9write16(u32 addr, u16 value);
|
||||
EXPORT_C_(void)
|
||||
DEV9write32(u32 addr, u32 value);
|
||||
EXPORT_C_(void)
|
||||
DEV9readDMA8Mem(u32 *pMem, int size);
|
||||
EXPORT_C_(void)
|
||||
DEV9writeDMA8Mem(u32 *pMem, int size);
|
||||
|
||||
// cycles = IOP cycles before calling callback,
|
||||
// if callback returns 1 the irq is triggered, else not
|
||||
EXPORT_C_(void)
|
||||
DEV9irqCallback(DEV9callback callback);
|
||||
EXPORT_C_(DEV9handler)
|
||||
DEV9irqHandler(void);
|
||||
|
||||
// Extended functions
|
||||
|
||||
EXPORT_C_(void)
|
||||
DEV9keyEvent(keyEvent *ev);
|
||||
EXPORT_C_(s32)
|
||||
DEV9freeze(u8 mode, freezeData *data);
|
||||
EXPORT_C_(void)
|
||||
DEV9configure();
|
||||
EXPORT_C_(s32)
|
||||
DEV9test();
|
||||
|
||||
#endif // __DEV9API_H__
|
|
@ -1,70 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __FWAPI_H__
|
||||
#define __FWAPI_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
/* FW plugin API */
|
||||
|
||||
// Basic functions.
|
||||
|
||||
// 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)
|
||||
FWinit();
|
||||
// pDisplay normally is passed a handle to the GS plugins window.
|
||||
EXPORT_C_(s32)
|
||||
FWopen(void *pDisplay);
|
||||
EXPORT_C_(void)
|
||||
FWclose();
|
||||
EXPORT_C_(void)
|
||||
FWshutdown();
|
||||
EXPORT_C_(u32)
|
||||
FWread32(u32 addr);
|
||||
EXPORT_C_(void)
|
||||
FWwrite32(u32 addr, u32 value);
|
||||
EXPORT_C_(void)
|
||||
FWirqCallback(void (*callback)());
|
||||
|
||||
// Extended functions
|
||||
|
||||
EXPORT_C_(void)
|
||||
FWkeyEvent(keyEvent *ev);
|
||||
EXPORT_C_(s32)
|
||||
FWfreeze(u8 mode, freezeData *data);
|
||||
EXPORT_C_(void)
|
||||
FWconfigure();
|
||||
EXPORT_C_(void)
|
||||
FWabout();
|
||||
EXPORT_C_(s32)
|
||||
FWtest();
|
||||
#endif
|
||||
|
||||
#endif // __USBAPI_H__
|
|
@ -1,116 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GSAPI_H__
|
||||
#define __GSAPI_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
typedef struct _GSdriverInfo
|
||||
{
|
||||
char name[8];
|
||||
void *common;
|
||||
} GSdriverInfo;
|
||||
|
||||
// Basic functions.
|
||||
EXPORT_C_(s32)
|
||||
GSinit();
|
||||
// pDisplay normally is passed a handle to the GS plugins window.
|
||||
EXPORT_C_(s32)
|
||||
GSopen(void *pDisplay, char *Title, bool multithread);
|
||||
EXPORT_C_(void)
|
||||
GSclose();
|
||||
EXPORT_C_(void)
|
||||
GSshutdown();
|
||||
EXPORT_C_(void)
|
||||
GSvsync(int field);
|
||||
EXPORT_C_(void)
|
||||
GSgifTransfer1(u32 *pMem, u32 addr);
|
||||
EXPORT_C_(void)
|
||||
GSgifTransfer2(u32 *pMem, u32 size);
|
||||
EXPORT_C_(void)
|
||||
GSgifTransfer3(u32 *pMem, u32 size);
|
||||
EXPORT_C_(void)
|
||||
GSgetLastTag(u64 *ptag); // returns the last tag processed (64 bits)
|
||||
EXPORT_C_(void)
|
||||
GSgifSoftReset(u32 mask);
|
||||
EXPORT_C_(void)
|
||||
GSreadFIFO(u64 *mem);
|
||||
EXPORT_C_(void)
|
||||
GSreadFIFO2(u64 *mem, int qwc);
|
||||
|
||||
// Extended functions
|
||||
|
||||
// GSkeyEvent gets called when there is a keyEvent from the PAD plugin
|
||||
EXPORT_C_(void)
|
||||
GSkeyEvent(keyEvent *ev);
|
||||
EXPORT_C_(void)
|
||||
GSchangeSaveState(s32 state, const char *filename);
|
||||
EXPORT_C_(void)
|
||||
GSmakeSnapshot(char *path);
|
||||
EXPORT_C_(void)
|
||||
GSmakeSnapshot2(char *pathname, int *snapdone, int savejpg);
|
||||
EXPORT_C_(void)
|
||||
GSirqCallback(void (*callback)());
|
||||
EXPORT_C_(void)
|
||||
CALLBACK GSprintf(s32 timeout, char *fmt, ...);
|
||||
EXPORT_C_(void)
|
||||
GSsetBaseMem(void *);
|
||||
EXPORT_C_(void)
|
||||
GSsetGameCRC(s32 crc, s32 gameoptions);
|
||||
|
||||
// controls frame skipping in the GS, if this routine isn't present, frame skipping won't be done
|
||||
EXPORT_C_(void)
|
||||
GSsetFrameSkip(int frameskip);
|
||||
|
||||
// if start is true, starts recording spu2 data, else stops
|
||||
// returns true if successful
|
||||
// for now, pData is not used
|
||||
EXPORT_C_(bool)
|
||||
GSsetupRecording(bool start);
|
||||
|
||||
EXPORT_C_(void)
|
||||
GSreset();
|
||||
EXPORT_C_(void)
|
||||
GSwriteCSR(u32 value);
|
||||
EXPORT_C_(void)
|
||||
GSgetDriverInfo(GSdriverInfo *info);
|
||||
#ifdef _WIN32
|
||||
EXPORT_C_(s32)
|
||||
CALLBACK GSsetWindowInfo(winInfo *info);
|
||||
#endif
|
||||
EXPORT_C_(s32)
|
||||
GSfreeze(u8 mode, freezeData *data);
|
||||
EXPORT_C_(void)
|
||||
GSconfigure();
|
||||
EXPORT_C_(void)
|
||||
GSabout();
|
||||
EXPORT_C_(s32)
|
||||
GStest();
|
||||
|
||||
#endif // __GSAPI_H__
|
|
@ -1,96 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __PADAPI_H__
|
||||
#define __PADAPI_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
/* PAD plugin API */
|
||||
/* So obsolete that everyone uses it. */
|
||||
|
||||
// Basic functions.
|
||||
EXPORT_C_(s32)
|
||||
PADinit(u32 flags);
|
||||
// pDisplay normally is passed a handle to the GS plugins window.
|
||||
EXPORT_C_(s32)
|
||||
PADopen(void *pDisplay);
|
||||
EXPORT_C_(void)
|
||||
PADclose();
|
||||
EXPORT_C_(void)
|
||||
PADshutdown();
|
||||
// PADkeyEvent is called every vsync (return NULL if no event)
|
||||
EXPORT_C_(keyEvent *)
|
||||
PADkeyEvent();
|
||||
EXPORT_C_(u8)
|
||||
PADstartPoll(u8 pad);
|
||||
EXPORT_C_(u8)
|
||||
PADpoll(u8 value);
|
||||
// returns: 1 if supported pad1
|
||||
// 2 if supported pad2
|
||||
// 3 if both are supported
|
||||
EXPORT_C_(u8)
|
||||
PADquery();
|
||||
|
||||
// call to give a hint to the PAD plugin to query for the keyboard state. A
|
||||
// good plugin will query the OS for keyboard state ONLY in this function.
|
||||
// This function is necessary when multithreading because otherwise
|
||||
// the PAD plugin can get into deadlocks with the thread that really owns
|
||||
// the window (and input). Note that PADupdate can be called from a different
|
||||
// thread than the other functions, so mutex or other multithreading primitives
|
||||
// have to be added to maintain data integrity.
|
||||
EXPORT_C_(void)
|
||||
PADupdate(u8 pad);
|
||||
|
||||
// Extended functions
|
||||
EXPORT_C_(void)
|
||||
PADgsDriverInfo(GSdriverInfo *info);
|
||||
EXPORT_C_(s32)
|
||||
PADfreeze(u8 mode, freezeData *data);
|
||||
|
||||
// Returns 1 if the pad plugin wants a multitap on the specified port.
|
||||
// 0 otherwise.
|
||||
EXPORT_C_(s32)
|
||||
PADqueryMtap(u8 port);
|
||||
|
||||
// Sets the active pad slot for the specified port.
|
||||
// Both numbers are 1-based indices. Should return 0 if there's no
|
||||
// pad on the specified slot. Even if PADqueryMtap(port) returns 0,
|
||||
// should handle this properly for slot != 1, so emulator can allow
|
||||
// Multitap to be enabled/disabled elsewhere.
|
||||
EXPORT_C_(s32)
|
||||
PADsetSlot(u8 port, u8 slot);
|
||||
|
||||
EXPORT_C_(void)
|
||||
PADconfigure();
|
||||
EXPORT_C_(void)
|
||||
PADabout();
|
||||
EXPORT_C_(s32)
|
||||
PADtest();
|
||||
|
||||
#endif // __PADAPI_H__
|
|
@ -1,98 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __SIOAPI_H__
|
||||
#define __SIOAPI_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
/* SIO plugin API */
|
||||
|
||||
// Called by SIO_TYPE_MTAP plugins to change the slot.
|
||||
// Slot is then passed to memcard and pad plugins on SIOstartPoll.
|
||||
// MTAP SIO plugins should ignore slot values on startPoll, as should RMs (probably).
|
||||
|
||||
// Port isn't strictly necessary, but doesn't hurt.
|
||||
typedef int(CALLBACK *SIOchangeSlotCB)(int port, int slot);
|
||||
|
||||
// Basic functions.
|
||||
|
||||
// Types is an or-ed combination of SioTypes to initialize. It'd probably be simplest
|
||||
// just to make each SIO plugin support only one type, for simplicity.
|
||||
// SIOchangeSlotCB should *only* be called by MTAP plugins.
|
||||
EXPORT_C_(s32)
|
||||
SIOinit(int types, SIOchangeSlotCB f);
|
||||
|
||||
// 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.
|
||||
// pDisplay normally is passed a handle to the GS plugins window.
|
||||
EXPORT_C_(s32)
|
||||
SIOopen(void *pDisplay);
|
||||
EXPORT_C_(void)
|
||||
SIOclose();
|
||||
EXPORT_C_(void)
|
||||
SIOshutdown();
|
||||
|
||||
// Returns 0 if device doesn't exist. Means old pad plugins can just say nothing
|
||||
// connected to other slots, and SIOpoll won't be called on those slots, ideally.
|
||||
EXPORT_C_(s32)
|
||||
SIOstartPoll(u8 deviceType, u32 port, u32 slot, u8 *returnValue);
|
||||
|
||||
// Returns 0 on the last output byte.
|
||||
EXPORT_C_(s32)
|
||||
SIOpoll(u8 value, u8 *returnValue);
|
||||
|
||||
// returns: SIO_TYPE_{PAD,MTAP,RM,MC}
|
||||
EXPORT_C_(u32)
|
||||
SIOquery();
|
||||
|
||||
// extended funcs
|
||||
|
||||
EXPORT_C_(void)
|
||||
SIOconfigure();
|
||||
EXPORT_C_(keyEvent *)
|
||||
CALLBACK SIOkeyEvent();
|
||||
|
||||
// Save one type at a time. If a plugin supports all 4 types,
|
||||
// should expect 4 calls. Increases savestate compatibility.
|
||||
EXPORT_C_(s32)
|
||||
SIOfreeze(u8 mode, freezeData *data, int type);
|
||||
EXPORT_C_(void)
|
||||
SIOabout();
|
||||
EXPORT_C_(s32)
|
||||
SIOtest();
|
||||
|
||||
enum {
|
||||
SIO_TYPE_PAD = 0x00000001,
|
||||
SIO_TYPE_MTAP = 0x00000004,
|
||||
SIO_TYPE_RM = 0x00000040,
|
||||
SIO_TYPE_MC = 0x00000100
|
||||
} SioTypes;
|
||||
|
||||
#endif // __SIOAPI_H__
|
|
@ -1,104 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __SPU2API_H__
|
||||
#define __SPU2API_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
EXPORT_C_(s32)
|
||||
SPU2init();
|
||||
// pDisplay normally is passed a handle to the GS plugins window.
|
||||
EXPORT_C_(s32)
|
||||
SPU2open(void *pDisplay);
|
||||
EXPORT_C_(void)
|
||||
SPU2close();
|
||||
EXPORT_C_(void)
|
||||
SPU2shutdown();
|
||||
EXPORT_C_(void)
|
||||
SPU2write(u32 mem, u16 value);
|
||||
EXPORT_C_(u16)
|
||||
SPU2read(u32 mem);
|
||||
|
||||
// The following calls are depreciated.
|
||||
EXPORT_C_(void)
|
||||
SPU2readDMA4Mem(u16 *pMem, u32 size);
|
||||
EXPORT_C_(void)
|
||||
SPU2readDMA7Mem(u16 *pMem, u32 size);
|
||||
EXPORT_C_(void)
|
||||
SPU2writeDMA4Mem(u16 *pMem, u32 size);
|
||||
EXPORT_C_(void)
|
||||
SPU2writeDMA7Mem(u16 *pMem, u32 size);
|
||||
EXPORT_C_(void)
|
||||
SPU2interruptDMA4();
|
||||
EXPORT_C_(void)
|
||||
SPU2interruptDMA7();
|
||||
|
||||
// These calls replace the calls above.
|
||||
EXPORT_C_(void)
|
||||
SPU2readDMAMem(u16 *pMem, u32 size, u8 core);
|
||||
EXPORT_C_(void)
|
||||
SPU2writeDMAMem(u16 *pMem, u32 size, u8 core);
|
||||
EXPORT_C_(void)
|
||||
SPU2interruptDMA(u8 core);
|
||||
|
||||
// all addresses passed by dma will be pointers to the array starting at baseaddr
|
||||
// This function is necessary to successfully save and reload the spu2 state
|
||||
EXPORT_C_(void)
|
||||
SPU2setDMABaseAddr(uptr baseaddr);
|
||||
|
||||
EXPORT_C_(u32)
|
||||
SPU2ReadMemAddr(u8 core);
|
||||
EXPORT_C_(void)
|
||||
SPU2WriteMemAddr(u8 core, u32 value);
|
||||
EXPORT_C_(void)
|
||||
SPU2irqCallback(void (*SPU2callback)(), void (*DMA4callback)(), void (*DMA7callback)());
|
||||
|
||||
// extended funcs
|
||||
|
||||
// if start is true, starts recording spu2 data, else stops
|
||||
// returns true if successful
|
||||
EXPORT_C_(bool)
|
||||
SPU2setupRecording(bool start);
|
||||
|
||||
EXPORT_C_(void)
|
||||
SPU2keyEvent(keyEvent *ev);
|
||||
EXPORT_C_(void)
|
||||
SPU2setClockPtr(u32 *ptr);
|
||||
EXPORT_C_(void)
|
||||
SPU2async(u32 cycles);
|
||||
EXPORT_C_(s32)
|
||||
SPU2freeze(u8 mode, freezeData *data);
|
||||
EXPORT_C_(void)
|
||||
SPU2configure();
|
||||
EXPORT_C_(void)
|
||||
SPU2about();
|
||||
EXPORT_C_(s32)
|
||||
SPU2test();
|
||||
|
||||
#endif
|
|
@ -1,84 +0,0 @@
|
|||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __USBAPI_H__
|
||||
#define __USBAPI_H__
|
||||
|
||||
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
|
||||
|
||||
/*
|
||||
* Based on PS2E Definitions by
|
||||
linuzappz@hotmail.com,
|
||||
* shadowpcsx2@yahoo.gr,
|
||||
* and florinsasu@hotmail.com
|
||||
*/
|
||||
|
||||
#include "Pcsx2Api.h"
|
||||
|
||||
typedef void (*USBcallback)(int cycles);
|
||||
typedef int (*USBhandler)(void);
|
||||
|
||||
// Basic functions.
|
||||
EXPORT_C_(s32)
|
||||
USBinit();
|
||||
// pDisplay normally is passed a handle to the GS plugins window.
|
||||
EXPORT_C_(s32)
|
||||
USBopen(void *pDisplay);
|
||||
EXPORT_C_(void)
|
||||
USBclose();
|
||||
EXPORT_C_(void)
|
||||
USBshutdown();
|
||||
EXPORT_C_(u8)
|
||||
USBread8(u32 addr);
|
||||
EXPORT_C_(u16)
|
||||
USBread16(u32 addr);
|
||||
EXPORT_C_(u32)
|
||||
USBread32(u32 addr);
|
||||
EXPORT_C_(void)
|
||||
USBwrite8(u32 addr, u8 value);
|
||||
EXPORT_C_(void)
|
||||
USBwrite16(u32 addr, u16 value);
|
||||
EXPORT_C_(void)
|
||||
USBwrite32(u32 addr, u32 value);
|
||||
EXPORT_C_(void)
|
||||
USBasync(u32 cycles);
|
||||
|
||||
// cycles = IOP cycles before calling callback,
|
||||
// if callback returns 1 the irq is triggered, else not
|
||||
EXPORT_C_(void)
|
||||
USBirqCallback(USBcallback callback);
|
||||
EXPORT_C_(USBhandler)
|
||||
USBirqHandler(void);
|
||||
EXPORT_C_(void)
|
||||
USBsetRAM(void *mem);
|
||||
|
||||
// Extended functions
|
||||
|
||||
EXPORT_C_(void)
|
||||
USBkeyEvent(keyEvent *ev);
|
||||
EXPORT_C_(s32)
|
||||
USBfreeze(u8 mode, freezeData *data);
|
||||
EXPORT_C_(void)
|
||||
USBconfigure();
|
||||
EXPORT_C_(void)
|
||||
USBabout();
|
||||
EXPORT_C_(s32)
|
||||
USBtest();
|
||||
|
||||
#endif // __USBAPI_H__
|
|
@ -138,11 +138,6 @@ void PADclose()
|
|||
_PADclose();
|
||||
}
|
||||
|
||||
u32 PADquery()
|
||||
{
|
||||
return 3; // both
|
||||
}
|
||||
|
||||
s32 PADsetSlot(u8 port, u8 slot)
|
||||
{
|
||||
port--;
|
||||
|
|
|
@ -136,7 +136,6 @@ void PADshutdown();
|
|||
s32 PADopen(void* pDsp);
|
||||
void PADsetLogDir(const char* dir);
|
||||
void PADclose();
|
||||
u32 PADquery();
|
||||
s32 PADsetSlot(u8 port, u8 slot);
|
||||
s32 PADfreeze(int mode, freezeData* data);
|
||||
u8 PADstartPoll(int pad);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "VKey.h"
|
||||
#include "DirectInput.h"
|
||||
#include "DeviceEnumerator.h"
|
||||
#include "PS2Etypes.h"
|
||||
#include "Pcsx2Defs.h"
|
||||
|
||||
// All for getting GUIDs of XInput devices....
|
||||
#include <wbemidl.h>
|
||||
|
|
|
@ -1507,14 +1507,6 @@ u8 PADpoll(u8 value)
|
|||
}
|
||||
}
|
||||
|
||||
// returns: 1 if supports pad1
|
||||
// 2 if supports pad2
|
||||
// 3 if both are supported
|
||||
u32 PADquery()
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
keyEvent* PADkeyEvent()
|
||||
{
|
||||
// If running both pads, ignore every other call. So if two keys pressed in same interval...
|
||||
|
@ -1671,34 +1663,6 @@ s32 PADfreeze(int mode, freezeData* data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
u32 PADreadPort1(PadDataS* pads)
|
||||
{
|
||||
PADstartPoll(1);
|
||||
PADpoll(0x42);
|
||||
memcpy(pads, query.response + 1, 7);
|
||||
pads->controllerType = pads[0].controllerType >> 4;
|
||||
memset(pads + 7, 0, sizeof(PadDataS) - 7);
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 PADreadPort2(PadDataS* pads)
|
||||
{
|
||||
PADstartPoll(2);
|
||||
PADpoll(0x42);
|
||||
memcpy(pads, query.response + 1, 7);
|
||||
pads->controllerType = pads->controllerType >> 4;
|
||||
memset(pads + 7, 0, sizeof(PadDataS) - 7);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 PADqueryMtap(u8 port)
|
||||
{
|
||||
port--;
|
||||
if (port > 1)
|
||||
return 0;
|
||||
return config.multitap[port];
|
||||
}
|
||||
|
||||
s32 PADsetSlot(u8 port, u8 slot)
|
||||
{
|
||||
port--;
|
||||
|
|
|
@ -51,14 +51,10 @@ s32 PADopen(void* pDsp);
|
|||
void PADclose();
|
||||
u8 PADstartPoll(int pad);
|
||||
u8 PADpoll(u8 value);
|
||||
u32 PADquery();
|
||||
keyEvent* PADkeyEvent();
|
||||
u32 PADreadPort1(PadDataS* pads);
|
||||
u32 PADreadPort2(PadDataS* pads);
|
||||
void PADconfigure();
|
||||
s32 PADfreeze(int mode, freezeData* data);
|
||||
s32 PADsetSlot(u8 port, u8 slot);
|
||||
s32 PADqueryMtap(u8 port);
|
||||
void PADsetSettingsDir(const char* dir);
|
||||
void PADDoFreezeOut(void* dest);
|
||||
void PADDoFreezeIn(pxInputStream& infp);
|
|
@ -98,7 +98,6 @@ void ClearMcdEjectTimeoutNow()
|
|||
static bool IsMtapPresent( uint port )
|
||||
{
|
||||
return EmuConfig.MultitapEnabled( port );
|
||||
//return (0 != PADqueryMtap(port+1));
|
||||
}
|
||||
|
||||
void sioInit()
|
||||
|
|
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
#endif
|
||||
#define GSdefs
|
||||
#include "PS2Edefs.h"
|
||||
#include "PS2Etypes.h"
|
||||
#include "Pcsx2Defs.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue