From 54ef2e8a8000b8056aa32eb00179ab15dd48e2d8 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Fri, 21 May 2010 08:32:39 +0000 Subject: revert the previous revert, and fixed the value in mdec1Interrupt(). git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@48431 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/ix86/iR3000A.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libpcsxcore/ix86') diff --git a/libpcsxcore/ix86/iR3000A.c b/libpcsxcore/ix86/iR3000A.c index b8076409..f8583d84 100644 --- a/libpcsxcore/ix86/iR3000A.c +++ b/libpcsxcore/ix86/iR3000A.c @@ -97,7 +97,7 @@ static void iFlushRegs() { static void iRet() { /* store cycle */ - count = (pc - pcold)/4; + count = ((pc - pcold) / 4) * BIAS; ADD32ItoM((u32)&psxRegs.cycle, count); if (resp) ADD32ItoR(ESP, resp); RET(); @@ -148,7 +148,7 @@ static void SetBranch() { iFlushRegs(); MOV32ItoM((u32)&psxRegs.code, psxRegs.code); /* store cycle */ - count = (pc - pcold) / 4; + count = ((pc - pcold) / 4) * BIAS; ADD32ItoM((u32)&psxRegs.cycle, count); if (resp) ADD32ItoR(ESP, resp); @@ -180,7 +180,7 @@ static void iJump(u32 branchPC) { iFlushRegs(); MOV32ItoM((u32)&psxRegs.code, psxRegs.code); /* store cycle */ - count = (pc - pcold)/4; + count = ((pc - pcold) / 4) * BIAS; ADD32ItoM((u32)&psxRegs.cycle, count); if (resp) ADD32ItoR(ESP, resp); @@ -199,7 +199,7 @@ static void iJump(u32 branchPC) { MOV32ItoM((u32)&psxRegs.pc, branchPC); CALLFunc((u32)psxBranchTest); /* store cycle */ - count = (pc - pcold)/4; + count = ((pc - pcold) / 4) * BIAS; ADD32ItoM((u32)&psxRegs.cycle, count); if (resp) ADD32ItoR(ESP, resp); @@ -236,7 +236,7 @@ static void iBranch(u32 branchPC, int savectx) { iFlushRegs(); MOV32ItoM((u32)&psxRegs.code, psxRegs.code); /* store cycle */ - count = ((pc+4) - pcold)/4; + count = (((pc+4) - pcold) / 4) * BIAS; ADD32ItoM((u32)&psxRegs.cycle, count); if (resp) ADD32ItoR(ESP, resp); @@ -256,7 +256,7 @@ static void iBranch(u32 branchPC, int savectx) { MOV32ItoM((u32)&psxRegs.pc, branchPC); CALLFunc((u32)psxBranchTest); /* store cycle */ - count = (pc - pcold)/4; + count = ((pc - pcold) / 4) * BIAS; ADD32ItoM((u32)&psxRegs.cycle, count); if (resp) ADD32ItoR(ESP, resp); -- cgit v1.2.3