Skip to content

Commit 60fc55a

Browse files
committed
ps1_acorepp arena cam fixed
1 parent ea86990 commit 60fc55a

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ avoid clicking off the window.
7070
| <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** |
7171
| <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** |
7272
| <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> | - | - |
73+
| <sup>Armored Core: Project Phantasma (USA) | <sup>SLUS-00670 | <sup>Fair | <sup>VS Mode not supported</br>Replays not working</br>Very little testing</sub> | - | - |
7474
| <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> | - |
7575
| <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** |
7676
| <sup>Brahma Force: The Assault on Beltlogger 9 (USA) | <sup>SLUS-00444 | <sup>Good | <sup>Not fully tested</sub> | - | - |

games/ps1_acorepp.c

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525

2626
#define ACPP_CAMY 0x42708
2727
#define ACPP_CAMX 0x1E2DF2
28+
#define ACPP_ARENA_CAMX 0x1D1D32
29+
#define ACPP_ARENA_CAMX_SANITY 0x1D1D20
30+
#define ACPP_ARENA_CAMX_SANITY_VALUE 0x801D1CC8
2831
#define ACPP_IS_NOT_BUSY 0x1A7FAC
2932
#define ACPP_IS_NOT_PAUSED 0x3BA14
3033
#define ACPP_IS_MAP_OPEN 0x1555EB
@@ -63,13 +66,20 @@ static uint8_t PS1_ACPP_Status(void)
6366
//==========================================================================
6467
static void PS1_ACPP_Inject(void)
6568
{
66-
if (!PS1_MEM_ReadByte(ACPP_IS_NOT_BUSY))
69+
// TODO: find new values for abort prompt
70+
// TODO: find arena isBusy
71+
72+
uint8_t isArena = 0;
73+
if (PS1_MEM_ReadUInt(ACPP_ARENA_CAMX_SANITY) == ACPP_ARENA_CAMX_SANITY_VALUE)
74+
isArena = 1;
75+
76+
if (!PS1_MEM_ReadByte(ACPP_IS_NOT_BUSY) && !isArena)
6777
return;
6878

6979
if (!PS1_MEM_ReadByte(ACPP_IS_NOT_PAUSED))
7080
return;
7181

72-
if (PS1_MEM_ReadByte(ACPP_IS_MAP_OPEN))
82+
if (PS1_MEM_ReadByte(ACPP_IS_MAP_OPEN) && !isArena)
7383
return;
7484

7585
// if (PS1_MEM_ReadByte(ACPP_IS_ABORT_PROMPT) == 0x4)
@@ -78,7 +88,12 @@ static void PS1_ACPP_Inject(void)
7888
if(xmouse == 0 && ymouse == 0) // if mouse is idle
7989
return;
8090

81-
uint16_t camX = PS1_MEM_ReadHalfword(ACPP_CAMX);
91+
// uint16_t camX = PS1_MEM_ReadHalfword(ACPP_CAMX);
92+
uint16_t camX;
93+
if (isArena)
94+
camX = PS1_MEM_ReadHalfword(ACPP_ARENA_CAMX);
95+
else
96+
camX = PS1_MEM_ReadHalfword(ACPP_CAMX);
8297
uint16_t camY = PS1_MEM_ReadHalfword(ACPP_CAMY);
8398
float camXF = (float)camX;
8499
float camYF = (float)camY;
@@ -93,6 +108,9 @@ static void PS1_ACPP_Inject(void)
93108
float dy = ym * looksensitivity * scale;
94109
AccumulateAddRemainder(&camYF, &yAccumulator, ym, dy);
95110

96-
PS1_MEM_WriteHalfword(ACPP_CAMX, (uint16_t)camXF);
111+
if (isArena)
112+
PS1_MEM_WriteHalfword(ACPP_ARENA_CAMX, (uint16_t)camXF);
113+
else
114+
PS1_MEM_WriteHalfword(ACPP_CAMX, (uint16_t)camXF);
97115
PS1_MEM_WriteHalfword(ACPP_CAMY, (uint16_t)camYF);
98116
}

0 commit comments

Comments
 (0)