Skip to content

Commit c35eed6

Browse files
committed
v11 newly supported games
1 parent ae12d7d commit c35eed6

File tree

8 files changed

+528
-41
lines changed

8 files changed

+528
-41
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ avoid clicking off the window.
134134
| Jurassic: The Hunted (USA) | SLUS-21907 | Good | <sup>**Requires supplied cheat file**</br>Optional 60FPS cheat recommended</sub> | <sup>Aim Assist: Off</sub> | **EFE4448F.pnach** |
135135
| Monster Attack (PAL) / Chikyū Bōeigun (Japan) | SLES-51856, SLPM-62344 | Good | <sup>Vehicle mouse control is experimental</br>Not fully tested</sub> | <sup>Control Type: Technical</sub> | - |
136136
| No One Lives Forever (USA) | SLUS-20028 | Good | <sup>Not fully tested</sub> | <sup>Auto-targeting: Off</sub> | - |
137+
| Call of Duty 3 (USA) | SLUS-21426 | Good | <sup>3rd-Person Jeep camera not supported</br>Not fully tested</sub> | - | - |
138+
| TimeSplitters (v1.10, v2.00) (USA) | SLUS-20090 | Good | <sup>**Optional cheat to always show crosshair**</br>Not fully tested</sub> | <sup>Auto Lookahead: No</br>Auto Aim: Off</sub> | **B4A004F2.pnach (v1.10)</br>8966730F.pnach (v2.00)** |
139+
| Return to Castle Wolfenstein: Operation Resurrection (USA) | SLUS-20297 | Good | <sup>Not fully tested</sub> | <sup>Auto Center View: Off</br>Always Aim: Off</sub> | - |
140+
| Beverly Hills Cop (USA) | SLES-54456 | Fair | <sup>Not fully tested</sub> | - | - |
137141
* NOTE: PCSX2 will only hook with **BIOS versions 5XXXX and up**.
138142
* NOTE: Some aspects may break when a game is started with overclocking. Requires testing.
139143
* PCSX2 Settings: **Disable** *'Settings->Interface->Double-Click Toggles Fullscreen'* | **Enable** *'Settings->Interface->Hide Cursor In Fullscreen'*

cheats/PS2/8966730F.pnach

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
gametitle=TimeSplitters(v2.00) SLUS-20090 0x8966730F
2+
3+
// Always display crosshair
4+
//patch=1,EE,202817FC,word,AE270320

cheats/PS2/B4A004F2.pnach

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
gametitle=TimeSplitters(v1.10) SLUS-20090 0xB4A004F2
2+
3+
// Always display crosshair
4+
//patch=1,EE,2027E7A4,word,AE270320

games/game.c

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,13 @@ extern const GAMEDRIVER *GAME_PS2_THESUFFERING;
134134
extern const GAMEDRIVER *GAME_PS1_007THEWORLDISNOTENOUGH;
135135
extern const GAMEDRIVER *GAME_PS2_RETURNTOCASTLEWOLF;
136136
extern const GAMEDRIVER *GAME_PS2_BEVERLYHILLSCOP;
137+
extern const GAMEDRIVER *GAME_PS2_KILLZONE;
138+
extern const GAMEDRIVER *GAME_PS2_TIMESPLITTERS;
139+
extern const GAMEDRIVER *GAME_PS2_BATTLEFIELD2;
140+
extern const GAMEDRIVER *GAME_PS2_CALLOFDUTY3;
137141

138142
static const GAMEDRIVER **GAMELIST[] =
139-
{
143+
{ // UNF - Unfinished
140144
&GAME_TS2,
141145
&GAME_TS3,
142146
&GAME_NF,
@@ -158,8 +162,8 @@ static const GAMEDRIVER **GAMELIST[] =
158162
&GAME_N64_SINPUNISHMENT,
159163
&GAME_SNES_PACMAN2,
160164
&GAME_SNES_TIMONANDPUMBAA,
161-
&GAME_SNES_SHADOWRUN,
162-
&GAME_SNES_STARFOX,
165+
&GAME_SNES_SHADOWRUN, // UNF
166+
&GAME_SNES_STARFOX, // UNF
163167
&GAME_SNES_UNTOUCHABLES,
164168
&GAME_SNES_RTYPE3,
165169
&GAME_PS2_007AGENTUNDERFIRE,
@@ -177,78 +181,82 @@ static const GAMEDRIVER **GAMELIST[] =
177181
&GAME_PS2_50CENTBULLETPROOF,
178182
&GAME_PS2_COLDWINTER,
179183
&GAME_PS1_RESIDENTEVILSURVIVOR,
180-
&GAME_PS1_DNLANDOFTHEBABES,
184+
&GAME_PS1_DNLANDOFTHEBABES, // UNF
181185
&GAME_PS2_MERCENARIES,
182186
&GAME_PS2_MOHVANGUARD,
183187
&GAME_PS1_THENOTE,
184-
&GAME_PS1_POED,
188+
&GAME_PS1_POED, // UNF
185189
&GAME_PS1_ECHONIGHT,
186190
&GAME_PS1_SHADOWTOWER,
187191
&GAME_PS1_SOUTHPARK,
188192
&GAME_PS1_JUMPINGFLASH,
189193
&GAME_PS1_KINGSFIELD,
190194
&GAME_PS1_KINGSFIELD2,
191-
// &GAME_SS_POWERSLAVE,
195+
// &GAME_SS_POWERSLAVE, // UNF
192196
&GAME_PS1_KINGSFIELD3,
193197
&GAME_PS2_KINGSFIELD4,
194-
&GAME_SD_MAKENX,
195-
&GAME_SD_REDDOG,
198+
&GAME_SD_MAKENX, // UNF
199+
&GAME_SD_REDDOG, // UNF
196200
&GAME_PS1_ARMOREDCORE,
197201
&GAME_PS1_BAROQUE,
198-
&GAME_PS1_GALEGUNNER,
199-
&GAME_PS1_C12FINALRESISTANCE,
200-
&GAME_PS1_MEGAMANLEGENDS,
202+
&GAME_PS1_GALEGUNNER, // UNF
203+
&GAME_PS1_C12FINALRESISTANCE, // UNF
204+
&GAME_PS1_MEGAMANLEGENDS, // UNF
201205
&GAME_SNES_WILDGUNS,
202206
&GAME_PS1_ALIENTRILOGY,
203-
&GAME_PS1_HPSORCERERSSTONE,
204-
&GAME_PS1_MEDALOFHONOR,
205-
&GAME_PS3_KILLZONEHD,
206-
&GAME_PS2_GTAVICECITYSTORIES,
207+
&GAME_PS1_HPSORCERERSSTONE, // UNF
208+
&GAME_PS1_MEDALOFHONOR, // UNF
209+
&GAME_PS3_KILLZONEHD, // UNF
210+
&GAME_PS2_GTAVICECITYSTORIES, // UNF
207211
&GAME_PS2_ETERNALRING,
208212
&GAME_PS1_DISRUPTOR,
209-
&GAME_SNES_CYBERNATOR,
210-
&GAME_N64_TUROK3,
213+
&GAME_SNES_CYBERNATOR, // UNF
214+
&GAME_N64_TUROK3, // UNF
211215
&GAME_PS2_MICHIGAN,
212-
&GAME_PS2_STABYSS,
213-
&GAME_PS2_AVPEXTINCTION,
214-
&GAME_N64_007WINE,
215-
&GAME_PS2_GEROGUEAGENT,
216+
&GAME_PS2_STABYSS, // UNF
217+
&GAME_PS2_AVPEXTINCTION, // UNF
218+
&GAME_N64_007WINE, // UNF
219+
&GAME_PS2_GEROGUEAGENT, // UNF
216220
&GAME_PS1_LSDDREAMEMULATOR,
217-
&GAME_PS1_DECEPTION,
221+
&GAME_PS1_DECEPTION, // UNF
218222
&GAME_PS1_AQUANAUTSHOLIDAY,
219223
&GAME_PS1_HELLNIGHT,
220-
&GAME_PS1_MEGAMANLEGENDS2,
221-
&GAME_PS2_TRIBESAA,
224+
&GAME_PS1_MEGAMANLEGENDS2, // UNF
225+
&GAME_PS2_TRIBESAA, // UNF
222226
&GAME_PSP_CODEDARMS,
223-
&GAME_SCD_JURASSICPARK,
224-
&GAME_PSP_NOVA,
225-
&GAME_PS2_GHOSTINTHESHELL,
227+
&GAME_SCD_JURASSICPARK, // UNF
228+
&GAME_PSP_NOVA, // UNF
229+
&GAME_PS2_GHOSTINTHESHELL, // UNF
226230
&GAME_PSP_GHOSTINTHESHELL,
227-
&GAME_PSP_RESISTANCERETRIBUTION,
228-
&GAME_PS2_GREGMAXD,
229-
&GAME_PS2_SHSHATTEREDMEMORIES,
231+
&GAME_PSP_RESISTANCERETRIBUTION, // UNF
232+
&GAME_PS2_GREGMAXD, // UNF
233+
&GAME_PS2_SHSHATTEREDMEMORIES, // UNF
230234
&GAME_PS1_DUKETIMETOKILL,
231235
&GAME_PS1_FUTURECOP,
232236
&GAME_PS2_ROBOTECHINVASION,
233237
&GAME_PS2_SERIOUSSAMNE,
234-
&GAME_SS_PANZERDRAGOON,
235-
&GAME_PS2_STATEOFEMERGENCY2,
236-
&GAME_PS2_RACUPYOURARSENAL,
237-
&GAME_PS2_ECHONIGHTBEYOND,
238+
&GAME_SS_PANZERDRAGOON, // UNF
239+
&GAME_PS2_STATEOFEMERGENCY2, // UNF
240+
&GAME_PS2_RACUPYOURARSENAL, // UNF
241+
&GAME_PS2_ECHONIGHTBEYOND, // UNF
238242
&GAME_PS2_ARMOREDCORE2,
239243
&GAME_PS2_GLOBALDEFENSEFORCE,
240244
&GAME_PS2_JURASSICTHEHUNTED,
241-
&GAME_PS2_MONSTERHUNTER,
242-
&GAME_PS3_HAZE,
245+
&GAME_PS2_MONSTERHUNTER, // UNF
246+
&GAME_PS3_HAZE, // UNF
243247
&GAME_PS2_NOONELIVESFOREVER,
244-
&GAME_SS_VIRTUALHYDLIDE,
248+
&GAME_SS_VIRTUALHYDLIDE, // UNF
245249
&GAME_PS2_EARTHDEFENSEFORCE,
246-
&GAME_PS2_SHADOWOFROME,
250+
&GAME_PS2_SHADOWOFROME, // UNF
247251
&GAME_GC_TUROKEVOLUTION,
248-
&GAME_PS2_THESUFFERING,
249-
&GAME_PS1_007THEWORLDISNOTENOUGH,
252+
&GAME_PS2_THESUFFERING, // UNF
253+
&GAME_PS1_007THEWORLDISNOTENOUGH, // UNF
250254
&GAME_PS2_RETURNTOCASTLEWOLF,
251-
&GAME_PS2_BEVERLYHILLSCOP
255+
&GAME_PS2_BEVERLYHILLSCOP,
256+
&GAME_PS2_KILLZONE, // UNF
257+
&GAME_PS2_TIMESPLITTERS,
258+
&GAME_PS2_BATTLEFIELD2, // UNF
259+
&GAME_PS2_CALLOFDUTY3
252260
};
253261

254262
static const GAMEDRIVER *CURRENT_GAME = NULL;

games/ps2_battlefield2.c

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
//===========================================================
2+
// Mouse Injector for Dolphin
3+
//==========================================================================
4+
// Copyright (C) 2019-2020 Carnivorous
5+
// All rights reserved.
6+
//
7+
// Mouse Injector is free software; you can redistribute it and/or modify it
8+
// under the terms of the GNU General Public License as published by the Free
9+
// Software Foundation; either version 2 of the License, or (at your option)
10+
// any later version.
11+
//
12+
// This program is distributed in the hope that it will be useful, but
13+
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14+
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15+
// for more details.
16+
//
17+
// You should have received a copy of the GNU General Public License
18+
// along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html
19+
//==========================================================================
20+
#include <stdint.h>
21+
#include "../main.h"
22+
#include "../memory.h"
23+
#include "../mouse.h"
24+
#include "game.h"
25+
26+
// #define BF2_CAM_BASE_PTR 0x782B98
27+
#define BF2_CAM_BASE_PTR 0xB295F0
28+
// offsets from camBase
29+
#define BF2_CAMX 0x4
30+
#define BF2_CAMY 0x8
31+
32+
static uint8_t PS2_BF2_Status(void);
33+
static uint8_t PS2_BF2_DetectCamBase(void);
34+
static void PS2_BF2_Inject(void);
35+
36+
static const GAMEDRIVER GAMEDRIVER_INTERFACE =
37+
{
38+
"Battlefield 2: Modern Combat",
39+
PS2_BF2_Status,
40+
PS2_BF2_Inject,
41+
1, // 1000 Hz tickrate
42+
0 // crosshair sway not supported for driver
43+
};
44+
45+
const GAMEDRIVER *GAME_PS2_BATTLEFIELD2 = &GAMEDRIVER_INTERFACE;
46+
47+
static uint32_t camBase = 0;
48+
49+
//==========================================================================
50+
// Purpose: return 1 if game is detected
51+
//==========================================================================
52+
static uint8_t PS2_BF2_Status(void)
53+
{
54+
// SLUS_210.26
55+
return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U &&
56+
PS2_MEM_ReadWord(0x00093394) == 0x5F323130U &&
57+
PS2_MEM_ReadWord(0x00093398) == 0x2E32363BU);
58+
}
59+
60+
static uint8_t PS2_BF2_DetectCamBase(void)
61+
{
62+
uint32_t p4 = PS2_MEM_ReadUInt(BF2_CAM_BASE_PTR) + 0x1C8; // 1AD86B0 + 1C8 = 1AD8878
63+
uint32_t p3 = PS2_MEM_ReadUInt(p4); // 1DDA760
64+
uint32_t p2 = PS2_MEM_ReadUInt(p3); // 7F8EF0
65+
uint32_t p1 = PS2_MEM_ReadUInt(p2) + 0x1C; // 1B11420 + 1C = 1B1143C
66+
uint32_t tempCamBase = PS2_MEM_ReadUInt(p1);
67+
68+
// TODO: sanity check
69+
if (tempCamBase)
70+
{
71+
camBase = tempCamBase;
72+
return 1;
73+
}
74+
75+
return 0;
76+
}
77+
78+
static void PS2_BF2_Inject(void)
79+
{
80+
// TODO: test camBase tree
81+
// TODO: playerBase? and look for current weapon camera since
82+
// each weapon uses different camera values???
83+
// TODO: tank barrel
84+
// TODO: turrets
85+
// static
86+
// car mounted
87+
88+
if(xmouse == 0 && ymouse == 0) // if mouse is idle
89+
return;
90+
91+
if (!PS2_BF2_DetectCamBase())
92+
return;
93+
94+
float looksensitivity = (float)sensitivity / 40.f;
95+
float scale = 250.f;
96+
// float fov = PS2_MEM_ReadFloat(RTCW_FOV) / 106.5f;
97+
float fov = 1.f;
98+
99+
float camX = PS2_MEM_ReadFloat(camBase + BF2_CAMX);
100+
camX += (float)xmouse * looksensitivity / scale * fov;
101+
PS2_MEM_WriteFloat(camBase + BF2_CAMX, (float)camX);
102+
103+
float camY = PS2_MEM_ReadFloat(camBase + BF2_CAMY);
104+
camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale * fov;
105+
106+
PS2_MEM_WriteFloat(camBase + BF2_CAMY, (float)camY);
107+
108+
}

