improve PE logging + misc
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2716 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
81996b890b
commit
76d24f2c0d
|
@ -15,6 +15,11 @@
|
||||||
// Official SVN repository and contact information can be found at
|
// Official SVN repository and contact information can be found at
|
||||||
// http://code.google.com/p/dolphin-emu/
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
|
// http://developer.nvidia.com/object/General_FAQ.html#t6 !!!!!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "ChunkFile.h"
|
#include "ChunkFile.h"
|
||||||
|
|
||||||
|
@ -34,8 +39,13 @@ namespace PixelEngine
|
||||||
// internal hardware addresses
|
// internal hardware addresses
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
CTRL_REGISTER = 0x00a,
|
PE_CTRL_REGISTER = 0x00a,
|
||||||
TOKEN_REG = 0x00e,
|
PE_TOKEN_REG = 0x00e,
|
||||||
|
PE_ZCONF = 0x000,
|
||||||
|
PE_ALPHACONF = 0x002,
|
||||||
|
PE_DSTALPHACONF = 0x004,
|
||||||
|
PE_ALPHAMODE = 0x006,
|
||||||
|
PE_ALPHAREAD = 0x008,
|
||||||
};
|
};
|
||||||
|
|
||||||
// fifo Control Register
|
// fifo Control Register
|
||||||
|
@ -90,16 +100,21 @@ void Read16(u16& _uReturnValue, const u32 _iAddress)
|
||||||
|
|
||||||
switch (_iAddress & 0xFFF)
|
switch (_iAddress & 0xFFF)
|
||||||
{
|
{
|
||||||
case CTRL_REGISTER:
|
case PE_CTRL_REGISTER:
|
||||||
_uReturnValue = g_ctrlReg.Hex;
|
_uReturnValue = g_ctrlReg.Hex;
|
||||||
INFO_LOG(PIXELENGINE,"\t CTRL_REGISTER : %04x", _uReturnValue);
|
INFO_LOG(PIXELENGINE,"\t CTRL_REGISTER : %04x", _uReturnValue);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case TOKEN_REG:
|
case PE_TOKEN_REG:
|
||||||
_uReturnValue = CommandProcessor::fifo.PEToken;
|
_uReturnValue = CommandProcessor::fifo.PEToken;
|
||||||
INFO_LOG(PIXELENGINE,"\t TOKEN_REG : %04x", _uReturnValue);
|
INFO_LOG(PIXELENGINE,"\t TOKEN_REG : %04x", _uReturnValue);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
case PE_ALPHACONF:
|
||||||
|
// Most games read this early. no idea why.
|
||||||
|
INFO_LOG(PIXELENGINE, "(r16): PE_ALPHACONF");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
WARN_LOG(PIXELENGINE, "(r16): unknown @ %08x", _iAddress);
|
WARN_LOG(PIXELENGINE, "(r16): unknown @ %08x", _iAddress);
|
||||||
break;
|
break;
|
||||||
|
@ -115,11 +130,9 @@ void Write32(const u32 _iValue, const u32 _iAddress)
|
||||||
|
|
||||||
void Write16(const u16 _iValue, const u32 _iAddress)
|
void Write16(const u16 _iValue, const u32 _iAddress)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(PIXELENGINE, "(w16): 0x%04x @ 0x%08x",_iValue,_iAddress);
|
|
||||||
|
|
||||||
switch (_iAddress & 0xFFF)
|
switch (_iAddress & 0xFFF)
|
||||||
{
|
{
|
||||||
case CTRL_REGISTER:
|
case PE_CTRL_REGISTER:
|
||||||
{
|
{
|
||||||
UPECtrlReg tmpCtrl(_iValue);
|
UPECtrlReg tmpCtrl(_iValue);
|
||||||
|
|
||||||
|
@ -131,17 +144,25 @@ void Write16(const u16 _iValue, const u32 _iAddress)
|
||||||
g_ctrlReg.PEToken = 0; // this flag is write only
|
g_ctrlReg.PEToken = 0; // this flag is write only
|
||||||
g_ctrlReg.PEFinish = 0; // this flag is write only
|
g_ctrlReg.PEFinish = 0; // this flag is write only
|
||||||
|
|
||||||
|
DEBUG_LOG(PIXELENGINE, "(w16): PE_CTRL_REGISTER: 0x%04x", _iValue);
|
||||||
UpdateInterrupts();
|
UpdateInterrupts();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOKEN_REG:
|
case PE_TOKEN_REG:
|
||||||
//LOG(PIXELENGINE,"WEIRD: program wrote token: %i",_iValue);
|
//LOG(PIXELENGINE,"WEIRD: program wrote token: %i",_iValue);
|
||||||
PanicAlert("PIXELENGINE : (w16) WTF? PowerPC program wrote token: %i", _iValue);
|
PanicAlert("(w16) WTF? PowerPC program wrote token: %i", _iValue);
|
||||||
//only the gx pipeline is supposed to be able to write here
|
//only the gx pipeline is supposed to be able to write here
|
||||||
//g_token = _iValue;
|
//g_token = _iValue;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// These are probably the settings for direct CPU EFB access. Ugh.
|
||||||
|
case PE_ZCONF: INFO_LOG("(w16) ZCONF: %02x", _iValue); break;
|
||||||
|
case PE_ALPHACONF: INFO_LOG("(w16) ALPHACONF: %02x", _iValue); break;
|
||||||
|
case PE_DSTALPHACONF: INFO_LOG("(w16) DSTALPHACONF: %02x", _iValue); break;
|
||||||
|
case PE_ALPHAMODE: INFO_LOG("(w16) ALPHAMODE: %02x", _iValue); break;
|
||||||
|
case PE_ALPHAREAD: INFO_LOG("(w16) ALPHAREAD: %02x", _iValue); break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
WARN_LOG(PIXELENGINE, "Write16: unknown %04x @ %08x", _iValue, _iAddress);
|
WARN_LOG(PIXELENGINE, "Write16: unknown %04x @ %08x", _iValue, _iAddress);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -463,6 +463,10 @@ namespace CPUCompare
|
||||||
// get start tic
|
// get start tic
|
||||||
PROFILER_QUERY_PERFORMACE_COUNTER(&b->ticStart);
|
PROFILER_QUERY_PERFORMACE_COUNTER(&b->ticStart);
|
||||||
}
|
}
|
||||||
|
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||||
|
// should help logged stacktraces become more accurate
|
||||||
|
MOV(32, M(&PC), Imm32(js.blockStart));
|
||||||
|
#endif
|
||||||
|
|
||||||
//Start up the register allocators
|
//Start up the register allocators
|
||||||
//They use the information in gpa/fpa to preload commonly used registers.
|
//They use the information in gpa/fpa to preload commonly used registers.
|
||||||
|
|
|
@ -315,7 +315,7 @@ void JitBlockCache::GetBlockNumbersFromAddress(u32 em_address, std::vector<int>
|
||||||
//overwritten. We should have thrown it out before, on instruction cache invalidate or something.
|
//overwritten. We should have thrown it out before, on instruction cache invalidate or something.
|
||||||
//Not ne cessarily bad though , if a game has simply thrown away a lot of code and is now using the space
|
//Not ne cessarily bad though , if a game has simply thrown away a lot of code and is now using the space
|
||||||
//for something else, then it's fine.
|
//for something else, then it's fine.
|
||||||
WARN_LOG(MASTER_LOG, "WARNING - ClearCache detected code overwrite @ %08x", blocks[blocknum].originalAddress);
|
DEBUG_LOG(MASTER_LOG, "WARNING - ClearCache detected code overwrite @ %08x", blocks[blocknum].originalAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't unlink blocks, we just send anyone who tries to run them back to the dispatcher.
|
// We don't unlink blocks, we just send anyone who tries to run them back to the dispatcher.
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="0"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
@ -88,6 +89,7 @@
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
|
WholeProgramOptimization="0"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
@ -152,7 +154,7 @@
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="0"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
@ -218,7 +220,7 @@
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="0"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
@ -284,7 +286,7 @@
|
||||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
CharacterSet="0"
|
CharacterSet="0"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="0"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
|
|
@ -267,7 +267,7 @@ int ReadOutPBs(u32 pbs_address, AXParamBlock* _pPBs, int _num)
|
||||||
if (pSrc != NULL)
|
if (pSrc != NULL)
|
||||||
{
|
{
|
||||||
short *pDest = (short *)&_pPBs[i];
|
short *pDest = (short *)&_pPBs[i];
|
||||||
for (size_t p = 0; p < sizeof(AXParamBlock) / 2; p++)
|
for (int p = 0; p < (int)sizeof(AXParamBlock) / 2; p++)
|
||||||
{
|
{
|
||||||
pDest[p] = Common::swap16(pSrc[p]);
|
pDest[p] = Common::swap16(pSrc[p]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue