From 1b76bd386358499b85df236353ef8a2c22090b60 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Sat, 18 Oct 2008 20:34:06 +0000 Subject: [PATCH] Moved some routine logs to higher verbosity levels. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@912 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Boot/Boot_BIOSEmu.cpp | 4 ++-- Source/Core/Core/Src/CoreTiming.cpp | 2 +- Source/Core/Core/Src/HW/AudioInterface.cpp | 10 +++++----- Source/Core/Core/Src/HW/CommandProcessor.cpp | 6 +++--- Source/Core/Core/Src/HW/DSP.cpp | 10 +++++----- Source/Core/Core/Src/HW/DVDInterface.cpp | 6 +++--- Source/Core/Core/Src/HW/EXI_Channel.cpp | 12 ++++++------ Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp | 4 ++-- Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp | 6 +++--- Source/Core/Core/Src/HW/PeripheralInterface.cpp | 6 +++--- Source/Core/Core/Src/HW/PixelEngine.cpp | 10 +++++----- Source/Core/Core/Src/HW/SerialInterface.cpp | 6 +++--- Source/Core/Core/Src/HW/VideoInterface.cpp | 4 ++-- Source/Core/Core/Src/HW/WII_IOB.cpp | 12 ++++++------ Source/Core/Core/Src/HW/WII_IPC.cpp | 10 +++++----- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 4 ++-- Source/Core/Core/Src/LogManager.cpp | 4 ++++ Source/Core/Core/Src/PowerPC/PowerPC.cpp | 10 +++++----- 18 files changed, 65 insertions(+), 61 deletions(-) diff --git a/Source/Core/Core/Src/Boot/Boot_BIOSEmu.cpp b/Source/Core/Core/Src/Boot/Boot_BIOSEmu.cpp index 204bc6c562..d4e670627f 100644 --- a/Source/Core/Core/Src/Boot/Boot_BIOSEmu.cpp +++ b/Source/Core/Core/Src/Boot/Boot_BIOSEmu.cpp @@ -142,7 +142,7 @@ void CBoot::EmulatedBIOS(bool _bDebug) u32 iLength = Memory::ReadUnchecked_U32(0x81300008); u32 iDVDOffset = Memory::ReadUnchecked_U32(0x8130000c); - LOG(MASTER_LOG, "DVDRead: offset: %08x memOffset: %08x length: %i", iDVDOffset, iRamAddress, iLength); + LOG(MASTER_LOG + 200, "DVDRead: offset: %08x memOffset: %08x length: %i", iDVDOffset, iRamAddress, iLength); DVDInterface::DVDRead(iDVDOffset, iRamAddress, iLength); } while(PowerPC::ppcState.gpr[3] != 0x00); @@ -349,7 +349,7 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug) u32 iLength = Memory::ReadUnchecked_U32(0x81300008); u32 iDVDOffset = Memory::ReadUnchecked_U32(0x8130000c) << 2; - LOG(BOOT, "DVDRead: offset: %08x memOffse: %08x length: %i", iDVDOffset, iRamAddress, iLength); + LOG(BOOT + 100, "DVDRead: offset: %08x memOffse: %08x length: %i", iDVDOffset, iRamAddress, iLength); DVDInterface::DVDRead(iDVDOffset, iRamAddress, iLength); } while(PowerPC::ppcState.gpr[3] != 0x00); diff --git a/Source/Core/Core/Src/CoreTiming.cpp b/Source/Core/Core/Src/CoreTiming.cpp index e1436f118e..37e6671285 100644 --- a/Source/Core/Core/Src/CoreTiming.cpp +++ b/Source/Core/Core/Src/CoreTiming.cpp @@ -347,7 +347,7 @@ void LogPendingEvents() void Idle() { - LOG(GEKKO, "Idle"); + LOG(GEKKO + 300, "Idle"); idledCycles += downcount; downcount = 0; diff --git a/Source/Core/Core/Src/HW/AudioInterface.cpp b/Source/Core/Core/Src/HW/AudioInterface.cpp index f57f485ead..ebd69ca9a7 100644 --- a/Source/Core/Core/Src/HW/AudioInterface.cpp +++ b/Source/Core/Core/Src/HW/AudioInterface.cpp @@ -124,7 +124,7 @@ void Read32(u32& _rReturnValue, const u32 _Address) switch (_Address & 0xFFFF) { case AI_CONTROL_REGISTER: //0x6C00 - LOG(AUDIO_INTERFACE, "AudioInterface(R) 0x%08x", _Address); + LOG(AUDIO_INTERFACE + 100, "AudioInterface(R) 0x%08x", _Address); _rReturnValue = g_AudioRegister.m_Control.hex; return; @@ -132,7 +132,7 @@ void Read32(u32& _rReturnValue, const u32 _Address) // Sample Rate (AIGetDSPSampleRate) // 32bit state (highest bit PlayState) // AIGetStreamPlayState case AI_VOLUME_REGISTER: //0x6C04 - LOG(AUDIO_INTERFACE, "AudioInterface(R) 0x%08x", _Address); + LOG(AUDIO_INTERFACE + 100, "AudioInterface(R) 0x%08x", _Address); _rReturnValue = g_AudioRegister.m_Volume.hex; return; @@ -145,7 +145,7 @@ void Read32(u32& _rReturnValue, const u32 _Address) case AI_INTERRUPT_TIMING: // When sample counter reaches the value of this register, the interrupt AIINT should // fire. - LOG(AUDIO_INTERFACE, "AudioInterface(R) 0x%08x", _Address); + LOG(AUDIO_INTERFACE + 100, "AudioInterface(R) 0x%08x", _Address); _rReturnValue = g_AudioRegister.m_InterruptTiming; return; @@ -200,7 +200,7 @@ void Write32(const u32 _Value, const u32 _Address) // Sample Count Reset if (tmpAICtrl.SCRESET) { - LOG(AUDIO_INTERFACE, "Reset SampleCounter"); + LOG(AUDIO_INTERFACE + 100, "Reset SampleCounter"); g_AudioRegister.m_SampleCounter = 0; g_AudioRegister.m_Control.SCRESET = 0; @@ -217,7 +217,7 @@ void Write32(const u32 _Value, const u32 _Address) case AI_VOLUME_REGISTER: g_AudioRegister.m_Volume.hex = _Value; - LOG(AUDIO_INTERFACE, "Set m_Volume: left(%i) right(%i)", g_AudioRegister.m_Volume.leftVolume, g_AudioRegister.m_Volume.rightVolume); + LOG(AUDIO_INTERFACE + 100, "Set m_Volume: left(%i) right(%i)", g_AudioRegister.m_Volume.leftVolume, g_AudioRegister.m_Volume.rightVolume); break; case AI_SAMPLE_COUNTER: diff --git a/Source/Core/Core/Src/HW/CommandProcessor.cpp b/Source/Core/Core/Src/HW/CommandProcessor.cpp index f6c58d4039..d88366e2f6 100644 --- a/Source/Core/Core/Src/HW/CommandProcessor.cpp +++ b/Source/Core/Core/Src/HW/CommandProcessor.cpp @@ -171,7 +171,7 @@ void Shutdown() void Read16(u16& _rReturnValue, const u32 _Address) { - LOG(COMMANDPROCESSOR, "(r): 0x%08x", _Address); + LOG(COMMANDPROCESSOR + 100, "(r): 0x%08x", _Address); if (Core::g_CoreStartupParameter.bUseDualCore) { //if ((_Address&0xFFF)>=0x20) @@ -258,7 +258,7 @@ bool AllowIdleSkipping() void Write16(const u16 _Value, const u32 _Address) { - LOG(COMMANDPROCESSOR, "(w): 0x%04x @ 0x%08x",_Value,_Address); + LOG(COMMANDPROCESSOR + 100, "(w): 0x%04x @ 0x%08x",_Value,_Address); //Spin until queue is empty - it WILL become empty because this is the only thread //that submits data @@ -275,7 +275,7 @@ void Write16(const u16 _Value, const u32 _Address) while (fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance > 0 && !(fifo.bFF_BPEnable && fifo.bFF_Breakpoint)) //while (fifo.bFF_GPReadEnable && fifo.CPReadWriteDistance > fifo.CPHiWatermark && !(fifo.bFF_BPEnable && fifo.bFF_Breakpoint)) ct++; - if (ct) {LOG(COMMANDPROCESSOR, "(Write16): %lu cycles for nothing :[ ", ct);} + if (ct) {LOG(COMMANDPROCESSOR + 200, "(Write16): %lu cycles for nothing :[ ", ct);} } #ifdef _WIN32 //EnterCriticalSection(&fifo.sync); diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp index 344c04ba00..7994674750 100644 --- a/Source/Core/Core/Src/HW/DSP.cpp +++ b/Source/Core/Core/Src/HW/DSP.cpp @@ -218,7 +218,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress) if ((_iAddress & 0x6C00) != 0x6c00) { if (_iAddress != 0xCC005004) { - LOG(DSPINTERFACE, "DSPInterface(r16) 0x%08x", _iAddress); + LOG(DSPINTERFACE + 300, "DSPInterface(r16) 0x%08x", _iAddress); } switch (_iAddress & 0xFFFF) @@ -303,7 +303,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress) void Write16(const u16 _Value, const u32 _Address) { - LOG(DSPINTERFACE, "DSPInterface(w16) 0x%04x 0x%08x", _Value, _Address); + LOG(DSPINTERFACE + 300, "DSPInterface(w16) 0x%04x 0x%08x", _Value, _Address); switch(_Address & 0xFFFF) { @@ -559,13 +559,13 @@ void Update_ARAM_DMA() return; g_arDMA.CntValid[0] = g_arDMA.CntValid[1] = false; - LOG(DSPINTERFACE,"ARAM DMA triggered"); + LOG(DSPINTERFACE + 100,"ARAM DMA triggered"); //TODO: speedup if (g_arDMA.Cnt.dir) { //read from ARAM - LOG(DSPINTERFACE,"ARAM DMA read %08x bytes from %08x to Mem: %08x",g_arDMA.Cnt.count, g_arDMA.ARAddr, g_arDMA.MMAddr); + LOG(DSPINTERFACE + 100,"ARAM DMA read %08x bytes from %08x to Mem: %08x",g_arDMA.Cnt.count, g_arDMA.ARAddr, g_arDMA.MMAddr); u32 iMemAddress = g_arDMA.MMAddr; u32 iARAMAddress = g_arDMA.ARAddr; @@ -585,7 +585,7 @@ void Update_ARAM_DMA() u32 iARAMAddress = g_arDMA.ARAddr; //write to g_ARAM - LOG(DSPINTERFACE,"g_ARAM DMA write %08x bytes from %08x to Aram: %08x",g_arDMA.Cnt.count, g_arDMA.MMAddr, g_arDMA.ARAddr); + LOG(DSPINTERFACE + 100,"g_ARAM DMA write %08x bytes from %08x to Aram: %08x",g_arDMA.Cnt.count, g_arDMA.MMAddr, g_arDMA.ARAddr); for (u32 i = 0; i < g_arDMA.Cnt.count; i++) { if (iARAMAddress < ARAM_SIZE) diff --git a/Source/Core/Core/Src/HW/DVDInterface.cpp b/Source/Core/Core/Src/HW/DVDInterface.cpp index 2d1ba8864c..4262a7d267 100644 --- a/Source/Core/Core/Src/HW/DVDInterface.cpp +++ b/Source/Core/Core/Src/HW/DVDInterface.cpp @@ -279,7 +279,7 @@ bool DVDReadADPCM(u8* _pDestBuffer, u32 _iNumSamples) void Read32(u32& _uReturnValue, const u32 _iAddress) { - LOG(DVDINTERFACE, "DVD(r): 0x%08x", _iAddress); + LOG(DVDINTERFACE + 300, "DVD(r): 0x%08x", _iAddress); switch (_iAddress & 0xFFF) { @@ -308,7 +308,7 @@ void Read32(u32& _uReturnValue, const u32 _iAddress) void Write32(const u32 _iValue, const u32 _iAddress) { - LOG(DVDINTERFACE, "DVD(w): 0x%08x @ 0x%08x", _iValue, _iAddress); + LOG(DVDINTERFACE + 300, "DVD(w): 0x%08x @ 0x%08x", _iValue, _iAddress); switch (_iAddress & 0x3FF) { @@ -466,7 +466,7 @@ void ExecuteCommand(UDIDMAControlRegister& _DMAControlReg) u32 iDVDOffset = dvdMem.Command[1] << 2; u32 iSrcLength = dvdMem.Command[2]; if (false) { iSrcLength++; } // avoid warning << wtf is this? - LOG(DVDINTERFACE, "DVD: Read ISO: DVDOffset=%08x, DMABuffer=%08x, SrcLength=%08x, DMALength=%08x",iDVDOffset,dvdMem.DMAAddress.Address,iSrcLength,dvdMem.DMALength.Length); + LOG(DVDINTERFACE + 200, "DVD: Read ISO: DVDOffset=%08x, DMABuffer=%08x, SrcLength=%08x, DMALength=%08x",iDVDOffset,dvdMem.DMAAddress.Address,iSrcLength,dvdMem.DMALength.Length); _dbg_assert_(DVDINTERFACE, iSrcLength == dvdMem.DMALength.Length); if (DVDRead(iDVDOffset, dvdMem.DMAAddress.Address, dvdMem.DMALength.Length) != true) diff --git a/Source/Core/Core/Src/HW/EXI_Channel.cpp b/Source/Core/Core/Src/HW/EXI_Channel.cpp index 2d8669235a..227d533c99 100644 --- a/Source/Core/Core/Src/HW/EXI_Channel.cpp +++ b/Source/Core/Core/Src/HW/EXI_Channel.cpp @@ -128,7 +128,7 @@ void CEXIChannel::Update() void CEXIChannel::Read32(u32& _uReturnValue, const u32 _iRegister) { - LOG(EXPANSIONINTERFACE, "ExtensionInterface(R): channel: %i reg: %i", m_ChannelId, _iRegister); + LOG(EXPANSIONINTERFACE + 300, "ExtensionInterface(R): channel: %i reg: %i", m_ChannelId, _iRegister); switch (_iRegister) { @@ -172,7 +172,7 @@ void CEXIChannel::Read32(u32& _uReturnValue, const u32 _iRegister) void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister) { - LOG(EXPANSIONINTERFACE, "ExtensionInterface(W): 0x%08x channel: %i reg: %i", _iValue, m_ChannelId, _iRegister); + LOG(EXPANSIONINTERFACE + 200, "ExtensionInterface(W): 0x%08x channel: %i reg: %i", _iValue, m_ChannelId, _iRegister); switch (_iRegister) { @@ -226,17 +226,17 @@ void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister) break; case EXI_DMAADDR: - LOG(EXPANSIONINTERFACE, "EXI: Wrote DMABuf, chan %i", m_ChannelId); + LOG(EXPANSIONINTERFACE + 200, "EXI: Wrote DMABuf, chan %i", m_ChannelId); m_DMAMemoryAddress = _iValue; break; case EXI_DMALENGTH: - LOG(EXPANSIONINTERFACE, "EXI: Wrote DMASize, chan %i", m_ChannelId); + LOG(EXPANSIONINTERFACE + 200, "EXI: Wrote DMASize, chan %i", m_ChannelId); m_DMALength = _iValue; break; case EXI_DMACONTROL: - LOG(EXPANSIONINTERFACE, "EXI: Wrote DMAControl, chan %i", m_ChannelId); + LOG(EXPANSIONINTERFACE + 200, "EXI: Wrote DMAControl, chan %i", m_ChannelId); m_Control.hex = _iValue; if (m_Control.TSTART) @@ -277,7 +277,7 @@ void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister) break; case EXI_IMMDATA: - LOG(EXPANSIONINTERFACE, "EXI: Wrote IMMData, chan %i", m_ChannelId); + LOG(EXPANSIONINTERFACE + 200, "EXI: Wrote IMMData, chan %i", m_ChannelId); m_ImmData = _iValue; break; } diff --git a/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp b/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp index a5354c490b..773a2a7920 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp @@ -188,7 +188,7 @@ void CEXIIPL::TransferByte(u8& _uByte) // debug only else if ((m_uAddress & 0x60000000) == 0) { - LOG(EXPANSIONINTERFACE, "EXI IPL-DEV: IPL access"); + LOG(EXPANSIONINTERFACE + 200, "EXI IPL-DEV: IPL access"); } else if ((m_uAddress & 0x7FFFFF00) == 0x20000000) { @@ -200,7 +200,7 @@ void CEXIIPL::TransferByte(u8& _uByte) } else if ((m_uAddress & 0x7FFFFF00) == 0x20010000) { - LOG(EXPANSIONINTERFACE, "EXI IPL-DEV: UART"); + LOG(EXPANSIONINTERFACE + 300, "EXI IPL-DEV: UART"); } else { diff --git a/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp index bda0490221..0b40b7a2d8 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceMemoryCard.cpp @@ -252,12 +252,12 @@ bool CEXIMemoryCard::IsInterruptSet() void CEXIMemoryCard::TransferByte(u8 &byte) { - LOG(EXPANSIONINTERFACE, "EXI MEMCARD: > %02x", byte); + LOG(EXPANSIONINTERFACE + 300, "EXI MEMCARD: > %02x", byte); if (m_uPosition == 0) { command = byte; // first byte is command byte = 0xFF; // would be tristate, but we don't care. - LOG(EXPANSIONINTERFACE, "EXI MEMCARD: command %02x", byte) + LOG(EXPANSIONINTERFACE + 100, "EXI MEMCARD: command %02x", byte) if(command == cmdClearStatus) { @@ -382,5 +382,5 @@ void CEXIMemoryCard::TransferByte(u8 &byte) } } m_uPosition++; - LOG(EXPANSIONINTERFACE, "EXI MEMCARD: < %02x", byte); + LOG(EXPANSIONINTERFACE + 300, "EXI MEMCARD: < %02x", byte); } diff --git a/Source/Core/Core/Src/HW/PeripheralInterface.cpp b/Source/Core/Core/Src/HW/PeripheralInterface.cpp index e48e495766..1582a16151 100644 --- a/Source/Core/Core/Src/HW/PeripheralInterface.cpp +++ b/Source/Core/Core/Src/HW/PeripheralInterface.cpp @@ -79,7 +79,7 @@ void CPeripheralInterface::Read32(u32& _uReturnValue, const u32 _iAddress) return; case PI_FIFO_WPTR: - LOG(PERIPHERALINTERFACE,"read writepointer, value = %08x",Fifo_CPUWritePointer); + LOG(PERIPHERALINTERFACE + 300,"read writepointer, value = %08x",Fifo_CPUWritePointer); _uReturnValue = Fifo_CPUWritePointer; //really writes in 32-byte chunks // Monk's gcube does some crazy align trickery here. @@ -206,12 +206,12 @@ void CPeripheralInterface::SetInterrupt(InterruptCause _causemask, bool _bSet) if (_bSet && !(m_InterruptCause & (u32)_causemask)) { - LOG(PERIPHERALINTERFACE,"Setting Interrupt %s (%s)",Debug_GetInterruptName(_causemask), "set"); + LOG(PERIPHERALINTERFACE + 200,"Setting Interrupt %s (%s)",Debug_GetInterruptName(_causemask), "set"); } if (!_bSet && (m_InterruptCause & (u32)_causemask)) { - LOG(PERIPHERALINTERFACE,"Setting Interrupt %s (%s)",Debug_GetInterruptName(_causemask), "clear"); + LOG(PERIPHERALINTERFACE + 200,"Setting Interrupt %s (%s)",Debug_GetInterruptName(_causemask), "clear"); } if (_bSet) diff --git a/Source/Core/Core/Src/HW/PixelEngine.cpp b/Source/Core/Core/Src/HW/PixelEngine.cpp index 290e3a6f71..8101dfb7f7 100644 --- a/Source/Core/Core/Src/HW/PixelEngine.cpp +++ b/Source/Core/Core/Src/HW/PixelEngine.cpp @@ -87,7 +87,7 @@ void Init() void Read16(u16& _uReturnValue, const u32 _iAddress) { - LOG(PIXELENGINE, "(r16): 0x%08x", _iAddress); + LOG(PIXELENGINE + 300, "(r16): 0x%08x", _iAddress); switch (_iAddress & 0xFFF) { @@ -109,12 +109,12 @@ void Read16(u16& _uReturnValue, const u32 _iAddress) void Write32(const u32 _iValue, const u32 _iAddress) { - LOG(PIXELENGINE, "(w32): 0x%08x @ 0x%08x",_iValue,_iAddress); + LOG(PIXELENGINE + 200, "(w32): 0x%08x @ 0x%08x",_iValue,_iAddress); } void Write16(const u16 _iValue, const u32 _iAddress) { - LOG(PIXELENGINE, "(w16): 0x%04x @ 0x%08x",_iValue,_iAddress); + LOG(PIXELENGINE + 300, "(w16): 0x%04x @ 0x%08x",_iValue,_iAddress); switch(_iAddress & 0xFFF) { @@ -169,7 +169,7 @@ void SetToken_OnMainThread(u64 userdata, int cyclesLate) if (userdata >> 16) g_bSignalTokenInterrupt = true; g_token = (u16)(userdata & 0xFFFF); - LOG(PIXELENGINE, "VIDEO Plugin wrote token: %i", g_token); + LOG(PIXELENGINE + 100, "VIDEO Plugin wrote token: %i", g_token); UpdateInterrupts(); } @@ -193,7 +193,7 @@ void SetFinish() { CoreTiming::ScheduleEvent_Threadsafe( 0, et_SetFinishOnMainThread); - LOG(PIXELENGINE, "VIDEO Set Finish"); + LOG(PIXELENGINE + 200, "VIDEO Set Finish"); } } // end of namespace PixelEngine diff --git a/Source/Core/Core/Src/HW/SerialInterface.cpp b/Source/Core/Core/Src/HW/SerialInterface.cpp index ac33eb92fd..90127f5b03 100644 --- a/Source/Core/Core/Src/HW/SerialInterface.cpp +++ b/Source/Core/Core/Src/HW/SerialInterface.cpp @@ -268,7 +268,7 @@ void Shutdown() void Read32(u32& _uReturnValue, const u32 _iAddress) { - LOG(SERIALINTERFACE, "(r32): 0x%08x", _iAddress); + LOG(SERIALINTERFACE + 300, "(r32): 0x%08x", _iAddress); // SIBuffer if ((_iAddress >= 0xCC006480 && _iAddress < 0xCC006500) || @@ -375,7 +375,7 @@ void Read32(u32& _uReturnValue, const u32 _iAddress) void Write32(const u32 _iValue, const u32 _iAddress) { - LOG(SERIALINTERFACE, "(w32): 0x%08x 0x%08x", _iValue,_iAddress); + LOG(SERIALINTERFACE + 300, "(w32): 0x%08x 0x%08x", _iValue,_iAddress); // SIBuffer if ((_iAddress >= 0xCC006480 && _iAddress < 0xCC006500) || @@ -546,7 +546,7 @@ void RunSIBuffer() int numOutput = #endif g_Channel[g_ComCSR.CHANNEL].m_pDevice->RunBuffer(g_SIBuffer, inLength); - LOG(SERIALINTERFACE, "RunSIBuffer (intLen: %i outLen: %i) (processed: %i)", inLength, outLength, numOutput); + LOG(SERIALINTERFACE + 200, "RunSIBuffer (intLen: %i outLen: %i) (processed: %i)", inLength, outLength, numOutput); // Transfer completed GenerateSIInterrupt(INT_TCINT); diff --git a/Source/Core/Core/Src/HW/VideoInterface.cpp b/Source/Core/Core/Src/HW/VideoInterface.cpp index b7423aeccf..792dcf4b16 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.cpp +++ b/Source/Core/Core/Src/HW/VideoInterface.cpp @@ -204,7 +204,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress) return; case VI_CONTROL_REGISTER: - LOG(VIDEOINTERFACE, "VideoInterface(r16): VI_CONTROL_REGISTER 0x%08x", m_VIDisplayControlRegister.Hex); + LOG(VIDEOINTERFACE + 300, "VideoInterface(r16): VI_CONTROL_REGISTER 0x%08x", m_VIDisplayControlRegister.Hex); _uReturnValue = m_VIDisplayControlRegister.Hex; return; @@ -271,7 +271,7 @@ void Read16(u16& _uReturnValue, const u32 _iAddress) void Write16(const u16 _iValue, const u32 _iAddress) { - LOG(VIDEOINTERFACE, "(w16): 0x%04x, 0x%08x",_iValue,_iAddress); + LOG(VIDEOINTERFACE + 300, "(w16): 0x%04x, 0x%08x",_iValue,_iAddress); //Somewhere it sets screen width.. we need to communicate this to the gfx plugin... diff --git a/Source/Core/Core/Src/HW/WII_IOB.cpp b/Source/Core/Core/Src/HW/WII_IOB.cpp index 0c96cf69e4..b80fd3c3e8 100644 --- a/Source/Core/Core/Src/HW/WII_IOB.cpp +++ b/Source/Core/Core/Src/HW/WII_IOB.cpp @@ -38,17 +38,17 @@ void HWCALL Read32(u32& _rReturnValue, const u32 _Address) { case 0xc0: // __VISendI2CData _rReturnValue = 0; - LOG(WII_IOB, "IOP: Read32 from 0xc0 = 0x%08x (__VISendI2CData)", _rReturnValue); + LOG(WII_IOB + 200, "IOP: Read32 from 0xc0 = 0x%08x (__VISendI2CData)", _rReturnValue); break; case 0xc4: // __VISendI2CData _rReturnValue = 0; - LOG(WII_IOB, "IOP: Read32 from 0xc4 = 0x%08x (__VISendI2CData)", _rReturnValue); + LOG(WII_IOB + 200, "IOP: Read32 from 0xc4 = 0x%08x (__VISendI2CData)", _rReturnValue); break; case 0xc8: // __VISendI2CData _rReturnValue = 0; - LOG(WII_IOB, "IOP: Read32 from 0xc8 = 0x%08x (__VISendI2CData)", _rReturnValue); + LOG(WII_IOB + 200, "IOP: Read32 from 0xc8 = 0x%08x (__VISendI2CData)", _rReturnValue); break; case 0x180: // __AIClockInit @@ -92,15 +92,15 @@ void HWCALL Write32(const u32 _Value, const u32 _Address) switch(_Address & 0xFFFF) { case 0xc0: // __VISendI2CData - LOG(WII_IOB, "IOP: Write32 to 0xc0 = 0x%08x (__VISendI2CData)", _Value); + LOG(WII_IOB + 200, "IOP: Write32 to 0xc0 = 0x%08x (__VISendI2CData)", _Value); break; case 0xc4: // __VISendI2CData - LOG(WII_IOB, "IOP: Write32 to 0xc4 = 0x%08x (__VISendI2CData)", _Value); + LOG(WII_IOB + 200, "IOP: Write32 to 0xc4 = 0x%08x (__VISendI2CData)", _Value); break; case 0xc8: // __VISendI2CData - LOG(WII_IOB, "IOP: Write32 to 0xc8 = 0x%08x (__VISendI2CData)", _Value); + LOG(WII_IOB + 200, "IOP: Write32 to 0xc8 = 0x%08x (__VISendI2CData)", _Value); break; case 0x180: // __AIClockInit diff --git a/Source/Core/Core/Src/HW/WII_IPC.cpp b/Source/Core/Core/Src/HW/WII_IPC.cpp index 8e942b6907..bd87c4afc1 100644 --- a/Source/Core/Core/Src/HW/WII_IPC.cpp +++ b/Source/Core/Core/Src/HW/WII_IPC.cpp @@ -129,7 +129,7 @@ void HWCALL Read32(u32& _rReturnValue, const u32 _Address) _rReturnValue = g_IPC_Control.Hex; - LOG(WII_IPC, "IOP: Read32 from IPC_CONTROL_REGISTER(0x04) = 0x%08x", _rReturnValue); + LOG(WII_IPC + 200, "IOP: Read32 from IPC_CONTROL_REGISTER(0x04) = 0x%08x", _rReturnValue); // CCPU::Break(); // if ((REASON_REG & 0x14) == 0x14) CALL IPCReplayHanlder @@ -139,7 +139,7 @@ void HWCALL Read32(u32& _rReturnValue, const u32 _Address) case IPC_REPLY_REGISTER: // looks a little bit like a callback function _rReturnValue = g_Reply; - LOG(WII_IPC, "IOP: Write32 to IPC_REPLAY_REGISTER(0x08) = 0x%08x ", _rReturnValue); + LOG(WII_IPC + 200, "IOP: Write32 to IPC_REPLAY_REGISTER(0x08) = 0x%08x ", _rReturnValue); break; case IPC_SENSOR_BAR_POWER_REGISTER: @@ -160,13 +160,13 @@ void HWCALL Write32(const u32 _Value, const u32 _Address) case IPC_COMMAND_REGISTER: // __ios_Ipc2 ... a value from __responses is loaded { g_Address = _Value; - LOG(WII_IPC, "IOP: Write32 to IPC_ADDRESS_REGISTER(0x00) = 0x%08x", g_Address); + LOG(WII_IPC + 100, "IOP: Write32 to IPC_ADDRESS_REGISTER(0x00) = 0x%08x", g_Address); } break; case IPC_CONTROL_REGISTER: { - LOG(WII_IPC, "IOP: Write32 to IPC_CONTROL_REGISTER(0x04) = 0x%08x (old: 0x%08x)", _Value, g_IPC_Control.Hex); + LOG(WII_IPC + 100, "IOP: Write32 to IPC_CONTROL_REGISTER(0x04) = 0x%08x (old: 0x%08x)", _Value, g_IPC_Control.Hex); UIPC_Control TempControl(_Value); _dbg_assert_msg_(WII_IPC, TempControl.pad == 0, "IOP: Write to UIPC_Control.pad", _Address); @@ -192,7 +192,7 @@ void HWCALL Write32(const u32 _Value, const u32 _Address) UIPC_Status NewStatus(_Value); if (NewStatus.INTERRUPT) g_IPC_Status.INTERRUPT = 0; // clear interrupt - LOG(WII_IPC, "IOP: Write32 to IPC_STATUS_REGISTER(0x30) = 0x%08x", _Value); + LOG(WII_IPC + 100, "IOP: Write32 to IPC_STATUS_REGISTER(0x30) = 0x%08x", _Value); } break; diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index b4606da56b..6c68e0b6a8 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -350,7 +350,7 @@ void Update() // check if we have to execute an acknowledged command if (!m_ReplyQueue.empty()) { - LOG(WII_IPC_HLE, "-- Generate Reply %s (0x%08x)", m_ReplyQueue.front().second.c_str(), m_ReplyQueue.front().first); + LOG(WII_IPC_HLE + 100, "-- Generate Reply %s (0x%08x)", m_ReplyQueue.front().second.c_str(), m_ReplyQueue.front().first); WII_IPCInterface::GenerateReply(m_ReplyQueue.front().first); m_ReplyQueue.pop(); return; @@ -363,7 +363,7 @@ void Update() u32 _Address = m_Ack.front(); m_Ack.pop(); ExecuteCommand(_Address); - LOG(WII_IPC_HLE, "-- Generate Ack (0x%08x)", _Address); + LOG(WII_IPC_HLE + 100, "-- Generate Ack (0x%08x)", _Address); WII_IPCInterface::GenerateAck(_Address); } } diff --git a/Source/Core/Core/Src/LogManager.cpp b/Source/Core/Core/Src/LogManager.cpp index 19f794330b..89ad0c7690 100644 --- a/Source/Core/Core/Src/LogManager.cpp +++ b/Source/Core/Core/Src/LogManager.cpp @@ -228,6 +228,10 @@ void LogManager::Log(LogTypes::LOG_TYPE _type, const char *_fmt, ...) m_Log[_type]->m_szShortName_, PC, Msg, eol); } + // ========================================================================================== + // Level 0 verbosity logs will be written to all verbosity levels. Given that logging is enabled + // for that level. Level 1 verbosity will only be written to level 1, 2, 3 and so on. + // --------------- int type = _type; for (int i = LogManager::VERBOSITY_LEVELS; i >= vv ; i--) { diff --git a/Source/Core/Core/Src/PowerPC/PowerPC.cpp b/Source/Core/Core/Src/PowerPC/PowerPC.cpp index 62a7eae02b..6bbffcfb22 100644 --- a/Source/Core/Core/Src/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/Src/PowerPC/PowerPC.cpp @@ -201,7 +201,7 @@ void CheckExceptions() SRR1 = MSR & 0x0780FF77; NPC = 0x80000800; - LOG(GEKKO, "EXCEPTION_FPU_UNAVAILABLE"); + LOG(GEKKO + 100, "EXCEPTION_FPU_UNAVAILABLE"); ppcState.Exceptions &= ~EXCEPTION_FPU_UNAVAILABLE; SRR1 |= 0x02; //recoverable } @@ -211,7 +211,7 @@ void CheckExceptions() SRR1 = MSR & 0x0780FF77; NPC = 0x80000C00; - LOG(GEKKO, "EXCEPTION_SYSCALL (PC=%08x)",PC); + LOG(GEKKO + 100, "EXCEPTION_SYSCALL (PC=%08x)",PC); ppcState.Exceptions &= ~EXCEPTION_SYSCALL; SRR1 |= 0x02; //recoverable } @@ -221,7 +221,7 @@ void CheckExceptions() SRR1 = MSR & 0x0780FF77; NPC = 0x80000300; - LOG(GEKKO, "EXCEPTION_DSI"); + LOG(GEKKO + 100, "EXCEPTION_DSI"); ppcState.Exceptions &= ~EXCEPTION_DSI; //SRR1 |= 0x02; //make recoverable ? } @@ -259,7 +259,7 @@ void CheckExceptions() NPC = 0x80000500; SRR1 = (MSR & 0x0780FF77); - LOG(GEKKO, "EXCEPTION_EXTERNAL_INT"); + LOG(GEKKO + 100, "EXCEPTION_EXTERNAL_INT"); SRR1 |= 0x02; //set it to recoverable _dbg_assert_msg_(GEKKO, (SRR1 & 0x02) != 0, "GEKKO", "EXTERNAL_INT unrecoverable???"); // unrecoverable exception !?! @@ -272,7 +272,7 @@ void CheckExceptions() ppcState.Exceptions &= ~EXCEPTION_DECREMENTER; - LOG(GEKKO, "EXCEPTION_DECREMENTER"); + LOG(GEKKO + 100, "EXCEPTION_DECREMENTER"); SRR1 |= 0x02; //make recoverable } else