Merge pull request #214 from xsacha/init_vars

Init vars directly instead of using dedicated functions
This commit is contained in:
Pseudonym 2014-08-15 14:04:06 +01:00
commit b574d06f5f
9 changed files with 16 additions and 38 deletions

View File

@ -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();

View File

@ -359,7 +359,6 @@ extern SysMtgsThread& GetMTGS();
/////////////////////////////////////////////////////////////////////////////
// Generalized GS Functions and Stuff
extern void gsInit();
extern s32 gsOpen();
extern void gsClose();
extern void gsReset();

View File

@ -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)
{

View File

@ -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()

View File

@ -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);

View File

@ -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);
}

View File

@ -17,7 +17,6 @@
#ifndef __SPR_H__
#define __SPR_H__
extern void sprInit();
extern void dmaSPR0();
extern void dmaSPR1();
extern void SPRFROMinterrupt();

View File

@ -20,7 +20,7 @@
#include "IopCommon.h"
#include "Sif.h"
void sifInit()
void sifReset()
{
memzero(sif0);
memzero(sif1);

View File

@ -124,7 +124,7 @@ struct _sif
extern _sif sif0, sif1, sif2;
extern void sifInit();
extern void sifReset();
extern void SIF0Dma();
extern void SIF1Dma();