Skip to content

Commit df40a05

Browse files
committed
v9 newly supported games
Newly supported games | Armored Core 2 (PS2), Jurassic: The Hunted (PS2), Global Defence Force/Chikyū Bōeigun 2 (PS2)
1 parent fad5df9 commit df40a05

File tree

12 files changed

+961
-26
lines changed

12 files changed

+961
-26
lines changed

README.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -106,28 +106,31 @@ avoid clicking off the window.
106106

107107
## Supported PCSX2 Titles
108108
| Game Title | Serial | Mouse Support | Issues | In-game Options | Cheat File |
109-
| ------ | --- | :---: | ----------- | ----------- | --- |
110-
| Red Dead Revolver (USA) | SLUS-20500 | Fair | <sup>Gatling guns and final scene may break if game is loaded from memory card after a shutdown. **Fix below*</sub> | <sup>Target Mode: Toggle</sub> | |
111-
| Time Crisis II (USA) | SLUS-20219 | Good | <sup>Not fully tested</sub> | | |
112-
| Vampire Night (USA) | SLUS-20221 | Good | <sup>Not fully tested</sub> | | |
113-
| Gunslinger Girl Vol. 1 (Japan)| SLPS-25343 | Fair | <sup>Not fully tested</sub> | | |
114-
| Darkwatch (USA) | SLUS-21043 | Good | <sup>**Requires supplied cheat file**, Horse aiming is not quite right but is usable.</sub> | | **327052E8.pnach** |
115-
| Black (USA) | SLUS-21376 | Good | <sup>Not fully tested</sub> | | |
116-
| Urban Chaos: Riot Response (USA) | SLUS-21390 | Good | <sup>Not fully tested</sub> | <sup>Auto-Center: No</sub> | |
117-
| 007: Agent Under Fire (USA) | SLUS-20265 | Good | <sup>Mouse movement warps camera while paused and during in-game cutscenes, aim-lock not disabled on auto-scroller levels</sub> | | |
118-
| Quake III: Revolution (USA) | SLUS-20167 | Good | <sup>None</sub> | <sup>Auto Center: No, Auto Aiming: no (only available from main menu options) | |
119-
| 50 Cent: Bulletproof (USA) | SLUS-21315 | Good | <sup>Not fully tested</sub> | <sup>Camera->Aim Assist: Off</sub> | |
120-
| Call of Duty: Finest Hour (USA) | SLUS-20725 | Good | <sup>None</sub> | <sup>Aim Assist: Off</sub> | |
121-
| Cold Winter (USA) | SLUS-20845 | Good | <sup>Split-screen mode not supported</sub> | <sup>Profile options - Aim Assist: Off</sub> | |
122-
| Medal of Honor: Vanguard (USA) | SLUS-21597 | Good | <sup>Multiplayer mode not supported</sub> | | |
123-
| Mercenaries: Playground of Destruction (USA) | SLUS-20932 | Fair | <sup>**Requires cheat file disable aim-assist**, x-axis in normal vehicles not supported</sub> | | **23510F99.pnach** |
124-
| King's Field IV: The Ancient City (USA) | SLUS-20318 | Good | <sup>Not fully tested</sub> | |
125-
| Eternal Ring (USA) | SLUS-20015 | Good | <sup>Not fully tested</sub> | |
126-
| Resident Evil: Dead Aim (USA) | SLUS-20669 | Good | <sup>**Requires supplied cheat file**, Third-person camera y-axis not supported</sub> | | **FBB5290C.pnach** |
127-
| Michigan: Report from Hell (Europe) | SLES-53073 | Fair | <sup>Door peek camera not supported, Not fully tested</sub> | | |
128-
| Ninja Assault (USA) | SLUS-20492 | Good | <sup>**Requires supplied cheat file to disable aim-lock**, Not fully tested</sub> | | **785B28DA.pnach** |
129-
| Robotech: Invasion (USA) | SLUS-20823 | Fair | <sup>Turrets not supported, Not fully tested</sub> | | |
130-
| Serious Sam: Next Encounter (USA) | SLUS-20907 | Good | <sup>Vehicles not supported, Not fully tested</sub> | Auto Center: Off, Auto Aim: Off | |
109+
| ---------- | :----: | :-----------: | :----: | :-------------: | :--------: |
110+
| Red Dead Revolver (USA) | SLUS-20500 | Fair | <sup>Gatling guns and final scene may break if game is loaded from memory card after a shutdown. **Fix below*</sub> | <sup>Target Mode: Toggle</sub> | - |
111+
| Time Crisis II (USA) | SLUS-20219 | Good | <sup>Not fully tested</sub> | - | - |
112+
| Vampire Night (USA) | SLUS-20221 | Good | <sup>Not fully tested</sub> | - | - |
113+
| Gunslinger Girl Vol. 1 (Japan)| SLPS-25343 | Fair | <sup>Not fully tested</sub> | - | - |
114+
| Darkwatch (USA) | SLUS-21043 | Good | <sup>**Requires supplied cheat file**</br>Horse aiming is not quite right but is usable.</sub> | - | **327052E8.pnach** |
115+
| Black (USA) | SLUS-21376 | Good | <sup>Not fully tested</sub> | - | - |
116+
| Urban Chaos: Riot Response (USA) | SLUS-21390 | Good | <sup>Not fully tested</sub> | <sup>Auto-Center: No</sub> | - |
117+
| 007: Agent Under Fire (USA) | SLUS-20265 | Good | <sup>Mouse movement warps camera while paused and during in-game cutscenes</br>Aim-lock not disabled on auto-scroller levels</sub> | - | - |
118+
| Quake III: Revolution (USA) | SLUS-20167 | Good | <sup>None</sub> | <sup>Auto Center: No <br> Auto Aiming: No (only available from main menu options) | - |
119+
| 50 Cent: Bulletproof (USA) | SLUS-21315 | Good | <sup>Not fully tested</sub> | <sup>Camera->Aim Assist: Off</sub> | - |
120+
| Call of Duty: Finest Hour (USA) | SLUS-20725 | Good | <sup>None</sub> | <sup>Aim Assist: Off</sub> | - |
121+
| Cold Winter (USA) | SLUS-20845 | Good | <sup>Split-screen mode not supported</sub> | <sup>Profile options - Aim Assist: Off</sub> | - |
122+
| Medal of Honor: Vanguard (USA) | SLUS-21597 | Good | <sup>Multiplayer mode not supported</sub> | - | - |
123+
| Mercenaries: Playground of Destruction (USA) | SLUS-20932 | Fair | <sup>**Requires cheat file to disable aim-assist**</br> X-axis in normal vehicles not supported</sub> | - | **23510F99.pnach** |
124+
| King's Field IV: The Ancient City (USA) | SLUS-20318 | Good | <sup>Not fully tested</sub> | - | - |
125+
| Eternal Ring (USA) | SLUS-20015 | Good | <sup>Not fully tested</sub> | - | - |
126+
| Resident Evil: Dead Aim (USA) | SLUS-20669 | Good | <sup>**Requires supplied cheat file**</br>Third-person camera y-axis not supported</sub> | - | **FBB5290C.pnach** |
127+
| Michigan: Report from Hell (Europe) | SLES-53073 | Fair | <sup>Door peek camera not supported</br>Not fully tested</sub> | - | - |
128+
| Ninja Assault (USA) | SLUS-20492 | Good | <sup>**Requires supplied cheat file to disable aim-lock**</br>Not fully tested</sub> | - | **785B28DA.pnach** |
129+
| Robotech: Invasion (USA) | SLUS-20823 | Fair | <sup>Turrets not supported</br>Not fully tested</sub> | - | - |
130+
| Serious Sam: Next Encounter (USA) | SLUS-20907 | Good | <sup>Vehicles not supported</br>Not fully tested</sub> | <sup>Auto Center: Off</br>Auto Aim: Off</sub> | - |
131+
| Armored Core 2 (USA) | SLUS-20014 | Good | <sup>Arena replays broken</br>Not fully tested</sub> | - | - |
132+
| Global Defence Force (PAL) / Chikyū Bōeigun 2 (Japan) | SLES-54464 / SLPM-62652 | Good | <sup>Vehicle mouse control is experimental</br>Not fully tested</sub> | Control Type: Technical | - |
133+
| Jurassic: The Hunted (USA) | SLUS-21907 | Good | <sup>**Requires supplied cheat file**</br>Optional 60FPS cheat recommended</sub> | Aim Assist: Off | **EFE4448F.pnach** |
131134
* NOTE: PCSX2 will only hook with **BIOS versions 5XXXX and up**.
132135
* NOTE: Some aspects may break when a game is started with overclocking. Requires testing.
133136
* PCSX2 Settings: **Disable** *'Settings->Interface->Double-Click Toggles Fullscreen'* | **Enable** *'Settings->Interface->Hide Cursor In Fullscreen'*
@@ -136,7 +139,7 @@ avoid clicking off the window.
136139

137140
## Supported PPSSPP Titles
138141
| Game Title | Serial | Mouse Support | Issues | In-game Options |
139-
| ------ | --- | :---: | ----------- | ----------- |
142+
| ---------- | ------ | :-----------: | ------ | --------------- |
140143
| Coded Arms (USA) | ULUS10019 | Fair | <sup>Not fully tested</sub> | <sup>Free Look->Lock On: None</sub> |
141144
| Ghost in the Shell: Stand Alone Complex (USA) | ULUS10020 | Fair | <sup>Not fully tested</sub> | |
142145

cheats/PS2/EFE4448F.pnach

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
gametitle=Jurassic The Hunted SLUS-21907 0xEFE4448F
2+
3+
// 60 FPS
4+
patch=1,EE,2017D480,word,2C420001
5+
6+
// write camBase to free address (required to use MouseInjector)
7+
patch=1,EE,20214B78,word,AF84FF00 // write camBase to 006BE670 | sw a0,-0x100(gp)
8+
patch=1,EE,20214B7C,word,0C06E7AA // move other opcodes down by one
9+
patch=1,EE,20214B80,word,8C4400E0
10+
patch=1,EE,20214B84,word,DFBF0000
11+
patch=1,EE,20214B88,word,03E00008
12+
patch=1,EE,20214B8C,word,27BD0010

