mirror of https://github.com/PCSX2/pcsx2.git
Experimental sliced transfer stuff for spu2-x in the new dmac code. Probably doesn't make anything better, and it could slow down the iop a tiny bit while doing DMAs.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2558 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b05733a8fb
commit
34e44e4956
|
@ -216,8 +216,6 @@ void V_Core::PlainDMAWrite(u16 *pMem, u32 size)
|
||||||
else
|
else
|
||||||
DMA7LogWrite(pMem,size<<1);
|
DMA7LogWrite(pMem,size<<1);
|
||||||
|
|
||||||
if(MsgDMA()) ConLog(" * SPU2: DMA%c Transfer of %d bytes to %x (%02x %x %04x).\n",GetDmaIndexChar(),size<<1,TSA,DMABits,AutoDMACtrl,(~Regs.ATTR)&0x7fff);
|
|
||||||
|
|
||||||
TSA &= 0xfffff;
|
TSA &= 0xfffff;
|
||||||
|
|
||||||
u32 buff1end = TSA + size;
|
u32 buff1end = TSA + size;
|
||||||
|
@ -422,6 +420,9 @@ void V_Core::DoDMAwrite(u16* pMem, u32 size)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(MsgDMA()) ConLog(" * SPU2: DMA%c Transfer of %d bytes to %x (%02x %x %04x).\n",
|
||||||
|
GetDmaIndexChar(),bytesLeft,TSA,DMABits,AutoDMACtrl,(~Regs.ATTR)&0x7fff);
|
||||||
|
|
||||||
PlainDMAWrite(pMem,size);
|
PlainDMAWrite(pMem,size);
|
||||||
}
|
}
|
||||||
Regs.STATX &= ~0x80;
|
Regs.STATX &= ~0x80;
|
||||||
|
@ -533,11 +534,8 @@ s32 V_Core::NewDmaWrite(u32* data, u32 bytesLeft, u32* bytesProcessed)
|
||||||
TSA&=0x1fff;
|
TSA&=0x1fff;
|
||||||
//Console.Error(" * SPU2: AutoDMA transfers not supported yet! (core %d)\n", Index);
|
//Console.Error(" * SPU2: AutoDMA transfers not supported yet! (core %d)\n", Index);
|
||||||
|
|
||||||
if(DmaStarting)
|
if(MsgAutoDMA() && DmaStarting) ConLog(" * SPU2: DMA%c AutoDMA Transfer of %d bytes to %x (%02x %x %04x).\n",
|
||||||
{
|
GetDmaIndexChar(), bytesLeft<<1, TSA, DMABits, AutoDMACtrl, (~Regs.ATTR)&0x7fff);
|
||||||
if(MsgAutoDMA()) ConLog(" * SPU2: DMA%c AutoDMA Transfer of %d bytes to %x (%02x %x %04x).\n",
|
|
||||||
GetDmaIndexChar(), bytesLeft<<1, TSA, DMABits, AutoDMACtrl, (~Regs.ATTR)&0x7fff);
|
|
||||||
}
|
|
||||||
|
|
||||||
u32 processed = 0;
|
u32 processed = 0;
|
||||||
while((AutoDmaFree>0)&&(bytesLeft>=0x400))
|
while((AutoDmaFree>0)&&(bytesLeft>=0x400))
|
||||||
|
@ -589,6 +587,12 @@ s32 V_Core::NewDmaWrite(u32* data, u32 bytesLeft, u32* bytesProcessed)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(MsgDMA() && DmaStarting) ConLog(" * SPU2: DMA%c Transfer of %d bytes to %x (%02x %x %04x).\n",
|
||||||
|
GetDmaIndexChar(),bytesLeft,TSA,DMABits,AutoDMACtrl,(~Regs.ATTR)&0x7fff);
|
||||||
|
|
||||||
|
if(bytesLeft> 2048)
|
||||||
|
bytesLeft = 2048;
|
||||||
|
|
||||||
// TODO: Sliced transfers?
|
// TODO: Sliced transfers?
|
||||||
PlainDMAWrite((u16*)data,bytesLeft/2);
|
PlainDMAWrite((u16*)data,bytesLeft/2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue