Skip to content

Commit 3ee1243

Browse files
committed
v15 newly supported games and emulator
Newly supported games | 007: The World Is Not Enough (N64), Armored Core: Project Phantasma (PS1), King's Field III: Pilot Style (PS1) Newly supported emulators | Project64 (N64)
1 parent aa20a28 commit 3ee1243

File tree

16 files changed

+737
-52
lines changed

16 files changed

+737
-52
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ An external app that injects cursor input into game memory.
1414
| PCSX2 Nightly | latest | pcsx2-qt.exe<br>pcsx2-qtx64.exe<br>pcsx2-qtx64-avx2.exe |
1515
| RetroArch (see cores below) | 1.14.0 | retroarch.exe |
1616
| PPSSPP | 1.14.4 | PPSSPPWindows.exe / PPSSPPWindows64.exe |
17+
| Project64 | >=3.0.1 | Project64.exe |
1718
* NOTE: Versions given are the latest that have been tested working, may work with newer
1819
* NOTE: PCSX2 will only hook with **BIOS versions 5XXXX and up**.
1920

@@ -69,6 +70,7 @@ avoid clicking off the window.
6970
| <sup>Alien Trilogy (USA) | <sup>SLUS-00007</sub> | <sup>Good | <sup>Requires supplied cheat file</br>Not fully tested</sub> | - | <sup>**AlienTrilogy_SLUS-00007.cht** |
7071
| <sup>Aquanaut's Holiday (USA) | <sup>SCUS-94603</sub> | <sup>Good | <sup>Requires supplied cheat file</br>Very little testing</sub> | - | <sup>**AquanautsHoliday_SCUS-94603.cht** |
7172
| <sup>Armored Core (USA) | <sup>SCUS-94182</br>SLUS-01323 | <sup>Fair | <sup>VS Mode not supported</br>Not fully tested</sub> | - | - |
73+
| <sup>Armored Core: Project Phantasma (USA) | <sup>SLUS-00670 | <sup>Fair | <sup>VS Mode not supported</br>Not fully tested</sub> | - | - |
7274
| <sup>Armorines: Project S.W.A.R.M. (USA) | <sup>SLUS-01022 | <sup>Fair | <sup>Not fully tested</sub> | <sup>Look Spring: Off</br>Auto Aim: Off</sub> | - |
7375
| <sup>Baroque - Yuganda Mousou (Japan) | <sup>SLPM-86328 | <sup>Fair | <sup>Supplied cheat required to prevent camera y-axis from being reset on hit</br>Not fully tested</sub> | - | <sup>**Baroque_SLPM-86328.cht** |
7476
| <sup>Brahma Force: The Assault on Beltlogger 9 (USA) | <sup>SLUS-00444 | <sup>Good | <sup>Not fully tested</sub> | - | - |
@@ -86,6 +88,7 @@ avoid clicking off the window.
8688
| <sup>King's Field (II) (USA) | <sup>SLUS-00158 | <sup>Good | <sup>Not fully tested</sub> | - | - |
8789
| <sup>King's Field (Japan) | <sup>SLPS-00017 | <sup>Good | <sup>Not fully tested, Will not hook until in-game</sub> | - | - |
8890
| <sup>King's Field II (III) (USA) | <sup>SLUS-00255 | <sup>Good | <sup>Not fully tested</sub> | - | - |
91+
| <sup>King's Field III: Pilot Style (Japan) | <sup>SLPM-80029 | <sup>Good | <sup>None</sub> | - | - |
8992
| <sup>LSD: Dream Emulator (Japan) | <sup>SLPS-01556 | <sup>Good | <sup>Requires supplied cheat file</br>Not fully tested</sub> | - | <sup>**LSDDreamEmulator_SLPS-01556.cht** |
9093
| <sup>Medal of Honor: Underground (USA) | <sup>SLUS-01270 | <sup>Fair | <sup>Machine Gun sentry doesn't always work (depends on objects in line of sight). Sidecar gun in 6-3 not supported. Precise aim not supported (holding trigger aiming). Controller type must be Analog/DualShock or else auto-center will be enabled. </sub> | - | - |
9194
| <sup>Men in Black: The Series - Crashdown (NTSC) | <sup>SLUS-01387 | <sup>Good | <sup>None</sub> | <sup>Auto Aim: Off</sub> | - |
@@ -115,11 +118,12 @@ avoid clicking off the window.
115118
* Open '.cue' file in a text editor and change first line to match patched file
116119
* *FILE "007 The World Is Not Enough (USA) (MouseInjector).bin" BINARY"*
117120

