Fixed an issue which caused savestates (or escaping) to freeze up the emu if MFIFO was in use

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@493 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2009-02-14 16:47:31 +00:00
parent a8ea2caabf
commit c4cc49cda6
3 changed files with 9 additions and 3 deletions

View File

@ -813,10 +813,13 @@ void gsDynamicSkipEnable()
frameLimitReset(); frameLimitReset();
} }
extern unsigned int gifdone;
void SaveState::gsFreeze() void SaveState::gsFreeze()
{ {
FreezeMem(PS2MEM_GS, 0x2000); FreezeMem(PS2MEM_GS, 0x2000);
Freeze(CSRw); Freeze(CSRw);
if(((DMACh*)&PS2MEM_HW[0xA000])->chcr & 0x100)gifdone = 0;
else gifdone = 0;
mtgsFreeze(); mtgsFreeze();
} }

View File

@ -343,7 +343,7 @@ void dmaGIF() {
static unsigned int mfifocycles; static unsigned int mfifocycles;
static unsigned int gifqwc = 0; static unsigned int gifqwc = 0;
static unsigned int gifdone = 0; unsigned int gifdone = 0;
// called from only one location, so forceinline it: // called from only one location, so forceinline it:
static __forceinline int mfifoGIFrbTransfer() { static __forceinline int mfifoGIFrbTransfer() {

View File

@ -1993,7 +1993,7 @@ __forceinline void vif1Interrupt() {
return; return;
} }
#ifdef PCSX2_DEVBUILD #ifdef PCSX2_DEVBUILD
if(vif1ch->qwc > 0) SysPrintf("VIF1 Ending with QWC left\n"); if(vif1ch->qwc > 0) SysPrintf("VIF1 Ending with %x QWC left\n");
if(vif1.cmd != 0) SysPrintf("vif1.cmd still set %x\n", vif1.cmd); if(vif1.cmd != 0) SysPrintf("vif1.cmd still set %x\n", vif1.cmd);
#endif #endif
@ -2238,6 +2238,9 @@ void vif1Reset() {
void SaveState::vif1Freeze() { void SaveState::vif1Freeze() {
Freeze(vif1); Freeze(vif1);
if( IsLoading() ) if( IsLoading() ){
SetNewMask(g_vif1Masks, g_vif1HasMask3, vif1Regs->mask, ~vif1Regs->mask); SetNewMask(g_vif1Masks, g_vif1HasMask3, vif1Regs->mask, ~vif1Regs->mask);
if(vif1ch->chcr & 0x100)vif1.done = 0;
else vif1.done = 0;
}
} }