MFIFO Changes:

* Vif: Altered how resumed transfers are handled slightly on VIF side (for MFIFO).  
* SPR: Now transfers data to the MFIFO even if not in MFIFO mode if it meets the conditions of the ring buffer location (SOCOM 2)

SOCOM 2 is now playable, sort of, the HUD is a mess (unless a tip shows up), looks like Path3 masking but isn't.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4876 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2011-08-25 13:36:23 +00:00
parent 260b98fb92
commit 737098ba8d
2 changed files with 26 additions and 27 deletions

View File

@ -61,10 +61,8 @@ int _SPR0chain()
pMem = SPRdmaGetAddr(spr0ch.madr, true);
if (pMem == NULL) return -1;
switch (dmacRegs.ctrl.MFD)
if(spr0ch.madr >= dmacRegs.rbor.ADDR && spr0ch.madr <= (dmacRegs.rbor.ADDR + dmacRegs.rbsr.RMSK + 16))
{
case MFD_VIF1:
case MFD_GIF:
partialqwc = spr0ch.qwc;
if ((spr0ch.madr & ~dmacRegs.rbsr.RMSK) != dmacRegs.rbor.ADDR)
@ -77,10 +75,11 @@ int _SPR0chain()
spr0ch.madr = dmacRegs.rbor.ADDR + (spr0ch.madr & dmacRegs.rbsr.RMSK);
spr0ch.sadr += partialqwc << 4;
spr0ch.qwc -= partialqwc;
break;
case NO_MFD:
case MFD_RESERVED:
spr0finished = true;
}
else
{
//Taking an arbitary small value for games which like to check the QWC/MADR instead of STR, so get most of
//the cycle delay out of the way before the end.
@ -94,7 +93,6 @@ int _SPR0chain()
spr0ch.sadr += partialqwc << 4;
spr0ch.qwc -= partialqwc;
break;
}

View File

@ -152,13 +152,6 @@ __fi void vif1SetupTransfer()
switch (vif1.dmamode)
{
case VIF_NORMAL_TO_MEM_MODE:
case VIF_NORMAL_FROM_MEM_MODE:
vif1.inprogress |= 1;
vif1.done = true;
g_vifCycles = 2;
break;
case VIF_CHAIN_MODE:
ptag = dmaGetAddr(vif1ch.tadr, false); //Set memory pointer to TADR
@ -379,21 +372,11 @@ void dmaVIF1()
}
#endif
if ((vif1ch.chcr.MOD == NORMAL_MODE) || vif1ch.qwc > 0) // Normal Mode
if (vif1ch.qwc > 0) // Normal Mode
{
if (dmacRegs.ctrl.STD == STD_VIF1)
Console.WriteLn("DMA Stall Control on VIF1 normal");
if (vif1ch.chcr.DIR) // to Memory
vif1.dmamode = VIF_NORMAL_FROM_MEM_MODE;
else
vif1.dmamode = VIF_NORMAL_TO_MEM_MODE;
vif1.done = false;
// ignore tag if it's a GS download (Def Jam Fight for NY)
if(vif1ch.chcr.MOD == CHAIN_MODE && vif1.dmamode != VIF_NORMAL_TO_MEM_MODE)
if(vif1ch.chcr.MOD == CHAIN_MODE && vif1ch.chcr.DIR)
{
vif1.dmamode = VIF_CHAIN_MODE;
//DevCon.Warning(L"VIF1 QWC on Chain CHCR " + vif1ch.chcr.desc());
@ -402,7 +385,25 @@ void dmaVIF1()
{
vif1.done = true;
}
else
{
vif1.done = false;
}
}
else //Assume normal mode for reverse FIFO and Normal.
{
if (dmacRegs.ctrl.STD == STD_VIF1)
Console.WriteLn("DMA Stall Control on VIF1 normal");
if (vif1ch.chcr.DIR) // to Memory
vif1.dmamode = VIF_NORMAL_FROM_MEM_MODE;
else
vif1.dmamode = VIF_NORMAL_TO_MEM_MODE;
vif1.done = true;
}
vif1.inprogress |= 1;
}
else
{