games/game.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ extern const GAMEDRIVER *GAME_PS2_SERIOUSSAMNE;
119119
extern const GAMEDRIVER *GAME_SS_PANZERDRAGOON;
120120
extern const GAMEDRIVER *GAME_PS2_STATEOFEMERGENCY2;
121121
extern const GAMEDRIVER *GAME_PS2_RACUPYOURARSENAL;
122+
extern const GAMEDRIVER *GAME_PS2_ECHONIGHTBEYOND;
123+
extern const GAMEDRIVER *GAME_PS2_ARMOREDCORE2;
124+
extern const GAMEDRIVER *GAME_PS2_GLOBALDEFENSEFORCE;
125+
extern const GAMEDRIVER *GAME_PS2_JURASSICTHEHUNTED;
126+
extern const GAMEDRIVER *GAME_PS2_MONSTERHUNTER;
127+
extern const GAMEDRIVER *GAME_PS3_HAZE;
122128

123129
static const GAMEDRIVER **GAMELIST[] =
124130
{
@@ -218,7 +224,13 @@ static const GAMEDRIVER **GAMELIST[] =
218224
&GAME_PS2_SERIOUSSAMNE,
219225
&GAME_SS_PANZERDRAGOON,
220226
&GAME_PS2_STATEOFEMERGENCY2,
221-
&GAME_PS2_RACUPYOURARSENAL
227+
&GAME_PS2_RACUPYOURARSENAL,
228+
&GAME_PS2_ECHONIGHTBEYOND,
229+
&GAME_PS2_ARMOREDCORE2,
230+
&GAME_PS2_GLOBALDEFENSEFORCE,
231+
&GAME_PS2_JURASSICTHEHUNTED,
232+
&GAME_PS2_MONSTERHUNTER,
233+
&GAME_PS3_HAZE
222234
};
223235

224236
static const GAMEDRIVER *CURRENT_GAME = NULL;

games/ps1_deception.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const GAMEDRIVER *GAME_PS1_DECEPTION = &GAMEDRIVER_INTERFACE;
4242

4343
static float xAccumulator = 0.f;
4444
static float yAccumulator = 0.f;
45-
static float scale = 20.f;
45+
static float scale = 30.f;
4646

4747
//==========================================================================
4848
// Purpose: return 1 if game is detected