118-
## Supported Mupen64Plus(RetroArch)
119-
| Game Title | Mouse Support | Issues |
120-
| --- | :---: | ----------- |
121-
| GoldenEye: 007 (NTSC) | Fair | <sup>None</sub> |
122-
| Sin and Punishment (J) | Good | <sup>Not fully tested</sub> |
121+
## Supported N64 Titles
122+
| Game Title | Mouse Support | Issues | In-game Options | Cheat File |
123+
| --- | :---: | :-----------: | :---: | :---: |
124+
| GoldenEye: 007 (USA) | Fair | <sup>None</sub> | - | - |
125+
| Sin and Punishment (J) | Good | <sup>Not fully tested</sub> | - | - |
126+
| 007: The World Is Not Enough (USA) | Good | <sup>Requires cheat for 'Cold Reception' mission</br>(disable cheat for multiplayer, may require restart)</br>Not fully tested</sub> | <sup>Auto Aim: Off</br>Look Ahead: Off</br>Auto Level: Off</sub>| <sup>**007 - The World Is Not Enough (USA).cht**</sub> |
123127

124128
## Supported SNES Titles
125129
| Game Title | Mouse Support | Issues |

TODO

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ Add game serials to README
55
Check the BIOS version to make sure it is 5XXXX or higher
66
Find better checks for N64 status
77
After switching games in RetroArch, the last game's status is still valid?
8-
so the injector must be closed and reopened
8+
so the injector must be closed and reopened
99
Might be a problem with RA in general
10+
Try looking for lastRegionSize
1011
*DONE* Different time/sleep implementation for more consistent tickrate
1112
Some PS2 titles (or all?) seem to be affected
1213
Options stuct defined in each game
@@ -23,4 +24,6 @@ Support for mapping keyboard keys to in-game functions
2324
Ex: For Quake III have the ability to map weapons to number keys
2425
Change the keys and toggle them on/off
2526
Ability to enable/disable features like aim-assist from GUI
26-
Select emulator to hook to from drop-down menu
27+
Select emulator to hook to from drop-down menu
28+
Select input device
29+
Multiple input devices for multiplayer
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[033F4C13-319EE7A7-C:45]
2+
Name=007 - The World is Not Enough (U)
3+
4+
$Disable Auto-Center/Level on Cold Reception
5+
D0117D37 0030
6+
81066BB0 0000
7+
D0117D37 0030
8+
81066BB2 0000
9+
D0117D37 0030
10+
81067054 0000
11+
D0117D37 0030
12+
81067056 0000
13+
D0117D37 0030
14+
81067058 0000
15+
D0117D37 0030
16+
8106705A 0000
17+
D0117D37 0030
18+
8111B94C 0000
19+
D0117D37 0030
20+
8111B94E 0000
21+
D0117D37 0030
22+
8106CB54 0000
23+
D0117D37 0030
24+
8106CB56 0000
25+
D0117D37 0030
26+
8106EFD0 0000
27+
D0117D37 0030
28+
8106EFD2 0000
29+
D0117D37 0030
30+
8111B964 0000
31+
D0117D37 0030
32+
8111B966 0000
33+
D0117D37 0030
34+
8111B984 0000
35+
D0117D37 0030
36+
8111B986 0000
37+
D0117D37 0030
38+
81067080 0000
39+
D0117D37 0030
40+
81067082 0000
41+
D0117D37 0030
42+
810670A8 0000
43+
D0117D37 0030
44+
810670AA 0000
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
cheat0_address = "0"
2+
cheat0_address_bit_position = "0"
3+
cheat0_big_endian = "false"
4+
cheat0_cheat_type = "1"
5+
cheat0_code = "D0117D37 0030; 81066BB0 0000; D0117D37 0030; 81066BB2 0000; D0117D37 0030; 81067054 0000; D0117D37 0030; 81067056 0000; D0117D37 0030; 81067058 0000; D0117D37 0030; 8106705A 0000; D0117D37 0030; 8111B94C 0000; D0117D37 0030; 8111B94E 0000; D0117D37 0030; 8106CB54 0000; D0117D37 0030; 8106CB56 0000; D0117D37 0030; 8106EFD0 0000; D0117D37 0030; 8106EFD2 0000; D0117D37 0030; 8111B964 0000; D0117D37 0030; 8111B966 0000; D0117D37 0030; 8111B984 0000; D0117D37 0030; 8111B986 0000; D0117D37 0030; 81067080 0000; D0117D37 0030; 81067082 0000; D0117D37 0030; 810670A8 0000; D0117D37 0030; 810670AA 0000"
6+
cheat0_desc = "Disable Auto-Center/Level on Cold Reception"
7+
cheat0_enable = "true"
8+
cheat0_handler = "0"
9+
cheat0_memory_search_size = "3"
10+
cheat0_repeat_add_to_address = "1"
11+
cheat0_repeat_add_to_value = "0"
12+
cheat0_repeat_count = "0"
13+
cheat0_rumble_port = "0"
14+
cheat0_rumble_primary_duration = "0"
15+
cheat0_rumble_primary_strength = "0"
16+
cheat0_rumble_secondary_duration = "0"
17+
cheat0_rumble_secondary_strength = "0"
18+
cheat0_rumble_type = "0"
19+
cheat0_rumble_value = "0"
20+
cheat0_value = "0"
21+
cheats = "1"

