zzogl replayer:

* I miss some ending bit. 
* Use a full int for GSvsync
* fix a small memory link


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5269 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2012-06-05 06:46:52 +00:00
parent 55ba4477ca
commit d79186fafe
6 changed files with 20 additions and 12 deletions

View File

@ -87,7 +87,7 @@ void GSDump::VSync(int field, bool last, u8* regs)
fwrite(regs, 0x2000, 1, m_gs); fwrite(regs, 0x2000, 1, m_gs);
fputc(1, m_gs); fputc(1, m_gs);
fputc(field, m_gs); fwrite(&field, 4, 1, m_gs);
if((++m_frames & 1) == 0 && last) if((++m_frames & 1) == 0 && last)
{ {

View File

@ -498,6 +498,8 @@ void CALLBACK GSvsync(int interlace)
if (get_snapshot_filename(filename, "/tmp", "gs")) if (get_snapshot_filename(filename, "/tmp", "gs"))
g_dump.Open(filename, g_LastCRC, fd, g_pBasePS2Mem); g_dump.Open(filename, g_LastCRC, fd, g_pBasePS2Mem);
conf.dump--; conf.dump--;
free(payload);
} }
g_dump.VSync(interlace, (conf.dump == 0), g_pBasePS2Mem); g_dump.VSync(interlace, (conf.dump == 0), g_pBasePS2Mem);
#endif #endif
@ -686,7 +688,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
switch(p->param) switch(p->param)
{ {
case 0: case 0:
p->buff.resize(0x4000/4); p->buff.resize(0x4000);
//p->addr = 0x4000 - p->size; //p->addr = 0x4000 - p->size;
//fread(&p->buff[p->addr], p->size, 1, fp); //fread(&p->buff[p->addr], p->size, 1, fp);
fread(&p->buff[0], p->size, 1, fp); fread(&p->buff[0], p->size, 1, fp);
@ -694,7 +696,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
case 1: case 1:
case 2: case 2:
case 3: case 3:
p->buff.resize(p->size/4); p->buff.resize(p->size);
fread(&p->buff[0], p->size, 1, fp); fread(&p->buff[0], p->size, 1, fp);
break; break;
} }
@ -703,7 +705,8 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
case 1: case 1:
p->param = (u8)fgetc(fp); fread(&p->param, 4, 1, fp);
//p->param = (u8)fgetc(fp);
break; break;
@ -715,7 +718,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
case 3: case 3:
p->buff.resize(0x2000/4); p->buff.resize(0x2000);
fread(&p->buff[0], 0x2000, 1, fp); fread(&p->buff[0], 0x2000, 1, fp);
@ -769,6 +772,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
// FIXME // FIXME
// GSreadFIFO2(&buff[0], p->size / 16); // GSreadFIFO2(&buff[0], p->size / 16);
fprintf(stderr, "GSreadFIFO2 not yet implemented");
break; break;

View File

@ -219,7 +219,7 @@ template<int index> void _GSgifTransfer(const u32 *pMem, u32 size)
} }
#ifdef _DEBUG #ifdef _DEBUG
g_dump.Transfer(index, start, pMem - start, size_arg); g_dump.Transfer(index, start, pMem - start + 4, size_arg);
#endif #endif
// This is the case when not all data was readed from one try: VU1 has too much data. // This is the case when not all data was readed from one try: VU1 has too much data.

View File

@ -87,7 +87,7 @@ void GSDump::VSync(int field, bool last, u8* regs)
fwrite(regs, 0x2000, 1, m_gs); fwrite(regs, 0x2000, 1, m_gs);
fputc(1, m_gs); fputc(1, m_gs);
fputc(field, m_gs); fwrite(&field, 4, 1, m_gs);
if((++m_frames & 1) == 0 && last) if((++m_frames & 1) == 0 && last)
{ {

View File

@ -513,6 +513,8 @@ EXPORT_C_(void) GSvsync(int current_interlace)
if (get_snapshot_filename(filename, "/tmp", "gs")) if (get_snapshot_filename(filename, "/tmp", "gs"))
g_dump.Open(filename, g_LastCRC, fd, g_pBasePS2Mem); g_dump.Open(filename, g_LastCRC, fd, g_pBasePS2Mem);
conf.dump--; conf.dump--;
free(payload);
} }
g_dump.VSync(current_interlace, (conf.dump == 0), g_pBasePS2Mem); g_dump.VSync(current_interlace, (conf.dump == 0), g_pBasePS2Mem);
#endif #endif
@ -702,7 +704,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
switch(p->param) switch(p->param)
{ {
case 0: case 0:
p->buff.resize(0x4000/4); p->buff.resize(0x4000);
//p->addr = 0x4000 - p->size; //p->addr = 0x4000 - p->size;
//fread(&p->buff[p->addr], p->size, 1, fp); //fread(&p->buff[p->addr], p->size, 1, fp);
fread(&p->buff[0], p->size, 1, fp); fread(&p->buff[0], p->size, 1, fp);
@ -710,7 +712,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
case 1: case 1:
case 2: case 2:
case 3: case 3:
p->buff.resize(p->size/4); p->buff.resize(p->size);
fread(&p->buff[0], p->size, 1, fp); fread(&p->buff[0], p->size, 1, fp);
break; break;
} }
@ -719,7 +721,8 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
case 1: case 1:
p->param = (u8)fgetc(fp); fread(&p->param, 4, 1, fp);
//p->param = (u8)fgetc(fp);
break; break;
@ -731,7 +734,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
case 3: case 3:
p->buff.resize(0x2000/4); p->buff.resize(0x2000);
fread(&p->buff[0], 0x2000, 1, fp); fread(&p->buff[0], 0x2000, 1, fp);
@ -785,6 +788,7 @@ EXPORT_C_(void) GSReplay(char* lpszCmdLine)
// FIXME // FIXME
// GSreadFIFO2(&buff[0], p->size / 16); // GSreadFIFO2(&buff[0], p->size / 16);
fprintf(stderr, "GSreadFIFO2 not yet implemented");
break; break;

View File

@ -223,7 +223,7 @@ template<int index> void _GSgifTransfer(const u32 *pMem, u32 size)
} }
#ifdef _DEBUG #ifdef _DEBUG
g_dump.Transfer(index, start, pMem - start, size_arg); g_dump.Transfer(index, start, pMem - start + 4, size_arg);
#endif #endif
// This is the case when not all data was readed from one try: VU1 has too much data. // This is the case when not all data was readed from one try: VU1 has too much data.