From 9e3824c9efeb42d7e8c25ba144b7767597cd5c6e Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Tue, 29 Jun 2010 16:43:19 +0000 Subject: [PATCH] Worked on SIGNAL support some more; fixes missing menu geometry in Soul Calibur 3 (devs: see code comments for details). git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3346 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/GS.cpp | 12 ++++++++--- pcsx2/gui/SysState.cpp | 2 +- pcsx2/ps2/GIFpath.cpp | 49 ++++++++++++++++++++---------------------- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/pcsx2/GS.cpp b/pcsx2/GS.cpp index 097174f03f..baa4de03db 100644 --- a/pcsx2/GS.cpp +++ b/pcsx2/GS.cpp @@ -117,9 +117,9 @@ static __forceinline void gsCSRwrite( const tGS_CSR& csr ) // trigger the gsInt and clear the second pending SIGNAL -- if they fail to do so, the // GS will freeze again upon the very next SIGNAL). - CSRreg.SIGNAL = CSR_SIGNAL_Pending; - if( CSRreg.SIGNAL ) - CSR_SIGNAL_Pending = false; + CSRreg.SIGNAL = false; //CSR_SIGNAL_Pending; + //if( CSRreg.SIGNAL ) + // CSR_SIGNAL_Pending = false; } if(csr.FINISH) CSRreg.FINISH = false; @@ -134,6 +134,12 @@ static __forceinline void IMRwrite(u32 value) if(CSRreg.GetInterruptMask() & (~(GSIMR >> 8) & 0x1f)) gsIrq(); + + if( CSR_SIGNAL_Pending && !(GSIMR & 0x100)) + { + //CSRreg.SIGNAL = true; + gsIrq(); + } } __forceinline void gsWrite8(u32 mem, u8 value) diff --git a/pcsx2/gui/SysState.cpp b/pcsx2/gui/SysState.cpp index 2005f92ed1..4d04e0a2ca 100644 --- a/pcsx2/gui/SysState.cpp +++ b/pcsx2/gui/SysState.cpp @@ -41,7 +41,7 @@ static void SaveStateFile_ReadHeader( IStreamReader& thr ) if( strcmp(SavestateIdentString, ident) ) throw Exception::SaveStateLoadError( thr.GetStreamName() ) - .SetDiagMsg(wxsFormat( L"Unrecognized file signature while loading savestate. [sig = %s]", ident )) + .SetDiagMsg(wxsFormat( L"Unrecognized file signature while loading savestate.")) .SetUserMsg(_("This is not a valid PCSX2 savestate, or is from an older unsupported version of PCSX2.")); u32 savever; diff --git a/pcsx2/ps2/GIFpath.cpp b/pcsx2/ps2/GIFpath.cpp index c088d160fe..aba1454a92 100644 --- a/pcsx2/ps2/GIFpath.cpp +++ b/pcsx2/ps2/GIFpath.cpp @@ -141,38 +141,35 @@ static void __fastcall RegHandlerSIGNAL(const u32* data) GSSIGLBLID.SIGID = (GSSIGLBLID.SIGID&~data[1])|(data[0]&data[1]); - // This is not working yet for some reason. Will have to troubleshoot it later. - // For now having the SIGNAL behave like other interrupts seems to be fine. --air - // (note: use Soul Calibur 3 for testing double-throw Signals!) + // HACK: + // Soul Calibur 3 has missing geometry on the Vs select screen if we only setup + // SIGNAL when the CSR flag is cleared. It seems to be doing SIGNALs on PATH2 and + // PATH3 simultaneously, and isn't too happy with the results. It properly clears the + // SIGNAL interrupt but seems to get suck on a VBLANK OVERLAP loop. + // Investigating the game's internals more deeply may prove to be revealing. --air - /*if (!(GSIMR&0x100) ) + if (false) + //if (CSRreg.SIGNAL) // breaks SC3 { - if (CSRreg.SIGNAL) + // Time to ignore all subsequent drawing operations. (which is not yet supported) + if (!CSR_SIGNAL_Pending) { - // Time to ignore all subsequent drawing operations. - if (!CSR_SIGNAL_Pending) - { - DevCon.WriteLn( Color_StrongOrange, "GS SIGNAL double throw encountered!" ); - CSR_SIGNAL_Pending = true; - } - } - else - { - CSRreg.SIGNAL = true; - gsIrq(); - } - }*/ - - if (!CSRreg.SIGNAL) - { - CSRreg.SIGNAL = true; - if (!(GSIMR&0x100) ) - { - CSRreg.SIGNAL = true; - gsIrq(); + DevCon.WriteLn( Color_StrongOrange, "GS SIGNAL double throw encountered!" ); + CSR_SIGNAL_Pending = true; } } + else + { + // notes: + // * DDS SMT however crashes at the first FMV if SIGNAL raises IRQs constantly, + // so that's why we only raise an IRQ if both signal and GSIMR are prepped. + // (this might be correct behavior-- hard to tell yet) --air + if (!CSRreg.SIGNAL && !(GSIMR&0x100) ) + gsIrq(); + + CSRreg.SIGNAL = true; + } } // FINISH : Enables end-of-draw signaling. When FINISH is written it tells the GIF to