mirror of https://github.com/PCSX2/pcsx2.git
* Add gRegionMode to the savestates; probably fixing a lot of unstable savestate behavior on PAL games (not sure how it managed to escape -- I explicitly remember adding the region info to the savestate in pcsx2-pg like 2 yrs ago).
* Make the new MTGS register packet during vsync not upload 0xf0->0x100. This is technically GS internal register space that the GS plugin may update or modify as it processes GIFtags. Thus, PCSX2 shouldn't touch it. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3331 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
00ec820198
commit
87c80d6e2b
|
@ -809,8 +809,6 @@ void SaveStateBase::rcntFreeze()
|
||||||
|
|
||||||
if( IsLoading() )
|
if( IsLoading() )
|
||||||
{
|
{
|
||||||
UpdateVSyncRate();
|
|
||||||
|
|
||||||
// make sure the gate flags are set based on the counter modes...
|
// make sure the gate flags are set based on the counter modes...
|
||||||
for( int i=0; i<4; i++ )
|
for( int i=0; i<4; i++ )
|
||||||
_rcntSetGate( i );
|
_rcntSetGate( i );
|
||||||
|
|
|
@ -142,9 +142,9 @@ void SysMtgsThread::ResetGS()
|
||||||
|
|
||||||
struct RingCmdPacket_Vsync
|
struct RingCmdPacket_Vsync
|
||||||
{
|
{
|
||||||
u8 regset1[0x100];
|
u8 regset1[0x0f0];
|
||||||
u32 csr;
|
u32 csr;
|
||||||
u32 imr;
|
u32 imr;
|
||||||
GSRegSIGBLID siglblid;
|
GSRegSIGBLID siglblid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -157,10 +157,12 @@ void SysMtgsThread::PostVsyncEnd()
|
||||||
|
|
||||||
PrepDataPacket(GS_RINGTYPE_VSYNC, sizeof(RingCmdPacket_Vsync));
|
PrepDataPacket(GS_RINGTYPE_VSYNC, sizeof(RingCmdPacket_Vsync));
|
||||||
RingCmdPacket_Vsync& local( *(RingCmdPacket_Vsync*)GetDataPacketPtr() );
|
RingCmdPacket_Vsync& local( *(RingCmdPacket_Vsync*)GetDataPacketPtr() );
|
||||||
|
|
||||||
memcpy_fast( local.regset1, PS2MEM_GS, sizeof(local.regset1) );
|
memcpy_fast( local.regset1, PS2MEM_GS, sizeof(local.regset1) );
|
||||||
local.csr = GSCSRr;
|
local.csr = GSCSRr;
|
||||||
local.imr = GSIMR;
|
local.imr = GSIMR;
|
||||||
local.siglblid = GSSIGLBLID;
|
local.siglblid = GSSIGLBLID;
|
||||||
|
|
||||||
SendDataPacket();
|
SendDataPacket();
|
||||||
|
|
||||||
// Alter-frame flushing! Restarts the ringbuffer (wraps) on every other frame. This is a
|
// Alter-frame flushing! Restarts the ringbuffer (wraps) on every other frame. This is a
|
||||||
|
@ -382,13 +384,13 @@ void SysMtgsThread::ExecuteTaskInThread()
|
||||||
|
|
||||||
// Mail in the important GS registers.
|
// Mail in the important GS registers.
|
||||||
RingCmdPacket_Vsync& local((RingCmdPacket_Vsync&)RingBuffer[m_RingPos+1]);
|
RingCmdPacket_Vsync& local((RingCmdPacket_Vsync&)RingBuffer[m_RingPos+1]);
|
||||||
|
|
||||||
memcpy_fast( RingBuffer.Regs, local.regset1, sizeof(local.regset1));
|
memcpy_fast( RingBuffer.Regs, local.regset1, sizeof(local.regset1));
|
||||||
((u32&)RingBuffer.Regs[0x1000]) = local.csr;
|
((u32&)RingBuffer.Regs[0x1000]) = local.csr;
|
||||||
((u32&)RingBuffer.Regs[0x1010]) = local.imr;
|
((u32&)RingBuffer.Regs[0x1010]) = local.imr;
|
||||||
((GSRegSIGBLID&)RingBuffer.Regs[0x1080]) = local.siglblid;
|
((GSRegSIGBLID&)RingBuffer.Regs[0x1080]) = local.siglblid;
|
||||||
|
|
||||||
GSvsync(!(local.csr & 0x2000));
|
// CSR & 0x2000; is the pageflip id.
|
||||||
|
GSvsync(((u32&)RingBuffer.Regs[0x1000]) & 0x2000);
|
||||||
gsFrameSkip();
|
gsFrameSkip();
|
||||||
|
|
||||||
// if we're not using GSOpen2, then the GS window is on this thread (MTGS thread),
|
// if we're not using GSOpen2, then the GS window is on this thread (MTGS thread),
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "AppConfig.h"
|
#include "AppConfig.h"
|
||||||
|
|
||||||
#include "Elfheader.h"
|
#include "Elfheader.h"
|
||||||
|
#include "Counters.h"
|
||||||
|
|
||||||
using namespace R5900;
|
using namespace R5900;
|
||||||
|
|
||||||
|
@ -38,6 +39,8 @@ static void PostLoadPrep()
|
||||||
memzero(pCache);
|
memzero(pCache);
|
||||||
// WriteCP0Status(cpuRegs.CP0.n.Status.val);
|
// WriteCP0Status(cpuRegs.CP0.n.Status.val);
|
||||||
for(int i=0; i<48; i++) MapTLB(i);
|
for(int i=0; i<48; i++) MapTLB(i);
|
||||||
|
|
||||||
|
UpdateVSyncRate();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString SaveStateBase::GetFilename( int slot )
|
wxString SaveStateBase::GetFilename( int slot )
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
// the lower 16 bit value. IF the change is breaking of all compatibility with old
|
// the lower 16 bit value. IF the change is breaking of all compatibility with old
|
||||||
// states, increment the upper 16 bit value, and clear the lower 16 bits to 0.
|
// states, increment the upper 16 bit value, and clear the lower 16 bits to 0.
|
||||||
|
|
||||||
static const u32 g_SaveVersion = 0x8b460000;
|
static const u32 g_SaveVersion = 0x8b460001;
|
||||||
|
|
||||||
// this function is meant to be used in the place of GSfreeze, and provides a safe layer
|
// this function is meant to be used in the place of GSfreeze, and provides a safe layer
|
||||||
// between the GS saving function and the MTGS's needs. :)
|
// between the GS saving function and the MTGS's needs. :)
|
||||||
|
|
Loading…
Reference in New Issue