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/psxcounters.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libpcsxcore/psxcounters.c') diff --git a/libpcsxcore/psxcounters.c b/libpcsxcore/psxcounters.c index 961739cb..d1089b66 100644 --- a/libpcsxcore/psxcounters.c +++ b/libpcsxcore/psxcounters.c @@ -116,7 +116,7 @@ void _psxRcntWcount( u32 index, u32 value ) value &= 0xffff; } - rcnts[index].cycleStart = psxRegs.cycle * BIAS; + rcnts[index].cycleStart = psxRegs.cycle; rcnts[index].cycleStart -= value * rcnts[index].rate; // TODO: <=. @@ -137,7 +137,7 @@ u32 _psxRcntRcount( u32 index ) { u32 count; - count = psxRegs.cycle * BIAS; + count = psxRegs.cycle; count -= rcnts[index].cycleStart; count /= rcnts[index].rate; @@ -158,7 +158,7 @@ void psxRcntSet() s32 countToUpdate; u32 i; - psxNextsCounter = psxRegs.cycle * BIAS; + psxNextsCounter = psxRegs.cycle; psxNextCounter = 0x7fffffff; for( i = 0; i < CounterQuantity; ++i ) @@ -189,7 +189,7 @@ void psxRcntReset( u32 index ) { if( rcnts[index].mode & RcCountToTarget ) { - count = psxRegs.cycle * BIAS; + count = psxRegs.cycle; count -= rcnts[index].cycleStart; count /= rcnts[index].rate; count -= rcnts[index].target; @@ -215,7 +215,7 @@ void psxRcntReset( u32 index ) } else if( rcnts[index].counterState == CountToOverflow ) { - count = psxRegs.cycle * BIAS; + count = psxRegs.cycle; count -= rcnts[index].cycleStart; count /= rcnts[index].rate; count -= 0xffff; @@ -244,7 +244,7 @@ void psxRcntUpdate() { u32 cycle; - cycle = psxRegs.cycle * BIAS; + cycle = psxRegs.cycle; // rcnt 0. if( cycle - rcnts[0].cycleStart >= rcnts[0].cycle ) -- cgit v1.2.3