mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #214 from xsacha/init_vars
Init vars directly instead of using dedicated functions
This commit is contained in:
commit
b574d06f5f
|
@ -25,7 +25,7 @@
|
||||||
using namespace Threading;
|
using namespace Threading;
|
||||||
using namespace R5900;
|
using namespace R5900;
|
||||||
|
|
||||||
__aligned16 u8 g_RealGSMem[0x2000];
|
__aligned16 u8 g_RealGSMem[Ps2MemSize::GSregs];
|
||||||
|
|
||||||
void gsOnModeChanged( Fixed100 framerate, u32 newTickrate )
|
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.
|
// Make sure framelimiter options are in sync with the plugin's capabilities.
|
||||||
void gsInit()
|
|
||||||
{
|
|
||||||
memzero(g_RealGSMem);
|
|
||||||
}
|
|
||||||
|
|
||||||
void gsReset()
|
void gsReset()
|
||||||
{
|
{
|
||||||
GetMTGS().ResetGS();
|
GetMTGS().ResetGS();
|
||||||
|
|
|
@ -359,7 +359,6 @@ extern SysMtgsThread& GetMTGS();
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Generalized GS Functions and Stuff
|
// Generalized GS Functions and Stuff
|
||||||
|
|
||||||
extern void gsInit();
|
|
||||||
extern s32 gsOpen();
|
extern s32 gsOpen();
|
||||||
extern void gsClose();
|
extern void gsClose();
|
||||||
extern void gsReset();
|
extern void gsReset();
|
||||||
|
|
12
pcsx2/Hw.cpp
12
pcsx2/Hw.cpp
|
@ -39,10 +39,9 @@ void hwInit()
|
||||||
|
|
||||||
VifUnpackSSE_Init();
|
VifUnpackSSE_Init();
|
||||||
|
|
||||||
gsInit();
|
// From ipuInit
|
||||||
sifInit();
|
decoder.picture_structure = FRAME_PICTURE; //default: progressive...my guess:P
|
||||||
sprInit();
|
ipu_cmd.current = 0xffffffff;
|
||||||
ipuInit();
|
|
||||||
|
|
||||||
hwInitialized = true;
|
hwInitialized = true;
|
||||||
}
|
}
|
||||||
|
@ -70,8 +69,7 @@ void hwReset()
|
||||||
|
|
||||||
SPU2reset();
|
SPU2reset();
|
||||||
|
|
||||||
sifInit();
|
sifReset();
|
||||||
sprInit();
|
|
||||||
|
|
||||||
gsReset();
|
gsReset();
|
||||||
gifUnit.Reset();
|
gifUnit.Reset();
|
||||||
|
@ -87,7 +85,7 @@ __fi uint intcInterrupt()
|
||||||
{
|
{
|
||||||
if ((psHu32(INTC_STAT)) == 0) {
|
if ((psHu32(INTC_STAT)) == 0) {
|
||||||
//DevCon.Warning("*PCSX2*: intcInterrupt already cleared");
|
//DevCon.Warning("*PCSX2*: intcInterrupt already cleared");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if ((psHu32(INTC_STAT) & psHu32(INTC_MASK)) == 0)
|
if ((psHu32(INTC_STAT) & psHu32(INTC_MASK)) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,23 +67,16 @@ __fi void IPUProcessInterrupt()
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////
|
||||||
// Register accesses (run on EE thread)
|
// 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()
|
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()
|
void ReportIPU()
|
||||||
|
|
|
@ -284,7 +284,6 @@ static IPUregisters& ipuRegs = (IPUregisters&)eeHw[0x2000];
|
||||||
extern __aligned16 tIPU_cmd ipu_cmd;
|
extern __aligned16 tIPU_cmd ipu_cmd;
|
||||||
extern int coded_block_pattern;
|
extern int coded_block_pattern;
|
||||||
|
|
||||||
extern int ipuInit();
|
|
||||||
extern void ipuReset();
|
extern void ipuReset();
|
||||||
|
|
||||||
extern u32 ipuRead32(u32 mem);
|
extern u32 ipuRead32(u32 mem);
|
||||||
|
|
|
@ -28,10 +28,6 @@ static bool spr0lastqwc = false;
|
||||||
static bool spr1lastqwc = false;
|
static bool spr1lastqwc = false;
|
||||||
static u32 mfifotransferred = 0;
|
static u32 mfifotransferred = 0;
|
||||||
|
|
||||||
void sprInit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TestClearVUs(u32 madr, u32 qwc, bool isWrite)
|
static void TestClearVUs(u32 madr, u32 qwc, bool isWrite)
|
||||||
{
|
{
|
||||||
if (madr >= 0x11000000 && (madr < 0x11010000))
|
if (madr >= 0x11000000 && (madr < 0x11010000))
|
||||||
|
@ -119,8 +115,7 @@ int _SPR0chain()
|
||||||
|
|
||||||
__fi void SPR0chain()
|
__fi void SPR0chain()
|
||||||
{
|
{
|
||||||
int cycles = 0;
|
int cycles = _SPR0chain() * BIAS;
|
||||||
cycles = _SPR0chain() * BIAS;
|
|
||||||
CPU_INT(DMAC_FROM_SPR, cycles);
|
CPU_INT(DMAC_FROM_SPR, cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#ifndef __SPR_H__
|
#ifndef __SPR_H__
|
||||||
#define __SPR_H__
|
#define __SPR_H__
|
||||||
|
|
||||||
extern void sprInit();
|
|
||||||
extern void dmaSPR0();
|
extern void dmaSPR0();
|
||||||
extern void dmaSPR1();
|
extern void dmaSPR1();
|
||||||
extern void SPRFROMinterrupt();
|
extern void SPRFROMinterrupt();
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "IopCommon.h"
|
#include "IopCommon.h"
|
||||||
#include "Sif.h"
|
#include "Sif.h"
|
||||||
|
|
||||||
void sifInit()
|
void sifReset()
|
||||||
{
|
{
|
||||||
memzero(sif0);
|
memzero(sif0);
|
||||||
memzero(sif1);
|
memzero(sif1);
|
||||||
|
|
|
@ -124,7 +124,7 @@ struct _sif
|
||||||
|
|
||||||
extern _sif sif0, sif1, sif2;
|
extern _sif sif0, sif1, sif2;
|
||||||
|
|
||||||
extern void sifInit();
|
extern void sifReset();
|
||||||
|
|
||||||
extern void SIF0Dma();
|
extern void SIF0Dma();
|
||||||
extern void SIF1Dma();
|
extern void SIF1Dma();
|
||||||
|
|
Loading…
Reference in New Issue