give /dev/stm it's own log

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3008 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-04-19 17:03:48 +00:00
parent 7434c0c4cd
commit a1ab247533
3 changed files with 35 additions and 33 deletions

View File

@ -63,6 +63,7 @@ enum LOG_TYPE {
WII_IPC_HLE, WII_IPC_HLE,
WII_IPC_NET, WII_IPC_NET,
WII_IPC_SD, WII_IPC_SD,
WII_IPC_STM,
WII_IPC_WIIMOTE, WII_IPC_WIIMOTE,
WIIMOTE, WIIMOTE,

View File

@ -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_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_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_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_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::WII_IPC_WIIMOTE] = new LogContainer("WII_IPC_WIIMOTE","WII IPC WIIMOTE");
m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay"); m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay");

View File

@ -54,14 +54,14 @@ public:
virtual bool Open(u32 _CommandAddress, u32 _Mode) 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); Memory::Write_U32(GetDeviceID(), _CommandAddress+4);
return true; return true;
} }
virtual bool Close(u32 _CommandAddress) 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); Memory::Write_U32(0, _CommandAddress+4);
return true; return true;
} }
@ -82,38 +82,38 @@ public:
switch(Parameter) switch(Parameter)
{ {
case IOCTL_STM_RELEASE_EH: case IOCTL_STM_RELEASE_EH:
INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str());
INFO_LOG(WII_IPC_SD, " IOCTL_STM_RELEASE_EH"); INFO_LOG(WII_IPC_STM, " IOCTL_STM_RELEASE_EH");
break; break;
case IOCTL_STM_HOTRESET: case IOCTL_STM_HOTRESET:
INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str());
INFO_LOG(WII_IPC_SD, " IOCTL_STM_HOTRESET"); INFO_LOG(WII_IPC_STM, " IOCTL_STM_HOTRESET");
break; break;
case IOCTL_STM_VIDIMMING: // (Input: 20 bytes, Output: 20 bytes) case IOCTL_STM_VIDIMMING: // (Input: 20 bytes, Output: 20 bytes)
INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str());
INFO_LOG(WII_IPC_SD, " IOCTL_STM_VIDIMMING"); INFO_LOG(WII_IPC_STM, " IOCTL_STM_VIDIMMING");
//DumpCommands(BufferIn, BufferInSize / 4, LogTypes::WII_IPC_SD); //DumpCommands(BufferIn, BufferInSize / 4, LogTypes::WII_IPC_STM);
//Memory::Write_U32(1, BufferOut); //Memory::Write_U32(1, BufferOut);
//ReturnValue = 1; //ReturnValue = 1;
break; break;
case IOCTL_STM_LEDMODE: // (Input: 20 bytes, Output: 20 bytes) case IOCTL_STM_LEDMODE: // (Input: 20 bytes, Output: 20 bytes)
INFO_LOG(WII_IPC_SD, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str());
INFO_LOG(WII_IPC_SD, " IOCTL_STM_LEDMODE"); INFO_LOG(WII_IPC_STM, " IOCTL_STM_LEDMODE");
break; break;
default: 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()); INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str());
DEBUG_LOG(WII_IPC_SD, " Parameter: 0x%x", Parameter); DEBUG_LOG(WII_IPC_STM, " Parameter: 0x%x", Parameter);
DEBUG_LOG(WII_IPC_SD, " InBuffer: 0x%08x", BufferIn); DEBUG_LOG(WII_IPC_STM, " InBuffer: 0x%08x", BufferIn);
DEBUG_LOG(WII_IPC_SD, " InBufferSize: 0x%08x", BufferInSize); DEBUG_LOG(WII_IPC_STM, " InBufferSize: 0x%08x", BufferInSize);
DEBUG_LOG(WII_IPC_SD, " OutBuffer: 0x%08x", BufferOut); DEBUG_LOG(WII_IPC_STM, " OutBuffer: 0x%08x", BufferOut);
DEBUG_LOG(WII_IPC_SD, " OutBufferSize: 0x%08x", BufferOutSize); DEBUG_LOG(WII_IPC_STM, " OutBufferSize: 0x%08x", BufferOutSize);
} }
break; break;
} }
@ -150,7 +150,7 @@ public:
virtual bool Close(u32 _CommandAddress) 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); Memory::Write_U32(0, _CommandAddress+4);
return true; return true;
} }
@ -175,14 +175,14 @@ public:
{ {
m_EventHookAddress = _CommandAddress; m_EventHookAddress = _CommandAddress;
INFO_LOG(WII_IPC_SD, "%s registers event hook:", GetDeviceName().c_str()); INFO_LOG(WII_IPC_STM, "%s registers event hook:", GetDeviceName().c_str());
DEBUG_LOG(WII_IPC_SD, " 0x1000 - IOCTL_STM_EVENTHOOK", Parameter); DEBUG_LOG(WII_IPC_STM, " 0x1000 - IOCTL_STM_EVENTHOOK", Parameter);
DEBUG_LOG(WII_IPC_SD, " BufferIn: 0x%08x", BufferIn); DEBUG_LOG(WII_IPC_STM, " BufferIn: 0x%08x", BufferIn);
DEBUG_LOG(WII_IPC_SD, " BufferInSize: 0x%08x", BufferInSize); DEBUG_LOG(WII_IPC_STM, " BufferInSize: 0x%08x", BufferInSize);
DEBUG_LOG(WII_IPC_SD, " BufferOut: 0x%08x", BufferOut); DEBUG_LOG(WII_IPC_STM, " BufferOut: 0x%08x", BufferOut);
DEBUG_LOG(WII_IPC_SD, " BufferOutSize: 0x%08x", BufferOutSize); 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; return false;
} }
@ -190,13 +190,13 @@ public:
default: default:
{ {
_dbg_assert_msg_(WII_IPC_SD, 0, "CWII_IPC_HLE_Device_stm_eventhook: 0x%x", Parameter); _dbg_assert_msg_(WII_IPC_STM, 0, "CWII_IPC_HLE_Device_stm_eventhook: 0x%x", Parameter);
INFO_LOG(WII_IPC_SD, "%s registers event hook:", GetDeviceName().c_str()); INFO_LOG(WII_IPC_STM, "%s registers event hook:", GetDeviceName().c_str());
DEBUG_LOG(WII_IPC_SD, " Parameter: 0x%x", Parameter); DEBUG_LOG(WII_IPC_STM, " Parameter: 0x%x", Parameter);
DEBUG_LOG(WII_IPC_SD, " BufferIn: 0x%08x", BufferIn); DEBUG_LOG(WII_IPC_STM, " BufferIn: 0x%08x", BufferIn);
DEBUG_LOG(WII_IPC_SD, " BufferInSize: 0x%08x", BufferInSize); DEBUG_LOG(WII_IPC_STM, " BufferInSize: 0x%08x", BufferInSize);
DEBUG_LOG(WII_IPC_SD, " BufferOut: 0x%08x", BufferOut); DEBUG_LOG(WII_IPC_STM, " BufferOut: 0x%08x", BufferOut);
DEBUG_LOG(WII_IPC_SD, " BufferOutSize: 0x%08x", BufferOutSize); DEBUG_LOG(WII_IPC_STM, " BufferOutSize: 0x%08x", BufferOutSize);
} }
break; break;
} }