1 |
cebix |
1.1 |
/* |
2 |
|
|
PSEmu Plugin Developer Kit Header definition |
3 |
|
|
|
4 |
|
|
(C)1998 Vision Thing |
5 |
|
|
|
6 |
|
|
This file can be used only to develop PSEmu Plugins |
7 |
|
|
Other usage is highly prohibited. |
8 |
|
|
*/ |
9 |
|
|
|
10 |
|
|
|
11 |
|
|
// IMPORTANT!!! |
12 |
|
|
// This file will be used by PSEmu version >= 1.0.3 |
13 |
|
|
// so, please, develop Plugins w/o using this header file now |
14 |
|
|
// if you want to add return codes (any) just drop mail to |
15 |
|
|
// duddie@psemu.com |
16 |
|
|
|
17 |
|
|
#ifndef _PSEMU_PLUGIN_DEFS_H |
18 |
|
|
#define _PSEMU_PLUGIN_DEFS_H |
19 |
|
|
|
20 |
|
|
|
21 |
|
|
// header version |
22 |
|
|
#define _PPDK_HEADER_VERSION 1 |
23 |
|
|
|
24 |
|
|
#define PLUGIN_VERSION 1 |
25 |
|
|
|
26 |
|
|
// plugin type returned by PSEgetLibType (types can be merged if plugin is multi type!) |
27 |
|
|
#define PSE_LT_CDR 1 |
28 |
|
|
#define PSE_LT_GPU 2 |
29 |
|
|
#define PSE_LT_SPU 4 |
30 |
|
|
#define PSE_LT_PAD 8 |
31 |
|
|
|
32 |
|
|
|
33 |
|
|
// every function in DLL if completed sucessfully should return this value |
34 |
|
|
#define PSE_ERR_SUCCESS 0 |
35 |
|
|
// undefined error but fatal one, that kills all functionality |
36 |
|
|
#define PSE_ERR_FATAL -1 |
37 |
|
|
|
38 |
|
|
|
39 |
|
|
// XXX_Init return values |
40 |
|
|
// Those return values apply to all libraries |
41 |
|
|
|
42 |
|
|
// initialization went OK |
43 |
|
|
#define PSE_INIT_ERR_SUCCESS 0 |
44 |
|
|
|
45 |
|
|
// this driver is not configured |
46 |
|
|
#define PSE_INIT_ERR_NOTCONFIGURED -2 |
47 |
|
|
|
48 |
|
|
// this driver can not operate properly on this hardware or hardware is not detected |
49 |
|
|
#define PSE_INIT_ERR_NOHARDWARE -3 |
50 |
|
|
|
51 |
|
|
|
52 |
|
|
/* GPU PlugIn */ |
53 |
|
|
|
54 |
|
|
|
55 |
|
|
// GPU_Test return values |
56 |
|
|
|
57 |
|
|
// sucess, everything configured, and went OK. |
58 |
|
|
#define PSE_GPU_ERR_SUCCESS 0 |
59 |
|
|
|
60 |
|
|
// this driver is not configured |
61 |
|
|
#define PSE_GPU_ERR_NOTCONFIGURED 1 |
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
// GPU_Query - will be implemented in v2 |
66 |
|
|
|
67 |
|
|
typedef struct |
68 |
|
|
{ |
69 |
|
|
unsigned long flags; |
70 |
|
|
unsigned long status; |
71 |
|
|
HWND window; |
72 |
|
|
unsigned char reserved[100]; |
73 |
|
|
} gpuQueryS; |
74 |
|
|
|
75 |
|
|
// gpuQueryS.flags |
76 |
|
|
// this driver requests windowed mode, |
77 |
|
|
#define PSE_GPU_FLAGS_WINDOWED 1 |
78 |
|
|
|
79 |
|
|
// gpuQueryS.status |
80 |
|
|
// this driver cannot operate in this windowed mode |
81 |
|
|
#define PSE_GPU_STATUS_WINDOWWRONG 1 |
82 |
|
|
|
83 |
|
|
// GPU_Query End - will be implemented in v2 |
84 |
|
|
|
85 |
|
|
|
86 |
|
|
/* CDR PlugIn */ |
87 |
|
|
|
88 |
|
|
// CDR_Test return values |
89 |
|
|
|
90 |
|
|
// sucess, everything configured, and went OK. |
91 |
|
|
#define PSE_CDR_ERR_SUCCESS 0 |
92 |
|
|
|
93 |
|
|
// ERRORS |
94 |
|
|
#define PSE_CDR_ERR -40 |
95 |
|
|
// this driver is not configured |
96 |
|
|
#define PSE_CDR_ERR_NOTCONFIGURED PSE_CDR_ERR - 0 |
97 |
|
|
// if this driver is unable to read data from medium |
98 |
|
|
#define PSE_CDR_ERR_NOREAD PSE_CDR_ERR - 1 |
99 |
|
|
|
100 |
|
|
// WARNINGS |
101 |
|
|
#define PSE_CDR_WARN 40 |
102 |
|
|
// if this driver emulates lame mode ie. can read only 2048 tracks and sector header is emulated |
103 |
|
|
// this might happen to CDROMS that do not support RAW mode reading - surelly it will kill many games |
104 |
|
|
#define PSE_CDR_WARN_LAMECD PSE_CDR_WARN + 0 |
105 |
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
/* SPU PlugIn */ |
110 |
|
|
|
111 |
|
|
// some info retricted (now!) |
112 |
|
|
|
113 |
|
|
// sucess, everything configured, and went OK. |
114 |
|
|
#define PSE_SPU_ERR_SUCCESS 0 |
115 |
|
|
|
116 |
|
|
// ERRORS |
117 |
|
|
// this error might be returned as critical error but none of below |
118 |
|
|
#define PSE_SPU_ERR -60 |
119 |
|
|
|
120 |
|
|
// this driver is not configured |
121 |
|
|
#define PSE_SPU_ERR_NOTCONFIGURED PSE_SPU_ERR - 1 |
122 |
|
|
// this driver failed Init |
123 |
|
|
#define PSE_SPU_ERR_INIT PSE_SPU_ERR - 2 |
124 |
|
|
|
125 |
|
|
|
126 |
|
|
// WARNINGS |
127 |
|
|
// this warning might be returned as undefined warning but allowing driver to continue |
128 |
|
|
#define PSE_SPU_WARN 60 |
129 |
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
|
|
/* PAD PlugIn */ |
134 |
|
|
|
135 |
|
|
// PADquery responses (notice - values ORed) |
136 |
|
|
// PSEmu will use them also in PADinit to tell Plugin which Ports will use |
137 |
|
|
// notice that PSEmu will call PADinit and PADopen only once when they are from |
138 |
|
|
// same plugin |
139 |
|
|
|
140 |
|
|
// might be used in port 1 (must support PADreadPort1() function) |
141 |
|
|
#define PSE_PAD_USE_PORT1 1 |
142 |
|
|
// might be used in port 2 (must support PADreadPort2() function) |
143 |
|
|
#define PSE_PAD_USE_PORT2 2 |
144 |
|
|
|
145 |
|
|
|
146 |
|
|
|
147 |
|
|
// MOUSE SCPH-1030 |
148 |
|
|
#define PSE_PAD_TYPE_MOUSE 1 |
149 |
|
|
// NEGCON - 16 button analog controller SLPH-00001 |
150 |
|
|
#define PSE_PAD_TYPE_NEGCON 2 |
151 |
|
|
// GUN CONTROLLER - gun controller SLPH-00014 from Konami |
152 |
|
|
#define PSE_PAD_TYPE_GUN 3 |
153 |
|
|
// STANDARD PAD SCPH-1080, SCPH-1150 |
154 |
|
|
#define PSE_PAD_TYPE_STANDARD 4 |
155 |
|
|
// ANALOG JOYSTICK SCPH-1110 |
156 |
|
|
#define PSE_PAD_TYPE_ANALOGJOY 5 |
157 |
|
|
// GUNCON - gun controller SLPH-00034 from Namco |
158 |
|
|
#define PSE_PAD_TYPE_GUNCON 6 |
159 |
|
|
// ANALOG CONTROLLER SCPH-1150 |
160 |
|
|
#define PSE_PAD_TYPE_ANALOGPAD 7 |
161 |
|
|
|
162 |
|
|
|
163 |
|
|
// sucess, everything configured, and went OK. |
164 |
|
|
#define PSE_PAD_ERR_SUCCESS 0 |
165 |
|
|
// general plugin failure (undefined error) |
166 |
|
|
#define PSE_PAD_ERR_FAILURE -1 |
167 |
|
|
|
168 |
|
|
|
169 |
|
|
// ERRORS |
170 |
|
|
// this error might be returned as critical error but none of below |
171 |
|
|
#define PSE_PAD_ERR -80 |
172 |
|
|
// this driver is not configured |
173 |
|
|
#define PSE_PAD_ERR_NOTCONFIGURED PSE_PAD_ERR - 1 |
174 |
|
|
// this driver failed Init |
175 |
|
|
#define PSE_PAD_ERR_INIT PSE_PAD_ERR - 2 |
176 |
|
|
|
177 |
|
|
|
178 |
|
|
// WARNINGS |
179 |
|
|
// this warning might be returned as undefined warning but allowing driver to continue |
180 |
|
|
#define PSE_PAD_WARN 80 |
181 |
|
|
|
182 |
|
|
|
183 |
|
|
typedef struct |
184 |
|
|
{ |
185 |
|
|
// controler type - fill it withe predefined values above |
186 |
|
|
unsigned char controllerType; |
187 |
|
|
|
188 |
|
|
// status of buttons - every controller fills this field |
189 |
|
|
unsigned short buttonStatus; |
190 |
|
|
|
191 |
|
|
// for analog pad fill those next 4 bytes |
192 |
|
|
// values are analog in range 0-255 where 128 is center position |
193 |
|
|
unsigned char rightJoyX, rightJoyY, leftJoyX, leftJoyY; |
194 |
|
|
|
195 |
|
|
// for mouse fill those next 2 bytes |
196 |
|
|
// values are in range -128 - 127 |
197 |
|
|
unsigned char moveX, moveY; |
198 |
|
|
|
199 |
|
|
unsigned char reserved[91]; |
200 |
|
|
|
201 |
|
|
} PadDataS; |
202 |
|
|
|
203 |
|
|
|
204 |
|
|
#endif // _PSEMU_PLUGIN_DEFS_H |