From 170acd854aec50622a67bde225c2cf65604aee0c Mon Sep 17 00:00:00 2001 From: refraction Date: Fri, 17 Apr 2009 00:54:53 +0000 Subject: [PATCH] Added a check to make sure the unpack REALLY overflows, sometimes it can be dead on the limit or count the skip, so it doesn't need to break to slower code. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@995 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/VifDma.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pcsx2/VifDma.cpp b/pcsx2/VifDma.cpp index adddb9a322..7522158b60 100644 --- a/pcsx2/VifDma.cpp +++ b/pcsx2/VifDma.cpp @@ -558,8 +558,17 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i { //DevCon::Notice("VIF%x Unpack ending %x > %x", params VIFdmanum, tempsize, VIFdmanum ? 0x4000 : 0x1000); - tempsize = size; - size = 0; + if(vifRegs->cycle.cl == 1 && ((u32)(VIFdmanum ? 0x4000 : 0x1000) + ((vifRegs->cycle.cl - vifRegs->cycle.wl) * 16)) == tempsize + || tempsize == (u32)(VIFdmanum ? 0x4000 : 0x1000)) + { + //Its a red herring! so ignore it! SSE unpacks will be much quicker + tempsize = 0; + } + else + { + tempsize = size; + size = 0; + } } else tempsize = 0;