games/ps2_armoredcore2.c

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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 PI 3.14159265f // 0x40490FDB
27+
#define TAU 6.2831853f // 0x40C90FDB
28+
29+
#define AC2_ROTY 0x2BB920
30+
#define AC2_ROTX 0x2BB954
31+
32+
#define AC2_IS_PAUSED 0x2B6900
33+
#define AC2_IS_PAUSED_TRUE 0xFF010000
34+
#define AC2_IS_IN_GAME_CUTSCENE 0x2B68EC
35+
#define AC2_IS_MAP_DISPLAYED 0x1C7D624
36+
#define AC2_IS_NOT_IN_MENU 0x2D4D00
37+
38+
// #define AC2_EMBLEM_EDIT_CURSORX 0xC9670C
39+
// #define AC2_EMBLEM_EDIT_CURSORY 0xC96710
40+
41+
// #define AC2_CURRENT_MENU_SCREEN 0x2AD32C
42+
// #define AC2_MENU_SCREEN_EMBLEM_EDITOR 0x00000EDA
43+
44+
static uint8_t PS2_AC2_Status(void);
45+
static void PS2_AC2_Inject(void);
46+
47+
static const GAMEDRIVER GAMEDRIVER_INTERFACE =
48+
{
49+
"Armored Core 2",
50+
PS2_AC2_Status,
51+
PS2_AC2_Inject,
52+
1, // 1000 Hz tickrate
53+
0 // crosshair sway not supported for driver
54+
};
55+
56+
const GAMEDRIVER *GAME_PS2_ARMOREDCORE2 = &GAMEDRIVER_INTERFACE;
57+
58+
//==========================================================================
59+
// Purpose: return 1 if game is detected
60+
//==========================================================================
61+
static uint8_t PS2_AC2_Status(void)
62+
{
63+
return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U &&
64+
PS2_MEM_ReadWord(0x00093394) == 0x5F323030U &&
65+
PS2_MEM_ReadWord(0x00093398) == 0x2E31343BU);
66+
}
67+
//==========================================================================
68+
// Purpose: calculate mouse look and inject into current game
69+
//==========================================================================
70+
static void PS2_AC2_Inject(void)
71+
{
72+
if(xmouse == 0 && ymouse == 0) // if mouse is idle
73+
return;
74+
75+
float looksensitivity = (float)sensitivity / 40.f;
76+
float scale = 400.f;
77+
78+
// if (PS2_MEM_ReadUInt(AC2_CURRENT_MENU_SCREEN) == AC2_MENU_SCREEN_EMBLEM_EDITOR)
79+
// {
80+
// // TODO: activate tools, pallete, editor when hovered
81+
// // TODO: cursor position base
82+
83+
// // move emblem editor cursor
84+
// float cursorScale = 2.f;
85+
// float cursorX = PS2_MEM_ReadFloat(AC2_EMBLEM_EDIT_CURSORX);
86+
// float cursorY = PS2_MEM_ReadFloat(AC2_EMBLEM_EDIT_CURSORY);
87+
// cursorX += (float)xmouse * looksensitivity / cursorScale;
88+
// cursorY += (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / cursorScale;
89+
// PS2_MEM_WriteFloat(AC2_EMBLEM_EDIT_CURSORX, (float)cursorX);
90+
// PS2_MEM_WriteFloat(AC2_EMBLEM_EDIT_CURSORY, (float)cursorY);
91+
// }
92+
93+
if (!PS2_MEM_ReadUInt(AC2_IS_NOT_IN_MENU))
94+
return;
95+
96+
// paused
97+
if (PS2_MEM_ReadWord(AC2_IS_PAUSED) == AC2_IS_PAUSED_TRUE)
98+
return;
99+
100+
if (PS2_MEM_ReadWord(AC2_IS_IN_GAME_CUTSCENE))
101+
return;
102+
103+
if (PS2_MEM_ReadUInt(AC2_IS_MAP_DISPLAYED))
104+
return;
105+
106+
float rotX = PS2_MEM_ReadFloat(AC2_ROTX);
107+
float rotY = PS2_MEM_ReadFloat(AC2_ROTY);
108+
109+
rotX += (float)xmouse * looksensitivity / scale;
110+
rotY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale;
111+
112+
rotY = ClampFloat(rotY, -1.17809999f, 1.17809999);
113+
114+
while (rotX > PI)
115+
rotX -= TAU;
116+
while (rotX < -PI)
117+
rotX += TAU;
118+
119+
PS2_MEM_WriteFloat(AC2_ROTX, (float)rotX);
120+
PS2_MEM_WriteFloat(AC2_ROTY, (float)rotY);
121+
}

