added some new log types for wii

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1023 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
fires.gc
2008-10-30 22:25:54 +00:00
parent 60a75d861d
commit 957441d2da
9 changed files with 359 additions and 353 deletions
+4 -1
View File
@@ -215,7 +215,10 @@ class LogTypes
WII_IOB,
WII_IPC,
WII_IPC_HLE,
WIIMOTE,
WII_IPC_DVD,
WII_IPC_ES,
WII_IPC_FILEIO,
WII_IPC_WIIMOTE,
NUMBER_OF_LOGS
};
};
+1 -1
View File
@@ -577,7 +577,7 @@ void Callback_KeyPress(int key, BOOL shift, BOOL control)
//
void Callback_WiimoteLog(const TCHAR* _szMessage)
{
LOG(WIIMOTE, _szMessage);
LOG(WII_IPC_WIIMOTE, _szMessage);
}
} // end of namespace Core
@@ -56,9 +56,9 @@ bool CWII_IPC_HLE_Device_di::Open(u32 _CommandAddress)
bool CWII_IPC_HLE_Device_di::IOCtl(u32 _CommandAddress)
{
LOG(WII_IPC_HLE, "*******************************");
LOG(WII_IPC_HLE, "CWII_IPC_HLE_Device_di::IOCtl");
LOG(WII_IPC_HLE, "*******************************");
LOG(WII_IPC_DVD, "*******************************");
LOG(WII_IPC_DVD, "CWII_IPC_DVD_Device_di::IOCtl");
LOG(WII_IPC_DVD, "*******************************");
// DumpCommands(_CommandAddress);
@@ -70,17 +70,17 @@ bool CWII_IPC_HLE_Device_di::IOCtl(u32 _CommandAddress)
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
LOG(WII_IPC_HLE, "%s - BufferIn(0x%08x, 0x%x) BufferOut(0x%08x, 0x%x)", GetDeviceName().c_str(), BufferIn, BufferInSize, BufferOut, BufferOutSize);
LOG(WII_IPC_DVD, "%s - BufferIn(0x%08x, 0x%x) BufferOut(0x%08x, 0x%x)", GetDeviceName().c_str(), BufferIn, BufferInSize, BufferOut, BufferOutSize);
u32 ReturnValue = ExecuteCommand(BufferIn, BufferInSize, BufferOut, BufferOutSize);
Memory::Write_U32(ReturnValue, _CommandAddress + 0x4);
/* DumpCommands(_CommandAddress);
LOG(WII_IPC_HLE, "InBuffer");
LOG(WII_IPC_DVD, "InBuffer");
DumpCommands(BufferIn, BufferInSize);
// LOG(WII_IPC_HLE, "OutBuffer");
// LOG(WII_IPC_DVD, "OutBuffer");
// DumpCommands(BufferOut, BufferOutSize); */
return true;
@@ -121,7 +121,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
buffer[6] = 0x08;
buffer[7] = 0x29;
LOG(WII_IPC_HLE, "%s executes DVDLowInquiry (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes DVDLowInquiry (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
return 0x1;
}
@@ -133,7 +133,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
// TODO - verify that this is correct
VolumeHandler::ReadToPtr(Memory::GetPointer(_BufferOut), 0, _BufferOutSize);
LOG(WII_IPC_HLE, "%s executes DVDLowReadDiskID (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes DVDLowReadDiskID (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
return 0x1;
}
@@ -152,11 +152,11 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
const char* pFilename = m_pFileSystem->GetFileName(DVDAddress);
if (pFilename != NULL)
{
LOG(WII_IPC_HLE, " DVDLowRead: %s (0x%x) - (DVDAddr: 0x%x, Size: 0x%x)", pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress, Size);
LOG(WII_IPC_DVD, " DVDLowRead: %s (0x%x) - (DVDAddr: 0x%x, Size: 0x%x)", pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress, Size);
}
else
{
LOG(WII_IPC_HLE, " DVDLowRead: file unkw - (DVDAddr: 0x%x, Size: 0x%x)", GetDeviceName().c_str(), DVDAddress, Size);
LOG(WII_IPC_DVD, " DVDLowRead: file unkw - (DVDAddr: 0x%x, Size: 0x%x)", GetDeviceName().c_str(), DVDAddress, Size);
}
if (Size > _BufferOutSize)
@@ -178,7 +178,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
case 0x79:
{
Memory::Memset(_BufferOut, 0, _BufferOutSize);
LOG(WII_IPC_HLE, "%s executes DVDLowWaitForCoverClose (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes DVDLowWaitForCoverClose (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
return 4;
}
break;
@@ -205,7 +205,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
case 0x86:
{
Memory::Memset(_BufferOut, 0, _BufferOutSize);
LOG(WII_IPC_HLE, "%s executes DVDLowClearCoverInterrupt (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes DVDLowClearCoverInterrupt (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
}
break;
@@ -213,7 +213,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
case 0x88:
{
Memory::Memset(_BufferOut, 0, _BufferOutSize);
LOG(WII_IPC_HLE, "%s executes DVDLowGetCoverStatus (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes DVDLowGetCoverStatus (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
return 1;
}
break;
@@ -222,7 +222,7 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
case 0x8a:
{
Memory::Memset(_BufferOut, 0, _BufferOutSize);
LOG(WII_IPC_HLE, "%s executes DVDLowReset (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes DVDLowReset (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
return 1;
}
break;
@@ -241,18 +241,18 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
Memory::Memset(_BufferOut, 0, _BufferOutSize);
u32 eject = Memory::Read_U32(_BufferIn + 0x04);
LOG(WII_IPC_HLE, "%s executes DVDLowStopMotor (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes DVDLowStopMotor (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
if(eject)
{
LOG(WII_IPC_HLE, "Eject disc", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "Eject disc", GetDeviceName().c_str(), _BufferOut, _BufferOutSize);
// TODO: eject the disc
}
}
break;
default:
LOG(WII_IPC_HLE, "%s executes unknown cmd 0x%08x (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), Command, _BufferOut, _BufferOutSize);
LOG(WII_IPC_DVD, "%s executes unknown cmd 0x%08x (Buffer 0x%08x, 0x%x)", GetDeviceName().c_str(), Command, _BufferOut, _BufferOutSize);
PanicAlert("%s executes unknown cmd 0x%08x", GetDeviceName().c_str(), Command);
break;
@@ -73,7 +73,7 @@ CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress)
bool
CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
{
LOG(WII_IPC_HLE, "FileIO: Seek (Device=%s)", GetDeviceName().c_str());
LOG(WII_IPC_FILEIO, "FileIO: Seek (Device=%s)", GetDeviceName().c_str());
DumpCommands(_CommandAddress);
PanicAlert("CWII_IPC_HLE_Device_FileIO: Seek (%s)", m_Filename.c_str());
@@ -95,11 +95,11 @@ CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress)
{
fread(Memory::GetPointer(Address), Size, 1, m_pFileHandle);
ReturnValue = Size;
LOG(WII_IPC_HLE, "FileIO reads from %s (Addr=0x%08x Size=0x%x)", GetDeviceName().c_str(), Address, Size);
LOG(WII_IPC_FILEIO, "FileIO reads from %s (Addr=0x%08x Size=0x%x)", GetDeviceName().c_str(), Address, Size);
}
else
{
LOG(WII_IPC_HLE, "FileIO failed to read from %s (Addr=0x%08x Size=0x%x) - file not open", GetDeviceName().c_str(), Address, Size);
LOG(WII_IPC_FILEIO, "FileIO failed to read from %s (Addr=0x%08x Size=0x%x) - file not open", GetDeviceName().c_str(), Address, Size);
}
Memory::Write_U32(ReturnValue, _CommandAddress + 0x4);
@@ -110,7 +110,7 @@ CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress)
bool
CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
{
LOG(WII_IPC_HLE, "FileIO: Write (Device=%s)", GetDeviceName().c_str());
LOG(WII_IPC_FILEIO, "FileIO: Write (Device=%s)", GetDeviceName().c_str());
DumpCommands(_CommandAddress);
// PanicAlert("CWII_IPC_HLE_Device_FileIO: Write (Device=%s)", GetDeviceName().c_str());
@@ -124,7 +124,7 @@ CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
bool
CWII_IPC_HLE_Device_FileIO::IOCtl(u32 _CommandAddress)
{
LOG(WII_IPC_HLE, "FileIO: IOCtl (Device=%s)", GetDeviceName().c_str());
LOG(WII_IPC_FILEIO, "FileIO: IOCtl (Device=%s)", GetDeviceName().c_str());
DumpCommands(_CommandAddress);
u32 Parameter = Memory::Read_U32(_CommandAddress + 0xC);
@@ -139,8 +139,8 @@ CWII_IPC_HLE_Device_FileIO::IOCtl(u32 _CommandAddress)
case ISFS_IOCTL_GETFILESTATS:
{
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
LOG(WII_IPC_HLE, "FileIO: ISFS_IOCTL_GETFILESTATS");
LOG(WII_IPC_HLE, "Length: %i Seek: %i", m_FileLength, m_Seek);
LOG(WII_IPC_FILEIO, "FileIO: ISFS_IOCTL_GETFILESTATS");
LOG(WII_IPC_FILEIO, "Length: %i Seek: %i", m_FileLength, m_Seek);
Memory::Write_U32(m_FileLength, BufferOut);
Memory::Write_U32(m_Seek, BufferOut+4);
File diff suppressed because it is too large Load Diff
@@ -150,7 +150,7 @@ CWII_IPC_HLE_WiiMote::CWII_IPC_HLE_WiiMote(CWII_IPC_HLE_Device_usb_oh1_57e_305*
, m_HIDInterruptChannel_ConfigWait(false)
{
s_Usb = _pHost;
LOG(WIIMOTE, "Wiimote %i constructed", _Number);
LOG(WII_IPC_WIIMOTE, "Wiimote %i constructed", _Number);
m_BD.b[0] = 0x11;
m_BD.b[1] = 0x02;
@@ -320,12 +320,12 @@ void CWII_IPC_HLE_WiiMote::SendACLFrame(u8* _pData, u32 _Size)
u8* pData = _pData + sizeof(SL2CAP_Header);
u32 DataSize = _Size - sizeof(SL2CAP_Header);
LOG(WIIMOTE, "L2Cap-SendFrame: Channel 0x%04x, Len 0x%x, DataSize 0x%x",
LOG(WII_IPC_WIIMOTE, "L2Cap-SendFrame: Channel 0x%04x, Len 0x%x, DataSize 0x%x",
pHeader->CID, pHeader->Length, DataSize);
if(pHeader->Length != DataSize)
{
LOG(WIIMOTE, "Faulty packet. It is dropped.");
LOG(WII_IPC_WIIMOTE, "Faulty packet. It is dropped.");
return;
}
@@ -337,7 +337,7 @@ void CWII_IPC_HLE_WiiMote::SendACLFrame(u8* _pData, u32 _Size)
default:
{
_dbg_assert_msg_(WIIMOTE, DoesChannelExist(pHeader->CID), "SendACLFrame to unknown channel %i", pHeader->CID);
_dbg_assert_msg_(WII_IPC_WIIMOTE, DoesChannelExist(pHeader->CID), "SendACLFrame to unknown channel %i", pHeader->CID);
CChannelMap::iterator itr= m_Channel.find(pHeader->CID);
if (itr != m_Channel.end())
{
@@ -401,7 +401,7 @@ void CWII_IPC_HLE_WiiMote::SignalChannel(u8* _pData, u32 _Size)
break;
default:
LOG(WIIMOTE, " Unknown Command-Code (0x%02x)", pCommand->code);
LOG(WII_IPC_WIIMOTE, " Unknown Command-Code (0x%02x)", pCommand->code);
PanicAlert("SignalChannel %x",pCommand->code);
return;
}
@@ -434,11 +434,11 @@ void CWII_IPC_HLE_WiiMote::CommandConnectionReq(u8 _Ident, u8* _pData, u32 _Size
rChannel.SCID = pCommandConnectionReq->scid;
rChannel.DCID = pCommandConnectionReq->scid;
LOG(WIIMOTE, " CommandConnectionReq");
LOG(WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WIIMOTE, " PSM: 0x%04x", rChannel.PSM);
LOG(WIIMOTE, " SCID: 0x%04x", rChannel.SCID);
LOG(WIIMOTE, " DCID: 0x%04x", rChannel.DCID);
LOG(WII_IPC_WIIMOTE, " CommandConnectionReq");
LOG(WII_IPC_WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WII_IPC_WIIMOTE, " PSM: 0x%04x", rChannel.PSM);
LOG(WII_IPC_WIIMOTE, " SCID: 0x%04x", rChannel.SCID);
LOG(WII_IPC_WIIMOTE, " DCID: 0x%04x", rChannel.DCID);
// response
SL2CAP_ConnectionResponse Rsp;
@@ -462,15 +462,15 @@ void CWII_IPC_HLE_WiiMote::CommandCofigurationReq(u8 _Ident, u8* _pData, u32 _Si
u32 Offset = 0;
SL2CAP_CommandConfigurationReq* pCommandConfigReq = (SL2CAP_CommandConfigurationReq*)_pData;
_dbg_assert_(WIIMOTE, pCommandConfigReq->flags == 0x00); // 1 means that the options are send in multi-packets
_dbg_assert_(WII_IPC_WIIMOTE, pCommandConfigReq->flags == 0x00); // 1 means that the options are send in multi-packets
_dbg_assert_(WIIMOTE, DoesChannelExist(pCommandConfigReq->dcid));
_dbg_assert_(WII_IPC_WIIMOTE, DoesChannelExist(pCommandConfigReq->dcid));
SChannel& rChannel = m_Channel[pCommandConfigReq->dcid];
LOG(WIIMOTE, " CommandCofigurationReq");
LOG(WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WIIMOTE, " DCID: 0x%04x", pCommandConfigReq->dcid);
LOG(WIIMOTE, " Flags: 0x%04x", pCommandConfigReq->flags);
LOG(WII_IPC_WIIMOTE, " CommandCofigurationReq");
LOG(WII_IPC_WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WII_IPC_WIIMOTE, " DCID: 0x%04x", pCommandConfigReq->dcid);
LOG(WII_IPC_WIIMOTE, " Flags: 0x%04x", pCommandConfigReq->flags);
Offset += sizeof(SL2CAP_CommandConfigurationReq);
@@ -494,24 +494,24 @@ void CWII_IPC_HLE_WiiMote::CommandCofigurationReq(u8 _Ident, u8* _pData, u32 _Si
{
case 0x01:
{
_dbg_assert_(WIIMOTE, pOptions->length == 2);
_dbg_assert_(WII_IPC_WIIMOTE, pOptions->length == 2);
SL2CAP_OptionsMTU* pMTU = (SL2CAP_OptionsMTU*)&_pData[Offset];
rChannel.MTU = pMTU->MTU;
LOG(WIIMOTE, " Config MTU: 0x%04x", pMTU->MTU);
LOG(WII_IPC_WIIMOTE, " Config MTU: 0x%04x", pMTU->MTU);
}
break;
case 0x02:
{
_dbg_assert_(WIIMOTE, pOptions->length == 2);
_dbg_assert_(WII_IPC_WIIMOTE, pOptions->length == 2);
SL2CAP_OptionsFlushTimeOut* pFlushTimeOut = (SL2CAP_OptionsFlushTimeOut*)&_pData[Offset];
rChannel.FlushTimeOut = pFlushTimeOut->TimeOut;
LOG(WIIMOTE, " Config FlushTimeOut: 0x%04x", pFlushTimeOut->TimeOut);
LOG(WII_IPC_WIIMOTE, " Config FlushTimeOut: 0x%04x", pFlushTimeOut->TimeOut);
}
break;
default:
_dbg_assert_msg_(WIIMOTE, 0, "Unknown Option: 0x%02x", pOptions->type);
_dbg_assert_msg_(WII_IPC_WIIMOTE, 0, "Unknown Option: 0x%02x", pOptions->type);
break;
}
@@ -529,18 +529,18 @@ void CWII_IPC_HLE_WiiMote::CommandConnectionResponse(u8 _Ident, u8* _pData, u32
{
l2cap_conn_rsp* rsp = (l2cap_conn_rsp*)_pData;
_dbg_assert_(WIIMOTE, _Size == sizeof(l2cap_conn_rsp));
_dbg_assert_(WII_IPC_WIIMOTE, _Size == sizeof(l2cap_conn_rsp));
LOG(WIIMOTE, " CommandConnectionResponse");
LOG(WIIMOTE, " DCID: 0x%04x", rsp->dcid);
LOG(WIIMOTE, " SCID: 0x%04x", rsp->scid);
LOG(WIIMOTE, " Result: 0x%04x", rsp->result);
LOG(WIIMOTE, " Status: 0x%04x", rsp->status);
LOG(WII_IPC_WIIMOTE, " CommandConnectionResponse");
LOG(WII_IPC_WIIMOTE, " DCID: 0x%04x", rsp->dcid);
LOG(WII_IPC_WIIMOTE, " SCID: 0x%04x", rsp->scid);
LOG(WII_IPC_WIIMOTE, " Result: 0x%04x", rsp->result);
LOG(WII_IPC_WIIMOTE, " Status: 0x%04x", rsp->status);
_dbg_assert_(WIIMOTE, rsp->result == 0);
_dbg_assert_(WIIMOTE, rsp->status == 0);
_dbg_assert_(WII_IPC_WIIMOTE, rsp->result == 0);
_dbg_assert_(WII_IPC_WIIMOTE, rsp->status == 0);
_dbg_assert_(WIIMOTE, DoesChannelExist(rsp->scid));
_dbg_assert_(WII_IPC_WIIMOTE, DoesChannelExist(rsp->scid));
SChannel& rChannel = m_Channel[rsp->scid];
rChannel.DCID = rsp->dcid;
@@ -556,14 +556,14 @@ void CWII_IPC_HLE_WiiMote::CommandCofigurationResponse(u8 _Ident, u8* _pData, u3
{
l2cap_conf_rsp* rsp = (l2cap_conf_rsp*)_pData;
_dbg_assert_(WIIMOTE, _Size == sizeof(l2cap_conf_rsp));
_dbg_assert_(WII_IPC_WIIMOTE, _Size == sizeof(l2cap_conf_rsp));
LOG(WIIMOTE, " CommandCofigurationResponse");
LOG(WIIMOTE, " SCID: 0x%04x", rsp->scid);
LOG(WIIMOTE, " Flags: 0x%04x", rsp->flags);
LOG(WIIMOTE, " Result: 0x%04x", rsp->result);
LOG(WII_IPC_WIIMOTE, " CommandCofigurationResponse");
LOG(WII_IPC_WIIMOTE, " SCID: 0x%04x", rsp->scid);
LOG(WII_IPC_WIIMOTE, " Flags: 0x%04x", rsp->flags);
LOG(WII_IPC_WIIMOTE, " Result: 0x%04x", rsp->result);
_dbg_assert_(WIIMOTE, rsp->result == 0);
_dbg_assert_(WII_IPC_WIIMOTE, rsp->result == 0);
// update state machine
SChannel& rChannel = m_Channel[rsp->scid];
@@ -579,12 +579,12 @@ void CWII_IPC_HLE_WiiMote::CommandDisconnectionReq(u8 _Ident, u8* _pData, u32 _S
SL2CAP_CommandDisconnectionReq* pCommandDisconnectionReq = (SL2CAP_CommandDisconnectionReq*)_pData;
// create the channel
_dbg_assert_(WIIMOTE, m_Channel.find(pCommandDisconnectionReq->scid) != m_Channel.end());
_dbg_assert_(WII_IPC_WIIMOTE, m_Channel.find(pCommandDisconnectionReq->scid) != m_Channel.end());
LOG(WIIMOTE, " CommandDisconnectionReq");
LOG(WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WIIMOTE, " SCID: 0x%04x", pCommandDisconnectionReq->dcid);
LOG(WIIMOTE, " DCID: 0x%04x", pCommandDisconnectionReq->scid);
LOG(WII_IPC_WIIMOTE, " CommandDisconnectionReq");
LOG(WII_IPC_WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WII_IPC_WIIMOTE, " SCID: 0x%04x", pCommandDisconnectionReq->dcid);
LOG(WII_IPC_WIIMOTE, " DCID: 0x%04x", pCommandDisconnectionReq->scid);
// response
SL2CAP_CommandDisconnectionResponse Rsp;
@@ -619,9 +619,9 @@ void CWII_IPC_HLE_WiiMote::SendConnectionRequest(u16 scid, u16 psm)
cr.psm = psm;
cr.scid = scid;
LOG(WIIMOTE, " SendConnectionRequest()");
LOG(WIIMOTE, " Psm: 0x%04x", cr.psm);
LOG(WIIMOTE, " Scid: 0x%04x", cr.scid);
LOG(WII_IPC_WIIMOTE, " SendConnectionRequest()");
LOG(WII_IPC_WIIMOTE, " Psm: 0x%04x", cr.psm);
LOG(WII_IPC_WIIMOTE, " Scid: 0x%04x", cr.scid);
SendCommandToACL(L2CAP_CONN_REQ, L2CAP_CONN_REQ, sizeof(l2cap_conn_req), (u8*)&cr);
}
@@ -635,16 +635,16 @@ void CWII_IPC_HLE_WiiMote::SendDisconnectRequest(u16 scid)
cr.dcid = rChannel.DCID;
cr.scid = rChannel.SCID;
LOG(WIIMOTE, " SendDisconnectionRequest()");
LOG(WIIMOTE, " Dcid: 0x%04x", cr.dcid);
LOG(WIIMOTE, " Scid: 0x%04x", cr.scid);
LOG(WII_IPC_WIIMOTE, " SendDisconnectionRequest()");
LOG(WII_IPC_WIIMOTE, " Dcid: 0x%04x", cr.dcid);
LOG(WII_IPC_WIIMOTE, " Scid: 0x%04x", cr.scid);
SendCommandToACL(L2CAP_DISCONN_REQ, L2CAP_DISCONN_REQ, sizeof(l2cap_disconn_req), (u8*)&cr);
}
void CWII_IPC_HLE_WiiMote::SendConfigurationRequest(u16 scid, u16* MTU, u16* FlushTimeOut)
{
_dbg_assert_(WIIMOTE, DoesChannelExist(scid));
_dbg_assert_(WII_IPC_WIIMOTE, DoesChannelExist(scid));
SChannel& rChannel = m_Channel[scid];
u8 Buffer[1024];
@@ -677,9 +677,9 @@ void CWII_IPC_HLE_WiiMote::SendConfigurationRequest(u16 scid, u16* MTU, u16* Flu
*(u16*)&Buffer[Offset] = *FlushTimeOut; Offset += 2;
}
LOG(WIIMOTE, " SendConfigurationRequest()");
LOG(WIIMOTE, " Dcid: 0x%04x", cr->dcid);
LOG(WIIMOTE, " Flags: 0x%04x", cr->flags);
LOG(WII_IPC_WIIMOTE, " SendConfigurationRequest()");
LOG(WII_IPC_WIIMOTE, " Dcid: 0x%04x", cr->dcid);
LOG(WII_IPC_WIIMOTE, " Flags: 0x%04x", cr->flags);
// hack:
static u8 ident = 99;
@@ -711,12 +711,12 @@ void CWII_IPC_HLE_WiiMote::SDPSendServiceSearchResponse(u16 cid, u16 Transaction
// verify block... we hanlde search pattern for HID service only
{
CBigEndianBuffer buffer(pServiceSearchPattern);
_dbg_assert_(WIIMOTE, buffer.Read8(0) == SDP_SEQ8); // data sequence
_dbg_assert_(WIIMOTE, buffer.Read8(1) == 0x03); // sequence size
_dbg_assert_(WII_IPC_WIIMOTE, buffer.Read8(0) == SDP_SEQ8); // data sequence
_dbg_assert_(WII_IPC_WIIMOTE, buffer.Read8(1) == 0x03); // sequence size
// HIDClassID
_dbg_assert_(WIIMOTE, buffer.Read8(2) == 0x19);
_dbg_assert_(WIIMOTE, buffer.Read16(3) == 0x1124);
_dbg_assert_(WII_IPC_WIIMOTE, buffer.Read8(2) == 0x19);
_dbg_assert_(WII_IPC_WIIMOTE, buffer.Read16(3) == 0x1124);
}
u8 DataFrame[1000];
@@ -735,7 +735,7 @@ void CWII_IPC_HLE_WiiMote::SDPSendServiceSearchResponse(u16 cid, u16 Transaction
buffer.Write8(Offset, 0x00); Offset++; // no continuation state;
pHeader->Length = Offset - sizeof(SL2CAP_Header);
pHeader->Length = (u16)(Offset - sizeof(SL2CAP_Header));
m_pHost->SendACLFrame(GetConnectionHandle(), DataFrame, pHeader->Length + sizeof(SL2CAP_Header));
}
@@ -764,7 +764,7 @@ int ParseAttribList(u8* pAttribIDList, u16& _startID, u16& _endID)
u32 attribOffset = 0;
CBigEndianBuffer attribList(pAttribIDList);
u8 sequence = attribList.Read8(attribOffset); attribOffset++; _dbg_assert_(WIIMOTE, sequence == SDP_SEQ8);
u8 sequence = attribList.Read8(attribOffset); attribOffset++; _dbg_assert_(WII_IPC_WIIMOTE, sequence == SDP_SEQ8);
u8 seqSize = attribList.Read8(attribOffset); attribOffset++;
u8 typeID = attribList.Read8(attribOffset); attribOffset++;
@@ -794,7 +794,7 @@ void CWII_IPC_HLE_WiiMote::SDPSendServiceAttributeResponse(u16 cid, u16 Transact
}
// _dbg_assert_(WIIMOTE, ServiceHandle == 0x10000);
// _dbg_assert_(WII_IPC_WIIMOTE, ServiceHandle == 0x10000);
u32 contState = ParseCont(pContinuationState);
@@ -814,7 +814,7 @@ void CWII_IPC_HLE_WiiMote::SDPSendServiceAttributeResponse(u16 cid, u16 Transact
memcpy(buffer.GetPointer(Offset), pPacket, packetSize); Offset += packetSize;
pHeader->Length = Offset - sizeof(SL2CAP_Header);
pHeader->Length = (u16)(Offset - sizeof(SL2CAP_Header));
m_pHost->SendACLFrame(GetConnectionHandle(), DataFrame, pHeader->Length + sizeof(SL2CAP_Header));
// Debugger::PrintDataBuffer(LogTypes::WIIMOTE, DataFrame, pHeader->Length + sizeof(SL2CAP_Header), "test response: ");
@@ -831,9 +831,9 @@ void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size)
// SDP_ServiceSearchRequest
case 0x02:
{
LOG(WIIMOTE, "!!! SDP_ServiceSearchRequest !!!");
LOG(WII_IPC_WIIMOTE, "!!! SDP_ServiceSearchRequest !!!");
_dbg_assert_(WIIMOTE, _Size == 13);
_dbg_assert_(WII_IPC_WIIMOTE, _Size == 13);
u16 TransactionID = buffer.Read16(1);
u16 ParameterLength = buffer.Read16(3);
@@ -848,7 +848,7 @@ void CWII_IPC_HLE_WiiMote::HandleSDP(u16 cid, u8* _pData, u32 _Size)
// SDP_ServiceAttributeRequest
case 0x04:
{
LOG(WIIMOTE, "!!! SDP_ServiceAttributeRequest !!!");
LOG(WII_IPC_WIIMOTE, "!!! SDP_ServiceAttributeRequest !!!");
u16 startAttrID, endAttrID;
u32 offset = 1;
@@ -900,9 +900,9 @@ void CWII_IPC_HLE_WiiMote::SendCommandToACL(u8 _Ident, u8 _Code, u8 _CommandLeng
memcpy(&DataFrame[Offset], _pCommandData, _CommandLength);
LOG(WIIMOTE, " SendCommandToACL (answer)");
LOG(WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WIIMOTE, " Code: 0x%02x", _Code);
LOG(WII_IPC_WIIMOTE, " SendCommandToACL (answer)");
LOG(WII_IPC_WIIMOTE, " Ident: 0x%02x", _Ident);
LOG(WII_IPC_WIIMOTE, " Code: 0x%02x", _Code);
// send ....
m_pHost->SendACLFrame(GetConnectionHandle(), DataFrame, pHeader->Length + sizeof(SL2CAP_Header));
@@ -918,7 +918,7 @@ void CWII_IPC_HLE_WiiMote::SendL2capData(u16 scid, const void* _pData, u32 _Size
SL2CAP_Header* pHeader = (SL2CAP_Header*)DataFrame;
Offset += sizeof(SL2CAP_Header);
_dbg_assert_(WIIMOTE, DoesChannelExist(scid));
_dbg_assert_(WII_IPC_WIIMOTE, DoesChannelExist(scid));
SChannel& rChannel = m_Channel[scid];
//assemble
@@ -941,7 +941,7 @@ namespace Core
void Callback_WiimoteInput(u16 _channelID, const void* _pData, u32 _Size)
{
const u8* pData = (const u8*)_pData;
LOG(WIIMOTE, "Callback_WiimoteInput: 0x%x", _channelID);
LOG(WII_IPC_WIIMOTE, "Callback_WiimoteInput: 0x%x", _channelID);
std::string Temp;
for (u32 j=0; j<_Size; j++)
{
@@ -949,7 +949,7 @@ namespace Core
sprintf(Buffer, "%02x ", pData[j]);
Temp.append(Buffer);
}
LOG(WIIMOTE, " Data: %s", Temp.c_str());
LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
s_Usb->m_WiiMotes[0].SendL2capData(_channelID, _pData, _Size);
}
@@ -221,7 +221,7 @@ const u8* GetAttribPacket(u32 serviceHandle, u32 cont, u32& _size)
if (serviceHandle == 0x10001)
{
_dbg_assert_(WIIMOTE, cont == 0x00);
_dbg_assert_(WII_IPC_WIIMOTE, cont == 0x00);
_size = sizeof(packet4_0x10001);
return packet4_0x10001;
}
+7 -4
View File
@@ -111,10 +111,13 @@ void LogManager::Init()
m_Log[LogTypes::DYNA_REC] = new CDebugger_Log("DYNA", "Dynamic Recompiler");
m_Log[LogTypes::CONSOLE] = new CDebugger_Log("CONSOLE", "Dolphin Console");
m_Log[LogTypes::OSREPORT] = new CDebugger_Log("OSREPORT", "OSReport");
m_Log[LogTypes::WII_IOB] = new CDebugger_Log("WII_IOB", "WII IO Bridge");
m_Log[LogTypes::WII_IPC] = new CDebugger_Log("WII_IPC", "WII IPC");
m_Log[LogTypes::WII_IPC_HLE] = new CDebugger_Log("WII_IPC_HLE", "WII IPC HLE");
m_Log[LogTypes::WIIMOTE] = new CDebugger_Log("WIIMOTE", "WIIMOTE");
m_Log[LogTypes::WII_IOB] = new CDebugger_Log("WII_IOB", "WII IO Bridge");
m_Log[LogTypes::WII_IPC] = new CDebugger_Log("WII_IPC", "WII IPC");
m_Log[LogTypes::WII_IPC_HLE] = new CDebugger_Log("WII_IPC_HLE", "WII IPC HLE");
m_Log[LogTypes::WII_IPC_DVD] = new CDebugger_Log("WII_IPC_DVD", "WII IPC DVD");
m_Log[LogTypes::WII_IPC_ES] = new CDebugger_Log("WII_IPC_ES", "WII IPC ES");
m_Log[LogTypes::WII_IPC_FILEIO] = new CDebugger_Log("WII_IPC_FILEIO", "WII IPC FILEIO");
m_Log[LogTypes::WII_IPC_WIIMOTE] = new CDebugger_Log("WII_IPC_WIIMOTE", "WII IPC WIIMOTE");
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
{
@@ -247,7 +247,7 @@ extern "C" void Wiimote_InterruptChannel(u16 _channelID, const void* _pData, u32
// dump raw data
{
LOG(WIIMOTE, "Wiimote_Input");
LOG(WII_IPC_WIIMOTE, "Wiimote_Input");
std::string Temp;
for (u32 j=0; j<_Size; j++)
{
@@ -255,7 +255,7 @@ extern "C" void Wiimote_InterruptChannel(u16 _channelID, const void* _pData, u32
sprintf(Buffer, "%02x ", data[j]);
Temp.append(Buffer);
}
LOG(WIIMOTE, " Data: %s", Temp.c_str());
LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
}
hid_packet* hidp = (hid_packet*) data;
@@ -291,7 +291,7 @@ extern "C" void Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _
const u8* data = (const u8*)_pData;
// dump raw data
{
LOG(WIIMOTE, "Wiimote_ControlChannel");
LOG(WII_IPC_WIIMOTE, "Wiimote_ControlChannel");
std::string Temp;
for (u32 j=0; j<_Size; j++)
{
@@ -299,7 +299,7 @@ extern "C" void Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _
sprintf(Buffer, "%02x ", data[j]);
Temp.append(Buffer);
}
LOG(WIIMOTE, " Data: %s", Temp.c_str());
LOG(WII_IPC_WIIMOTE, " Data: %s", Temp.c_str());
}
hid_packet* hidp = (hid_packet*) data;
@@ -343,7 +343,7 @@ extern "C" void Wiimote_ControlChannel(u16 _channelID, const void* _pData, u32 _
}
extern "C" void Wiimote_Update() {
//LOG(WIIMOTE, "Wiimote_Update");
//LOG(WII_IPC_WIIMOTE, "Wiimote_Update");
switch(g_ReportingMode) {
case 0:
@@ -364,12 +364,12 @@ extern "C" unsigned int Wiimote_GetAttachedControllers() {
// Subroutines
//******************************************************************************
void HidOutputReport(u16 _channelID, wm_report* sr) {
LOG(WIIMOTE, " HidOutputReport(0x%02x)", sr->channel);
LOG(WII_IPC_WIIMOTE, " HidOutputReport(0x%02x)", sr->channel);
switch(sr->channel)
{
case 0x10:
LOG(WIIMOTE, "HidOutputReport: unknown sr->channel 0x10");
LOG(WII_IPC_WIIMOTE, "HidOutputReport: unknown sr->channel 0x10");
break;
case WM_LEDS:
WmLeds(_channelID, (wm_leds*)sr->data);
@@ -382,7 +382,7 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
break;
case WM_IR_PIXEL_CLOCK:
case WM_IR_LOGIC:
LOG(WIIMOTE, " IR Enable 0x%02x 0x%02x", sr->channel, sr->data[0]);
LOG(WII_IPC_WIIMOTE, " IR Enable 0x%02x 0x%02x", sr->channel, sr->data[0]);
break;
case WM_WRITE_DATA:
WmWriteData(_channelID, (wm_write_data*)sr->data);
@@ -392,11 +392,11 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
break;
case WM_SPEAKER_ENABLE:
LOG(WIIMOTE, " WM Speaker Enable 0x%02x 0x%02x", sr->channel, sr->data[0]);
LOG(WII_IPC_WIIMOTE, " WM Speaker Enable 0x%02x 0x%02x", sr->channel, sr->data[0]);
break;
case WM_SPEAKER_MUTE:
LOG(WIIMOTE, " WM Mute Enable 0x%02x 0x%02x", sr->channel, sr->data[0]);
LOG(WII_IPC_WIIMOTE, " WM Mute Enable 0x%02x 0x%02x", sr->channel, sr->data[0]);
break;
default:
@@ -406,9 +406,9 @@ void HidOutputReport(u16 _channelID, wm_report* sr) {
}
void WmLeds(u16 _channelID, wm_leds* leds) {
LOG(WIIMOTE, " Set LEDs");
LOG(WIIMOTE, " Leds: %x", leds->leds);
LOG(WIIMOTE, " Rumble: %x", leds->rumble);
LOG(WII_IPC_WIIMOTE, " Set LEDs");
LOG(WII_IPC_WIIMOTE, " Leds: %x", leds->leds);
LOG(WII_IPC_WIIMOTE, " Rumble: %x", leds->rumble);
g_Leds = leds->leds;
}
@@ -433,7 +433,7 @@ void WmSendAck(u16 _channelID, u8 _reportID)
Offset += sizeof(wm_acknowledge);
LOG(WIIMOTE, " WMSendAck()");
LOG(WII_IPC_WIIMOTE, " WMSendAck()");
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
}
@@ -441,12 +441,12 @@ void WmSendAck(u16 _channelID, u8 _reportID)
void WmDataReporting(u16 _channelID, wm_data_reporting* dr)
{
LOG(WIIMOTE, " Set Data reporting mode");
LOG(WIIMOTE, " Rumble: %x", dr->rumble);
LOG(WIIMOTE, " Continuous: %x", dr->continuous);
LOG(WIIMOTE, " All The Time: %x (not only on data change)", dr->all_the_time);
LOG(WIIMOTE, " Rumble: %x", dr->rumble);
LOG(WIIMOTE, " Mode: 0x%02x", dr->mode);
LOG(WII_IPC_WIIMOTE, " Set Data reporting mode");
LOG(WII_IPC_WIIMOTE, " Rumble: %x", dr->rumble);
LOG(WII_IPC_WIIMOTE, " Continuous: %x", dr->continuous);
LOG(WII_IPC_WIIMOTE, " All The Time: %x (not only on data change)", dr->all_the_time);
LOG(WII_IPC_WIIMOTE, " Rumble: %x", dr->rumble);
LOG(WII_IPC_WIIMOTE, " Mode: 0x%02x", dr->mode);
g_ReportingMode = dr->mode;
g_ReportingChannel = _channelID;
@@ -551,7 +551,7 @@ void SendReportCore(u16 _channelID)
FillReportInfo(pReport->c);
LOG(WIIMOTE, " SendReportCore()");
LOG(WII_IPC_WIIMOTE, " SendReportCore()");
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
}
@@ -569,7 +569,7 @@ void SendReportCoreAccelIr12(u16 _channelID) {
FillReportAcc(pReport->a);
FillReportIR(pReport->ir[0], pReport->ir[1]);
LOG(WIIMOTE, " SendReportCoreAccelIr12()");
LOG(WII_IPC_WIIMOTE, " SendReportCoreAccelIr12()");
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
}
@@ -587,7 +587,7 @@ void SendReportCoreAccelIr10Ext(u16 _channelID)
FillReportAcc(pReport->a);
FillReportIRBasic(pReport->ir[0], pReport->ir[1]);
LOG(WIIMOTE, " SendReportCoreAccelIr10Ext()");
LOG(WII_IPC_WIIMOTE, " SendReportCoreAccelIr10Ext()");
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
}
@@ -605,7 +605,7 @@ void SendReportCoreAccel(u16 _channelID)
FillReportInfo(pReport->c);
FillReportAcc(pReport->a);
LOG(WIIMOTE, " SendReportCoreAccel()");
LOG(WII_IPC_WIIMOTE, " SendReportCoreAccel()");
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
}
@@ -614,11 +614,11 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
{
u32 address = convert24bit(rd->address);
u16 size = convert16bit(rd->size);
LOG(WIIMOTE, " Read data");
LOG(WIIMOTE, " Address space: %x", rd->space);
LOG(WIIMOTE, " Address: 0x%06x", address);
LOG(WIIMOTE, " Size: 0x%04x", size);
LOG(WIIMOTE, " Rumble: %x", rd->rumble);
LOG(WII_IPC_WIIMOTE, " Read data");
LOG(WII_IPC_WIIMOTE, " Address space: %x", rd->space);
LOG(WII_IPC_WIIMOTE, " Address: 0x%06x", address);
LOG(WII_IPC_WIIMOTE, " Size: 0x%04x", size);
LOG(WII_IPC_WIIMOTE, " Rumble: %x", rd->rumble);
if(rd->space == 0)
{
@@ -669,11 +669,11 @@ void WmReadData(u16 _channelID, wm_read_data* rd)
void WmWriteData(u16 _channelID, wm_write_data* wd)
{
u32 address = convert24bit(wd->address);
LOG(WIIMOTE, " Write data");
LOG(WIIMOTE, " Address space: %x", wd->space);
LOG(WIIMOTE, " Address: 0x%06x", address);
LOG(WIIMOTE, " Size: 0x%02x", wd->size);
LOG(WIIMOTE, " Rumble: %x", wd->rumble);
LOG(WII_IPC_WIIMOTE, " Write data");
LOG(WII_IPC_WIIMOTE, " Address space: %x", wd->space);
LOG(WII_IPC_WIIMOTE, " Address: 0x%06x", address);
LOG(WII_IPC_WIIMOTE, " Size: 0x%02x", wd->size);
LOG(WII_IPC_WIIMOTE, " Rumble: %x", wd->rumble);
if(wd->size <= 16 && wd->space == WM_SPACE_EEPROM)
{
@@ -735,8 +735,8 @@ int WriteWmReport(u8* dst, u8 channel) {
}
void WmRequestStatus(u16 _channelID, wm_request_status* rs) {
LOG(WIIMOTE, " Request Status");
LOG(WIIMOTE, " Rumble: %x", rs->rumble);
LOG(WII_IPC_WIIMOTE, " Request Status");
LOG(WII_IPC_WIIMOTE, " Rumble: %x", rs->rumble);
//SendStatusReport();
u8 DataFrame[1024];
@@ -750,9 +750,9 @@ void WmRequestStatus(u16 _channelID, wm_request_status* rs) {
pStatus->battery = 0x4F; //arbitrary number
pStatus->extension = 0;
LOG(WIIMOTE, " SendStatusReport()");
LOG(WIIMOTE, " Flags: 0x%02x", pStatus->padding1[2]);
LOG(WIIMOTE, " Battery: %d", pStatus->battery);
LOG(WII_IPC_WIIMOTE, " SendStatusReport()");
LOG(WII_IPC_WIIMOTE, " Flags: 0x%02x", pStatus->padding1[2]);
LOG(WII_IPC_WIIMOTE, " Battery: %d", pStatus->battery);
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);
}
@@ -784,11 +784,11 @@ void SendReadDataReply(u16 _channelID, void* _Base, u16 _Address, u8 _Size)
}
dataOffset += copySize;
LOG(WIIMOTE, " SendReadDataReply()");
LOG(WIIMOTE, " Buttons: 0x%04x", pReply->buttons);
LOG(WIIMOTE, " Error: 0x%x", pReply->error);
LOG(WIIMOTE, " Size: 0x%x", pReply->size);
LOG(WIIMOTE, " Address: 0x%04x", pReply->address);
LOG(WII_IPC_WIIMOTE, " SendReadDataReply()");
LOG(WII_IPC_WIIMOTE, " Buttons: 0x%04x", pReply->buttons);
LOG(WII_IPC_WIIMOTE, " Error: 0x%x", pReply->error);
LOG(WII_IPC_WIIMOTE, " Size: 0x%x", pReply->size);
LOG(WII_IPC_WIIMOTE, " Address: 0x%04x", pReply->address);
g_WiimoteInitialize.pWiimoteInput(_channelID, DataFrame, Offset);