games/game.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ extern const GAMEDRIVER *GAME_PS2_CALLOFDUTYWORLDATWAR;
159159
extern const GAMEDRIVER *GAME_PS2_DELTAFORCE;
160160
extern const GAMEDRIVER *GAME_PS2_FOREVERKINGDOM;
161161
extern const GAMEDRIVER *GAME_PS1_GAMERA2000;
162+
extern const GAMEDRIVER *GAME_PS1_POPULOUSTHEBEGINNING;
163+
extern const GAMEDRIVER *GAME_N64_DUKEZEROHOUR;
164+
extern const GAMEDRIVER *GAME_N64_TUROKRAGEWARS;
165+
extern const GAMEDRIVER *GAME_N64_MEGAMAN64;
166+
extern const GAMEDRIVER *GAME_PS1_KINGSFIELD3PILOT;
167+
extern const GAMEDRIVER *GAME_PS1_ARMOREDCOREPP;
162168

163169
static const GAMEDRIVER **GAMELIST[] =
164170
{ // UNF - Unfinished
@@ -285,7 +291,7 @@ static const GAMEDRIVER **GAMELIST[] =
285291
&GAME_PS2_SPIDERMAN2, // UNF
286292
&GAME_PS1_POWERSLAVE,
287293
&GAME_PS1_GHOSTINTHESHELL,
288-
&GAME_PS1_DELTAFORCEURBANWARFARE, // UNF
294+
&GAME_PS1_DELTAFORCEURBANWARFARE,
289295
&GAME_PS2_GTAVICECITYSTORIES, // UNF
290296
&GAME_PS2_GHOSTBUSTERS, // UNF
291297
&GAME_PS2_SWAT,
@@ -298,7 +304,13 @@ static const GAMEDRIVER **GAMELIST[] =
298304
&GAME_PS2_CALLOFDUTYWORLDATWAR, // UNF
299305
&GAME_PS2_DELTAFORCE,
300306
&GAME_PS2_FOREVERKINGDOM, // UNF
301-
&GAME_PS1_GAMERA2000
307+
&GAME_PS1_GAMERA2000, // UNF
308+
&GAME_PS1_POPULOUSTHEBEGINNING, // UNF
309+
&GAME_N64_DUKEZEROHOUR, // UNF
310+
&GAME_N64_TUROKRAGEWARS, // UNF
311+
&GAME_N64_MEGAMAN64, // UNF
312+
&GAME_PS1_KINGSFIELD3PILOT,
313+
&GAME_PS1_ARMOREDCOREPP
302314
};
303315

304316
static const GAMEDRIVER *CURRENT_GAME = NULL;

games/n64_007wine.c

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,20 @@
2424
#include "../mouse.h"
2525
#include "game.h"
2626