games/ps2_echonightbeyond.c

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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 <math.h>
22+
#include "../main.h"
23+
#include "../memory.h"
24+
#include "../mouse.h"
25+
#include "game.h"
26+
27+
#define TAU 6.2831853f // 0x40C90FDB
28+
29+
#define ENB_CAMY 0x9D602C
30+
#define ENB_CAMY_LAST 0x9D6034
31+
#define ENB_CAMX_SIN 0x9D5F20
32+
#define ENB_CAMX_SIN2_NEG 0x9D5F08
33+
#define ENB_CAMX_SIN3_NEG 0x9D5F48
34+
#define ENB_CAMX_COS 0x9D5F28
35+
#define ENB_CAMX_COS2 0x9D5F00
36+
#define ENB_CAMX_COS3 0x9D5F40
37+
#define ENB_CAMX_ANGLE 0x9D6030
38+
#define ENB_CAMX_ANGLE2 0x9D6038
39+
#define ENB_CAMX_ANGLE3 0x9D6A0C
40+
41+
static uint8_t PS2_ENB_Status(void);
42+
static void PS2_ENB_Inject(void);
43+
44+
static const GAMEDRIVER GAMEDRIVER_INTERFACE =
45+
{
46+
"Echo Night: Beyond",
47+
PS2_ENB_Status,
48+
PS2_ENB_Inject,
49+
1, // 1000 Hz tickrate
50+
0 // crosshair sway not supported for driver
51+
};
52+
53+
const GAMEDRIVER *GAME_PS2_ECHONIGHTBEYOND = &GAMEDRIVER_INTERFACE;
54+
55+
static float scale = 100.f;
56+
57+
//==========================================================================
58+
// Purpose: return 1 if game is detected
59+
//==========================================================================
60+
static uint8_t PS2_ENB_Status(void)
61+
{
62+
// SLUS_209.28
63+
return (PS2_MEM_ReadWord(0x00093390) == 0x534C5553U &&
64+
PS2_MEM_ReadWord(0x00093394) == 0x5F323039U &&
65+
PS2_MEM_ReadWord(0x00093398) == 0x2E32383BU);
66+
}
67+
//==========================================================================
68+
// Purpose: calculate mouse look and inject into current game
69+
//==========================================================================
70+
static void PS2_ENB_Inject(void)
71+
{
72+
// TODO: disable during
73+
// pause
74+
// elevator
75+
// hatch open
76+
// door open
77+
// examine locked door
78+
// item pickup
79+
// conversation
80+
// save
81+
82+
if(xmouse == 0 && ymouse == 0) // if mouse is idle
83+
return;
84+
85+
float looksensitivity = (float)sensitivity / 140.f;
86+
87+
float camY = PS2_MEM_ReadFloat(ENB_CAMY);
88+
camY -= (float)(invertpitch ? -ymouse : ymouse) * looksensitivity / scale;
89+
camY = ClampFloat(camY, -0.8726645708f, 0.7853981256f);
90+
PS2_MEM_WriteFloat(ENB_CAMY, camY);
91+
PS2_MEM_WriteFloat(ENB_CAMY_LAST, camY);
92+
93+
float camXSin = PS2_MEM_ReadFloat(ENB_CAMX_SIN);
94+
float camXCos = PS2_MEM_ReadFloat(ENB_CAMX_COS);
95+
float angle = atan(camXSin / camXCos);
96+
angle += (float)xmouse * looksensitivity / scale;
97+
if (camXCos < 0)
98+
angle += TAU / 2.f;
99+
camXSin = sin(angle);
100+
camXCos = cos(angle);
101+
PS2_MEM_WriteFloat(ENB_CAMX_SIN, camXSin);
102+
PS2_MEM_WriteFloat(ENB_CAMX_SIN2_NEG, -camXSin);
103+
PS2_MEM_WriteFloat(ENB_CAMX_SIN3_NEG, -camXSin);
104+
PS2_MEM_WriteFloat(ENB_CAMX_COS, camXCos);
105+
PS2_MEM_WriteFloat(ENB_CAMX_COS2, camXCos);
106+
PS2_MEM_WriteFloat(ENB_CAMX_COS3, camXCos);
107+
PS2_MEM_WriteFloat(ENB_CAMX_ANGLE, angle);
108+
109+
}

0 commit comments

Comments
 (0)