From 0f2fcc31bb880489f9adc62996e4172da5a77a1a Mon Sep 17 00:00:00 2001 From: Jean-Philip Desjardins Date: Thu, 24 May 2018 12:59:15 -0400 Subject: [PATCH] Use Warn function. --- Source/ee/DMAC.cpp | 8 ++++---- Source/ee/Ee_SubSystem.cpp | 12 ++++++------ Source/ee/GIF.cpp | 4 ++-- Source/ee/INTC.cpp | 4 ++-- Source/gs/GSHandler.cpp | 6 +++--- Source/iop/Iop_Cdvdfsv.cpp | 12 ++++++------ Source/iop/Iop_Cdvdman.cpp | 2 +- Source/iop/Iop_Dmac.cpp | 4 ++-- Source/iop/Iop_FileIoHandler1000.cpp | 2 +- Source/iop/Iop_FileIoHandler2100.cpp | 2 +- Source/iop/Iop_FileIoHandler2240.cpp | 2 +- Source/iop/Iop_Heaplib.cpp | 2 +- Source/iop/Iop_Intrman.cpp | 2 +- Source/iop/Iop_Ioman.cpp | 12 ++++++------ Source/iop/Iop_Loadcore.cpp | 4 ++-- Source/iop/Iop_McServ.cpp | 6 +++--- Source/iop/Iop_Modload.cpp | 4 ++-- Source/iop/Iop_MtapMan.cpp | 8 ++++---- Source/iop/Iop_SifCmd.cpp | 2 +- Source/iop/Iop_SifMan.cpp | 2 +- Source/iop/Iop_Stdio.cpp | 4 ++-- Source/iop/Iop_Sysclib.cpp | 6 +++++- Source/iop/Iop_Sysmem.cpp | 2 +- Source/iop/Iop_Thbase.cpp | 2 +- Source/iop/Iop_Thevent.cpp | 2 +- Source/iop/Iop_Thmsgbx.cpp | 2 +- Source/iop/Iop_Thsema.cpp | 2 +- Source/iop/Iop_Thvpool.cpp | 2 +- Source/iop/Iop_Timrman.cpp | 2 +- Source/iop/Iop_Vblank.cpp | 2 +- 30 files changed, 65 insertions(+), 61 deletions(-) diff --git a/Source/ee/DMAC.cpp b/Source/ee/DMAC.cpp index 5f5f1fd7..3c2481af 100644 --- a/Source/ee/DMAC.cpp +++ b/Source/ee/DMAC.cpp @@ -444,7 +444,7 @@ uint32 CDMAC::GetRegister(uint32 nAddress) break; default: - CLog::GetInstance().Print(LOG_NAME, "Read an unhandled IO port (0x%08X).\r\n", nAddress); + CLog::GetInstance().Warn(LOG_NAME, "Read an unhandled IO port (0x%08X).\r\n", nAddress); break; } @@ -859,7 +859,7 @@ void CDMAC::SetRegister(uint32 nAddress, uint32 nData) break; default: - CLog::GetInstance().Print(LOG_NAME, "Wrote to an unhandled IO port (0x%08X, 0x%08X).\r\n", nAddress, nData); + CLog::GetInstance().Warn(LOG_NAME, "Wrote to an unhandled IO port (0x%08X, 0x%08X).\r\n", nAddress, nData); break; } @@ -983,7 +983,7 @@ void CDMAC::DisassembleGet(uint32 nAddress) LOG_GET(D_ENABLER) default: - CLog::GetInstance().Print(LOG_NAME, "Reading unknown register 0x%08X.\r\n", nAddress); + CLog::GetInstance().Warn(LOG_NAME, "Reading unknown register 0x%08X.\r\n", nAddress); break; } @@ -1063,7 +1063,7 @@ void CDMAC::DisassembleSet(uint32 nAddress, uint32 nData) LOG_SET(D_ENABLEW) default: - CLog::GetInstance().Print(LOG_NAME, "Writing unknown register 0x%08X, 0x%08X.\r\n", nAddress, nData); + CLog::GetInstance().Warn(LOG_NAME, "Writing unknown register 0x%08X, 0x%08X.\r\n", nAddress, nData); break; } diff --git a/Source/ee/Ee_SubSystem.cpp b/Source/ee/Ee_SubSystem.cpp index 87b72854..edb28886 100644 --- a/Source/ee/Ee_SubSystem.cpp +++ b/Source/ee/Ee_SubSystem.cpp @@ -427,7 +427,7 @@ uint32 CSubSystem::IOPortReadHandler(uint32 nAddress) } else { - CLog::GetInstance().Print(LOG_NAME, "Read an unhandled IO port (0x%08X, PC: 0x%08X).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Read an unhandled IO port (0x%08X, PC: 0x%08X).\r\n", nAddress, m_EE.m_State.nPC); } @@ -516,7 +516,7 @@ uint32 CSubSystem::IOPortWriteHandler(uint32 nAddress, uint32 nData) } else { - CLog::GetInstance().Print(LOG_NAME, "Wrote to an unhandled IO port (0x%08X, 0x%08X, PC: 0x%08X).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Wrote to an unhandled IO port (0x%08X, 0x%08X, PC: 0x%08X).\r\n", nAddress, nData, m_EE.m_State.nPC); } @@ -547,7 +547,7 @@ uint32 CSubSystem::Vu0IoPortReadHandler(uint32 address) result = m_vpu0->GetVif().GetITOP(); break; default: - CLog::GetInstance().Print(LOG_NAME, "Read an unhandled VU0 IO port (0x%08X).\r\n", address); + CLog::GetInstance().Warn(LOG_NAME, "Read an unhandled VU0 IO port (0x%08X).\r\n", address); break; } return result; @@ -558,7 +558,7 @@ uint32 CSubSystem::Vu0IoPortWriteHandler(uint32 address, uint32 value) switch(address) { default: - CLog::GetInstance().Print(LOG_NAME, "Wrote an unhandled VU0 IO port (0x%08X, 0x%08X).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Wrote an unhandled VU0 IO port (0x%08X, 0x%08X).\r\n", address, value); break; } @@ -584,7 +584,7 @@ uint32 CSubSystem::Vu1IoPortReadHandler(uint32 address) result = m_vpu1->GetVif().GetTOP(); break; default: - CLog::GetInstance().Print(LOG_NAME, "Read an unhandled VU1 IO port (0x%08X).\r\n", address); + CLog::GetInstance().Warn(LOG_NAME, "Read an unhandled VU1 IO port (0x%08X).\r\n", address); break; } return result; @@ -598,7 +598,7 @@ uint32 CSubSystem::Vu1IoPortWriteHandler(uint32 address, uint32 value) m_vpu1->ProcessXgKick(value); break; default: - CLog::GetInstance().Print(LOG_NAME, "Wrote an unhandled VU1 IO port (0x%08X, 0x%08X).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Wrote an unhandled VU1 IO port (0x%08X, 0x%08X).\r\n", address, value); break; } diff --git a/Source/ee/GIF.cpp b/Source/ee/GIF.cpp index bdd74cef..c1293d61 100644 --- a/Source/ee/GIF.cpp +++ b/Source/ee/GIF.cpp @@ -463,7 +463,7 @@ void CGIF::DisassembleGet(uint32 address) CLog::GetInstance().Print(LOG_NAME, "= GIF_STAT.\r\n", address); break; default: - CLog::GetInstance().Print(LOG_NAME, "Reading unknown register 0x%08X.\r\n", address); + CLog::GetInstance().Warn(LOG_NAME, "Reading unknown register 0x%08X.\r\n", address); break; } } @@ -473,7 +473,7 @@ void CGIF::DisassembleSet(uint32 address, uint32 value) switch(address) { default: - CLog::GetInstance().Print(LOG_NAME, "Writing unknown register 0x%08X, 0x%08X.\r\n", address, value); + CLog::GetInstance().Warn(LOG_NAME, "Writing unknown register 0x%08X, 0x%08X.\r\n", address, value); break; } } diff --git a/Source/ee/INTC.cpp b/Source/ee/INTC.cpp index 69fa5cc6..d1160fcd 100644 --- a/Source/ee/INTC.cpp +++ b/Source/ee/INTC.cpp @@ -57,7 +57,7 @@ uint32 CINTC::GetRegister(uint32 nAddress) return m_INTC_MASK; break; default: - CLog::GetInstance().Print(LOG_NAME, "Read an unhandled register (0x%08X).\r\n", nAddress); + CLog::GetInstance().Warn(LOG_NAME, "Read an unhandled register (0x%08X).\r\n", nAddress); break; } @@ -75,7 +75,7 @@ void CINTC::SetRegister(uint32 nAddress, uint32 nValue) m_INTC_MASK ^= nValue; break; default: - CLog::GetInstance().Print(LOG_NAME, "Wrote to an unhandled register (0x%08X).\r\n", nAddress); + CLog::GetInstance().Warn(LOG_NAME, "Wrote to an unhandled register (0x%08X).\r\n", nAddress); break; } } diff --git a/Source/gs/GSHandler.cpp b/Source/gs/GSHandler.cpp index d617029c..1fefab18 100644 --- a/Source/gs/GSHandler.cpp +++ b/Source/gs/GSHandler.cpp @@ -271,7 +271,7 @@ uint32 CGSHandler::ReadPrivRegister(uint32 nAddress) R_REG(nAddress, nData, m_nSIGLBLID); break; default: - CLog::GetInstance().Print(LOG_NAME, "Read an unhandled priviledged register (0x%08X).\r\n", nAddress); + CLog::GetInstance().Warn(LOG_NAME, "Read an unhandled priviledged register (0x%08X).\r\n", nAddress); nData = 0xCCCCCCCC; break; } @@ -339,7 +339,7 @@ void CGSHandler::WritePrivRegister(uint32 nAddress, uint32 nData) W_REG(nAddress, nData, m_nSIGLBLID); break; default: - CLog::GetInstance().Print(LOG_NAME, "Wrote to an unhandled priviledged register (0x%08X, 0x%08X).\r\n", nAddress, nData); + CLog::GetInstance().Warn(LOG_NAME, "Wrote to an unhandled priviledged register (0x%08X, 0x%08X).\r\n", nAddress, nData); break; } @@ -540,7 +540,7 @@ void CGSHandler::FeedImageDataImpl(const void* pData, uint32 nLength) if(m_trxCtx.nSize == 0) { #ifdef _DEBUG - CLog::GetInstance().Print(LOG_NAME, "Warning. Received image data when no transfer was expected.\r\n"); + CLog::GetInstance().Warn(LOG_NAME, "Warning. Received image data when no transfer was expected.\r\n"); #endif } else diff --git a/Source/iop/Iop_Cdvdfsv.cpp b/Source/iop/Iop_Cdvdfsv.cpp index f0803fd9..a197475c 100644 --- a/Source/iop/Iop_Cdvdfsv.cpp +++ b/Source/iop/Iop_Cdvdfsv.cpp @@ -168,7 +168,7 @@ bool CCdvdfsv::Invoke592(uint32 method, uint32* args, uint32 argsSize, uint32* r } break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x592, method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x592, method); break; } return true; @@ -296,7 +296,7 @@ bool CCdvdfsv::Invoke595(uint32 method, uint32* args, uint32 argsSize, uint32* r break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x595, method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x595, method); break; } return true; @@ -307,7 +307,7 @@ bool CCdvdfsv::Invoke596(uint32 method, uint32* args, uint32 argsSize, uint32* r switch(method) { default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x596, method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x596, method); break; } return true; @@ -321,7 +321,7 @@ bool CCdvdfsv::Invoke597(uint32 method, uint32* args, uint32 argsSize, uint32* r SearchFile(args, argsSize, ret, retSize, ram); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x597, method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x597, method); break; } return true; @@ -460,7 +460,7 @@ bool CCdvdfsv::StreamCmd(uint32* args, uint32 argsSize, uint32* ret, uint32 retS CLog::GetInstance().Print(LOG_NAME, "StreamSeek(pos = 0x%08X);\r\n", sector); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown stream command used.\r\n"); + CLog::GetInstance().Warn(LOG_NAME, "Unknown stream command used.\r\n"); break; } @@ -480,7 +480,7 @@ void CCdvdfsv::SearchFile(uint32* args, uint32 argsSize, uint32* ret, uint32 ret } else { - CLog::GetInstance().Print(LOG_NAME, "Warning: Using unknown structure size (%d bytes);\r\n", argsSize); + CLog::GetInstance().Warn(LOG_NAME, "Warning: Using unknown structure size (%d bytes);\r\n", argsSize); } assert(retSize == 4); diff --git a/Source/iop/Iop_Cdvdman.cpp b/Source/iop/Iop_Cdvdman.cpp index e2011703..60959b07 100644 --- a/Source/iop/Iop_Cdvdman.cpp +++ b/Source/iop/Iop_Cdvdman.cpp @@ -267,7 +267,7 @@ void CCdvdman::Invoke(CMIPS& ctx, unsigned int functionId) ctx.m_State.nGPR[CMIPS::A2].nV0); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function called (%d).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Unknown function called (%d).\r\n", functionId); break; } diff --git a/Source/iop/Iop_Dmac.cpp b/Source/iop/Iop_Dmac.cpp index 023eee5a..8ee33cd5 100644 --- a/Source/iop/Iop_Dmac.cpp +++ b/Source/iop/Iop_Dmac.cpp @@ -205,7 +205,7 @@ void CDmac::LogRead(uint32 address) CLog::GetInstance().Print(LOG_NAME, "ch%02d: = CHCR.\r\n", channelId); break; default: - CLog::GetInstance().Print(LOG_NAME, "Read an unknown register 0x%08X.\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Read an unknown register 0x%08X.\r\n", address); break; } @@ -243,7 +243,7 @@ void CDmac::LogWrite(uint32 address, uint32 value) CLog::GetInstance().Print(LOG_NAME, "ch%02d: CHCR = 0x%08X.\r\n", channelId, value); break; default: - CLog::GetInstance().Print(LOG_NAME, "Wrote 0x%08X to unknown register 0x%08X.\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Wrote 0x%08X to unknown register 0x%08X.\r\n", value, address); break; } diff --git a/Source/iop/Iop_FileIoHandler1000.cpp b/Source/iop/Iop_FileIoHandler1000.cpp index cfa2d7a9..c3f39e6f 100644 --- a/Source/iop/Iop_FileIoHandler1000.cpp +++ b/Source/iop/Iop_FileIoHandler1000.cpp @@ -36,7 +36,7 @@ void CFileIoHandler1000::Invoke(uint32 method, uint32* args, uint32 argsSize, ui *ret = m_ioman->Seek(args[0], args[1], args[2]); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called.\r\n", method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called.\r\n", method); break; } } diff --git a/Source/iop/Iop_FileIoHandler2100.cpp b/Source/iop/Iop_FileIoHandler2100.cpp index 438a67b6..71383a33 100644 --- a/Source/iop/Iop_FileIoHandler2100.cpp +++ b/Source/iop/Iop_FileIoHandler2100.cpp @@ -59,7 +59,7 @@ void CFileIoHandler2100::Invoke(uint32 method, uint32* args, uint32 argsSize, ui } break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called.\r\n", method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called.\r\n", method); break; } } diff --git a/Source/iop/Iop_FileIoHandler2240.cpp b/Source/iop/Iop_FileIoHandler2240.cpp index 35f01e41..f95db7aa 100644 --- a/Source/iop/Iop_FileIoHandler2240.cpp +++ b/Source/iop/Iop_FileIoHandler2240.cpp @@ -82,7 +82,7 @@ void CFileIoHandler2240::Invoke(uint32 method, uint32* args, uint32 argsSize, ui m_resultPtr[1] = args[1]; break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called.\r\n", method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called.\r\n", method); break; } } diff --git a/Source/iop/Iop_Heaplib.cpp b/Source/iop/Iop_Heaplib.cpp index d4f06dff..52fd3da9 100644 --- a/Source/iop/Iop_Heaplib.cpp +++ b/Source/iop/Iop_Heaplib.cpp @@ -60,7 +60,7 @@ void CHeaplib::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A1].nV0); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function called (%d).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Unknown function called (%d).\r\n", functionId); break; } diff --git a/Source/iop/Iop_Intrman.cpp b/Source/iop/Iop_Intrman.cpp index 8b1741f7..79a4c947 100644 --- a/Source/iop/Iop_Intrman.cpp +++ b/Source/iop/Iop_Intrman.cpp @@ -119,7 +119,7 @@ void CIntrman::Invoke(CMIPS& context, unsigned int functionId) context)); break; default: - CLog::GetInstance().Print(LOGNAME, "%08X: Unknown function (%d) called.\r\n", context.m_State.nPC, functionId); + CLog::GetInstance().Warn(LOGNAME, "%08X: Unknown function (%d) called.\r\n", context.m_State.nPC, functionId); break; } } diff --git a/Source/iop/Iop_Ioman.cpp b/Source/iop/Iop_Ioman.cpp index 10128fa5..cadad47d 100644 --- a/Source/iop/Iop_Ioman.cpp +++ b/Source/iop/Iop_Ioman.cpp @@ -139,7 +139,7 @@ uint32 CIoman::Open(uint32 flags, const char* path) } catch(const std::exception& except) { - CLog::GetInstance().Print(LOG_NAME, "%s: Error occured while trying to open file : %s\r\n", __FUNCTION__, except.what()); + CLog::GetInstance().Warn(LOG_NAME, "%s: Error occured while trying to open file : %s\r\n", __FUNCTION__, except.what()); } return handle; } @@ -163,7 +163,7 @@ uint32 CIoman::Close(uint32 handle) } catch(const std::exception& except) { - CLog::GetInstance().Print(LOG_NAME, "%s: Error occured while trying to close file : %s\r\n", __FUNCTION__, except.what()); + CLog::GetInstance().Warn(LOG_NAME, "%s: Error occured while trying to close file : %s\r\n", __FUNCTION__, except.what()); } return result; } @@ -187,7 +187,7 @@ uint32 CIoman::Read(uint32 handle, uint32 size, void* buffer) } catch(const std::exception& except) { - CLog::GetInstance().Print(LOG_NAME, "%s: Error occured while trying to read file : %s\r\n", __FUNCTION__, except.what()); + CLog::GetInstance().Warn(LOG_NAME, "%s: Error occured while trying to read file : %s\r\n", __FUNCTION__, except.what()); } return result; } @@ -211,7 +211,7 @@ uint32 CIoman::Write(uint32 handle, uint32 size, const void* buffer) { if((handle != FID_STDOUT) && (handle != FID_STDERR)) { - CLog::GetInstance().Print(LOG_NAME, "%s: Error occured while trying to write file : %s\r\n", __FUNCTION__, except.what()); + CLog::GetInstance().Warn(LOG_NAME, "%s: Error occured while trying to write file : %s\r\n", __FUNCTION__, except.what()); } } return result; @@ -244,7 +244,7 @@ uint32 CIoman::Seek(uint32 handle, uint32 position, uint32 whence) } catch(const std::exception& except) { - CLog::GetInstance().Print(LOG_NAME, "%s: Error occured while trying to seek file : %s\r\n", __FUNCTION__, except.what()); + CLog::GetInstance().Warn(LOG_NAME, "%s: Error occured while trying to seek file : %s\r\n", __FUNCTION__, except.what()); } return result; } @@ -343,7 +343,7 @@ void CIoman::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A0].nV0)); break; default: - CLog::GetInstance().Print(LOG_NAME, "%s(%08X): Unknown function (%d) called.\r\n", __FUNCTION__, context.m_State.nPC, functionId); + CLog::GetInstance().Warn(LOG_NAME, "%s(%08X): Unknown function (%d) called.\r\n", __FUNCTION__, context.m_State.nPC, functionId); break; } } diff --git a/Source/iop/Iop_Loadcore.cpp b/Source/iop/Iop_Loadcore.cpp index f6332dd4..5d7f56cf 100644 --- a/Source/iop/Iop_Loadcore.cpp +++ b/Source/iop/Iop_Loadcore.cpp @@ -79,7 +79,7 @@ void CLoadcore::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A1].nV0)); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called (PC: 0x%08X).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called (PC: 0x%08X).\r\n", functionId, context.m_State.nPC); break; } @@ -113,7 +113,7 @@ bool CLoadcore::Invoke(uint32 method, uint32* args, uint32 argsSize, uint32* ret Initialize(args, argsSize, ret, retSize); break; default: - CLog::GetInstance().Print(LOG_NAME, "Invoking unknown function %d.\r\n", method); + CLog::GetInstance().Warn(LOG_NAME, "Invoking unknown function %d.\r\n", method); break; } return true; diff --git a/Source/iop/Iop_McServ.cpp b/Source/iop/Iop_McServ.cpp index 0c9fe426..c04d6a84 100644 --- a/Source/iop/Iop_McServ.cpp +++ b/Source/iop/Iop_McServ.cpp @@ -85,7 +85,7 @@ bool CMcServ::Invoke(uint32 method, uint32* args, uint32 argsSize, uint32* ret, GetVersionInformation(args, argsSize, ret, retSize, ram); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X).\r\n", method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X).\r\n", method); break; } return true; @@ -398,7 +398,7 @@ void CMcServ::ChDir(uint32* args, uint32 argsSize, uint32* ret, uint32 retSize, } catch(const std::exception& exception) { - CLog::GetInstance().Print(LOG_NAME, "Error while executing GetDir: %s\r\n.", exception.what()); + CLog::GetInstance().Warn(LOG_NAME, "Error while executing GetDir: %s\r\n.", exception.what()); } ret[0] = result; @@ -459,7 +459,7 @@ void CMcServ::GetDir(uint32* args, uint32 argsSize, uint32* ret, uint32 retSize, } catch(const std::exception& exception) { - CLog::GetInstance().Print(LOG_NAME, "Error while executing GetDir: %s\r\n.", exception.what()); + CLog::GetInstance().Warn(LOG_NAME, "Error while executing GetDir: %s\r\n.", exception.what()); } ret[0] = result; diff --git a/Source/iop/Iop_Modload.cpp b/Source/iop/Iop_Modload.cpp index 8e8883c5..31f08e77 100644 --- a/Source/iop/Iop_Modload.cpp +++ b/Source/iop/Iop_Modload.cpp @@ -94,7 +94,7 @@ void CModload::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A0].nV0); break; default: - CLog::GetInstance().Print(LOG_NAME, "(%08X): Unknown function (%d) called.\r\n", + CLog::GetInstance().Warn(LOG_NAME, "(%08X): Unknown function (%d) called.\r\n", context.m_State.nPC, functionId); break; } @@ -115,7 +115,7 @@ uint32 CModload::LoadStartModule(uint32 pathPtr, uint32 argsLength, uint32 argsP } catch(const std::exception& except) { - CLog::GetInstance().Print(LOG_NAME, "Error occured while trying to load module '%s' : %s\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Error occured while trying to load module '%s' : %s\r\n", path, except.what()); } return -1; diff --git a/Source/iop/Iop_MtapMan.cpp b/Source/iop/Iop_MtapMan.cpp index c0ba012a..673769d5 100644 --- a/Source/iop/Iop_MtapMan.cpp +++ b/Source/iop/Iop_MtapMan.cpp @@ -46,7 +46,7 @@ bool CMtapMan::Invoke901(uint32 method, uint32* args, uint32 argsSize, uint32* r ret[1] = PortOpen(args[0]); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x901, method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x901, method); break; } return true; @@ -57,7 +57,7 @@ bool CMtapMan::Invoke902(uint32 method, uint32* args, uint32 argsSize, uint32* r switch(method) { default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x902, method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x902, method); break; } return true; @@ -68,7 +68,7 @@ bool CMtapMan::Invoke903(uint32 method, uint32* args, uint32 argsSize, uint32* r switch(method) { default: - CLog::GetInstance().Print(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x903, method); + CLog::GetInstance().Warn(LOG_NAME, "Unknown method invoked (0x%08X, 0x%08X).\r\n", 0x903, method); break; } return true; @@ -76,6 +76,6 @@ bool CMtapMan::Invoke903(uint32 method, uint32* args, uint32 argsSize, uint32* r uint32 CMtapMan::PortOpen(uint32 port) { - CLog::GetInstance().Print(LOG_NAME, "PortOpen(port = %d);\r\n", port); + CLog::GetInstance().Warn(LOG_NAME, "PortOpen(port = %d);\r\n", port); return 0; } diff --git a/Source/iop/Iop_SifCmd.cpp b/Source/iop/Iop_SifCmd.cpp index ff5f0040..f84cf6b8 100644 --- a/Source/iop/Iop_SifCmd.cpp +++ b/Source/iop/Iop_SifCmd.cpp @@ -265,7 +265,7 @@ void CSifCmd::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A0].nV0); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function called (%d).\r\n", + CLog::GetInstance().Warn(LOG_NAME, "Unknown function called (%d).\r\n", functionId); break; } diff --git a/Source/iop/Iop_SifMan.cpp b/Source/iop/Iop_SifMan.cpp index f10980c4..cf04c7f0 100644 --- a/Source/iop/Iop_SifMan.cpp +++ b/Source/iop/Iop_SifMan.cpp @@ -71,7 +71,7 @@ void CSifMan::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A3].nV0)); break; default: - CLog::GetInstance().Print(LOG_NAME, "%08X: Unknown function (%d) called.\r\n", context.m_State.nPC, functionId); + CLog::GetInstance().Warn(LOG_NAME, "%08X: Unknown function (%d) called.\r\n", context.m_State.nPC, functionId); break; } } diff --git a/Source/iop/Iop_Stdio.cpp b/Source/iop/Iop_Stdio.cpp index 5ef8ba93..b2b8f3ee 100644 --- a/Source/iop/Iop_Stdio.cpp +++ b/Source/iop/Iop_Stdio.cpp @@ -47,8 +47,8 @@ void CStdio::Invoke(CMIPS& context, unsigned int functionId) __printf(context); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called. PC = (%08X).", - functionId, context.m_State.nPC); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called. PC = (%08X).\r\n", + functionId, context.m_State.nPC); break; } } diff --git a/Source/iop/Iop_Sysclib.cpp b/Source/iop/Iop_Sysclib.cpp index dc3b0fec..72fb4b8c 100644 --- a/Source/iop/Iop_Sysclib.cpp +++ b/Source/iop/Iop_Sysclib.cpp @@ -1,5 +1,8 @@ #include "Iop_Sysclib.h" #include "../Ps2Const.h" +#include "../Log.h" + +#define LOG_NAME "iop_sysclib" using namespace Iop; @@ -268,7 +271,8 @@ void CSysclib::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A2].nV0)); break; default: - printf("%s(%08X): Unknown function (%d) called.\r\n", __FUNCTION__, context.m_State.nPC, functionId); + CLog::GetInstance().Warn(LOG_NAME, "(%08X): Unknown function (%d) called.\r\n", + context.m_State.nPC, functionId); assert(0); break; } diff --git a/Source/iop/Iop_Sysmem.cpp b/Source/iop/Iop_Sysmem.cpp index 544edbb7..079068d6 100644 --- a/Source/iop/Iop_Sysmem.cpp +++ b/Source/iop/Iop_Sysmem.cpp @@ -92,7 +92,7 @@ void CSysmem::Invoke(CMIPS& context, unsigned int functionId) m_stdio.__printf(context); break; default: - CLog::GetInstance().Print(LOG_NAME, "%s(%08X): Unknown function (%d) called.\r\n", __FUNCTION__, context.m_State.nPC, functionId); + CLog::GetInstance().Warn(LOG_NAME, "(%08X): Unknown function (%d) called.\r\n", context.m_State.nPC, functionId); break; } } diff --git a/Source/iop/Iop_Thbase.cpp b/Source/iop/Iop_Thbase.cpp index dcf27158..54c1e7c1 100644 --- a/Source/iop/Iop_Thbase.cpp +++ b/Source/iop/Iop_Thbase.cpp @@ -248,7 +248,7 @@ void CThbase::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::V0].nD0 = static_cast(GetSystemTimeLow()); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); break; } } diff --git a/Source/iop/Iop_Thevent.cpp b/Source/iop/Iop_Thevent.cpp index df52bd8e..6a48e8a2 100644 --- a/Source/iop/Iop_Thevent.cpp +++ b/Source/iop/Iop_Thevent.cpp @@ -121,7 +121,7 @@ void CThevent::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A1].nV0)); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called (%08X).\r\n", functionId, context.m_State.nPC); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called (%08X).\r\n", functionId, context.m_State.nPC); break; } } diff --git a/Source/iop/Iop_Thmsgbx.cpp b/Source/iop/Iop_Thmsgbx.cpp index 60af21cd..c58b6de3 100644 --- a/Source/iop/Iop_Thmsgbx.cpp +++ b/Source/iop/Iop_Thmsgbx.cpp @@ -98,7 +98,7 @@ void CThmsgbx::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A1].nV0); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); break; } } diff --git a/Source/iop/Iop_Thsema.cpp b/Source/iop/Iop_Thsema.cpp index 55e96174..5805730a 100644 --- a/Source/iop/Iop_Thsema.cpp +++ b/Source/iop/Iop_Thsema.cpp @@ -94,7 +94,7 @@ void CThsema::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A1].nV0)); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); break; } } diff --git a/Source/iop/Iop_Thvpool.cpp b/Source/iop/Iop_Thvpool.cpp index 620fcdd2..30db5d43 100644 --- a/Source/iop/Iop_Thvpool.cpp +++ b/Source/iop/Iop_Thvpool.cpp @@ -74,7 +74,7 @@ void CThvpool::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A1].nV0)); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function (%d) called at (%08X).\r\n", functionId, context.m_State.nPC); break; } } diff --git a/Source/iop/Iop_Timrman.cpp b/Source/iop/Iop_Timrman.cpp index 7d8b4105..7bf38066 100644 --- a/Source/iop/Iop_Timrman.cpp +++ b/Source/iop/Iop_Timrman.cpp @@ -146,7 +146,7 @@ void CTimrman::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A0].nV0); break; default: - CLog::GetInstance().Print(LOG_NAME, "(%08X): Unknown function (%d) called.\r\n", + CLog::GetInstance().Warn(LOG_NAME, "(%08X): Unknown function (%d) called.\r\n", context.m_State.nPC, functionId); break; } diff --git a/Source/iop/Iop_Vblank.cpp b/Source/iop/Iop_Vblank.cpp index 31b449d6..d180d7be 100644 --- a/Source/iop/Iop_Vblank.cpp +++ b/Source/iop/Iop_Vblank.cpp @@ -66,7 +66,7 @@ void CVblank::Invoke(CMIPS& context, unsigned int functionId) context.m_State.nGPR[CMIPS::A3].nV0); break; default: - CLog::GetInstance().Print(LOG_NAME, "Unknown function called (%d).\r\n", functionId); + CLog::GetInstance().Warn(LOG_NAME, "Unknown function called (%d).\r\n", functionId); break; } }