27-
#define WINE_CAMBASE 0x800E1718
28-
#define WINE_CAMBASE_SANITY_VALUE 0x3FDDB3D7
27+
#define WINE_CAMBASE_POINTER 0x80102CD0
28+
#define WINE_CAMBASE_SANITY_VALUE_1 0x0007D000
29+
#define WINE_CAMBASE_SANITY_VALUE_2 0xFFFFFFFF
2930
// -- offsets from cambase --
30-
#define WINE_CAMBASE_SANITY_1 0x64
31-
#define WINE_CAMBASE_SANITY_2 0xF4
32-
#define WINE_CAMX 0xD0
33-
#define WINE_CAMY 0x148
34-
#define WINE_CAM_ZOOM 0x150
35-
#define WINE_AUTO_LEVEL 0x291
31+
#define WINE_CAMBASE_SANITY_1 0x0
32+
#define WINE_CAMBASE_SANITY_2 0xC
33+
// offsets from camValueBasePointer
34+
#define WINE_CAMX -0x44
35+
#define WINE_CAMY 0x34
36+
#define WINE_CAM_ZOOM 0x3C
37+
#define WINE_AUTO_LEVEL 0x17D
38+
39+
#define WINE_STATUS 0x8022CFE8
40+
#define WINE_STATUS_NOT_BUSY 0xDE000000
3641

3742
static uint8_t N64_WINE_Status(void);
3843
static uint8_t N64_WINE_DetectCam(void);
@@ -50,6 +55,7 @@ static const GAMEDRIVER GAMEDRIVER_INTERFACE =
5055
const GAMEDRIVER *GAME_N64_007WINE = &GAMEDRIVER_INTERFACE;
5156

5257
static uint32_t camBase = 0;
58+
static uint32_t camValueBase = 0;
5359

5460
static uint8_t N64_WINE_Status(void)
5561
{
@@ -58,10 +64,10 @@ static uint8_t N64_WINE_Status(void)
5864

5965
static uint8_t N64_WINE_DetectCam(void)
6066
{
61-
uint32_t tempCamBase = N64_MEM_ReadUInt(WINE_CAMBASE);
67+
uint32_t tempCamBase = N64_MEM_ReadUInt(WINE_CAMBASE_POINTER);
6268
if (tempCamBase &&
63-
N64_MEM_ReadUInt(tempCamBase + WINE_CAMBASE_SANITY_1) == WINE_CAMBASE_SANITY_VALUE &&
64-
N64_MEM_ReadUInt(tempCamBase + WINE_CAMBASE_SANITY_2) == WINE_CAMBASE_SANITY_VALUE)
69+
N64_MEM_ReadUInt(tempCamBase + WINE_CAMBASE_SANITY_1) == WINE_CAMBASE_SANITY_VALUE_1)// &&
70+
// N64_MEM_ReadUInt(tempCamBase + WINE_CAMBASE_SANITY_2) == WINE_CAMBASE_SANITY_VALUE_2)
6571
{
6672
camBase = tempCamBase;
6773
return 1;
@@ -71,13 +77,12 @@ static uint8_t N64_WINE_DetectCam(void)
7177

7278
static void N64_WINE_Inject(void)
7379
{
74-
// TODO: fix auto-level/lookahead not turning off until camY manually moved with controller
75-
// TODO: disable while
76-
// paused
77-
// cutscene
80+
if (N64_MEM_ReadUInt(WINE_STATUS) != WINE_STATUS_NOT_BUSY)
81+
return;
7882

7983
if (!N64_WINE_DetectCam())
8084
return;
85+
// camBase = N64_MEM_ReadUInt(WINE_CAMBASE);
8186

8287
N64_MEM_WriteByte(camBase + WINE_AUTO_LEVEL - 0x1, 0x1);
8388
N64_MEM_WriteByte(camBase + WINE_AUTO_LEVEL, 0x1);
@@ -86,25 +91,17 @@ static void N64_WINE_Inject(void)
8691
return;
8792

8893
const float looksensitivity = (float)sensitivity;
89-
const float scale = 30000.f;
94+
const float scale = 20000.f;
9095
const float zoom = 1 / N64_MEM_ReadFloat(camBase + WINE_CAM_ZOOM);
9196

9297
float camX = N64_MEM_ReadFloat(camBase + WINE_CAMX);
9398
float camY = N64_MEM_ReadFloat(camBase + WINE_CAMY);
9499

95100
camX -= (float)xmouse * looksensitivity / scale * 1024.f * zoom;
96101
camY -= (float)ymouse * looksensitivity / scale * zoom;
97-
98-
// if (camY > 1)
99-
// camY = 1;
100-
// if (camY < -1)
101-
// camY = -1;
102102

103103
camY = ClampFloat(camY, -1.f, 1.f);
104104

105-
// cursorx = ClampFloat(cursorx, -144.f, 144.f);
106-
// cursory = ClampFloat(cursory, -104.f, 104.f);
107-
108105
N64_MEM_WriteFloat(camBase + WINE_CAMX, camX);
109106
N64_MEM_WriteFloat(camBase + WINE_CAMY, camY);
110107
}

games/n64_dukezerohour.c

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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 <stdio.h>
22+
#include "../main.h"
23+
#include "../memory.h"
24+
#include "../mouse.h"
25+
#include "game.h"
26+
27+
#define DNZH_ROTX 0x80117F12
28+
#define DNZH_ROTY 0x80117F14
29+
#define DNZH_ZOOM 0x80117F44
30+
#define DNZH_CAMX 0x801A27A4
31+
#define DNZH_CAMY 0x801A27AA
32+
33+
static uint8_t N64_DNZH_Status(void);
34+
static void N64_DNZH_Inject(void);
35+
36+
static const GAMEDRIVER GAMEDRIVER_INTERFACE =
37+
{
38+
"Duke Nukem: Zero Hour",
39+
N64_DNZH_Status,
40+
N64_DNZH_Inject,
41+
1, // 1000 Hz tickrate
42+
0 // crosshair sway not supported for driver
43+
};
44+
45+
const GAMEDRIVER *GAME_N64_DUKEZEROHOUR = &GAMEDRIVER_INTERFACE;
46+
47+
static float xAccumulator = 0.f;
48+
static float yAccumulator = 0.f;
49+
50+
static uint8_t N64_DNZH_Status(void)
51+
{
52+
return (N64_MEM_ReadUInt(0x80000000) == 0x3C1A800B && N64_MEM_ReadUInt(0x80000004) == 0x275A44A0); // unique header in RDRAM
53+
}
54+
55+
static void N64_DNZH_Inject(void)
56+
{
57+
// TODO: disable during
58+
// pause
59+
// climbing
60+
// in-game cutscene
61+
// TODO: disable idle camera spin
62+
// TODO: check out in-game debug menu cheat
63+
// TODO: disable auto-aim
64+
// lock red dot to center?
65+
// lvl2 save with 2 enemies and invincibility on, turn
66+
// auto aim level up and down, red dot moves but camera
67+
// will stay the same so you can look for red dot position
68+
// look for different values between first and third person
69+
// maybe you can find an auto-aim value between the two
70+
// TODO: try also writting cam values
71+
72+
if(xmouse == 0 && ymouse == 0) // if mouse is idle
73+
return;
74+
75+
const float looksensitivity = (float)sensitivity;
76+
const float scale = 32.f;
77+
const float zoom = 256.f / N64_MEM_ReadInt16(DNZH_ZOOM);
78+
79+
int16_t rotX = N64_MEM_ReadInt16(DNZH_ROTX);
80+
int16_t rotY = N64_MEM_ReadInt16(DNZH_ROTY);
81+
float rotXF = (float)rotX;
82+
float rotYF = (float)rotY;
83+
84+
float dx = (float)xmouse * looksensitivity / scale * zoom;
85+
AccumulateAddRemainder(&rotXF, &xAccumulator, xmouse, dx);
86+
// cursorXF = ClampFloat(cursorXF, 8.f, 312.f);
87+
88+
float ym = (float)(invertpitch ? -ymouse : ymouse);
89+
float dy = ym * looksensitivity / scale * zoom;
90+
AccumulateAddRemainder(&rotYF, &yAccumulator, ym, dy);
91+
rotYF = ClampFloat(rotYF, -301.f, 301.f);
92+
93+
// rotXF -= (float)xmouse * looksensitivity * scale * zoom;
94+
// rotYF -= (float)ymouse * looksensitivity * scale * zoom;
95+
96+
N64_MEM_WriteInt16(DNZH_ROTX, (int16_t)rotXF);
97+
N64_MEM_WriteInt16(DNZH_CAMX, (int16_t)(rotXF + 515.f));
98+
N64_MEM_WriteInt16(DNZH_ROTY, (int16_t)rotYF);
99+
N64_MEM_WriteInt16(DNZH_CAMY, (int16_t)rotYF);
100+
}

0 commit comments

Comments
 (0)