mirror of https://github.com/PCSX2/pcsx2.git
Move a bit of code into the IopDmaStart function. In the rare case it caused any kind of noticeable slowdown (applies to the new dmac only, which is disabled by default), it could be easily reverted.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2541 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b624486932
commit
54b8c44dad
|
@ -358,13 +358,19 @@ void RaiseDmaIrq(u32 channel)
|
|||
|
||||
void IopDmaStart(int channel)
|
||||
{
|
||||
int chcr = IopDmaHandlers[channel].REG_CHCR();
|
||||
|
||||
int pcr = (channel>=7)?(HW_DMA_PCR2 & (8 << ((channel-7) * 4))):(HW_DMA_PCR & (8 << (channel * 4)));
|
||||
|
||||
if ( !(chcr & 0x01000000) || pcr)
|
||||
return;
|
||||
|
||||
// I dont' really understand this, but it's used above. Is this BYTES OR WHAT?
|
||||
int bcr = IopDmaHandlers[channel].REG_BCR();
|
||||
int bcr_size = (bcr & 0xFFFF);
|
||||
int bcr_count = (bcr >> 16);
|
||||
int size = 4* bcr_count * bcr_size;
|
||||
|
||||
int chcr = IopDmaHandlers[channel].REG_CHCR();
|
||||
int dirf = IopDmaHandlers[channel].DirectionFlags&3;
|
||||
|
||||
if(dirf != 3)
|
||||
|
|
|
@ -190,19 +190,8 @@ enum IOPCountRegs
|
|||
}
|
||||
|
||||
#ifdef ENABLE_NEW_IOPDMA
|
||||
#define DmaExecNew(n) { \
|
||||
if (HW_DMA##n##_CHCR & 0x01000000 && \
|
||||
HW_DMA_PCR & (8 << (n * 4))) { \
|
||||
IopDmaStart(n); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define DmaExecNew2(n) { \
|
||||
if (HW_DMA##n##_CHCR & 0x01000000 && \
|
||||
HW_DMA_PCR2 & (8 << ((n-7) * 4))) { \
|
||||
IopDmaStart(n); \
|
||||
} \
|
||||
}
|
||||
#define DmaExecNew(n) IopDmaStart(n);
|
||||
#define DmaExecNew2(n) IopDmaStart(n);
|
||||
#endif
|
||||
|
||||
struct dma_mbc
|
||||
|
|
|
@ -278,7 +278,7 @@ static __forceinline T _HwRead_16or32_Page1( u32 addr )
|
|||
//
|
||||
mcase(0x1f8010C0):
|
||||
#ifdef ENABLE_NEW_IOPDMA_SPU2
|
||||
ret = IopChannels[4].MemAddr;
|
||||
ret = psxHu32(addr);
|
||||
#else
|
||||
ret = SPU2ReadMemAddr(0);
|
||||
#endif
|
||||
|
@ -286,7 +286,7 @@ static __forceinline T _HwRead_16or32_Page1( u32 addr )
|
|||
|
||||
mcase(0x1f801500):
|
||||
#ifdef ENABLE_NEW_IOPDMA_SPU2
|
||||
ret = IopChannels[7].MemAddr;
|
||||
ret = psxHu32(addr);
|
||||
#else
|
||||
ret = SPU2ReadMemAddr(1);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue