More bug fixes related to ABL change, paper mario now boots

This commit is contained in:
zilmar 2012-10-24 22:57:57 +11:00
parent 0cdb90fa6d
commit d72f2c2c55
2 changed files with 8 additions and 4 deletions

View File

@ -471,7 +471,10 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin
if (Command.rs != 0 || Command.rt != 0) if (Command.rs != 0 || Command.rt != 0)
{ {
ContinuePC = PC + 8; ContinuePC = PC + 8;
} else if (TargetPC == PC) { }
if (TargetPC == PC && !DelaySlotEffectsCompare(PC,Command.rs,Command.rt))
{
PermLoop = true; PermLoop = true;
} }
IncludeDelaySlot = true; IncludeDelaySlot = true;
@ -571,8 +574,9 @@ bool CCodeBlock::AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & Contin
case R4300i_LB: case R4300i_LH: case R4300i_LWL: case R4300i_LW: case R4300i_LB: case R4300i_LH: case R4300i_LWL: case R4300i_LW:
case R4300i_LBU: case R4300i_LHU: case R4300i_LWR: case R4300i_LWU: case R4300i_LBU: case R4300i_LHU: case R4300i_LWR: case R4300i_LWU:
case R4300i_SB: case R4300i_SH: case R4300i_SWL: case R4300i_SW: case R4300i_SB: case R4300i_SH: case R4300i_SWL: case R4300i_SW:
case R4300i_SWR: case R4300i_CACHE: case R4300i_LWC1: case R4300i_LDC1: case R4300i_SDL: case R4300i_SDR: case R4300i_SWR: case R4300i_CACHE:
case R4300i_LD: case R4300i_SWC1: case R4300i_SDC1: case R4300i_SD: case R4300i_LWC1: case R4300i_LDC1: case R4300i_LD: case R4300i_SWC1:
case R4300i_SDC1: case R4300i_SD:
break; break;
case R4300i_BEQL: case R4300i_BEQL:
TargetPC = PC + ((short)Command.offset << 2) + 4; TargetPC = PC + ((short)Command.offset << 2) + 4;

View File

@ -784,7 +784,7 @@ bool LoopAnalysis::SyncRegState ( CRegInfo & RegSet, const CRegInfo& SyncReg )
CPU_Message(__FUNCTION__ ": Clear state %s RegEnter State: %X Jump Reg State: %X",CRegName::GPR[x],RegSet.MipsRegState(x),SyncReg.MipsRegState(x)); CPU_Message(__FUNCTION__ ": Clear state %s RegEnter State: %X Jump Reg State: %X",CRegName::GPR[x],RegSet.MipsRegState(x),SyncReg.MipsRegState(x));
RegSet.SetMipsRegState(x,CRegInfo::STATE_MODIFIED); RegSet.SetMipsRegState(x,CRegInfo::STATE_MODIFIED);
bChanged = true; bChanged = true;
} else if (RegSet.IsConst(x) && RegSet.Is64Bit(x)) { } else if (RegSet.IsConst(x) && RegSet.Is64Bit(x) && RegSet.cMipsReg_S(x) != SyncReg.cMipsReg_S(x)) {
_Notify->BreakPoint(__FILE__,__LINE__); _Notify->BreakPoint(__FILE__,__LINE__);
} }
} }