Fix PGXP "+CPU" integration (#448)

Add PGXP calls for instructions that were previously missed. Should improve support for games like Croc, MGS, Alundra 2 and others.
This commit is contained in:
iCatButler 2018-11-25 14:47:26 +00:00 committed by hizzlekizzle
parent 74bd7550ff
commit 8d15a7823c

View File

@ -2131,6 +2131,9 @@ pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in)
uint32 result = GPR[rs] - GPR[rt];
bool ep = (((GPR[rs] ^ GPR[rt])) & (GPR[rs] ^ result)) & 0x80000000;
if (PGXP_GetModes() & PGXP_MODE_CPU)
PGXP_CPU_SUB(instr, result, GPR[rs], GPR[rt]);
DO_LDS();
if(MDFN_UNLIKELY(ep))
@ -2157,6 +2160,9 @@ pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in)
uint32 result = GPR[rs] - GPR[rt];
if (PGXP_GetModes() & PGXP_MODE_CPU)
PGXP_CPU_SUBU(instr, result, GPR[rs], GPR[rt]);
DO_LDS();
GPR[rd] = result;
@ -2188,6 +2194,9 @@ pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in)
uint32 result = GPR[rs] ^ GPR[rt];
if (PGXP_GetModes() & PGXP_MODE_CPU)
PGXP_CPU_XOR(instr, result, GPR[rs], GPR[rt]);
DO_LDS();
GPR[rd] = result;
@ -2207,6 +2216,9 @@ pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in)
uint32 result = GPR[rs] ^ immediate;
if (PGXP_GetModes() & PGXP_MODE_CPU)
PGXP_CPU_XORI(instr, result, GPR[rs]);
DO_LDS();
GPR[rt] = result;
@ -2235,6 +2247,9 @@ pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in)
LDWhich = rt;
LDValue = (int32)ReadMemory<int8>(timestamp, address);
if (PGXP_GetModes() & PGXP_MODE_MEMORY)
PGXP_CPU_LB(instr, LDValue, address);
END_OPF;
//
@ -2405,6 +2420,9 @@ pscpu_timestamp_t PS_CPU::RunReal(pscpu_timestamp_t timestamp_in)
else
WriteMemory<uint16>(timestamp, address, GPR[rt]);
if (PGXP_GetModes() & PGXP_MODE_MEMORY)
PGXP_CPU_SH(instr, GPR[rt], address);
DO_LDS();
END_OPF;