More Fixes
The possibility of the RSP instruction at address 0xFFC being JR was never accounted for. This fixes Wave Race and Star Wars - Shadow of the Empire. The accumulator analysis was wrong, which broke games like Mario No Photopie.
This commit is contained in:
parent
43c6017ddb
commit
02fe2e7241
|
@ -247,20 +247,25 @@ DWORD WriteToAccum2 (int Location, int PC, BOOL RecursiveCall) {
|
|||
case RSP_VECTOR_VMADL:
|
||||
case RSP_VECTOR_VMADM:
|
||||
case RSP_VECTOR_VMADN:
|
||||
case RSP_VECTOR_VMADH:
|
||||
return TRUE;
|
||||
case RSP_VECTOR_VMADH:
|
||||
if (Location == Low16BitAccum) { break; }
|
||||
return TRUE;
|
||||
|
||||
case RSP_VECTOR_VABS:
|
||||
case RSP_VECTOR_VADD:
|
||||
case RSP_VECTOR_VADDC:
|
||||
case RSP_VECTOR_VSUB:
|
||||
case RSP_VECTOR_VSUBC:
|
||||
case RSP_VECTOR_VAND:
|
||||
case RSP_VECTOR_VNAND:
|
||||
case RSP_VECTOR_VOR:
|
||||
case RSP_VECTOR_VNOR:
|
||||
case RSP_VECTOR_VXOR:
|
||||
case RSP_VECTOR_VNXOR:
|
||||
/* since these modify the accumulator lower-16 bits we can */
|
||||
/* safely assume these 'reset' the accumulator no matter what */
|
||||
return FALSE;
|
||||
// return FALSE;
|
||||
case RSP_VECTOR_VCR:
|
||||
case RSP_VECTOR_VCH:
|
||||
case RSP_VECTOR_VCL:
|
||||
|
@ -272,11 +277,11 @@ DWORD WriteToAccum2 (int Location, int PC, BOOL RecursiveCall) {
|
|||
case RSP_VECTOR_VLT:
|
||||
case RSP_VECTOR_VEQ:
|
||||
case RSP_VECTOR_VGE:
|
||||
case RSP_VECTOR_VMRG:
|
||||
if (Location == Low16BitAccum) { return FALSE; }
|
||||
break;
|
||||
|
||||
case RSP_VECTOR_VMOV:
|
||||
case RSP_VECTOR_VMRG:
|
||||
break;
|
||||
case RSP_VECTOR_VSAW:
|
||||
return TRUE;
|
||||
|
|
|
@ -878,7 +878,7 @@ void CompilerRSPBlock ( void ) {
|
|||
CompilePC += 4;
|
||||
break;
|
||||
}
|
||||
} while ( NextInstruction != FINISH_BLOCK && CompilePC < 0x1000);
|
||||
} while (NextInstruction != FINISH_BLOCK && (CompilePC < 0x1000 || NextInstruction == DELAY_SLOT));
|
||||
CPU_Message("==== end of recompiled code ====");
|
||||
|
||||
if (Compiler.bReOrdering == TRUE) {
|
||||
|
|
Loading…
Reference in New Issue