GSdx: just increasing the revision number of gsdx to test something...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@868 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gabest11 2009-03-31 03:19:21 +00:00
parent 0748dca5af
commit 8b3c30d2ce
8 changed files with 139 additions and 110 deletions

View File

@ -36,30 +36,6 @@
// sps2registers.h // sps2registers.h
// //
enum GS_REG
{
GS_PMODE = 0x12000000,
GS_SMODE1 = 0x12000010,
GS_SMODE2 = 0x12000020,
GS_SRFSH = 0x12000030,
GS_SYNCH1 = 0x12000040,
GS_SYNCH2 = 0x12000050,
GS_SYNCV = 0x12000060,
GS_DISPFB1 = 0x12000070,
GS_DISPLAY1 = 0x12000080,
GS_DISPFB2 = 0x12000090,
GS_DISPLAY2 = 0x120000a0,
GS_EXTBUF = 0x120000b0,
GS_EXTDATA = 0x120000c0,
GS_EXTWRITE = 0x120000d0,
GS_BGCOLOR = 0x120000e0,
GS_UNKNOWN = 0x12000400,
GS_CSR = 0x12001000,
GS_IMR = 0x12001010,
GS_BUSDIR = 0x12001040,
GS_SIGLBLID = 0x12001080
};
enum GS_PRIM enum GS_PRIM
{ {
GS_POINTLIST = 0, GS_POINTLIST = 0,
@ -340,7 +316,7 @@ REG64_(GSReg, DISPFB) // (-1/2)
UINT32 DBY:11; UINT32 DBY:11;
UINT32 _PAD2:10; UINT32 _PAD2:10;
REG_END2 REG_END2
UINT32 Block() {return FBP<<5;} UINT32 Block() const {return FBP << 5;}
REG_END2 REG_END2
REG64_(GSReg, DISPLAY) // (-1/2) REG64_(GSReg, DISPLAY) // (-1/2)
@ -461,6 +437,22 @@ REG64_(GSReg, SMODE2)
UINT32 _PAD3:32; UINT32 _PAD3:32;
REG_END REG_END
REG64_(GSReg, SRFSH)
// TODO
REG_END
REG64_(GSReg, SYNCH1)
// TODO
REG_END
REG64_(GSReg, SYNCH2)
// TODO
REG_END
REG64_(GSReg, SYNCV)
// TODO
REG_END
REG64_SET(GSReg) REG64_SET(GSReg)
GSRegBGCOLOR BGCOLOR; GSRegBGCOLOR BGCOLOR;
GSRegBUSDIR BUSDIR; GSRegBUSDIR BUSDIR;
@ -1087,6 +1079,65 @@ __declspec(align(16)) struct GIFPath
} }
}; };
struct GSPrivRegSet
{
union
{
struct
{
GSRegPMODE PMODE;
UINT64 _pad1;
GSRegSMODE1 SMODE1;
UINT64 _pad2;
GSRegSMODE2 SMODE2;
UINT64 _pad3;
GSRegSRFSH SRFSH;
UINT64 _pad4;
GSRegSYNCH1 SYNCH1;
UINT64 _pad5;
GSRegSYNCH2 SYNCH2;
UINT64 _pad6;
GSRegSYNCV SYNCV;
UINT64 _pad7;
struct {
GSRegDISPFB DISPFB;
UINT64 _pad1;
GSRegDISPLAY DISPLAY;
UINT64 _pad2;
} DISP[2];
GSRegEXTBUF EXTBUF;
UINT64 _pad8;
GSRegEXTDATA EXTDATA;
UINT64 _pad9;
GSRegEXTWRITE EXTWRITE;
UINT64 _pad10;
GSRegBGCOLOR BGCOLOR;
UINT64 _pad11;
};
BYTE _pad12[0x1000];
};
union
{
struct
{
GSRegCSR CSR;
UINT64 _pad13;
GSRegIMR IMR;
UINT64 _pad14;
UINT64 _unk1[4];
GSRegBUSDIR BUSDIR;
UINT64 _pad15;
UINT64 _unk2[6];
GSRegSIGLBLID SIGLBLID;
UINT64 _pad16;
};
BYTE _pad17[0x1000];
};
};
#pragma pack(pop) #pragma pack(pop)
enum {KEYPRESS=1, KEYRELEASE=2}; enum {KEYPRESS=1, KEYRELEASE=2};

