Skip to content

Commit 81ef74a

Browse files
committed
v12 newly supported games
1 parent 4e5f8ba commit 81ef74a

15 files changed

+849
-27
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ avoid clicking off the window.
8686
| Future Cop: L.A.P.D. (USA) | SLUS-00739 | Fair | <sup>Not fully tested</sub> | |
8787
| Duke Nukem: Time to Kill (USA) | SLUS-00583 | Fair | <sup>Requires supplied cheat file, Not fully tested</sub> | **DukeNukemTimeToKill_SLUS-00583.cht** |
8888
| Jumping Flash (USA) | SCUS-94103 | Good | <sup>Requires supplied cheat file</sub> | **JumpingFlash_SCUS-94103.cht** |
89+
| Hybrid (Japan, Europe) | SLPS-01102, SLES-03531 | Fair | <sup>Requires supplied cheat file</sub> | **Hybrid_SLPS-01102.cht (Japan)<br>Hybrid_SLES-03531.cht (Europe)** |
8990
* NOTE: If DuckStation is not hooking, try restoring the default settings. 'Settings->General->Restore Defaults'
9091
* Importing cheat files in DuckStation: 'Tools->Cheat Manager->Cheat List->Import->From File'
9192

@@ -138,6 +139,8 @@ avoid clicking off the window.
138139
| 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)** |
139140
| 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> | - |
140141
| Beverly Hills Cop (PAL) | SLES-54456 | Fair | <sup>Not fully tested</sub> | - | - |
142+
| SOCOM U.S. Navy SEALs (USA) | SCUS-97134 | Fair | <sup>Not fully tested</sub> | <sup>Aim Assist: Off</sub> | - |
143+
| Ghost in the Shell: Stand Alone Complex (USA) | SLUS-21006 | Fair | <sup>Horizontal camera while climbing not clamped</sub> | - | - |
141144
* NOTE: PCSX2 will only hook with **BIOS versions 5XXXX and up**.
142145
* NOTE: Some aspects may break when a game is started with overclocking. Requires testing.
143146
* PCSX2 Settings: **Disable** *'Settings->Interface->Double-Click Toggles Fullscreen'* | **Enable** *'Settings->Interface->Hide Cursor In Fullscreen'*

TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Frequently Asked Questions at top of README
1818
Proper BIOS
1919
Keybinds/Controller Setup is not provided
2020
Unlisted games
21+
Explain no installation/works from any directory
2122
PCSX2 | use pointer to PS2 RAM? "pcsx2-qtx64-avx2.exe"+342CDD0
2223
seems to be static
2324

cheats/PS1/Hybrid_SLES-03531.cht

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#group=MouseInjector
2+
#type=Gameshark
3+
#activation=EndFrame
4+
[*Disable Auto-Lookahead]
5+
E00A5CC4 0001
6+
8002C364 0000
7+
E00A5CC4 0001
8+
8002C366 0000
9+
E00A5CC4 0001
10+
8002C3D8 0000
11+
E00A5CC4 0001
12+
8002C3DA 0000
13+
E00A5CC4 0001
14+
8002C348 0000
15+
E00A5CC4 0001
16+
8002C34A 0000
17+
E00A5CC4 0001
18+
8002C3C4 0000
19+
E00A5CC4 0001
20+
8002C3C6 0000
21+
E00A5CC4 0001
22+
8002C328 0000
23+
E00A5CC4 0001
24+
8002C32A 0000
25+
E00A5CC4 0001
26+
8002C3A4 0000
27+
E00A5CC4 0001
28+
8002C3A6 0000
29+

cheats/PS1/Hybrid_SLPS-01102.cht

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#group=MouseInjector
2+
#type=Gameshark
3+
#activation=EndFrame
4+
[*Disable Auto-Lookahead]
5+
E009E770 0001
6+
800269A8 0000
7+
E009E770 0001
8+
800269AA 0000
9+
E009E770 0001
10+
80026A24 0000
11+
E009E770 0001
12+
80026A26 0000
13+
E009E770 0001
14+
80026A04 0000
15+
E009E770 0001
16+
80026A06 0000
17+
E009E770 0001
18+
800269C4 0000
19+
E009E770 0001
20+
800269C6 0000
21+
E009E770 0001
22+
80026990 0000
23+
E009E770 0001
24+
80026992 0000
25+
E009E770 0001
26+
80026A40 0000
27+
E009E770 0001
28+
80026A42 0000
29+

