git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@34859 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
parent
d9a03cd925
commit
86b69df9d5
|
@ -4,6 +4,14 @@ November 2, 2009 Wei Mingzhi <weimingzhi@gmail.com>
|
|||
building existing dfxvideo sources for Mac OS X. (NOT bug-free yet!!!)
|
||||
* dfxvideo/gpu.c: Made necessary changes for Mac OS X build.
|
||||
* dfxvideo/externals.h: Likewise.
|
||||
* macosx/plugins/HIDInput/HIDInput.xcodeproj/project.pbxproj: Use
|
||||
psemu_plugin_defs.h from libpcsxcore.
|
||||
* macosx/plugins/HIDInput/src/PlugPAD.c: Likewise.
|
||||
* macosx/plugins/CDDeviceInterface/CDDeviceInterfacePlugin.xcodeproj/
|
||||
project.pbxproj: Likewise.
|
||||
* macosx/plugins/CDDeviceInterface/src/PlugCD.c: Likewise.
|
||||
* macosx/plugins/HIDInput/src/PSEmu_Plugin_Defs.h: Removed.
|
||||
* macosx/plugins/CDDeviceInterface/src/PSEmu_Plugin_Defs.h: Removed.
|
||||
|
||||
November 1, 2009 Wei Mingzhi <weimingzhi@gmail.com>
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
2BC4897906DF966200274548 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BC4897706DF966200274548 /* CoreServices.framework */; };
|
||||
2BD707140555995400CB5D9B /* PlugCD.c in Sources */ = {isa = PBXBuildFile; fileRef = 2BD707110555995400CB5D9B /* PlugCD.c */; };
|
||||
2BD707150555995400CB5D9B /* PlugCD.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BD707120555995400CB5D9B /* PlugCD.h */; };
|
||||
2BD707160555995400CB5D9B /* PSEmu_Plugin_Defs.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BD707130555995400CB5D9B /* PSEmu_Plugin_Defs.h */; };
|
||||
2BD707180555997500CB5D9B /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BD707170555997500CB5D9B /* IOKit.framework */; };
|
||||
8D576314048677EA00EA77CD /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AA1909FFE8422F4C02AAC07 /* CoreFoundation.framework */; };
|
||||
8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; };
|
||||
|
@ -24,7 +23,6 @@
|
|||
2BC4897706DF966200274548 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
|
||||
2BD707110555995400CB5D9B /* PlugCD.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = PlugCD.c; path = src/PlugCD.c; sourceTree = SOURCE_ROOT; };
|
||||
2BD707120555995400CB5D9B /* PlugCD.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PlugCD.h; path = src/PlugCD.h; sourceTree = SOURCE_ROOT; };
|
||||
2BD707130555995400CB5D9B /* PSEmu_Plugin_Defs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PSEmu_Plugin_Defs.h; path = src/PSEmu_Plugin_Defs.h; sourceTree = SOURCE_ROOT; };
|
||||
2BD707170555997500CB5D9B /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
|
||||
8D576316048677EA00EA77CD /* CDDeviceInterface.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDDeviceInterface.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
8D576317048677EA00EA77CD /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
|
@ -81,7 +79,6 @@
|
|||
children = (
|
||||
2BD707110555995400CB5D9B /* PlugCD.c */,
|
||||
2BD707120555995400CB5D9B /* PlugCD.h */,
|
||||
2BD707130555995400CB5D9B /* PSEmu_Plugin_Defs.h */,
|
||||
2BC488C406DF90FF00274548 /* CoreAudioUtils */,
|
||||
);
|
||||
name = Source;
|
||||
|
@ -111,7 +108,6 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2BD707150555995400CB5D9B /* PlugCD.h in Headers */,
|
||||
2BD707160555995400CB5D9B /* PSEmu_Plugin_Defs.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -261,6 +257,7 @@
|
|||
buildSettings = {
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
HEADER_SEARCH_PATHS = ../../../libpcsxcore;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
};
|
||||
name = Development;
|
||||
|
@ -269,6 +266,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_MODEL_TUNING = "";
|
||||
HEADER_SEARCH_PATHS = ../../../libpcsxcore;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
|
|
|
@ -1,313 +0,0 @@
|
|||
/*
|
||||
PSEmu Plugin Developer Kit Header definition
|
||||
|
||||
(C)1998 Vision Thing
|
||||
|
||||
This file can be used only to develop PSEmu Plugins
|
||||
Other usage is highly prohibited.
|
||||
*/
|
||||
|
||||
|
||||
// IMPORTANT!!!
|
||||
|
||||
// if you want to add return codes (any errors or warnings) just drop mail to
|
||||
// plugin@psemu.com
|
||||
|
||||
#ifndef _PSEMU_PLUGIN_DEFS_H
|
||||
#define _PSEMU_PLUGIN_DEFS_H
|
||||
|
||||
|
||||
// header version
|
||||
#define _PPDK_HEADER_VERSION 3
|
||||
|
||||
#define PLUGIN_VERSION 1
|
||||
|
||||
// plugin type returned by PSEgetLibType (types can be merged if plugin is multi type!)
|
||||
#define PSE_LT_CDR 1
|
||||
#define PSE_LT_GPU 2
|
||||
#define PSE_LT_SPU 4
|
||||
#define PSE_LT_PAD 8
|
||||
#define PSE_LT_NET 16
|
||||
|
||||
|
||||
// every function in DLL if completed sucessfully should return this value
|
||||
#define PSE_ERR_SUCCESS 0
|
||||
|
||||
// undefined error but fatal one, that kills all functionality
|
||||
#define PSE_ERR_FATAL -1
|
||||
|
||||
|
||||
|
||||
// XXX_Init return values
|
||||
// Those return values apply to all libraries
|
||||
// currently obsolete - preserved for compatibilty
|
||||
|
||||
|
||||
// initialization went OK
|
||||
#define PSE_INIT_ERR_SUCCESS 0
|
||||
|
||||
// this driver is not configured
|
||||
#define PSE_INIT_ERR_NOTCONFIGURED -2
|
||||
|
||||
// this driver can not operate properly on this hardware or hardware is not detected
|
||||
#define PSE_INIT_ERR_NOHARDWARE -3
|
||||
|
||||
|
||||
|
||||
/* GPU PlugIn */
|
||||
|
||||
|
||||
// GPU_Test return values
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_GPU_ERR_SUCCESS 0
|
||||
|
||||
// ERRORS
|
||||
// this error might be returned as critical error but none of below
|
||||
#define PSE_GPU_ERR -20
|
||||
|
||||
|
||||
// this driver is not configured
|
||||
#define PSE_GPU_ERR_NOTCONFIGURED PSE_GPU_ERR - 1
|
||||
// this driver failed Init
|
||||
#define PSE_GPU_ERR_INIT PSE_GPU_ERR - 2
|
||||
|
||||
// WARNINGS
|
||||
// this warning might be returned as undefined warning but allowing driver to continue
|
||||
#define PSE_GPU_WARN 20
|
||||
|
||||
|
||||
|
||||
|
||||
// GPU_Query - will be implemented soon
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long status;
|
||||
HWND window;
|
||||
unsigned char reserved[100];
|
||||
} gpuQueryS;
|
||||
|
||||
// gpuQueryS.flags
|
||||
// if driver can operate in both modes it must support GPU_changeMode();
|
||||
// this driver can operate in fullscreen mode
|
||||
#define PSE_GPU_FLAGS_FULLSCREEN 1
|
||||
// this driver can operate in windowed mode
|
||||
#define PSE_GPU_FLAGS_WINDOWED 2
|
||||
|
||||
|
||||
// gpuQueryS.status
|
||||
// this driver cannot operate in this windowed mode
|
||||
#define PSE_GPU_STATUS_WINDOWWRONG 1
|
||||
|
||||
// GPU_Query End - will be implemented in v2
|
||||
|
||||
|
||||
|
||||
|
||||
/* CDR PlugIn */
|
||||
|
||||
// CDR_Test return values
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_CDR_ERR_SUCCESS 0
|
||||
|
||||
// general failure (error undefined)
|
||||
#define PSE_CDR_ERR_FAILURE -1
|
||||
|
||||
// ERRORS
|
||||
#define PSE_CDR_ERR -40
|
||||
// this driver is not configured
|
||||
#define PSE_CDR_ERR_NOTCONFIGURED PSE_CDR_ERR - 0
|
||||
// if this driver is unable to read data from medium
|
||||
#define PSE_CDR_ERR_NOREAD PSE_CDR_ERR - 1
|
||||
|
||||
// WARNINGS
|
||||
#define PSE_CDR_WARN 40
|
||||
// if this driver emulates lame mode ie. can read only 2048 tracks and sector header is emulated
|
||||
// this might happen to CDROMS that do not support RAW mode reading - surelly it will kill many games
|
||||
#define PSE_CDR_WARN_LAMECD PSE_CDR_WARN + 0
|
||||
|
||||
|
||||
|
||||
|
||||
/* SPU PlugIn */
|
||||
|
||||
// some info retricted (now!)
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_SPU_ERR_SUCCESS 0
|
||||
|
||||
// ERRORS
|
||||
// this error might be returned as critical error but none of below
|
||||
#define PSE_SPU_ERR -60
|
||||
|
||||
// this driver is not configured
|
||||
#define PSE_SPU_ERR_NOTCONFIGURED PSE_SPU_ERR - 1
|
||||
// this driver failed Init
|
||||
#define PSE_SPU_ERR_INIT PSE_SPU_ERR - 2
|
||||
|
||||
|
||||
// WARNINGS
|
||||
// this warning might be returned as undefined warning but allowing driver to continue
|
||||
#define PSE_SPU_WARN 60
|
||||
|
||||
|
||||
|
||||
|
||||
/* PAD PlugIn */
|
||||
|
||||
/*
|
||||
|
||||
functions that must be exported from PAD Plugin
|
||||
|
||||
long PADinit(long flags); // called only once when PSEmu Starts
|
||||
void PADshutdown(void); // called when PSEmu exits
|
||||
long PADopen(PadInitS *); // called when PSEmu is running program
|
||||
long PADclose(void);
|
||||
long PADconfigure(void);
|
||||
void PADabout(void);
|
||||
long PADtest(void); // called from Configure Dialog and after PADopen();
|
||||
long PADquery(void);
|
||||
|
||||
long PADreadPort1(PadDataS *);
|
||||
long PADreadPort2(PadDataS *);
|
||||
|
||||
*/
|
||||
|
||||
// PADquery responses (notice - values ORed)
|
||||
// PSEmu will use them also in PADinit to tell Plugin which Ports will use
|
||||
// notice that PSEmu will call PADinit and PADopen only once when they are from
|
||||
// same plugin
|
||||
|
||||
// might be used in port 1 (must support PADreadPort1() function)
|
||||
#define PSE_PAD_USE_PORT1 1
|
||||
// might be used in port 2 (must support PADreadPort2() function)
|
||||
#define PSE_PAD_USE_PORT2 2
|
||||
|
||||
|
||||
|
||||
// MOUSE SCPH-1030
|
||||
#define PSE_PAD_TYPE_MOUSE 1
|
||||
// NEGCON - 16 button analog controller SLPH-00001
|
||||
#define PSE_PAD_TYPE_NEGCON 2
|
||||
// GUN CONTROLLER - gun controller SLPH-00014 from Konami
|
||||
#define PSE_PAD_TYPE_GUN 3
|
||||
// STANDARD PAD SCPH-1080, SCPH-1150
|
||||
#define PSE_PAD_TYPE_STANDARD 4
|
||||
// ANALOG JOYSTICK SCPH-1110
|
||||
#define PSE_PAD_TYPE_ANALOGJOY 5
|
||||
// GUNCON - gun controller SLPH-00034 from Namco
|
||||
#define PSE_PAD_TYPE_GUNCON 6
|
||||
// ANALOG CONTROLLER SCPH-1150
|
||||
#define PSE_PAD_TYPE_ANALOGPAD 7
|
||||
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_PAD_ERR_SUCCESS 0
|
||||
// general plugin failure (undefined error)
|
||||
#define PSE_PAD_ERR_FAILURE -1
|
||||
|
||||
|
||||
// ERRORS
|
||||
// this error might be returned as critical error but none of below
|
||||
#define PSE_PAD_ERR -80
|
||||
// this driver is not configured
|
||||
#define PSE_PAD_ERR_NOTCONFIGURED PSE_PAD_ERR - 1
|
||||
// this driver failed Init
|
||||
#define PSE_PAD_ERR_INIT PSE_PAD_ERR - 2
|
||||
|
||||
|
||||
// WARNINGS
|
||||
// this warning might be returned as undefined warning but allowing driver to continue
|
||||
#define PSE_PAD_WARN 80
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// controler type - fill it withe predefined values above
|
||||
unsigned char controllerType;
|
||||
|
||||
// status of buttons - every controller fills this field
|
||||
unsigned short buttonStatus;
|
||||
|
||||
// for analog pad fill those next 4 bytes
|
||||
// values are analog in range 0-255 where 128 is center position
|
||||
unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY;
|
||||
|
||||
// for mouse fill those next 2 bytes
|
||||
// values are in range -128 - 127
|
||||
unsigned char moveX, moveY;
|
||||
|
||||
unsigned char reserved[91];
|
||||
|
||||
} PadDataS;
|
||||
|
||||
/* NET PlugIn v2 */
|
||||
/* Added by linuzappz@pcsx.net */
|
||||
|
||||
/* Modes bits for NETsendData/NETrecvData */
|
||||
#define PSE_NET_BLOCKING 0x00000000
|
||||
#define PSE_NET_NONBLOCKING 0x00000001
|
||||
|
||||
/*
|
||||
typedef struct {
|
||||
char EmuName[32];
|
||||
char CdromID[32];
|
||||
char CdromLabel[32];
|
||||
void *psxMem;
|
||||
GPUshowScreenPic PAD_showScreenPic;
|
||||
GPUdisplayText PAD_displayText;
|
||||
PADsetSensitive PAD_setSensitive;
|
||||
void unused[1024];
|
||||
} netInfo;
|
||||
*/
|
||||
|
||||
/*
|
||||
basic funcs:
|
||||
|
||||
long NETopen(HWND hWnd)
|
||||
opens the connection.
|
||||
shall return 0 on success, else -1.
|
||||
-1 is also returned if the user selects offline mode.
|
||||
|
||||
long NETclose()
|
||||
closes the connection.
|
||||
shall return 0 on success, else -1.
|
||||
|
||||
void NETpause()
|
||||
this is called when the user paused the emulator.
|
||||
|
||||
void NETresume()
|
||||
this is called when the user resumed the emulator.
|
||||
|
||||
long NETqueryPlayer()
|
||||
returns player number
|
||||
|
||||
long NETsendPadData(void *pData, int Size)
|
||||
this should be called for the first pad only on each side.
|
||||
|
||||
long NETrecvPadData(void *pData, int Pad)
|
||||
call this for Pad 1/2 to get the data sent by the above func.
|
||||
|
||||
extended funcs:
|
||||
|
||||
long NETsendData(void *pData, int Size, int Mode)
|
||||
sends Size bytes from pData to the other side.
|
||||
|
||||
long NETrecvData(void *pData, int Size, int Mode)
|
||||
receives Size bytes from pData to the other side.
|
||||
|
||||
void NETsetInfo(netInfo *info);
|
||||
sets the netInfo struct.
|
||||
|
||||
void NETvsync()
|
||||
called every vsync (before GPUupdateLace).
|
||||
|
||||
void NETkeypressed(int key)
|
||||
key is on win32 a VK_?? keycode, and over linux a XK_?? (X11) keycode.
|
||||
*/
|
||||
|
||||
|
||||
#endif // _PSEMU_PLUGIN_DEFS_H
|
|
@ -44,7 +44,7 @@ long CDRclose(void);
|
|||
|
||||
/////////////////////////////////////////////////////////
|
||||
typedef void* HWND;
|
||||
#include "PSEmu_Plugin_Defs.h"
|
||||
#include "psemu_plugin_defs.h"
|
||||
|
||||
const char *LibName = "CD-ROM Device Interface";
|
||||
const int version = 0;
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
2B6796E50691938800E2BD4F /* PadView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PadView.m; path = src/PadView.m; sourceTree = "<group>"; };
|
||||
2B6796E60691938800E2BD4F /* PlugPAD.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = PlugPAD.c; path = src/PlugPAD.c; sourceTree = "<group>"; };
|
||||
2B6796E70691938800E2BD4F /* PlugPAD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlugPAD.h; path = src/PlugPAD.h; sourceTree = "<group>"; };
|
||||
2B6796E80691938800E2BD4F /* PSEmu_Plugin_Defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PSEmu_Plugin_Defs.h; path = src/PSEmu_Plugin_Defs.h; sourceTree = "<group>"; };
|
||||
2B679860069193F300E2BD4F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
||||
2B679861069193F300E2BD4F /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
|
||||
2B679C9F06919D6800E2BD4F /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/NetPcsxHIDInputPluginMain.nib; sourceTree = "<group>"; };
|
||||
|
@ -132,7 +131,6 @@
|
|||
2B6796E30691938800E2BD4F /* PadController.m */,
|
||||
2B6796E40691938800E2BD4F /* PadView.h */,
|
||||
2B6796E50691938800E2BD4F /* PadView.m */,
|
||||
2B6796E80691938800E2BD4F /* PSEmu_Plugin_Defs.h */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
|
@ -349,6 +347,7 @@
|
|||
buildSettings = {
|
||||
GCC_MODEL_TUNING = "";
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
HEADER_SEARCH_PATHS = ../../../libpcsxcore;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
};
|
||||
name = Development;
|
||||
|
@ -357,6 +356,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
HEADER_SEARCH_PATHS = ../../../libpcsxcore;
|
||||
};
|
||||
name = Deployment;
|
||||
};
|
||||
|
|
|
@ -1,318 +0,0 @@
|
|||
/*
|
||||
PSEmu Plugin Developer Kit Header definition
|
||||
|
||||
(C)1998 Vision Thing
|
||||
|
||||
This file can be used only to develop PSEmu Plugins
|
||||
Other usage is highly prohibited.
|
||||
*/
|
||||
|
||||
|
||||
// IMPORTANT!!!
|
||||
|
||||
// if you want to add return codes (any errors or warnings) just drop mail to
|
||||
// plugin@psemu.com
|
||||
|
||||
#ifndef _PSEMU_PLUGIN_DEFS_H
|
||||
#define _PSEMU_PLUGIN_DEFS_H
|
||||
|
||||
|
||||
// header version
|
||||
#define _PPDK_HEADER_VERSION 3
|
||||
|
||||
#define PLUGIN_VERSION 1
|
||||
|
||||
// plugin type returned by PSEgetLibType (types can be merged if plugin is multi type!)
|
||||
#define PSE_LT_CDR 1
|
||||
#define PSE_LT_GPU 2
|
||||
#define PSE_LT_SPU 4
|
||||
#define PSE_LT_PAD 8
|
||||
#define PSE_LT_NET 16
|
||||
|
||||
|
||||
// every function in DLL if completed sucessfully should return this value
|
||||
#define PSE_ERR_SUCCESS 0
|
||||
|
||||
// undefined error but fatal one, that kills all functionality
|
||||
#define PSE_ERR_FATAL -1
|
||||
|
||||
|
||||
|
||||
// XXX_Init return values
|
||||
// Those return values apply to all libraries
|
||||
// currently obsolete - preserved for compatibilty
|
||||
|
||||
|
||||
// initialization went OK
|
||||
#define PSE_INIT_ERR_SUCCESS 0
|
||||
|
||||
// this driver is not configured
|
||||
#define PSE_INIT_ERR_NOTCONFIGURED -2
|
||||
|
||||
// this driver can not operate properly on this hardware or hardware is not detected
|
||||
#define PSE_INIT_ERR_NOHARDWARE -3
|
||||
|
||||
|
||||
|
||||
/* GPU PlugIn */
|
||||
|
||||
|
||||
// GPU_Test return values
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_GPU_ERR_SUCCESS 0
|
||||
|
||||
// ERRORS
|
||||
// this error might be returned as critical error but none of below
|
||||
#define PSE_GPU_ERR -20
|
||||
|
||||
|
||||
// this driver is not configured
|
||||
#define PSE_GPU_ERR_NOTCONFIGURED PSE_GPU_ERR - 1
|
||||
// this driver failed Init
|
||||
#define PSE_GPU_ERR_INIT PSE_GPU_ERR - 2
|
||||
|
||||
// WARNINGS
|
||||
// this warning might be returned as undefined warning but allowing driver to continue
|
||||
#define PSE_GPU_WARN 20
|
||||
|
||||
|
||||
|
||||
|
||||
// GPU_Query - will be implemented soon
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long status;
|
||||
HWND window;
|
||||
unsigned char reserved[100];
|
||||
} gpuQueryS;
|
||||
|
||||
// gpuQueryS.flags
|
||||
// if driver can operate in both modes it must support GPU_changeMode();
|
||||
// this driver can operate in fullscreen mode
|
||||
#define PSE_GPU_FLAGS_FULLSCREEN 1
|
||||
// this driver can operate in windowed mode
|
||||
#define PSE_GPU_FLAGS_WINDOWED 2
|
||||
|
||||
|
||||
// gpuQueryS.status
|
||||
// this driver cannot operate in this windowed mode
|
||||
#define PSE_GPU_STATUS_WINDOWWRONG 1
|
||||
|
||||
// GPU_Query End - will be implemented in v2
|
||||
|
||||
|
||||
|
||||
|
||||
/* CDR PlugIn */
|
||||
|
||||
// CDR_Test return values
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_CDR_ERR_SUCCESS 0
|
||||
|
||||
// general failure (error undefined)
|
||||
#define PSE_CDR_ERR_FAILURE -1
|
||||
|
||||
// ERRORS
|
||||
#define PSE_CDR_ERR -40
|
||||
// this driver is not configured
|
||||
#define PSE_CDR_ERR_NOTCONFIGURED PSE_CDR_ERR - 0
|
||||
// if this driver is unable to read data from medium
|
||||
#define PSE_CDR_ERR_NOREAD PSE_CDR_ERR - 1
|
||||
|
||||
// WARNINGS
|
||||
#define PSE_CDR_WARN 40
|
||||
// if this driver emulates lame mode ie. can read only 2048 tracks and sector header is emulated
|
||||
// this might happen to CDROMS that do not support RAW mode reading - surelly it will kill many games
|
||||
#define PSE_CDR_WARN_LAMECD PSE_CDR_WARN + 0
|
||||
|
||||
|
||||
|
||||
|
||||
/* SPU PlugIn */
|
||||
|
||||
// some info retricted (now!)
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_SPU_ERR_SUCCESS 0
|
||||
|
||||
// ERRORS
|
||||
// this error might be returned as critical error but none of below
|
||||
#define PSE_SPU_ERR -60
|
||||
|
||||
// this driver is not configured
|
||||
#define PSE_SPU_ERR_NOTCONFIGURED PSE_SPU_ERR - 1
|
||||
// this driver failed Init
|
||||
#define PSE_SPU_ERR_INIT PSE_SPU_ERR - 2
|
||||
|
||||
|
||||
// WARNINGS
|
||||
// this warning might be returned as undefined warning but allowing driver to continue
|
||||
#define PSE_SPU_WARN 60
|
||||
|
||||
|
||||
|
||||
|
||||
/* PAD PlugIn */
|
||||
|
||||
/*
|
||||
|
||||
functions that must be exported from PAD Plugin
|
||||
|
||||
long PADinit(long flags); // called only once when PSEmu Starts
|
||||
void PADshutdown(void); // called when PSEmu exits
|
||||
long PADopen(PadInitS *); // called when PSEmu is running program
|
||||
long PADclose(void);
|
||||
long PADconfigure(void);
|
||||
void PADabout(void);
|
||||
long PADtest(void); // called from Configure Dialog and after PADopen();
|
||||
long PADquery(void);
|
||||
|
||||
long PADreadPort1(PadDataS *);
|
||||
long PADreadPort2(PadDataS *);
|
||||
|
||||
*/
|
||||
|
||||
// PADquery responses (notice - values ORed)
|
||||
// PSEmu will use them also in PADinit to tell Plugin which Ports will use
|
||||
// notice that PSEmu will call PADinit and PADopen only once when they are from
|
||||
// same plugin
|
||||
|
||||
// might be used in port 1 (must support PADreadPort1() function)
|
||||
#define PSE_PAD_USE_PORT1 1
|
||||
// might be used in port 2 (must support PADreadPort2() function)
|
||||
#define PSE_PAD_USE_PORT2 2
|
||||
|
||||
|
||||
|
||||
// MOUSE SCPH-1030
|
||||
#define PSE_PAD_TYPE_MOUSE 1
|
||||
// NEGCON - 16 button analog controller SLPH-00001
|
||||
#define PSE_PAD_TYPE_NEGCON 2
|
||||
// GUN CONTROLLER - gun controller SLPH-00014 from Konami
|
||||
#define PSE_PAD_TYPE_GUN 3
|
||||
// STANDARD PAD SCPH-1080, SCPH-1150
|
||||
#define PSE_PAD_TYPE_STANDARD 4
|
||||
// ANALOG JOYSTICK SCPH-1110
|
||||
#define PSE_PAD_TYPE_ANALOGJOY 5
|
||||
// GUNCON - gun controller SLPH-00034 from Namco
|
||||
#define PSE_PAD_TYPE_GUNCON 6
|
||||
// ANALOG CONTROLLER SCPH-1150
|
||||
#define PSE_PAD_TYPE_ANALOGPAD 7
|
||||
|
||||
|
||||
// sucess, everything configured, and went OK.
|
||||
#define PSE_PAD_ERR_SUCCESS 0
|
||||
// general plugin failure (undefined error)
|
||||
#define PSE_PAD_ERR_FAILURE -1
|
||||
|
||||
|
||||
// ERRORS
|
||||
// this error might be returned as critical error but none of below
|
||||
#define PSE_PAD_ERR -80
|
||||
// this driver is not configured
|
||||
#define PSE_PAD_ERR_NOTCONFIGURED PSE_PAD_ERR - 1
|
||||
// this driver failed Init
|
||||
#define PSE_PAD_ERR_INIT PSE_PAD_ERR - 2
|
||||
|
||||
|
||||
// WARNINGS
|
||||
// this warning might be returned as undefined warning but allowing driver to continue
|
||||
#define PSE_PAD_WARN 80
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// controler type - fill it withe predefined values above
|
||||
unsigned char controllerType;
|
||||
|
||||
// status of buttons - every controller fills this field
|
||||
unsigned short buttonStatus;
|
||||
|
||||
// for analog pad fill those next 4 bytes
|
||||
// values are analog in range 0-255 where 128 is center position
|
||||
unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY;
|
||||
|
||||
// for mouse fill those next 2 bytes
|
||||
// values are in range -128 - 127
|
||||
unsigned char moveX, moveY;
|
||||
|
||||
unsigned char reserved[91];
|
||||
|
||||
} PadDataS;
|
||||
|
||||
/* NET PlugIn v2 */
|
||||
/* Added by linuzappz@pcsx.net */
|
||||
|
||||
/* Modes bits for NETsendData/NETrecvData */
|
||||
#define PSE_NET_BLOCKING 0x00000000
|
||||
#define PSE_NET_NONBLOCKING 0x00000001
|
||||
|
||||
/* note: unsupported fields should be zeroed.
|
||||
|
||||
typedef struct {
|
||||
char EmuName[32];
|
||||
char CdromID[9]; // ie. 'SCPH12345', no \0 trailing character
|
||||
char CdromLabel[11];
|
||||
void *psxMem;
|
||||
GPUshowScreenPic GPU_showScreenPic;
|
||||
GPUdisplayText GPU_displayText;
|
||||
PADsetSensitive PAD_setSensitive;
|
||||
char GPUpath[256];
|
||||
char SPUpath[256];
|
||||
char CDRpath[256];
|
||||
char MCD1path[256];
|
||||
char MCD2path[256];
|
||||
char BIOSpath[256]; // 'HLE' for internal bios
|
||||
char Unused[1024];
|
||||
} netInfo;
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
basic funcs:
|
||||
|
||||
long NETopen(HWND hWnd)
|
||||
opens the connection.
|
||||
shall return 0 on success, else -1.
|
||||
-1 is also returned if the user selects offline mode.
|
||||
|
||||
long NETclose()
|
||||
closes the connection.
|
||||
shall return 0 on success, else -1.
|
||||
|
||||
void NETpause()
|
||||
this is called when the user paused the emulator.
|
||||
|
||||
void NETresume()
|
||||
this is called when the user resumed the emulator.
|
||||
|
||||
long NETqueryPlayer()
|
||||
returns player number
|
||||
|
||||
long NETsendPadData(void *pData, int Size)
|
||||
this should be called for the first pad only on each side.
|
||||
|
||||
long NETrecvPadData(void *pData, int Pad)
|
||||
call this for Pad 1/2 to get the data sent by the above func.
|
||||
|
||||
extended funcs:
|
||||
|
||||
long NETsendData(void *pData, int Size, int Mode)
|
||||
sends Size bytes from pData to the other side.
|
||||
|
||||
long NETrecvData(void *pData, int Size, int Mode)
|
||||
receives Size bytes from pData to the other side.
|
||||
|
||||
void NETsetInfo(netInfo *info);
|
||||
sets the netInfo struct.
|
||||
|
||||
void NETkeypressed(int key) (linux only)
|
||||
key is a XK_?? (X11) keycode.
|
||||
*/
|
||||
|
||||
|
||||
#endif // _PSEMU_PLUGIN_DEFS_H
|
|
@ -3,10 +3,12 @@
|
|||
#include "HID_Utilities.h"
|
||||
#include "PlugPAD.h"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////
|
||||
typedef void* HWND;
|
||||
#include "PSEmu_Plugin_Defs.h"
|
||||
#include "psemu_plugin_defs.h"
|
||||
|
||||
long DoConfiguration();
|
||||
void DoAbout();
|
||||
|
||||
const char *LibName = "HIDInput";
|
||||
const int version = 0;
|
||||
|
@ -100,7 +102,7 @@ long PADconfigure(void) {
|
|||
HIDBuildDeviceList(kHIDPage_GenericDesktop, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return DoConfiguration();
|
||||
}
|
||||
|
||||
|
@ -153,23 +155,23 @@ long _readPortX(PadDataS *data, int port)
|
|||
buttonState &= ~(1 << keys[i].button);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (i=0; i<gNumAxes[port]; i++) {
|
||||
long value = HIDGetElementValue(axes[i].device, axes[i].element);
|
||||
|
||||
|
||||
if (value != axes[i].lastValue) {
|
||||
axes[i].lastValue = value;
|
||||
|
||||
|
||||
if (axes[i].element->usagePage == kHIDPage_GenericDesktop &&
|
||||
axes[i].element->usage >= kHIDUsage_GD_X && axes[i].element->usage <= kHIDUsage_GD_Rz) {
|
||||
/* axis input device */
|
||||
value = HIDCalibrateValue(value, axes[i].element);
|
||||
value = HIDScaleValue(value, axes[i].element);
|
||||
if (!axes[i].positive) value = 255-value;
|
||||
|
||||
|
||||
if (value >= 127) {
|
||||
if (axes[i].reverse) value = 255-value;
|
||||
|
||||
|
||||
switch (axes[i].axis) {
|
||||
case 0: data->rightJoyX = value; break;
|
||||
case 1: data->rightJoyY = value; break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user