View File

@ -36,7 +36,7 @@ GSDump::~GSDump()
Close(); Close();
} }
void GSDump::Open(const CString& fn, DWORD crc, const GSFreezeData& fd, const void* regs) void GSDump::Open(const CString& fn, DWORD crc, const GSFreezeData& fd, const GSPrivRegSet* regs)
{ {
m_gs = _tfopen(fn + _T(".gs"), _T("wb")); m_gs = _tfopen(fn + _T(".gs"), _T("wb"));
m_obj = _tfopen(fn + _T(".obj"), _T("wt")); m_obj = _tfopen(fn + _T(".obj"), _T("wt"));
@ -50,7 +50,7 @@ void GSDump::Open(const CString& fn, DWORD crc, const GSFreezeData& fd, const vo
fwrite(&crc, 4, 1, m_gs); fwrite(&crc, 4, 1, m_gs);
fwrite(&fd.size, 4, 1, m_gs); fwrite(&fd.size, 4, 1, m_gs);
fwrite(fd.data, fd.size, 1, m_gs); fwrite(fd.data, fd.size, 1, m_gs);
fwrite(regs, 0x2000, 1, m_gs); fwrite(regs, sizeof(*regs), 1, m_gs);
} }
} }
@ -80,12 +80,12 @@ void GSDump::ReadFIFO(UINT32 size)
} }
} }
void GSDump::VSync(int field, bool last, const void* regs) void GSDump::VSync(int field, bool last, const GSPrivRegSet* regs)
{ {
if(m_gs) if(m_gs)
{ {
fputc(3, m_gs); fputc(3, m_gs);
fwrite(regs, 0x2000, 1, m_gs); fwrite(regs, sizeof(*regs), 1, m_gs);
fputc(1, m_gs); fputc(1, m_gs);
fputc(field, m_gs); fputc(field, m_gs);

View File

@ -55,11 +55,11 @@ public:
GSDump(); GSDump();
virtual ~GSDump(); virtual ~GSDump();
void Open(const CString& fn, DWORD crc, const GSFreezeData& fd, const void* regs); void Open(const CString& fn, DWORD crc, const GSFreezeData& fd, const GSPrivRegSet* regs);
void Close(); void Close();
void ReadFIFO(UINT32 size); void ReadFIFO(UINT32 size);
void Transfer(int index, BYTE* mem, size_t size); void Transfer(int index, BYTE* mem, size_t size);
void VSync(int field, bool last, const void* regs); void VSync(int field, bool last, const GSPrivRegSet* regs);
void Object(GSVertexSW* vertices, int count, GS_PRIM_CLASS primclass); void Object(GSVertexSW* vertices, int count, GS_PRIM_CLASS primclass);
operator bool() {return m_gs != NULL;} operator bool() {return m_gs != NULL;}
}; };

View File

@ -165,10 +165,15 @@ protected:
// //
// NOTE: probably the technique explained in graphtip.pdf (Antialiasing by Supersampling / 4. Reading Odd/Even Scan Lines Separately with the PCRTC then Blending) // NOTE: probably the technique explained in graphtip.pdf (Antialiasing by Supersampling / 4. Reading Odd/Even Scan Lines Separately with the PCRTC then Blending)
bool samesrc = en[0] && en[1] && DISPFB[0]->FBP == DISPFB[1]->FBP && DISPFB[0]->FBW == DISPFB[1]->FBW && DISPFB[0]->PSM == DISPFB[1]->PSM; bool samesrc =
en[0] && en[1] &&
m_regs->DISP[0].DISPFB.FBP == m_regs->DISP[1].DISPFB.FBP &&
m_regs->DISP[0].DISPFB.FBW == m_regs->DISP[1].DISPFB.FBW &&
m_regs->DISP[0].DISPFB.PSM == m_regs->DISP[1].DISPFB.PSM;
bool blurdetected = false; bool blurdetected = false;
if(samesrc && PMODE->SLBG == 0 && PMODE->MMOD == 1 && PMODE->ALP == 0x80) if(samesrc && m_regs->PMODE.SLBG == 0 && m_regs->PMODE.MMOD == 1 && m_regs->PMODE.ALP == 0x80)
{ {
if(fr[0] == fr[1] + CRect(0, 1, 0, 0) && dr[0] == dr[1] + CRect(0, 0, 0, 1) if(fr[0] == fr[1] + CRect(0, 1, 0, 0) && dr[0] == dr[1] + CRect(0, 0, 0, 1)
|| fr[1] == fr[0] + CRect(0, 1, 0, 0) && dr[1] == dr[0] + CRect(0, 0, 0, 1)) || fr[1] == fr[0] + CRect(0, 1, 0, 0) && dr[1] == dr[0] + CRect(0, 0, 0, 1))
@ -251,7 +256,7 @@ protected:
if(dr[i].Height() > 512) // hmm if(dr[i].Height() > 512) // hmm
{ {
int y = GetDeviceSize(i).cy; int y = GetDeviceSize(i).cy;
if(SMODE2->INT && SMODE2->FFMD) y /= 2; if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD) y /= 2;
r.bottom = r.top + y; r.bottom = r.top + y;
} }
@ -282,7 +287,7 @@ protected:
o.y = tex[i].m_scale.y * (dr[i].top - baseline); o.y = tex[i].m_scale.y * (dr[i].top - baseline);
} }
if(SMODE2->INT && SMODE2->FFMD) o.y /= 2; if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD) o.y /= 2;
dst[i].x = o.x; dst[i].x = o.x;
dst[i].y = o.y; dst[i].y = o.y;
@ -296,23 +301,23 @@ protected:
ds.cx = fs.cx; ds.cx = fs.cx;
ds.cy = fs.cy; ds.cy = fs.cy;
if(SMODE2->INT && SMODE2->FFMD) ds.cy *= 2; if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD) ds.cy *= 2;
bool slbg = PMODE->SLBG; bool slbg = m_regs->PMODE.SLBG;
bool mmod = PMODE->MMOD; bool mmod = m_regs->PMODE.MMOD;
if(tex[0] || tex[1]) if(tex[0] || tex[1])
{ {
GSVector4 c; GSVector4 c;
c.r = (float)BGCOLOR->R / 255; c.r = (float)m_regs->BGCOLOR.R / 255;
c.g = (float)BGCOLOR->G / 255; c.g = (float)m_regs->BGCOLOR.G / 255;
c.b = (float)BGCOLOR->B / 255; c.b = (float)m_regs->BGCOLOR.B / 255;
c.a = (float)PMODE->ALP / 255; c.a = (float)m_regs->PMODE.ALP / 255;
m_dev.Merge(tex, src, dst, fs, slbg, mmod, c); m_dev.Merge(tex, src, dst, fs, slbg, mmod, c);
if(SMODE2->INT && m_interlace > 0) if(m_regs->SMODE2.INT && m_interlace > 0)
{ {
int field2 = 1 - ((m_interlace - 1) & 1); int field2 = 1 - ((m_interlace - 1) & 1);
int mode = (m_interlace - 1) >> 1; int mode = (m_interlace - 1) >> 1;
@ -340,7 +345,7 @@ protected:
fd.data = new BYTE[fd.size]; fd.data = new BYTE[fd.size];
Freeze(&fd, false); Freeze(&fd, false);
m_dump.Open(m_snapshot, m_crc, fd, PMODE); m_dump.Open(m_snapshot, m_crc, fd, m_regs);
delete [] fd.data; delete [] fd.data;
} }
@ -353,7 +358,7 @@ protected:
{ {
if(m_dump) if(m_dump)
{ {
m_dump.VSync(field, !(::GetAsyncKeyState(VK_CONTROL) & 0x8000), PMODE); m_dump.VSync(field, !(::GetAsyncKeyState(VK_CONTROL) & 0x8000), m_regs);
} }
} }
} }
@ -481,7 +486,7 @@ public:
s_stats.Format( s_stats.Format(
_T("%I64d | %d x %d | %.2f fps (%d%%) | %s - %s | %s | %d/%d/%d | %d%% CPU | %.2f | %.2f"), _T("%I64d | %d x %d | %.2f fps (%d%%) | %s - %s | %s | %d/%d/%d | %d%% CPU | %.2f | %.2f"),
m_perfmon.GetFrame(), GetDisplaySize().cx, GetDisplaySize().cy, fps, (int)(100.0 * fps / GetFPS()), m_perfmon.GetFrame(), GetDisplaySize().cx, GetDisplaySize().cy, fps, (int)(100.0 * fps / GetFPS()),
SMODE2->INT ? (CString(_T("Interlaced ")) + (SMODE2->FFMD ? _T("(frame)") : _T("(field)"))) : _T("Progressive"), m_regs->SMODE2.INT ? (CString(_T("Interlaced ")) + (m_regs->SMODE2.FFMD ? _T("(frame)") : _T("(field)"))) : _T("Progressive"),
GSSettingsDlg::g_interlace[m_interlace].name, GSSettingsDlg::g_interlace[m_interlace].name,
GSSettingsDlg::g_aspectratio[m_aspectratio].name, GSSettingsDlg::g_aspectratio[m_aspectratio].name,
(int)m_perfmon.Get(GSPerfMon::Quad), (int)m_perfmon.Get(GSPerfMon::Quad),

View File

@ -245,11 +245,13 @@ protected:
bool GetOutput(int i, Texture& t) bool GetOutput(int i, Texture& t)
{ {
const GSRegDISPFB& DISPFB = m_regs->DISP[i].DISPFB;
GIFRegTEX0 TEX0; GIFRegTEX0 TEX0;
TEX0.TBP0 = DISPFB[i]->Block(); TEX0.TBP0 = DISPFB.Block();
TEX0.TBW = DISPFB[i]->FBW; TEX0.TBW = DISPFB.FBW;
TEX0.PSM = DISPFB[i]->PSM; TEX0.PSM = DISPFB.PSM;
TRACE(_T("[%d] GetOutput %d %05x (%d)\n"), (int)m_perfmon.GetFrame(), i, (int)TEX0.TBP0, (int)TEX0.PSM); TRACE(_T("[%d] GetOutput %d %05x (%d)\n"), (int)m_perfmon.GetFrame(), i, (int)TEX0.TBP0, (int)TEX0.PSM);

View File

@ -71,7 +71,15 @@ protected:
bool GetOutput(int i, Texture& t) bool GetOutput(int i, Texture& t)
{ {
CRect r(0, 0, DISPFB[i]->FBW * 64, GetFrameRect(i).bottom); const GSRegDISPFB& DISPFB = m_regs->DISP[i].DISPFB;
GIFRegTEX0 TEX0;
TEX0.TBP0 = DISPFB.Block();
TEX0.TBW = DISPFB.FBW;
TEX0.PSM = DISPFB.PSM;
CRect r(0, 0, TEX0.TBW * 64, GetFrameRect(i).bottom);
// TODO: round up bottom // TODO: round up bottom
@ -85,12 +93,6 @@ protected:
return false; return false;
} }
GIFRegTEX0 TEX0;
TEX0.TBP0 = DISPFB[i]->Block();
TEX0.TBW = DISPFB[i]->FBW;
TEX0.PSM = DISPFB[i]->PSM;
GIFRegCLAMP CLAMP; GIFRegCLAMP CLAMP;
CLAMP.WMS = CLAMP.WMT = 1; CLAMP.WMS = CLAMP.WMT = 1;

View File

@ -87,27 +87,9 @@ GSState::GSState(BYTE* base, bool mt, void (*irq)(), int nloophack)
ASSERT(base); ASSERT(base);
PMODE = (GSRegPMODE*)(base + GS_PMODE); m_regs = (GSPrivRegSet*)(base + 0x12000000);
SMODE1 = (GSRegSMODE1*)(base + GS_SMODE1);
SMODE2 = (GSRegSMODE2*)(base + GS_SMODE2);
// SRFSH = (GSRegPMODE*)(base + GS_SRFSH);
// SYNCH1 = (GSRegPMODE*)(base + GS_SYNCH1);
// SYNCH2 = (GSRegPMODE*)(base + GS_SYNCH2);
// SYNCV = (GSRegPMODE*)(base + GS_SYNCV);
DISPFB[0] = (GSRegDISPFB*)(base + GS_DISPFB1);
DISPFB[1] = (GSRegDISPFB*)(base + GS_DISPFB2);
DISPLAY[0] = (GSRegDISPLAY*)(base + GS_DISPLAY1);
DISPLAY[1] = (GSRegDISPLAY*)(base + GS_DISPLAY2);
EXTBUF = (GSRegEXTBUF*)(base + GS_EXTBUF);
EXTDATA = (GSRegEXTDATA*)(base + GS_EXTDATA);
EXTWRITE = (GSRegEXTWRITE*)(base + GS_EXTWRITE);
BGCOLOR = (GSRegBGCOLOR*)(base + GS_BGCOLOR);
CSR = (GSRegCSR*)(base + GS_CSR);
IMR = (GSRegIMR*)(base + GS_IMR);
BUSDIR = (GSRegBUSDIR*)(base + GS_BUSDIR);
SIGLBLID = (GSRegSIGLBLID*)(base + GS_SIGLBLID);
memset(PMODE, 0, 0x1100); memset(m_regs, 0, sizeof(GSPrivRegSet));
PRIM = &m_env.PRIM; PRIM = &m_env.PRIM;
// CSR->rREV = 0x20; // CSR->rREV = 0x20;
@ -234,8 +216,8 @@ CPoint GSState::GetDisplayPos(int i)
CPoint p; CPoint p;
p.x = DISPLAY[i]->DX / (DISPLAY[i]->MAGH + 1); p.x = m_regs->DISP[i].DISPLAY.DX / (m_regs->DISP[i].DISPLAY.MAGH + 1);
p.y = DISPLAY[i]->DY / (DISPLAY[i]->MAGV + 1); p.y = m_regs->DISP[i].DISPLAY.DY / (m_regs->DISP[i].DISPLAY.MAGV + 1);
return p; return p;
} }
@ -246,8 +228,8 @@ CSize GSState::GetDisplaySize(int i)
CSize s; CSize s;
s.cx = (DISPLAY[i]->DW + 1) / (DISPLAY[i]->MAGH + 1); s.cx = (m_regs->DISP[i].DISPLAY.DW + 1) / (m_regs->DISP[i].DISPLAY.MAGH + 1);
s.cy = (DISPLAY[i]->DH + 1) / (DISPLAY[i]->MAGV + 1); s.cy = (m_regs->DISP[i].DISPLAY.DH + 1) / (m_regs->DISP[i].DISPLAY.MAGV + 1);
return s; return s;
} }
@ -276,14 +258,14 @@ CPoint GSState::GetFramePos(int i)
{ {
ASSERT(i >= 0 && i < 2); ASSERT(i >= 0 && i < 2);
return CPoint(DISPFB[i]->DBX, DISPFB[i]->DBY); return CPoint(m_regs->DISP[i].DISPFB.DBX, m_regs->DISP[i].DISPFB.DBY);
} }
CSize GSState::GetFrameSize(int i) CSize GSState::GetFrameSize(int i)
{ {
CSize s = GetDisplaySize(i); CSize s = GetDisplaySize(i);
if(SMODE2->INT && SMODE2->FFMD && s.cy > 1) s.cy >>= 1; if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD && s.cy > 1) s.cy >>= 1;
return s; return s;
} }
@ -322,7 +304,7 @@ CSize GSState::GetDeviceSize(int i)
} }
else else
{ {
s.cy = (SMODE1->CMOD & 1) ? 512 : 448; s.cy = (m_regs->SMODE1.CMOD & 1) ? 512 : 448;
} }
return s; return s;
@ -338,13 +320,13 @@ bool GSState::IsEnabled(int i)
{ {
ASSERT(i >= 0 && i < 2); ASSERT(i >= 0 && i < 2);
if(i == 0 && PMODE->EN1) if(i == 0 && m_regs->PMODE.EN1)
{ {
return DISPLAY[0]->DW || DISPLAY[0]->DH; return m_regs->DISP[0].DISPLAY.DW || m_regs->DISP[0].DISPLAY.DH;
} }
else if(i == 1 && PMODE->EN2) else if(i == 1 && m_regs->PMODE.EN2)
{ {
return DISPLAY[1]->DW || DISPLAY[1]->DH; return m_regs->DISP[1].DISPLAY.DW || m_regs->DISP[1].DISPLAY.DH;
} }
return false; return false;
@ -352,7 +334,7 @@ bool GSState::IsEnabled(int i)
int GSState::GetFPS() int GSState::GetFPS()
{ {
return ((SMODE1->CMOD & 1) ? 50 : 60) / (SMODE2->INT ? 1 : 2); return ((m_regs->SMODE1.CMOD & 1) ? 50 : 60) / (m_regs->SMODE2.INT ? 1 : 2);
} }
// GIFPackedRegHandler* // GIFPackedRegHandler*
@ -985,25 +967,25 @@ void GSState::GIFRegHandlerSIGNAL(GIFReg* r)
{ {
if(m_mt) return; if(m_mt) return;
SIGLBLID->SIGID = (SIGLBLID->SIGID & ~r->SIGNAL.IDMSK) | (r->SIGNAL.ID & r->SIGNAL.IDMSK); m_regs->SIGLBLID.SIGID = (m_regs->SIGLBLID.SIGID & ~r->SIGNAL.IDMSK) | (r->SIGNAL.ID & r->SIGNAL.IDMSK);
if(CSR->wSIGNAL) CSR->rSIGNAL = 1; if(m_regs->CSR.wSIGNAL) m_regs->CSR.rSIGNAL = 1;
if(!IMR->SIGMSK && m_irq) m_irq(); if(!m_regs->IMR.SIGMSK && m_irq) m_irq();
} }
void GSState::GIFRegHandlerFINISH(GIFReg* r) void GSState::GIFRegHandlerFINISH(GIFReg* r)
{ {
if(m_mt) return; if(m_mt) return;
if(CSR->wFINISH) CSR->rFINISH = 1; if(m_regs->CSR.wFINISH) m_regs->CSR.rFINISH = 1;
if(!IMR->FINISHMSK && m_irq) m_irq(); if(!m_regs->IMR.FINISHMSK && m_irq) m_irq();
} }
void GSState::GIFRegHandlerLABEL(GIFReg* r) void GSState::GIFRegHandlerLABEL(GIFReg* r)
{ {
if(m_mt) return; if(m_mt) return;
SIGLBLID->LBLID = (SIGLBLID->LBLID & ~r->LABEL.IDMSK) | (r->LABEL.ID & r->LABEL.IDMSK); m_regs->SIGLBLID.LBLID = (m_regs->SIGLBLID.LBLID & ~r->LABEL.IDMSK) | (r->LABEL.ID & r->LABEL.IDMSK);
} }
// //

View File

@ -189,22 +189,9 @@ protected:
} }
public: public:
GIFRegPRIM* PRIM;
GSRegPMODE* PMODE;
GSRegSMODE1* SMODE1;
GSRegSMODE2* SMODE2;
GSRegDISPFB* DISPFB[2];
GSRegDISPLAY* DISPLAY[2];
GSRegEXTBUF* EXTBUF;
GSRegEXTDATA* EXTDATA;
GSRegEXTWRITE* EXTWRITE;
GSRegBGCOLOR* BGCOLOR;
GSRegCSR* CSR;
GSRegIMR* IMR;
GSRegBUSDIR* BUSDIR;
GSRegSIGLBLID* SIGLBLID;
GIFPath m_path[3]; GIFPath m_path[3];
GIFRegPRIM* PRIM;
GSPrivRegSet* m_regs;
GSLocalMemory m_mem; GSLocalMemory m_mem;
GSDrawingEnvironment m_env; GSDrawingEnvironment m_env;
GSDrawingContext* m_context; GSDrawingContext* m_context;
@ -256,7 +243,7 @@ public:
void Read(BYTE* mem, int len); void Read(BYTE* mem, int len);
void SoftReset(BYTE mask); void SoftReset(BYTE mask);
void WriteCSR(UINT32 csr) {CSR->ai32[1] = csr;} void WriteCSR(UINT32 csr) {m_regs->CSR.ai32[1] = csr;}
void ReadFIFO(BYTE* mem, int size); void ReadFIFO(BYTE* mem, int size);
template<int index> void Transfer(BYTE* mem, UINT32 size); template<int index> void Transfer(BYTE* mem, UINT32 size);
int Freeze(GSFreezeData* fd, bool sizeonly); int Freeze(GSFreezeData* fd, bool sizeonly);