games/game.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ extern const GAMEDRIVER *GAME_PS2_KILLZONE;
138138
extern const GAMEDRIVER *GAME_PS2_TIMESPLITTERS;
139139
extern const GAMEDRIVER *GAME_PS2_BATTLEFIELD2;
140140
extern const GAMEDRIVER *GAME_PS2_CALLOFDUTY3;
141+
extern const GAMEDRIVER *GAME_PS2_NPPLPAINTBALL;
142+
extern const GAMEDRIVER *GAME_PS1_SMALLSOLDIERS;
143+
extern const GAMEDRIVER *GAME_PS2_SOCOM1;
144+
extern const GAMEDRIVER *GAME_PS1_HYBRID;
145+
extern const GAMEDRIVER *GAME_PS1_HYBRID_JAPAN;
141146

142147
static const GAMEDRIVER **GAMELIST[] =
143148
{ // UNF - Unfinished
@@ -256,7 +261,12 @@ static const GAMEDRIVER **GAMELIST[] =
256261
&GAME_PS2_KILLZONE, // UNF
257262
&GAME_PS2_TIMESPLITTERS,
258263
&GAME_PS2_BATTLEFIELD2, // UNF
259-
&GAME_PS2_CALLOFDUTY3
264+
&GAME_PS2_CALLOFDUTY3,
265+
&GAME_PS2_NPPLPAINTBALL,
266+
&GAME_PS1_SMALLSOLDIERS,
267+
&GAME_PS2_SOCOM1,
268+
&GAME_PS1_HYBRID,
269+
&GAME_PS1_HYBRID_JAPAN
260270
};
261271

262272
static const GAMEDRIVER *CURRENT_GAME = NULL;

games/ps1_hybrid.c

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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 HYB_CAMY 0x14F524
27+
#define HYB_CAMY2 0xA5CCC
28+
#define HYB_CAMX 0xF5806
29+
30+
#define HYB_IS_NOT_PAUSED 0xA5CC4
31+
32+
static uint8_t PS1_HYB_Status(void);
33+
static void PS1_HYB_Inject(void);
34+
35+
static const GAMEDRIVER GAMEDRIVER_INTERFACE =
36+
{
37+
"Hybrid",
38+
PS1_HYB_Status,
39+
PS1_HYB_Inject,
40+
1, // 1000 Hz tickrate
41+
0 // crosshair sway supported for driver
42+
};
43+
44+
const GAMEDRIVER *GAME_PS1_HYBRID = &GAMEDRIVER_INTERFACE;
45+
46+
static float xAccumulator = 0.f;
47+
static float yAccumulator = 0.f;
48+
49+
//==========================================================================
50+
// Purpose: return 1 if game is detected
51+
//==========================================================================
52+
static uint8_t PS1_HYB_Status(void)
53+
{
54+
// SLES_035.31
55+
return (PS1_MEM_ReadWord(0x93DC) == 0x534C4553U &&
56+
PS1_MEM_ReadWord(0x93E0) == 0x5F303335U &&
57+
PS1_MEM_ReadWord(0x93E4) == 0x2E33313BU);
58+
}
59+
//==========================================================================
60+
// Purpose: calculate mouse look and inject into current game
61+
//==========================================================================
62+
static void PS1_HYB_Inject(void)
63+
{
64+
// TODO: 25/50 FPS cheat
65+
66+
if(xmouse == 0 && ymouse == 0) // if mouse is idle
67+
return;
68+
69+
if (!PS1_MEM_ReadByte(HYB_IS_NOT_PAUSED))
70+
return;
71+
72+
uint16_t camX = PS1_MEM_ReadHalfword(HYB_CAMX);
73+
int16_t camY = PS1_MEM_ReadInt16(HYB_CAMY);
74+
float camXF = (float)camX;
75+
float camYF = (float)camY;
76+
77+
const float looksensitivity = (float)sensitivity / 20.f;
78+
79+
float dx = (float)xmouse * looksensitivity;
80+
AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx);
81+
while (camXF > 4096.f)
82+
camXF -= 4096.f;
83+
while (camXF < 0.f)
84+
camXF += 4096.f;
85+
86+
float ym = (float)(invertpitch ? -ymouse : ymouse);
87+
float dy = ym * looksensitivity;
88+
AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy);
89+
camYF = ClampFloat(camYF, -340.f, 340.f);
90+
91+
PS1_MEM_WriteHalfword(HYB_CAMX, (uint16_t)camXF);
92+
PS1_MEM_WriteInt16(HYB_CAMY, (int16_t)camYF);
93+
PS1_MEM_WriteInt16(HYB_CAMY2, (int16_t)camYF);
94+
}