games/ps2_cod3.c

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
//===========================================================
2+
// Mouse Injector for Dolphin
3+
//==========================================================================
4+
// Copyright (C) 2019-2020 Carnivorous
5+
// All rights reserved.
6+
//
7+
// Mouse Injector is free software; you can redistribute it and/or modify it
8+
// under the terms of the GNU General Public License as published by the Free
9+
// Software Foundation; either version 2 of the License, or (at your option)
10+
// any later version.
11+
//
12+
// This program is distributed in the hope that it will be useful, but
13+
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14+
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15+
// for more details.
16+
//
17+
// You should have received a copy of the GNU General Public License
18+
// along with this program; if not, visit http://www.gnu.org/licenses/gpl-2.0.html
19+
//==========================================================================
20+
#include <stdint.h>
21+
#include "../main.h"
22+
#include "../memory.h"
23+
#include "../mouse.h"
24+
#include "game.h"
25+
26+
#define COD3_CAMY 0x48FC64
27+
#define COD3_CAMX 0x48FC68
28+
#define COD3_AIM_ASSIST 0x47CB74
29+
#define COD3_FOV 0x4C0430
30+
#define COD3_CAN_MOVE_JEEP_3RD_PERSON_CAM 0x4C0474
31+
32+
#define COD3_IS_IN_GAME_CUTSCENE 0x49D858
33+
#define COD3_IS_PAUSED 0x4A5CD0
34+
35+
static uint8_t PS2_COD3_Status(void);
36+
static void PS2_COD3_Inject(void);
37+
38+
static const GAMEDRIVER GAMEDRIVER_INTERFACE =
39+
{
40+
"Call of Duty 3",
41+
PS2_COD3_Status,
42+
PS2_COD3_Inject,
43+
1, // 1000 Hz tickrate
44+
0 // crosshair sway not supported for driver
45+
};
46+
47+
const GAMEDRIVER *GAME_PS2_CALLOFDUTY3 = &GAMEDRIVER_INTERFACE;
48+
49+
//==========================================================================
50+
// Purpose: return 1 if game is detected
51+
//==========================================================================
52+
static uint8_t PS2_COD3_Status(void)
53+
{
54+
// SLUS_214.26
55+
return (PS2_MEM_ReadWord(0x49C918) == 0x534C5553U &&
56+
PS2_MEM_ReadWord(0x49C91C) == 0x5F323134U &&
57+
PS2_MEM_ReadWord(0x49C920) == 0x2E32363BU);
58+
}
59+
60+
// static uint8_t PS2_COD3_DetectCam(void)
61+
// {
62+
// uint32_t tempCamBase = PS2_MEM_ReadUInt(RTCW_ACTUAL_CAMY_BASE_PTR);
63+
// if (tempCamBase)
64+
// {
65+
// actualCamYBase = tempCamBase;
66+
// return 1;
67+
// }
68+
// return 0;
69+
// }
70+
71+
static void PS2_COD3_Inject(void)
72+
{
73+
// TODO: 3rd person jeep camera
74+
// does move but only moved manually with controller button
75+
// works for a bit and then it rebounds to center and locks
76+
// TODO: charge plant mini-game with mouse
77+
78+
// disable aim-assist
79+
PS2_MEM_WriteUInt(COD3_AIM_ASSIST, 0x0);
80+
81+
// PS2_MEM_WriteUInt(COD3_CAN_MOVE_JEEP_3RD_PERSON_CAM, 0x1);
82+
83+
if (PS2_MEM_ReadUInt(COD3_IS_IN_GAME_CUTSCENE))
84+
return;
85+
86+
if (PS2_MEM_ReadUInt(COD3_IS_PAUSED))
87+
return;
88+
89+
if(xmouse == 0 && ymouse == 0) // if mouse is idle
90+
return;
91+
92+
// if (!PS2_RTCW_DetectCam())
93+
// return;
94+
95+
float looksensitivity = (float)sensitivity / 40.f;
96+
float scale = 6.f;
97+
float fov = PS2_MEM_ReadFloat(COD3_FOV) / 65.f;
98+
99+
float camX = PS2_MEM_ReadFloat(COD3_CAMX);
100+
camX -= (float)xmouse * looksensitivity / scale * fov;
101+
PS2_MEM_WriteFloat(COD3_CAMX, (float)camX);
102+
103+
float camY = PS2_MEM_ReadFloat(COD3_CAMY);
104+
camY += (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale * fov;
105+
// game clamps internally to actual camY
106+
PS2_MEM_WriteFloat(COD3_CAMY, (float)camY);
107+
108+
}

0 commit comments

Comments
 (0)