From 553635f00d0292c7d9a609d58dad730c1eb0967a Mon Sep 17 00:00:00 2001 From: "sudonim1@gmail.com" Date: Thu, 27 Oct 2011 15:34:14 +0000 Subject: [PATCH] SPU2-X: silly logic error in IRQA testing for DMA, fixes Atelier Iris, maybe others. Thanks to rama for testing. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4945 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/Dma.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/spu2-x/src/Dma.cpp b/plugins/spu2-x/src/Dma.cpp index 7dee0fc171..70b13420b7 100644 --- a/plugins/spu2-x/src/Dma.cpp +++ b/plugins/spu2-x/src/Dma.cpp @@ -272,14 +272,14 @@ void V_Core::PlainDMAWrite(u16 *pMem, u32 size) { // Note: (start is inclusive, dest exclusive -- fixes DMC1 FMVs) - if ((Cores[i].IRQEnable && (Cores[i].IRQA >= TSA)) || (Cores[i].IRQA < TDA)) + if (Cores[i].IRQEnable && (Cores[i].IRQA >= TSA || Cores[i].IRQA < TDA)) { //ConLog("DMAwrite Core %d: IRQ Called (IRQ passed). IRQA = %x Cycles = %d\n", i, Cores[i].IRQA, Cycles ); SetIrqCall(i); } } #else - if ((IRQEnable && (IRQA >= TSA)) || (IRQA < TDA)) + if ((IRQEnable && (IRQA >= TSA || IRQA < TDA)) { SetIrqCall(Index); } @@ -354,7 +354,7 @@ void V_Core::DoDMAread(u16* pMem, u32 size) for( int i=0; i<2; i++ ) { - if ((Cores[i].IRQEnable && (Cores[i].IRQA >= TSA)) || (Cores[i].IRQA < TDA)) + if (Cores[i].IRQEnable && (Cores[i].IRQA >= TSA || Cores[i].IRQA < TDA)) { SetIrqCall(i); } @@ -470,7 +470,7 @@ s32 V_Core::NewDmaRead(u32* data, u32 bytesLeft, u32* bytesProcessed) for( int i=0; i<2; i++ ) { - if( Cores[i].IRQEnable && (Cores[i].IRQA >= TSA) || (Cores[i].IRQA < TDA) ) + if( Cores[i].IRQEnable && (Cores[i].IRQA >= TSA || Cores[i].IRQA < TDA) ) { SetIrqCall(i); }