From 186403a789af4ef43b8c69f035d375a35e5aa798 Mon Sep 17 00:00:00 2001 From: refraction Date: Thu, 18 Jun 2009 04:51:09 +0000 Subject: [PATCH] Added some code to "skip" invalid memory addresses on VIF, the old PCSX2 use to ignore it, but it doesn't anymore. Fixes Ratatouille git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1387 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/VifDma.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pcsx2/VifDma.cpp b/pcsx2/VifDma.cpp index 66adee139e..0276185d61 100644 --- a/pcsx2/VifDma.cpp +++ b/pcsx2/VifDma.cpp @@ -1348,7 +1348,13 @@ int _VIF0chain() if ((vif0ch->qwc == 0) && !vif0.vifstalled) return 0; pMem = (u32*)dmaGetAddr(vif0ch->madr); - if (pMem == NULL) return -1; + if (pMem == NULL) + { + vif0.cmd = 0; + vif0.tag.size = 0; + vif0ch->qwc = 0; + return 0; + } if (vif0.vifstalled) ret = VIF0transfer(pMem + vif0.irqoffset, vif0ch->qwc * 4 - vif0.irqoffset, 0); @@ -2406,7 +2412,13 @@ int _VIF1chain() } pMem = (u32*)dmaGetAddr(vif1ch->madr); - if (pMem == NULL) return -1; + if (pMem == NULL) + { + vif1.cmd = 0; + vif1.tag.size = 0; + vif1ch->qwc = 0; + return 0; + } VIF_LOG("VIF1chain size=%d, madr=%lx, tadr=%lx", vif1ch->qwc, vif1ch->madr, vif1ch->tadr);