trunk/stable: logging additions for VPU's VIFcodes

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3914 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-10-11 13:55:28 +00:00
parent b2bb425c88
commit 2d9d3a6b5c
3 changed files with 34 additions and 4 deletions

View File

@ -503,13 +503,37 @@ vifOp(vifCode_STMod) {
return 0; return 0;
} }
template< uint idx >
static uint calc_addr(bool flg)
{
VIFregisters& vifRegs = vifXRegs;
uint retval = vifRegs.code;
if (idx && flg) retval += vifRegs.tops;
return retval & (idx ? 0x3ff : 0xff);
}
vifOp(vifCode_Unpack) { vifOp(vifCode_Unpack) {
pass1 { pass1 {
vifUnpackSetup<idx>(data); vifUnpackSetup<idx>(data);
return 1; return 1;
} }
pass2 { return nVifUnpack<idx>((u8*)data); } pass2 { return nVifUnpack<idx>((u8*)data); }
pass3 { VifCodeLog("Unpack"); } pass3 {
vifStruct& vifX = GetVifX;
VIFregisters& vifRegs = vifXRegs;
uint vl = vifX.cmd & 0x03;
uint vn = (vifX.cmd >> 2) & 0x3;
bool flg = (vifRegs.code >> 15) & 1;
static const char* const vntbl[] = { "S", "V2", "V3", "V4" };
static const uint vltbl[] = { 32, 16, 8, 5 };
VifCodeLog("Unpack %s_%u (%s) @ 0x%04X%s (cl=%u wl=%u num=0x%02X)",
vntbl[vn], vltbl[vl], (vifX.cmd & 0x10) ? "masked" : "unmasked",
calc_addr<idx>(flg), flg ? "(FLG)" : "",
vifRegs.cycle.cl, vifRegs.cycle.wl, (vifXRegs.code >> 16) & 0xff
);
}
return 0; return 0;
} }

View File

@ -86,7 +86,13 @@ _vifT void vifTransferLoop(u32* &data) {
vifX.cmd = data[0] >> 24; vifX.cmd = data[0] >> 24;
iBit = data[0] >> 31; iBit = data[0] >> 31;
VIF_LOG("New VifCMD %x tagsize %x", vifX.cmd, vifX.tag.size); //VIF_LOG("New VifCMD %x tagsize %x", vifX.cmd, vifX.tag.size);
if (IsDevBuild && SysTrace.EE.VIFcode.IsActive())
{
// Pass 2 means "log it"
vifCmdHandler[idx][vifX.cmd & 0x7f](2, data);
}
vifCmdHandler[idx][vifX.cmd & 0x7f](0, data); vifCmdHandler[idx][vifX.cmd & 0x7f](0, data);
data++; pSize--; data++; pSize--;
if (analyzeIbit<idx>(data, iBit)) break; if (analyzeIbit<idx>(data, iBit)) break;

View File

@ -880,8 +880,8 @@ static __noinline s32 recExecuteBlock( s32 eeCycles )
iopCycleEE = eeCycles; iopCycleEE = eeCycles;
#ifdef PCSX2_DEVBUILD #ifdef PCSX2_DEVBUILD
if (SysTrace.SIF.IsActive()) //if (SysTrace.SIF.IsActive())
SysTrace.IOP.R3000A.Write("Switching to IOP CPU for %d cycles", eeCycles); // SysTrace.IOP.R3000A.Write("Switching to IOP CPU for %d cycles", eeCycles);
#endif #endif
// [TODO] recExecuteBlock could be replaced by a direct call to the iopEnterRecompiledCode() // [TODO] recExecuteBlock could be replaced by a direct call to the iopEnterRecompiledCode()