mirror of https://github.com/PCSX2/pcsx2.git
ReorderingMTGS: Revert changes to Vif_Codes.cpp from earlier, until other bugs in VIF processing can be resolved. (fixes ICO bootup).
git-svn-id: http://pcsx2.googlecode.com/svn/branches/ReorderingMTGS@3519 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
2d4c7aaa25
commit
4f62554702
|
@ -71,7 +71,7 @@ wxString DiagnosticOrigin::ToString( const wxChar* msg ) const
|
|||
|
||||
bool pxAssertImpl_LogIt( const DiagnosticOrigin& origin, const wxChar *msg )
|
||||
{
|
||||
wxLogError( origin.ToString( msg ) );
|
||||
wxLogError( L"%s", origin.ToString( msg ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -174,27 +174,75 @@ template<int idx> _f int _vifCode_Direct(int pass, u8* data, bool isDirectHL) {
|
|||
|
||||
// the tag size should ALWAYS be 128 bits (qwc). If it isn't, it means there's a serious bug
|
||||
// somewhere in the VIF (likely relating to +/-'ing the tag.size during processing).
|
||||
pxAssumeMsg( (vif1.tag.size & 3) == 0, "Invalid Vif1 DIRECT packet size detected!" );
|
||||
// NOTE: ICO [PAL] exploits this during bootup. Needs investigation. --air
|
||||
//pxAssumeMsg( (vif1.tag.size & 3) == 0, "Invalid Vif1 DIRECT packet size detected!" );
|
||||
|
||||
const int minSize = aMin(vif1.vifpacketsize, vif1.tag.size)/4;
|
||||
uint ret;
|
||||
nVifStruct& v = nVif[1];
|
||||
const int ret = aMin(vif1.vifpacketsize, vif1.tag.size);
|
||||
u32 size = ret << 2;
|
||||
|
||||
if (!minSize)
|
||||
DevCon.Warning("VIF DIRECT (PATH2): No Data Transfer?");
|
||||
//gifRegs->stat.APATH = GIF_APATH2; //Flag is cleared in vif1interrupt to simulate it being in progress.
|
||||
|
||||
GetMTGS().PrepDataPacket(GIF_PATH_2, minSize);
|
||||
ret = GIFPath_CopyTag(GIF_PATH_2, (u128*)data, minSize)*4;
|
||||
GetMTGS().SendDataPacket();
|
||||
//In the original code we were saving this data, it seems if it does happen, its just blank, so we ignore it.
|
||||
|
||||
vif1.tag.size -= ret;
|
||||
if (!size) { DevCon.WriteLn("Path2: No Data Transfer?"); }
|
||||
|
||||
|
||||
if(vif1.vifpacketsize < 4 && v.bSize < 16)
|
||||
{
|
||||
memcpy(&v.buffer[v.bPtr], data, vif1.vifpacketsize << 2);
|
||||
v.bSize += vif1.vifpacketsize << 2;
|
||||
v.bPtr += vif1.vifpacketsize << 2;
|
||||
vif1.tag.size -= vif1.vifpacketsize;
|
||||
if(vif1.tag.size == 0)
|
||||
{
|
||||
DevCon.Warning("Missaligned packet on DIRECT end!");
|
||||
vif1.cmd = 0;
|
||||
}
|
||||
return vif1.vifpacketsize;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(v.bSize)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if(v.bSize < 16)
|
||||
{
|
||||
if(((16 - v.bSize) >> 2) > vif1.vifpacketsize) DevCon.Warning("Not Enough Data!");
|
||||
ret = (16 - v.bSize) >> 2;
|
||||
memcpy(&v.buffer[v.bPtr], data, ret << 2);
|
||||
vif1.tag.size -= ret;
|
||||
v.bSize = 0;
|
||||
v.bPtr = 0;
|
||||
}
|
||||
GetMTGS().PrepDataPacket(GIF_PATH_2, 1);
|
||||
GIFPath_CopyTag(GIF_PATH_2, (u128*)v.buffer, 1);
|
||||
GetMTGS().SendDataPacket();
|
||||
|
||||
if(vif1.tag.size == 0)
|
||||
{
|
||||
vif1.cmd = 0;
|
||||
}
|
||||
vif1.vifstalled = true;
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetMTGS().PrepDataPacket(GIF_PATH_2, size/16);
|
||||
uint count = GIFPath_CopyTag(GIF_PATH_2, (u128*)data, size/16) * 4;
|
||||
GetMTGS().SendDataPacket();
|
||||
|
||||
vif1.tag.size -= count;
|
||||
if(vif1.tag.size == 0)
|
||||
{
|
||||
vif1.cmd = 0;
|
||||
}
|
||||
vif1.vifstalled = true;
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
if(vif1.tag.size == 0)
|
||||
{
|
||||
vif1.cmd = 0;
|
||||
gifRegs->stat.clear_flags(GIF_STAT_APATH2 | GIF_STAT_OPH);
|
||||
}
|
||||
vif1.vifstalled = true;
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -134,10 +134,10 @@ bool AppDoAssert( const DiagnosticOrigin& origin, const wxChar *msg )
|
|||
wxString trace( pxGetStackTrace(origin.function) );
|
||||
wxString dbgmsg( origin.ToString( msg ) );
|
||||
|
||||
wxMessageOutputDebug().Printf( dbgmsg );
|
||||
wxMessageOutputDebug().Printf( L"%s", dbgmsg );
|
||||
|
||||
Console.Error( dbgmsg );
|
||||
Console.WriteLn( trace );
|
||||
Console.Error( L"%s", dbgmsg );
|
||||
Console.WriteLn( L"%s", trace );
|
||||
|
||||
wxString windowmsg( L"Assertion failed: " );
|
||||
if( msg != NULL )
|
||||
|
|
Loading…
Reference in New Issue