From a1ab2475334a3ddec242d68d54d7b7504d768e70 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 19 Apr 2009 17:03:48 +0000 Subject: [PATCH] give /dev/stm it's own log git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3008 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/Log.h | 1 + Source/Core/Common/Src/LogManager.cpp | 1 + .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h | 66 +++++++++---------- 3 files changed, 35 insertions(+), 33 deletions(-) diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h index 0f7be41473..b7c83ddf2f 100644 --- a/Source/Core/Common/Src/Log.h +++ b/Source/Core/Common/Src/Log.h @@ -63,6 +63,7 @@ enum LOG_TYPE { WII_IPC_HLE, WII_IPC_NET, WII_IPC_SD, + WII_IPC_STM, WII_IPC_WIIMOTE, WIIMOTE, diff --git a/Source/Core/Common/Src/LogManager.cpp b/Source/Core/Common/Src/LogManager.cpp index 2b1c5befd6..15540a267b 100644 --- a/Source/Core/Common/Src/LogManager.cpp +++ b/Source/Core/Common/Src/LogManager.cpp @@ -57,6 +57,7 @@ LogManager::LogManager()\ m_Log[LogTypes::WII_IPC_ES] = new LogContainer("WII_IPC_ES", "WII IPC ES"); m_Log[LogTypes::WII_IPC_FILEIO] = new LogContainer("WII_IPC_FILEIO","WII IPC FILEIO"); m_Log[LogTypes::WII_IPC_SD] = new LogContainer("WII_IPC_SD", "WII IPC SD"); + m_Log[LogTypes::WII_IPC_STM] = new LogContainer("WII_IPC_STM", "WII IPC STM"); m_Log[LogTypes::WII_IPC_NET] = new LogContainer("WII_IPC_NET", "WII IPC NET"); m_Log[LogTypes::WII_IPC_WIIMOTE] = new LogContainer("WII_IPC_WIIMOTE","WII IPC WIIMOTE"); m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay"); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h index 0842e14fb2..9c44f2e8e3 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_stm.h @@ -54,14 +54,14 @@ public: virtual bool Open(u32 _CommandAddress, u32 _Mode) { - ERROR_LOG(WII_IPC_SD, "STM immediate: Open"); + ERROR_LOG(WII_IPC_STM, "STM immediate: Open"); Memory::Write_U32(GetDeviceID(), _CommandAddress+4); return true; } virtual bool Close(u32 _CommandAddress) { - ERROR_LOG(WII_IPC_SD, "STM immediate: Close"); + ERROR_LOG(WII_IPC_STM, "STM immediate: Close"); Memory::Write_U32(0, _CommandAddress+4); return true; } @@ -82,38 +82,38 @@ public: switch(Parameter) { case IOCTL_STM_RELEASE_EH: - INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); - INFO_LOG(WII_IPC_SD, " IOCTL_STM_RELEASE_EH"); + INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str()); + INFO_LOG(WII_IPC_STM, " IOCTL_STM_RELEASE_EH"); break; case IOCTL_STM_HOTRESET: - INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); - INFO_LOG(WII_IPC_SD, " IOCTL_STM_HOTRESET"); + INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str()); + INFO_LOG(WII_IPC_STM, " IOCTL_STM_HOTRESET"); break; case IOCTL_STM_VIDIMMING: // (Input: 20 bytes, Output: 20 bytes) - INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); - INFO_LOG(WII_IPC_SD, " IOCTL_STM_VIDIMMING"); - //DumpCommands(BufferIn, BufferInSize / 4, LogTypes::WII_IPC_SD); + INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str()); + INFO_LOG(WII_IPC_STM, " IOCTL_STM_VIDIMMING"); + //DumpCommands(BufferIn, BufferInSize / 4, LogTypes::WII_IPC_STM); //Memory::Write_U32(1, BufferOut); //ReturnValue = 1; break; case IOCTL_STM_LEDMODE: // (Input: 20 bytes, Output: 20 bytes) - INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); - INFO_LOG(WII_IPC_SD, " IOCTL_STM_LEDMODE"); + INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str()); + INFO_LOG(WII_IPC_STM, " IOCTL_STM_LEDMODE"); break; default: { - _dbg_assert_msg_(WII_IPC_SD, 0, "CWII_IPC_HLE_Device_stm_immediate: 0x%x", Parameter); + _dbg_assert_msg_(WII_IPC_STM, 0, "CWII_IPC_HLE_Device_stm_immediate: 0x%x", Parameter); - INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); - DEBUG_LOG(WII_IPC_SD, " Parameter: 0x%x", Parameter); - DEBUG_LOG(WII_IPC_SD, " InBuffer: 0x%08x", BufferIn); - DEBUG_LOG(WII_IPC_SD, " InBufferSize: 0x%08x", BufferInSize); - DEBUG_LOG(WII_IPC_SD, " OutBuffer: 0x%08x", BufferOut); - DEBUG_LOG(WII_IPC_SD, " OutBufferSize: 0x%08x", BufferOutSize); + INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str()); + DEBUG_LOG(WII_IPC_STM, " Parameter: 0x%x", Parameter); + DEBUG_LOG(WII_IPC_STM, " InBuffer: 0x%08x", BufferIn); + DEBUG_LOG(WII_IPC_STM, " InBufferSize: 0x%08x", BufferInSize); + DEBUG_LOG(WII_IPC_STM, " OutBuffer: 0x%08x", BufferOut); + DEBUG_LOG(WII_IPC_STM, " OutBufferSize: 0x%08x", BufferOutSize); } break; } @@ -150,7 +150,7 @@ public: virtual bool Close(u32 _CommandAddress) { - INFO_LOG(WII_IPC_SD, "STM eventhook: Close"); + INFO_LOG(WII_IPC_STM, "STM eventhook: Close"); Memory::Write_U32(0, _CommandAddress+4); return true; } @@ -175,14 +175,14 @@ public: { m_EventHookAddress = _CommandAddress; - INFO_LOG(WII_IPC_SD, "%s registers event hook:", GetDeviceName().c_str()); - DEBUG_LOG(WII_IPC_SD, " 0x1000 - IOCTL_STM_EVENTHOOK", Parameter); - DEBUG_LOG(WII_IPC_SD, " BufferIn: 0x%08x", BufferIn); - DEBUG_LOG(WII_IPC_SD, " BufferInSize: 0x%08x", BufferInSize); - DEBUG_LOG(WII_IPC_SD, " BufferOut: 0x%08x", BufferOut); - DEBUG_LOG(WII_IPC_SD, " BufferOutSize: 0x%08x", BufferOutSize); + INFO_LOG(WII_IPC_STM, "%s registers event hook:", GetDeviceName().c_str()); + DEBUG_LOG(WII_IPC_STM, " 0x1000 - IOCTL_STM_EVENTHOOK", Parameter); + DEBUG_LOG(WII_IPC_STM, " BufferIn: 0x%08x", BufferIn); + DEBUG_LOG(WII_IPC_STM, " BufferInSize: 0x%08x", BufferInSize); + DEBUG_LOG(WII_IPC_STM, " BufferOut: 0x%08x", BufferOut); + DEBUG_LOG(WII_IPC_STM, " BufferOutSize: 0x%08x", BufferOutSize); - DumpCommands(BufferIn, BufferInSize/4, LogTypes::WII_IPC_SD); + DumpCommands(BufferIn, BufferInSize/4, LogTypes::WII_IPC_STM); return false; } @@ -190,13 +190,13 @@ public: default: { - _dbg_assert_msg_(WII_IPC_SD, 0, "CWII_IPC_HLE_Device_stm_eventhook: 0x%x", Parameter); - INFO_LOG(WII_IPC_SD, "%s registers event hook:", GetDeviceName().c_str()); - DEBUG_LOG(WII_IPC_SD, " Parameter: 0x%x", Parameter); - DEBUG_LOG(WII_IPC_SD, " BufferIn: 0x%08x", BufferIn); - DEBUG_LOG(WII_IPC_SD, " BufferInSize: 0x%08x", BufferInSize); - DEBUG_LOG(WII_IPC_SD, " BufferOut: 0x%08x", BufferOut); - DEBUG_LOG(WII_IPC_SD, " BufferOutSize: 0x%08x", BufferOutSize); + _dbg_assert_msg_(WII_IPC_STM, 0, "CWII_IPC_HLE_Device_stm_eventhook: 0x%x", Parameter); + INFO_LOG(WII_IPC_STM, "%s registers event hook:", GetDeviceName().c_str()); + DEBUG_LOG(WII_IPC_STM, " Parameter: 0x%x", Parameter); + DEBUG_LOG(WII_IPC_STM, " BufferIn: 0x%08x", BufferIn); + DEBUG_LOG(WII_IPC_STM, " BufferInSize: 0x%08x", BufferInSize); + DEBUG_LOG(WII_IPC_STM, " BufferOut: 0x%08x", BufferOut); + DEBUG_LOG(WII_IPC_STM, " BufferOutSize: 0x%08x", BufferOutSize); } break; }