diff --git a/pcsx2/GS.cpp b/pcsx2/GS.cpp index e42590677f..e63b166c22 100644 --- a/pcsx2/GS.cpp +++ b/pcsx2/GS.cpp @@ -25,7 +25,7 @@ using namespace Threading; using namespace R5900; -__aligned16 u8 g_RealGSMem[0x2000]; +__aligned16 u8 g_RealGSMem[Ps2MemSize::GSregs]; void gsOnModeChanged( Fixed100 framerate, u32 newTickrate ) { @@ -46,11 +46,6 @@ void gsSetRegionMode( GS_RegionMode region ) // Make sure framelimiter options are in sync with the plugin's capabilities. -void gsInit() -{ - memzero(g_RealGSMem); -} - void gsReset() { GetMTGS().ResetGS(); diff --git a/pcsx2/GS.h b/pcsx2/GS.h index 234c59d2c8..dbacc47192 100644 --- a/pcsx2/GS.h +++ b/pcsx2/GS.h @@ -359,7 +359,6 @@ extern SysMtgsThread& GetMTGS(); ///////////////////////////////////////////////////////////////////////////// // Generalized GS Functions and Stuff -extern void gsInit(); extern s32 gsOpen(); extern void gsClose(); extern void gsReset(); diff --git a/pcsx2/Hw.cpp b/pcsx2/Hw.cpp index 081bc42feb..593ffee567 100644 --- a/pcsx2/Hw.cpp +++ b/pcsx2/Hw.cpp @@ -39,10 +39,9 @@ void hwInit() VifUnpackSSE_Init(); - gsInit(); - sifInit(); - sprInit(); - ipuInit(); + // From ipuInit + decoder.picture_structure = FRAME_PICTURE; //default: progressive...my guess:P + ipu_cmd.current = 0xffffffff; hwInitialized = true; } @@ -70,8 +69,7 @@ void hwReset() SPU2reset(); - sifInit(); - sprInit(); + sifReset(); gsReset(); gifUnit.Reset(); @@ -87,7 +85,7 @@ __fi uint intcInterrupt() { if ((psHu32(INTC_STAT)) == 0) { //DevCon.Warning("*PCSX2*: intcInterrupt already cleared"); - return 0; + return 0; } if ((psHu32(INTC_STAT) & psHu32(INTC_MASK)) == 0) { diff --git a/pcsx2/IPU/IPU.cpp b/pcsx2/IPU/IPU.cpp index b03f5cd9ac..d1aa5e4a75 100644 --- a/pcsx2/IPU/IPU.cpp +++ b/pcsx2/IPU/IPU.cpp @@ -67,23 +67,16 @@ __fi void IPUProcessInterrupt() ///////////////////////////////////////////////////////// // Register accesses (run on EE thread) -int ipuInit() -{ - memzero(ipuRegs); - memzero(g_BP); - memzero(decoder); - - decoder.picture_structure = FRAME_PICTURE; //default: progressive...my guess:P - - ipu_fifo.init(); - ipu_cmd.clear(); - - return 0; -} void ipuReset() { - ipuInit(); + memzero(g_BP); + memzero(decoder); + memzero(ipuRegs); + decoder.picture_structure = FRAME_PICTURE; //default: progressive...my guess:P + + ipu_fifo.init(); + ipu_cmd.clear(); } void ReportIPU() diff --git a/pcsx2/IPU/IPU.h b/pcsx2/IPU/IPU.h index 4cf87733c1..22f4ac0f30 100644 --- a/pcsx2/IPU/IPU.h +++ b/pcsx2/IPU/IPU.h @@ -284,7 +284,6 @@ static IPUregisters& ipuRegs = (IPUregisters&)eeHw[0x2000]; extern __aligned16 tIPU_cmd ipu_cmd; extern int coded_block_pattern; -extern int ipuInit(); extern void ipuReset(); extern u32 ipuRead32(u32 mem); diff --git a/pcsx2/SPR.cpp b/pcsx2/SPR.cpp index 9100796ced..6349ea4d94 100644 --- a/pcsx2/SPR.cpp +++ b/pcsx2/SPR.cpp @@ -28,10 +28,6 @@ static bool spr0lastqwc = false; static bool spr1lastqwc = false; static u32 mfifotransferred = 0; -void sprInit() -{ -} - static void TestClearVUs(u32 madr, u32 qwc, bool isWrite) { if (madr >= 0x11000000 && (madr < 0x11010000)) @@ -119,8 +115,7 @@ int _SPR0chain() __fi void SPR0chain() { - int cycles = 0; - cycles = _SPR0chain() * BIAS; + int cycles = _SPR0chain() * BIAS; CPU_INT(DMAC_FROM_SPR, cycles); } diff --git a/pcsx2/SPR.h b/pcsx2/SPR.h index 7e002e342a..ad61c3f5f2 100644 --- a/pcsx2/SPR.h +++ b/pcsx2/SPR.h @@ -17,7 +17,6 @@ #ifndef __SPR_H__ #define __SPR_H__ -extern void sprInit(); extern void dmaSPR0(); extern void dmaSPR1(); extern void SPRFROMinterrupt(); diff --git a/pcsx2/Sif.cpp b/pcsx2/Sif.cpp index 104a022e09..a56cc3e09f 100644 --- a/pcsx2/Sif.cpp +++ b/pcsx2/Sif.cpp @@ -20,7 +20,7 @@ #include "IopCommon.h" #include "Sif.h" -void sifInit() +void sifReset() { memzero(sif0); memzero(sif1); diff --git a/pcsx2/Sif.h b/pcsx2/Sif.h index 2474a1f4b5..86bc20947a 100644 --- a/pcsx2/Sif.h +++ b/pcsx2/Sif.h @@ -124,7 +124,7 @@ struct _sif extern _sif sif0, sif1, sif2; -extern void sifInit(); +extern void sifReset(); extern void SIF0Dma(); extern void SIF1Dma();