2009-03-13 07:25:00 +00:00
|
|
|
/* 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
|
|
|
|
*/
|
2009-03-15 03:18:31 +00:00
|
|
|
|
|
|
|
|
2009-03-13 07:25:00 +00:00
|
|
|
#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
|
|
|
|
*/
|
2009-03-15 03:18:31 +00:00
|
|
|
|
2009-03-13 07:25:00 +00:00
|
|
|
#include "Pcsx2Api.h"
|
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
typedef struct _GSdriverInfo
|
|
|
|
{
|
|
|
|
char name[8];
|
|
|
|
void *common;
|
2009-03-13 07:25:00 +00:00
|
|
|
} GSdriverInfo;
|
|
|
|
|
|
|
|
// Basic functions.
|
2016-11-12 15:28:37 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
GSinit();
|
2009-03-14 02:39:40 +00:00
|
|
|
// pDisplay normally is passed a handle to the GS plugins window.
|
2016-11-12 15:28:37 +00:00
|
|
|
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);
|
2009-03-13 07:25:00 +00:00
|
|
|
|
|
|
|
// Extended functions
|
|
|
|
|
|
|
|
// GSkeyEvent gets called when there is a keyEvent from the PAD plugin
|
2016-11-12 15:28:37 +00:00
|
|
|
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);
|
2009-03-13 07:25:00 +00:00
|
|
|
|
|
|
|
// controls frame skipping in the GS, if this routine isn't present, frame skipping won't be done
|
2016-11-12 15:28:37 +00:00
|
|
|
EXPORT_C_(void)
|
|
|
|
GSsetFrameSkip(int frameskip);
|
2009-03-13 07:25:00 +00:00
|
|
|
|
|
|
|
// if start is true, starts recording spu2 data, else stops
|
|
|
|
// returns true if successful
|
|
|
|
// for now, pData is not used
|
2016-11-12 15:28:37 +00:00
|
|
|
EXPORT_C_(bool)
|
|
|
|
GSsetupRecording(bool start);
|
2009-03-13 07:25:00 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
EXPORT_C_(void)
|
|
|
|
GSreset();
|
|
|
|
EXPORT_C_(void)
|
|
|
|
GSwriteCSR(u32 value);
|
|
|
|
EXPORT_C_(void)
|
|
|
|
GSgetDriverInfo(GSdriverInfo *info);
|
2009-03-13 07:25:00 +00:00
|
|
|
#ifdef _WIN32
|
2016-11-12 15:28:37 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CALLBACK GSsetWindowInfo(winInfo *info);
|
2009-03-13 07:25:00 +00:00
|
|
|
#endif
|
2016-11-12 15:28:37 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
GSfreeze(u8 mode, freezeData *data);
|
|
|
|
EXPORT_C_(void)
|
|
|
|
GSconfigure();
|
|
|
|
EXPORT_C_(void)
|
|
|
|
GSabout();
|
|
|
|
EXPORT_C_(s32)
|
|
|
|
GStest();
|
2009-03-13 07:25:00 +00:00
|
|
|
|
|
|
|
#endif // __GSAPI_H__
|