mirror of https://github.com/PCSX2/pcsx2.git
GS: Remove GSState.cpp
Seems like old/unused code, and we have a replacement GSDump replayer now anyway.
This commit is contained in:
parent
63ecdfefe3
commit
c0ac71611b
|
@ -130,7 +130,6 @@ set(pcsx2Sources
|
|||
Gif_Logger.cpp
|
||||
Gif_Unit.cpp
|
||||
GS.cpp
|
||||
GSState.cpp
|
||||
Host.cpp
|
||||
HostDisplay.cpp
|
||||
Hw.cpp
|
||||
|
|
|
@ -571,10 +571,6 @@ static __fi void VSyncStart(u32 sCycle)
|
|||
SysTrace.EE.Counters.Write( " ================ EE COUNTER VSYNC START (frame: %d) ================", g_FrameCount );
|
||||
|
||||
// EE Profiling and Debug code.
|
||||
// FIXME: should probably be moved to VsyncInThread, and handled
|
||||
// by UI implementations. (ie, AppCoreThread in PCSX2-wx interface).
|
||||
vSyncDebugStuff( g_FrameCount );
|
||||
|
||||
CpuVU0->Vsync();
|
||||
CpuVU1->Vsync();
|
||||
|
||||
|
|
16
pcsx2/GS.h
16
pcsx2/GS.h
|
@ -461,22 +461,6 @@ void gsIrq();
|
|||
|
||||
extern tGS_CSR CSRr;
|
||||
|
||||
// GS Playback
|
||||
enum gsrun
|
||||
{
|
||||
GSRUN_TRANS1 = 1,
|
||||
GSRUN_TRANS2,
|
||||
GSRUN_TRANS3,
|
||||
GSRUN_VSYNC
|
||||
};
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
|
||||
extern int g_SaveGSStream;
|
||||
extern int g_nLeftGSFrames;
|
||||
|
||||
#endif
|
||||
|
||||
// Size of the ringbuffer as a power of 2 -- size is a multiple of simd128s.
|
||||
// (actual size is 1<<m_RingBufferSizeFactor simd vectors [128-bit values])
|
||||
// A value of 19 is a 8meg ring buffer. 18 would be 4 megs, and 20 would be 16 megs.
|
||||
|
|
|
@ -1,147 +0,0 @@
|
|||
/* PCSX2 - PS2 Emulator for PCs
|
||||
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
||||
*
|
||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCSX2.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
#include "GS.h"
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
|
||||
// GS Playback
|
||||
int g_SaveGSStream = 0; // save GS stream; 1 - prepare, 2 - save
|
||||
int g_nLeftGSFrames = 0; // when saving, number of frames left
|
||||
static std::unique_ptr<memSavingState> g_fGSSave;
|
||||
|
||||
// fixme - need to take this concept and make it MTGS friendly.
|
||||
#ifdef _STGS_GSSTATE_CODE
|
||||
void GSGIFTRANSFER1(u32 *pMem, u32 addr) {
|
||||
if( g_SaveGSStream == 2) {
|
||||
u32 type = GSRUN_TRANS1;
|
||||
u32 size = (0x4000-(addr))/16;
|
||||
g_fGSSave->Freeze( type );
|
||||
g_fGSSave->Freeze( size );
|
||||
g_fGSSave->FreezeMem( ((u8*)pMem)+(addr), size*16 );
|
||||
}
|
||||
GSgifTransfer1(pMem, addr);
|
||||
}
|
||||
|
||||
void GSGIFTRANSFER2(u32 *pMem, u32 size) {
|
||||
if( g_SaveGSStream == 2) {
|
||||
u32 type = GSRUN_TRANS2;
|
||||
u32 _size = size;
|
||||
g_fGSSave->Freeze( type );
|
||||
g_fGSSave->Freeze( size );
|
||||
g_fGSSave->FreezeMem( pMem, _size*16 );
|
||||
}
|
||||
GSgifTransfer2(pMem, size);
|
||||
}
|
||||
|
||||
void GSGIFTRANSFER3(u32 *pMem, u32 size) {
|
||||
if( g_SaveGSStream == 2 ) {
|
||||
u32 type = GSRUN_TRANS3;
|
||||
u32 _size = size;
|
||||
g_fGSSave->Freeze( type );
|
||||
g_fGSSave->Freeze( size );
|
||||
g_fGSSave->FreezeMem( pMem, _size*16 );
|
||||
}
|
||||
GSgifTransfer3(pMem, size);
|
||||
}
|
||||
|
||||
__fi void GSVSYNC(void) {
|
||||
if( g_SaveGSStream == 2 ) {
|
||||
u32 type = GSRUN_VSYNC;
|
||||
g_fGSSave->Freeze( type );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void vSyncDebugStuff( uint frame )
|
||||
{
|
||||
#ifdef OLD_TESTBUILD_STUFF
|
||||
if( g_TestRun.enabled && g_TestRun.frame > 0 ) {
|
||||
if( frame > g_TestRun.frame ) {
|
||||
// take a snapshot
|
||||
if( g_TestRun.pimagename != NULL && GSmakeSnapshot2 != NULL ) {
|
||||
if( g_TestRun.snapdone ) {
|
||||
g_TestRun.curimage++;
|
||||
g_TestRun.snapdone = 0;
|
||||
g_TestRun.frame += 20;
|
||||
if( g_TestRun.curimage >= g_TestRun.numimages ) {
|
||||
// exit
|
||||
g_EmuThread->Cancel();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// query for the image
|
||||
GSmakeSnapshot2(g_TestRun.pimagename, &g_TestRun.snapdone, g_TestRun.jpgcapture);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// exit
|
||||
g_EmuThread->Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GSVSYNC();
|
||||
|
||||
if( g_SaveGSStream == 1 ) {
|
||||
freezeData fP;
|
||||
|
||||
g_SaveGSStream = 2;
|
||||
g_fGSSave->gsFreeze();
|
||||
|
||||
if (GSfreeze(FREEZE_SIZE, &fP) == -1) {
|
||||
safe_delete( g_fGSSave );
|
||||
g_SaveGSStream = 0;
|
||||
}
|
||||
else {
|
||||
fP.data = (s8*)malloc(fP.size);
|
||||
if (fP.data == NULL) {
|
||||
safe_delete( g_fGSSave );
|
||||
g_SaveGSStream = 0;
|
||||
}
|
||||
else {
|
||||
if (GSfreeze(FREEZE_SAVE, &fP) == -1) {
|
||||
safe_delete( g_fGSSave );
|
||||
g_SaveGSStream = 0;
|
||||
}
|
||||
else {
|
||||
g_fGSSave->Freeze( fP.size );
|
||||
if (fP.size) {
|
||||
g_fGSSave->FreezeMem( fP.data, fP.size );
|
||||
free(fP.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( g_SaveGSStream == 2 ) {
|
||||
|
||||
if( --g_nLeftGSFrames <= 0 ) {
|
||||
safe_delete( g_fGSSave );
|
||||
g_SaveGSStream = 0;
|
||||
Console.WriteLn("Done saving GS stream");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
|
@ -162,7 +162,6 @@ extern void SysClearExecutionCache(); // clears recompiled execution caches!
|
|||
extern void SysOutOfMemory_EmergencyResponse(uptr blocksize);
|
||||
|
||||
extern u8 *SysMmapEx(uptr base, u32 size, uptr bounds, const char *caller="Unnamed");
|
||||
extern void vSyncDebugStuff( uint frame );
|
||||
|
||||
extern std::string SysGetBiosDiscID();
|
||||
extern std::string SysGetDiscID();
|
||||
|
|
|
@ -643,7 +643,6 @@
|
|||
<ClCompile Include="Ipu\mpeg2lib\Idct.cpp" />
|
||||
<ClCompile Include="Ipu\mpeg2lib\Mpeg.cpp" />
|
||||
<ClCompile Include="GS.cpp" />
|
||||
<ClCompile Include="GSState.cpp" />
|
||||
<ClCompile Include="MTGS.cpp" />
|
||||
<ClCompile Include="DebugTools\DisR3000A.cpp" />
|
||||
<ClCompile Include="DebugTools\DisR5900asm.cpp" />
|
||||
|
|
|
@ -725,9 +725,6 @@
|
|||
<ClCompile Include="GS.cpp">
|
||||
<Filter>System\Ps2\GS\GIF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GSState.cpp">
|
||||
<Filter>System\Ps2\GS\GIF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MTGS.cpp">
|
||||
<Filter>System\Ps2\GS\GIF</Filter>
|
||||
</ClCompile>
|
||||
|
|
|
@ -413,7 +413,6 @@
|
|||
<ClCompile Include="Ipu\mpeg2lib\Idct.cpp" />
|
||||
<ClCompile Include="Ipu\mpeg2lib\Mpeg.cpp" />
|
||||
<ClCompile Include="GS.cpp" />
|
||||
<ClCompile Include="GSState.cpp" />
|
||||
<ClCompile Include="MTGS.cpp" />
|
||||
<ClCompile Include="DebugTools\DisR3000A.cpp" />
|
||||
<ClCompile Include="DebugTools\DisR5900asm.cpp" />
|
||||
|
|
|
@ -632,9 +632,6 @@
|
|||
<ClCompile Include="GS.cpp">
|
||||
<Filter>System\Ps2\GS\GIF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GSState.cpp">
|
||||
<Filter>System\Ps2\GS\GIF</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MTGS.cpp">
|
||||
<Filter>System\Ps2\GS\GIF</Filter>
|
||||
</ClCompile>
|
||||
|
|
Loading…
Reference in New Issue