games/ps1_hybrid_japan.c

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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 HYB_CAMY 0x156E7C
27+
#define HYB_CAMY2 0x9E7B8
28+
#define HYB_CAMX 0xEE2EE
29+
30+
#define HYB_IS_NOT_PAUSED 0x9E770
31+
32+
static uint8_t PS1_HYB_Status(void);
33+
static void PS1_HYB_Inject(void);
34+
35+
static const GAMEDRIVER GAMEDRIVER_INTERFACE =
36+
{
37+
"Hybrid",
38+
PS1_HYB_Status,
39+
PS1_HYB_Inject,
40+
1, // 1000 Hz tickrate
41+
0 // crosshair sway supported for driver
42+
};
43+
44+
const GAMEDRIVER *GAME_PS1_HYBRID_JAPAN = &GAMEDRIVER_INTERFACE;
45+
46+
static float xAccumulator = 0.f;
47+
static float yAccumulator = 0.f;
48+
49+
//==========================================================================
50+
// Purpose: return 1 if game is detected
51+
//==========================================================================
52+
static uint8_t PS1_HYB_Status(void)
53+
{
54+
// SLPS_011.02
55+
return (PS1_MEM_ReadWord(0x93C4) == 0x534C5053U &&
56+
PS1_MEM_ReadWord(0x93C8) == 0x5F303131U &&
57+
PS1_MEM_ReadWord(0x93CC) == 0x2E30323BU);
58+
}
59+
//==========================================================================
60+
// Purpose: calculate mouse look and inject into current game
61+
//==========================================================================
62+
static void PS1_HYB_Inject(void)
63+
{
64+
// TODO: 25/50 FPS cheat
65+
66+
if(xmouse == 0 && ymouse == 0) // if mouse is idle
67+
return;
68+
69+
if (!PS1_MEM_ReadByte(HYB_IS_NOT_PAUSED))
70+
return;
71+
72+
uint16_t camX = PS1_MEM_ReadHalfword(HYB_CAMX);
73+
int16_t camY = PS1_MEM_ReadInt16(HYB_CAMY);
74+
float camXF = (float)camX;
75+
float camYF = (float)camY;
76+
77+
const float looksensitivity = (float)sensitivity / 20.f;
78+
79+
float dx = (float)xmouse * looksensitivity;
80+
AccumulateAddRemainder(&camXF, &xAccumulator, xmouse, dx);
81+
while (camXF > 4096.f)
82+
camXF -= 4096.f;
83+
while (camXF < 0.f)
84+
camXF += 4096.f;
85+
86+
float ym = (float)(invertpitch ? -ymouse : ymouse);
87+
float dy = ym * looksensitivity;
88+
AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy);
89+
camYF = ClampFloat(camYF, -340.f, 340.f);
90+
91+
PS1_MEM_WriteHalfword(HYB_CAMX, (uint16_t)camXF);
92+
PS1_MEM_WriteInt16(HYB_CAMY, (int16_t)camYF);
93+
// PS1_MEM_WriteInt16(HYB_CAMY2, (int16_t)camYF);
94+
}

0 commit comments

Comments
 (0)