* Implemented GIF PATH/TAG logging option.

* Some other EE/Core logging additions and formatting tweaks.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3870 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-10-04 17:22:54 +00:00
parent e63314f545
commit 02d5ed7f45
7 changed files with 49 additions and 12 deletions

View File

@ -347,7 +347,8 @@ static __fi void VSyncStart(u32 sCycle)
GetCoreThread().VsyncInThread();
Cpu->CheckExecutionState();
EECNT_LOG( "///////// EE COUNTER VSYNC START (frame: %6d) \\\\\\\\\\\\\\\\\\\\ ", g_FrameCount );
if(EmuConfig.Trace.Enabled && EmuConfig.Trace.EE.m_EnableAll)
SysTrace.EE.Counters.Write( " ================ EE COUNTER VSYNC START (frame: %d) ================", g_FrameCount );
// EE Profiling and Debug code.
// FIXME: should probably be moved to VsyncInThread, and handled
@ -393,7 +394,8 @@ static __fi void VSyncStart(u32 sCycle)
static __fi void VSyncEnd(u32 sCycle)
{
EECNT_LOG( "///////// EE COUNTER VSYNC END (frame: %d) \\\\\\\\\\\\\\\\\\\\", g_FrameCount );
if(EmuConfig.Trace.Enabled && EmuConfig.Trace.EE.m_EnableAll)
SysTrace.EE.Counters.Write( " ================ EE COUNTER VSYNC END (frame: %d) ================", g_FrameCount );
g_FrameCount++;

View File

@ -373,6 +373,7 @@ extern void __Log( const char* fmt, ... );
#define GIF_LOG macTrace(EE.GIF)
#define EECNT_LOG macTrace(EE.Counters)
#define VifCodeLog macTrace(EE.VIFcode)
#define GifTagLog macTrace(EE.GIFpath)
#define PSXBIOS_LOG macTrace(IOP.Bios)

View File

@ -85,9 +85,9 @@ _vifT void vifTransferLoop(u32* &data) {
vifXRegs.code = data[0];
vifX.cmd = data[0] >> 24;
iBit = data[0] >> 31;
vifCmdHandler[idx][vifX.cmd & 0x7f](0, data);
VIF_LOG("New VifCMD %x tagsize %x", vifX.cmd, vifX.tag.size);
vifCmdHandler[idx][vifX.cmd & 0x7f](0, data);
data++; pSize--;
if (analyzeIbit<idx>(data, iBit)) break;
continue;
@ -98,7 +98,7 @@ _vifT void vifTransferLoop(u32* &data) {
pSize -= ret;
if (analyzeIbit<idx>(data, iBit)) break;
}
if (pSize) vifX.vifstalled = true;
}

View File

@ -74,8 +74,37 @@ struct GIFTAG
u32 REGS[2];
GIFTAG() {}
wxString DumpRegsToString() const;
};
wxString GIFTAG::DumpRegsToString() const
{
static const char* PackedModeRegsLabel[] =
{
"PRIM", "RGBA", "STQ", "UV",
"XYZF2", "XYZ2", "TEX0_1", "TEX0_2",
"CLAMP_1", "CLAMP_2", "FOG", "Unknown",
"XYZF3", "XYZ3", "A_D", "NOP"
};
u32 tempreg = REGS[0];
uint numregs = ((NREG-1)&0xf) + 1;
FastFormatUnicode result;
result.Write("NREG=0x%02X (", NREG);
for (u32 i = 0; i < numregs; i++) {
if (i == 8) tempreg = REGS[1];
if (i > 0) result.Write(" ");
result.Write(PackedModeRegsLabel[tempreg & 0xf]);
tempreg >>= 4;
}
result.Write(")");
return result;
}
// --------------------------------------------------------------------------------------
// GIFPath -- PS2 GIFtag info (one for each path).
// --------------------------------------------------------------------------------------
@ -655,7 +684,7 @@ __fi int GIFPath::CopyTag(const u128* pMem128, u32 size)
switch(tag.FLG) {
case GIF_FLG_PACKED:
GIF_LOG("Packed Mode EOP %x", tag.EOP);
GIF_LOG("Packed Mode EOP %x : %ls", tag.EOP, tag.DumpRegsToString().c_str());
PrepPackedRegs();
if(DetectE > 0)

View File

@ -21,12 +21,12 @@
static __ri bool _eelog_enabled( u32 addr )
{
// Selective enable/disable ability for specific register maps
if (eeAddrInRange(RCNT0, addr)) return false;
if (eeAddrInRange(RCNT0, addr)) return true;
if (eeAddrInRange(RCNT1, addr)) return true;
if (eeAddrInRange(RCNT2, addr)) return true;
if (eeAddrInRange(RCNT3, addr)) return true;
if (eeAddrInRange(SBUS, addr)) return false;
if (eeAddrInRange(SBUS, addr)) return true;
// INTC!
if (addr == INTC_STAT || addr == INTC_MASK) return true;

View File

@ -2039,10 +2039,6 @@
RelativePath="..\..\gui\Dialogs\ConfirmationDialogs.cpp"
>
</File>
<File
RelativePath="..\..\gui\Dialogs\CreateMemoryCardDialog.cpp"
>
</File>
<File
RelativePath="..\..\gui\Dialogs\FirstTimeWizard.cpp"
>
@ -2884,6 +2880,10 @@
<Filter
Name="gui"
>
<File
RelativePath="..\..\gui\Dialogs\CreateMemoryCardDialog.cpp"
>
</File>
<File
RelativePath="..\..\gui\Dialogs\McdConfigDialog.cpp"
>

View File

@ -879,6 +879,11 @@ static __noinline s32 recExecuteBlock( s32 eeCycles )
iopBreak = 0;
iopCycleEE = eeCycles;
#ifdef PCSX2_DEVBUILD
if (SysTrace.SIF.IsActive())
SysTrace.IOP.R3000A.Write("Switching to IOP CPU for %d cycles", eeCycles);
#endif
// [TODO] recExecuteBlock could be replaced by a direct call to the iopEnterRecompiledCode()
// (by assigning its address to the psxRec structure). But for that to happen, we need
// to move iopBreak/iopCycleEE update code to emitted assembly code. >_< --air