Prevent remaining possibilities of overwriting $zero in RSP.

In the RSP, MFC0, MFC2, and CFC2 were all susceptible to overwriting $zero.  Some of us have tried waiting for some games to use handcoded assembly in an attempt to purposely overwrite $zero in their microcode (to throw off emulators), but so far what few occurrences there have been of this have not included using those 3 opcodes.  Since it was decided to centralize the security of register $zero in the main R4300 CPU, it was decided to do so in the RSP as well.
This commit is contained in:
unknown 2015-03-08 20:17:18 -04:00
parent dc103ec59b
commit 1772f1467c
1 changed files with 1 additions and 0 deletions

View File

@ -444,6 +444,7 @@ DWORD RunInterpreterCPU(DWORD Cycles) {
RSP_LW_IMEM(*PrgCount, &RSPOpC.Hex);
RSP_Opcode[ RSPOpC.op ]();
RSP_GPR[0].W = 0x00000000; /* MIPS $zero hard-wired to 0 */
switch (RSP_NextInstruction) {
case NORMAL: