Fixed Issue 157

removed redundant code arcum pointed out I'd committed

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@991 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2009-04-16 23:28:18 +00:00
parent 1279fe2c21
commit 7308ae1b71
2 changed files with 20 additions and 33 deletions

View File

@ -1370,7 +1370,6 @@ int FIFOto_write(u32* pMem, int size)
} \
}
#define gif ((DMACh*)&PS2MEM_HW[0xA000])
extern void gsInterrupt();
int IPU1dma()

View File

@ -543,30 +543,6 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
memsize = size;
#endif
#ifdef VIFUNPACKDEBUG
if((vif->tag.addr + (size / (VIFfuncTable[ vif->cmd & 0xf ].gsize * vifRegs->cycle.wl)) *
((vifRegs->cycle.cl - vifRegs->cycle.wl) * 16)) > (u32)(VIFdmanum ? 0x4000 : 0x1000))
{
//Sanity Check (memory overflow)
DevCon::Notice("VIF%x Unpack ending %x > %x", params VIFdmanum, vif->tag.addr, VIFdmanum ? 0x4000 : 0x1000);
}
#endif
tempsize = (vif->tag.addr + (size / (ft->gsize * vifRegs->cycle.wl)) *
((vifRegs->cycle.cl - vifRegs->cycle.wl) * 16)) + ((size / ft->gsize) * 16);
//Sanity Check (memory overflow)
if(tempsize > (u32)(VIFdmanum ? 0x4000 : 0x1000))
{
// DevCon::Notice("VIF%x Unpack ending %x > %x", params VIFdmanum, tempsize, VIFdmanum ? 0x4000 : 0x1000);
tempsize = size;
size = 0;
} else tempsize = 0;
if (vifRegs->cycle.cl >= vifRegs->cycle.wl) // skipping write
{
@ -574,6 +550,18 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
static int s_count = 0;
#endif
tempsize = (vif->tag.addr + (size / (ft->gsize * vifRegs->cycle.wl)) *
((vifRegs->cycle.cl - vifRegs->cycle.wl) * 16)) + ((size / ft->gsize) * 16);
//Sanity Check (memory overflow)
if(tempsize > (u32)(VIFdmanum ? 0x4000 : 0x1000))
{
DevCon::Notice("VIF%x Unpack ending %x > %x", params VIFdmanum, tempsize, VIFdmanum ? 0x4000 : 0x1000);
tempsize = size;
size = 0;
} else tempsize = 0;
if (size >= ft->gsize)
{
@ -735,8 +723,8 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
else /* filling write */
{
if((u32)(size / ft->gsize) < vifRegs->num && vifRegs->cycle.cl != 0)
DevCon::Notice("Filling write warning! Size < packet size and CL != 0");
if((u32)(((size / ft->gsize) / vifRegs->cycle.cl) * vifRegs->cycle.wl) < vifRegs->num && vifRegs->cycle.cl != 0)
DevCon::Notice("Filling write warning! %x < %x and CL = %x WL = %x", params (size / ft->gsize), vifRegs->num, vifRegs->cycle.cl, vifRegs->cycle.wl);
VIFUNPACK_LOG("filling write %d cl %d, wl %d mask %x mode %x unpacktype %x", vifRegs->num, vifRegs->cycle.cl, vifRegs->cycle.wl, vifRegs->mask, vifRegs->mode, unpackType);
while (vifRegs->num > 0)
@ -748,6 +736,11 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
if (vif->cl < vifRegs->cycle.cl) /* unpack one qword */
{
if(size < ft->gsize)
{
VIF_LOG("Out of Filling write data");
break;
}
func(dest, (u32*)cdata, ft->qsize);
cdata += ft->gsize;
size -= ft->gsize;
@ -756,12 +749,7 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
if (vif->cl == vifRegs->cycle.wl)
{
vif->cl = 0;
}
if(size < ft->gsize)
{
VIF_LOG("Out of Filling write data");
break;
}
}
}
else
{