Last fix was ok, but this fix is better.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@255 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
Jake.Stine 2008-10-31 16:59:21 +00:00 committed by Gregory Hainaut
parent 41d466120b
commit 29bc1337b5
3 changed files with 6 additions and 5 deletions

View File

@ -167,7 +167,7 @@ static void _psxTestInterrupts() {
// even higher and just let the IRQ/Counter targets adjust it as needed, // even higher and just let the IRQ/Counter targets adjust it as needed,
// but I'll stick to a conservative value for the time being. // but I'll stick to a conservative value for the time being.
#define IOP_WAIT_CYCLE 512 // was 64 #define IOP_WAIT_CYCLE 2048 // was 64
void psxBranchTest() void psxBranchTest()
{ {

View File

@ -438,9 +438,6 @@ void cpuBranchTest()
EEsCycle += cpuRegs.cycle - EEoCycle; EEsCycle += cpuRegs.cycle - EEoCycle;
EEoCycle = cpuRegs.cycle; EEoCycle = cpuRegs.cycle;
// Force the IOP to run at least one branch test:
// If the IOP doesn't run it's branch test, bad things can happen.
g_psxNextBranchCycle = min( g_psxNextBranchCycle, EEsCycle >> 3 );
psxCpu->ExecuteBlock(); psxCpu->ExecuteBlock();
if (VU0.VI[REG_VPU_STAT].UL & 0x1) { if (VU0.VI[REG_VPU_STAT].UL & 0x1) {

View File

@ -997,6 +997,10 @@ static void iPsxBranchTest(u32 newpc, u32 cpuBranch)
j8Ptr[2] = JG8(0); j8Ptr[2] = JG8(0);
// Break the Block-execute Loop here. // Break the Block-execute Loop here.
// (but not without running another branch test! And do it regardless
// because the EE needs at least one IOP branch test or else bad things happen)
CALLFunc((uptr)psxBranchTest);
if( REC_INC_STACK ) if( REC_INC_STACK )
ADD64ItoR(ESP, REC_INC_STACK); ADD64ItoR(ESP, REC_INC_STACK);
RET2(); RET2();