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

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
};
};

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

View File

@ -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;

View File

@ -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);

View File

@ -113,17 +113,17 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)
CtrlSetup.m_PayLoadSize = CommandBuffer.PayloadBuffer[0].m_Size;
// check termination
_dbg_assert_msg_(WIIMOTE, *(u8*)Memory::GetPointer(CommandBuffer.InBuffer[5].m_Address) == 0,
_dbg_assert_msg_(WII_IPC_WIIMOTE, *(u8*)Memory::GetPointer(CommandBuffer.InBuffer[5].m_Address) == 0,
"WIIMOTE: Termination != 0");
#if 0
LOG(WIIMOTE, "USB_IOCTL_CTRLMSG (0x%08x) - execute command", _CommandAddress);
LOG(WII_IPC_WIIMOTE, "USB_IOCTL_CTRLMSG (0x%08x) - execute command", _CommandAddress);
LOG(WIIMOTE, " bRequestType: 0x%x", CtrlSetup.bRequestType);
LOG(WIIMOTE, " bRequest: 0x%x", CtrlSetup.bRequest);
LOG(WIIMOTE, " wValue: 0x%x", CtrlSetup.wValue);
LOG(WIIMOTE, " wIndex: 0x%x", CtrlSetup.wIndex);
LOG(WIIMOTE, " wLength: 0x%x", CtrlSetup.wLength);
LOG(WII_IPC_WIIMOTE, " bRequestType: 0x%x", CtrlSetup.bRequestType);
LOG(WII_IPC_WIIMOTE, " bRequest: 0x%x", CtrlSetup.bRequest);
LOG(WII_IPC_WIIMOTE, " wValue: 0x%x", CtrlSetup.wValue);
LOG(WII_IPC_WIIMOTE, " wIndex: 0x%x", CtrlSetup.wIndex);
LOG(WII_IPC_WIIMOTE, " wLength: 0x%x", CtrlSetup.wLength);
#endif
ExecuteHCICommandMessage(CtrlSetup);
@ -148,8 +148,8 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)
SIOCtlVBuffer pBulkBuffer(_CommandAddress);
UACLHeader* pACLHeader = (UACLHeader*)Memory::GetPointer(pBulkBuffer.PayloadBuffer[0].m_Address);
_dbg_assert_(WIIMOTE, pACLHeader->BCFlag == 0);
_dbg_assert_(WIIMOTE, pACLHeader->PBFlag == 2);
_dbg_assert_(WII_IPC_WIIMOTE, pACLHeader->BCFlag == 0);
_dbg_assert_(WII_IPC_WIIMOTE, pACLHeader->PBFlag == 2);
SendToDevice(pACLHeader->ConnectionHandle, Memory::GetPointer(pBulkBuffer.PayloadBuffer[0].m_Address + 4), pACLHeader->Size);
}
@ -161,14 +161,14 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)
delete m_pACLBuffer;
m_pACLBuffer = new SIOCtlVBuffer(_CommandAddress);
LOG(WIIMOTE, "ACL_DATA_ENDPOINT: 0x%08x ", _CommandAddress);
LOG(WII_IPC_WIIMOTE, "ACL_DATA_ENDPOINT: 0x%08x ", _CommandAddress);
return false;
}
break;
default:
{
_dbg_assert_msg_(WIIMOTE, 0, "Unknown USB_IOCTL_BLKMSG: %x", Command);
_dbg_assert_msg_(WII_IPC_WIIMOTE, 0, "Unknown USB_IOCTL_BLKMSG: %x", Command);
}
break;
}
@ -195,7 +195,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)
default:
{
_dbg_assert_msg_(WIIMOTE, 0, "Unknown USB_IOCTL_INTRMSG: %x", Command);
_dbg_assert_msg_(WII_IPC_WIIMOTE, 0, "Unknown USB_IOCTL_INTRMSG: %x", Command);
}
break;
}
@ -204,14 +204,14 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)
default:
{
_dbg_assert_msg_(WIIMOTE, 0, "Unknown CWII_IPC_HLE_Device_usb_oh1_57e_305: %x", CommandBuffer.Parameter);
_dbg_assert_msg_(WII_IPC_WIIMOTE, 0, "Unknown CWII_IPC_HLE_Device_usb_oh1_57e_305: %x", CommandBuffer.Parameter);
LOG(WIIMOTE, "%s - IOCtlV:", GetDeviceName().c_str());
LOG(WIIMOTE, " Parameter: 0x%x", CommandBuffer.Parameter);
LOG(WIIMOTE, " NumberIn: 0x%08x", CommandBuffer.NumberInBuffer);
LOG(WIIMOTE, " NumberOut: 0x%08x", CommandBuffer.NumberPayloadBuffer);
LOG(WIIMOTE, " BufferVector: 0x%08x", CommandBuffer.BufferVector);
LOG(WIIMOTE, " BufferSize: 0x%08x", CommandBuffer.BufferSize);
LOG(WII_IPC_WIIMOTE, "%s - IOCtlV:", GetDeviceName().c_str());
LOG(WII_IPC_WIIMOTE, " Parameter: 0x%x", CommandBuffer.Parameter);
LOG(WII_IPC_WIIMOTE, " NumberIn: 0x%08x", CommandBuffer.NumberInBuffer);
LOG(WII_IPC_WIIMOTE, " NumberOut: 0x%08x", CommandBuffer.NumberPayloadBuffer);
LOG(WII_IPC_WIIMOTE, " BufferVector: 0x%08x", CommandBuffer.BufferVector);
LOG(WII_IPC_WIIMOTE, " BufferSize: 0x%08x", CommandBuffer.BufferSize);
DumpAsync(CommandBuffer.BufferVector, _CommandAddress, CommandBuffer.NumberInBuffer, CommandBuffer.NumberPayloadBuffer);
}
break;
@ -237,7 +237,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::SendToDevice(u16 _ConnectionHandle, u8
void CWII_IPC_HLE_Device_usb_oh1_57e_305::SendACLFrame(u16 _ConnectionHandle, u8* _pData, u32 _Size)
{
LOG(WIIMOTE, "Queing ACL frame.");
LOG(WII_IPC_WIIMOTE, "Queing ACL frame.");
//queue the packet
ACLFrame frame;
@ -283,7 +283,7 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update()
{
ACLFrame& frame = m_AclFrameQue.front();
LOG(WIIMOTE, "Sending ACL frame.");
LOG(WII_IPC_WIIMOTE, "Sending ACL frame.");
UACLHeader* pHeader = (UACLHeader*)Memory::GetPointer(m_pACLBuffer->PayloadBuffer[0].m_Address);
pHeader->ConnectionHandle = frame.ConnectionHandle;
pHeader->BCFlag = 0;
@ -374,15 +374,15 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventCommandStatus(u16 _Opcode)
AddEventToQueue(Event);
LOG(WIIMOTE, "Event: Command Status");
LOG(WIIMOTE, " Opcode: 0x%04x", pHCIEvent->Opcode);
LOG(WII_IPC_WIIMOTE, "Event: Command Status");
LOG(WII_IPC_WIIMOTE, " Opcode: 0x%04x", pHCIEvent->Opcode);
return true;
}
void CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventCommandComplete(u16 _OpCode, void* _pData, u32 _DataSize)
{
_dbg_assert_(WIIMOTE, (sizeof(SHCIEventCommand) - 2 + _DataSize) < 256);
_dbg_assert_(WII_IPC_WIIMOTE, (sizeof(SHCIEventCommand) - 2 + _DataSize) < 256);
SQueuedEvent Event(sizeof(SHCIEventCommand) + _DataSize, 0);
@ -401,8 +401,8 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventCommandComplete(u16 _OpCode,
AddEventToQueue(Event);
LOG(WIIMOTE, "Event: Command Complete");
LOG(WIIMOTE, " Opcode: 0x%04x", pHCIEvent->Opcode);
LOG(WII_IPC_WIIMOTE, "Event: Command Complete");
LOG(WII_IPC_WIIMOTE, " Opcode: 0x%04x", pHCIEvent->Opcode);
}
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventInquiryResponse()
@ -410,7 +410,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventInquiryResponse()
if (m_WiiMotes.empty())
return false;
_dbg_assert_(WIIMOTE, sizeof(SHCIEventInquiryResult) - 2 + (m_WiiMotes.size() * sizeof(hci_inquiry_response)) < 256);
_dbg_assert_(WII_IPC_WIIMOTE, sizeof(SHCIEventInquiryResult) - 2 + (m_WiiMotes.size() * sizeof(hci_inquiry_response)) < 256);
SQueuedEvent Event(sizeof(SHCIEventInquiryResult) + m_WiiMotes.size()*sizeof(hci_inquiry_response), 0);
@ -438,8 +438,8 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventInquiryResponse()
pResponse->page_scan_mode = 0;
pResponse->clock_offset = 0x3818;
LOG(WIIMOTE, "Event: Send Fake Inquriy of one controller");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: Send Fake Inquriy of one controller");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pResponse->bdaddr.b[0], pResponse->bdaddr.b[1], pResponse->bdaddr.b[2],
pResponse->bdaddr.b[3], pResponse->bdaddr.b[4], pResponse->bdaddr.b[5]);
}
@ -460,7 +460,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventInquiryComplete()
AddEventToQueue(Event);
LOG(WIIMOTE, "Event: Inquiry complete");
LOG(WII_IPC_WIIMOTE, "Event: Inquiry complete");
return true;
}
@ -487,11 +487,11 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRemoteNameReq(bdaddr_t _bd)
AddEventToQueue(Event);
LOG(WIIMOTE, "Event: SendEventRemoteNameReq");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: SendEventRemoteNameReq");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pRemoteNameReq->bdaddr.b[0], pRemoteNameReq->bdaddr.b[1], pRemoteNameReq->bdaddr.b[2],
pRemoteNameReq->bdaddr.b[3], pRemoteNameReq->bdaddr.b[4], pRemoteNameReq->bdaddr.b[5]);
LOG(WIIMOTE, " remotename: %s", pRemoteNameReq->RemoteName);
LOG(WII_IPC_WIIMOTE, " remotename: %s", pRemoteNameReq->RemoteName);
return true;
}
@ -522,14 +522,14 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRequestConnection(CWII_IPC_HL
};
#endif
LOG(WIIMOTE, "Event: SendEventRequestConnection");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: SendEventRequestConnection");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pEventRequestConnection->bdaddr.b[0], pEventRequestConnection->bdaddr.b[1], pEventRequestConnection->bdaddr.b[2],
pEventRequestConnection->bdaddr.b[3], pEventRequestConnection->bdaddr.b[4], pEventRequestConnection->bdaddr.b[5]);
LOG(WIIMOTE, " COD[0]: 0x%02x", pEventRequestConnection->uclass[0]);
LOG(WIIMOTE, " COD[1]: 0x%02x", pEventRequestConnection->uclass[1]);
LOG(WIIMOTE, " COD[2]: 0x%02x", pEventRequestConnection->uclass[2]);
LOG(WIIMOTE, " LinkType: %s", LinkType[pEventRequestConnection->LinkType]);
LOG(WII_IPC_WIIMOTE, " COD[0]: 0x%02x", pEventRequestConnection->uclass[0]);
LOG(WII_IPC_WIIMOTE, " COD[1]: 0x%02x", pEventRequestConnection->uclass[1]);
LOG(WII_IPC_WIIMOTE, " COD[2]: 0x%02x", pEventRequestConnection->uclass[2]);
LOG(WII_IPC_WIIMOTE, " LinkType: %s", LinkType[pEventRequestConnection->LinkType]);
return true;
};
@ -548,8 +548,8 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRequestLinkKey(bdaddr_t _bd)
AddEventToQueue(Event);
LOG(WIIMOTE, "Event: SendEventRequestLinkKey");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: SendEventRequestLinkKey");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pEventRequestLinkKey->bdaddr.b[0], pEventRequestLinkKey->bdaddr.b[1], pEventRequestLinkKey->bdaddr.b[2],
pEventRequestLinkKey->bdaddr.b[3], pEventRequestLinkKey->bdaddr.b[4], pEventRequestLinkKey->bdaddr.b[5]);
@ -570,8 +570,8 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventLinkKeyNotification(const CWI
AddEventToQueue(Event);
LOG(WIIMOTE, "Event: SendEventLinkKeyNotification");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: SendEventLinkKeyNotification");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pEventLinkKey->bdaddr.b[0], pEventLinkKey->bdaddr.b[1], pEventLinkKey->bdaddr.b[2],
pEventLinkKey->bdaddr.b[3], pEventLinkKey->bdaddr.b[4], pEventLinkKey->bdaddr.b[5]);
LOG_LinkKey(pEventLinkKey->LinkKey);
@ -624,13 +624,13 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventConnectionComplete(bdaddr_t _
};
#endif
LOG(WIIMOTE, "Event: SendEventConnectionComplete");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pConnectionComplete->Connection_Handle);
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: SendEventConnectionComplete");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pConnectionComplete->Connection_Handle);
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pConnectionComplete->bdaddr.b[0], pConnectionComplete->bdaddr.b[1], pConnectionComplete->bdaddr.b[2],
pConnectionComplete->bdaddr.b[3], pConnectionComplete->bdaddr.b[4], pConnectionComplete->bdaddr.b[5]);
LOG(WIIMOTE, " LinkType: %s", s_szLinkType[pConnectionComplete->LinkType]);
LOG(WIIMOTE, " EncryptionEnabled: %i", pConnectionComplete->EncryptionEnabled);
LOG(WII_IPC_WIIMOTE, " LinkType: %s", s_szLinkType[pConnectionComplete->LinkType]);
LOG(WII_IPC_WIIMOTE, " EncryptionEnabled: %i", pConnectionComplete->EncryptionEnabled);
return true;
}
@ -658,11 +658,11 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventRoleChange(bdaddr_t _bd, bool
AddEventToQueue(Event);
LOG(WIIMOTE, "Event: SendEventRoleChange");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: SendEventRoleChange");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pRoleChange->bdaddr.b[0], pRoleChange->bdaddr.b[1], pRoleChange->bdaddr.b[2],
pRoleChange->bdaddr.b[3], pRoleChange->bdaddr.b[4], pRoleChange->bdaddr.b[5]);
LOG(WIIMOTE, " NewRole: %i", pRoleChange->NewRole);
LOG(WII_IPC_WIIMOTE, " NewRole: %i", pRoleChange->NewRole);
return true;
}
@ -690,9 +690,9 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventReadClockOffsetComplete(u16 _
AddEventToQueue(Event);
// Log
LOG(WIIMOTE, "Event: SendEventReadClockOffsetComplete");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pReadClockOffsetComplete->ConnectionHandle);
LOG(WIIMOTE, " ClockOffset: 0x%04x", pReadClockOffsetComplete->ClockOffset);
LOG(WII_IPC_WIIMOTE, "Event: SendEventReadClockOffsetComplete");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pReadClockOffsetComplete->ConnectionHandle);
LOG(WII_IPC_WIIMOTE, " ClockOffset: 0x%04x", pReadClockOffsetComplete->ClockOffset);
return true;
}
@ -720,11 +720,11 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventReadRemoteVerInfo(u16 _connec
AddEventToQueue(Event);
// Log
LOG(WIIMOTE, "Event: SendEventReadRemoteVerInfo");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pReadRemoteVerInfo->ConnectionHandle);
LOG(WIIMOTE, " lmp_version: 0x%02x", pReadRemoteVerInfo->lmp_version);
LOG(WIIMOTE, " manufacturer: 0x%04x", pReadRemoteVerInfo->manufacturer);
LOG(WIIMOTE, " lmp_subversion: 0x%04x", pReadRemoteVerInfo->lmp_subversion);
LOG(WII_IPC_WIIMOTE, "Event: SendEventReadRemoteVerInfo");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pReadRemoteVerInfo->ConnectionHandle);
LOG(WII_IPC_WIIMOTE, " lmp_version: 0x%02x", pReadRemoteVerInfo->lmp_version);
LOG(WII_IPC_WIIMOTE, " manufacturer: 0x%04x", pReadRemoteVerInfo->manufacturer);
LOG(WII_IPC_WIIMOTE, " lmp_subversion: 0x%04x", pReadRemoteVerInfo->lmp_subversion);
return true;
}
@ -757,9 +757,9 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventReadRemoteFeatures(u16 _conne
AddEventToQueue(Event);
// Log
LOG(WIIMOTE, "Event: SendEventReadRemoteFeatures");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pReadRemoteFeatures->ConnectionHandle);
LOG(WIIMOTE, " features: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Event: SendEventReadRemoteFeatures");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pReadRemoteFeatures->ConnectionHandle);
LOG(WII_IPC_WIIMOTE, " features: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
pReadRemoteFeatures->features[0], pReadRemoteFeatures->features[1], pReadRemoteFeatures->features[2],
pReadRemoteFeatures->features[3], pReadRemoteFeatures->features[4], pReadRemoteFeatures->features[5],
pReadRemoteFeatures->features[6], pReadRemoteFeatures->features[7]);
@ -788,9 +788,9 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventNumberOfCompletedPackets(u16
AddEventToQueue(Event);
// Log
LOG(WIIMOTE, "Event: SendEventNumberOfCompletedPackets");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pNumberOfCompletedPackets->Connection_Handle);
LOG(WIIMOTE, " Number_Of_Completed_Packets: %i", pNumberOfCompletedPackets->Number_Of_Completed_Packets);
LOG(WII_IPC_WIIMOTE, "Event: SendEventNumberOfCompletedPackets");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pNumberOfCompletedPackets->Connection_Handle);
LOG(WII_IPC_WIIMOTE, " Number_Of_Completed_Packets: %i", pNumberOfCompletedPackets->Number_Of_Completed_Packets);
return true;
}
@ -815,8 +815,8 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventAuthenticationCompleted(u16 _
AddEventToQueue(Event);
// Log
LOG(WIIMOTE, "Event: SendEventAuthenticationCompleted");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pEventAuthenticationCompleted->Connection_Handle);
LOG(WII_IPC_WIIMOTE, "Event: SendEventAuthenticationCompleted");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pEventAuthenticationCompleted->Connection_Handle);
return true;
}
@ -843,9 +843,9 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventModeChange(u16 _connectionHan
AddEventToQueue(Event);
// Log
LOG(WIIMOTE, "Event: SendEventModeChange");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pModeChange->Connection_Handle);
LOG(WIIMOTE, " missing other paramter :)");
LOG(WII_IPC_WIIMOTE, "Event: SendEventModeChange");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pModeChange->Connection_Handle);
LOG(WII_IPC_WIIMOTE, " missing other paramter :)");
return true;
}
@ -871,9 +871,9 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::SendEventDisconnect(u16 _connectionHan
AddEventToQueue(Event);
// Log
LOG(WIIMOTE, "Event: SendEventDisconnect");
LOG(WIIMOTE, " Connection_Handle: 0x%04x", pDisconnect->Connection_Handle);
LOG(WIIMOTE, " Reason: 0x%02x", pDisconnect->Reason);
LOG(WII_IPC_WIIMOTE, "Event: SendEventDisconnect");
LOG(WII_IPC_WIIMOTE, " Connection_Handle: 0x%04x", pDisconnect->Connection_Handle);
LOG(WII_IPC_WIIMOTE, " Reason: 0x%02x", pDisconnect->Reason);
return true;
}
@ -894,7 +894,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::ExecuteHCICommandMessage(const SHCICom
u16 ocf = HCI_OCF(pMsg->Opcode);
u16 ogf = HCI_OGF(pMsg->Opcode);
LOG(WIIMOTE, "****************************** ExecuteHCICommandMessage(0x%04x)"
LOG(WII_IPC_WIIMOTE, "****************************** ExecuteHCICommandMessage(0x%04x)"
"(ocf: 0x%02x, ogf: 0x%02x)", pMsg->Opcode, ocf, ogf);
switch(pMsg->Opcode)
@ -1047,16 +1047,16 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::ExecuteHCICommandMessage(const SHCICom
if (ogf == 0x3f)
{
PanicAlert("Vendor specific HCI command");
LOG(WIIMOTE, "Command: vendor specific: 0x%04X (ocf: 0x%x)", pMsg->Opcode, ocf);
LOG(WII_IPC_WIIMOTE, "Command: vendor specific: 0x%04X (ocf: 0x%x)", pMsg->Opcode, ocf);
for (int i=0; i<pMsg->len; i++)
{
LOG(WIIMOTE, " 0x02%x", pInput[i]);
LOG(WII_IPC_WIIMOTE, " 0x02%x", pInput[i]);
}
}
else
{
_dbg_assert_msg_(WIIMOTE, 0, "Unknown USB_IOCTL_CTRLMSG: 0x%04X (ocf: 0x%x ogf 0x%x)", pMsg->Opcode, ocf, ogf);
_dbg_assert_msg_(WII_IPC_WIIMOTE, 0, "Unknown USB_IOCTL_CTRLMSG: 0x%04X (ocf: 0x%x ogf 0x%x)", pMsg->Opcode, ocf, ogf);
}
// send fake all is okay msg...
@ -1080,7 +1080,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReset(u8* _Input)
hci_status_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_RESET");
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_RESET");
SendEventCommandComplete(HCI_CMD_RESET, &Reply, sizeof(hci_status_rp));
}
@ -1095,12 +1095,12 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadBufferSize(u8* _Input)
Reply.max_sco_size = 64;
Reply.num_sco_pkts = 0;
LOG(WIIMOTE, "Command: HCI_CMD_READ_BUFFER_SIZE:");
LOG(WIIMOTE, "return:");
LOG(WIIMOTE, " max_acl_size: %i", Reply.max_acl_size);
LOG(WIIMOTE, " num_acl_pkts: %i", Reply.num_acl_pkts);
LOG(WIIMOTE, " max_sco_size: %i", Reply.max_sco_size);
LOG(WIIMOTE, " num_sco_pkts: %i", Reply.num_sco_pkts);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_BUFFER_SIZE:");
LOG(WII_IPC_WIIMOTE, "return:");
LOG(WII_IPC_WIIMOTE, " max_acl_size: %i", Reply.max_acl_size);
LOG(WII_IPC_WIIMOTE, " num_acl_pkts: %i", Reply.num_acl_pkts);
LOG(WII_IPC_WIIMOTE, " max_sco_size: %i", Reply.max_sco_size);
LOG(WII_IPC_WIIMOTE, " num_sco_pkts: %i", Reply.num_sco_pkts);
SendEventCommandComplete(HCI_CMD_READ_BUFFER_SIZE, &Reply, sizeof(hci_read_buffer_size_rp));
}
@ -1116,13 +1116,13 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadLocalVer(u8* _Input)
Reply.manufacturer = 0x000F; // manufacturer: reserved for tests
Reply.lmp_subversion = 0x430e; // LMP subversion
LOG(WIIMOTE, "Command: HCI_CMD_READ_LOCAL_VER:");
LOG(WIIMOTE, "return:");
LOG(WIIMOTE, " status: %i", Reply.status);
LOG(WIIMOTE, " hci_revision: %i", Reply.hci_revision);
LOG(WIIMOTE, " lmp_version: %i", Reply.lmp_version);
LOG(WIIMOTE, " manufacturer: %i", Reply.manufacturer);
LOG(WIIMOTE, " lmp_subversion: %i", Reply.lmp_subversion);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_LOCAL_VER:");
LOG(WII_IPC_WIIMOTE, "return:");
LOG(WII_IPC_WIIMOTE, " status: %i", Reply.status);
LOG(WII_IPC_WIIMOTE, " hci_revision: %i", Reply.hci_revision);
LOG(WII_IPC_WIIMOTE, " lmp_version: %i", Reply.lmp_version);
LOG(WII_IPC_WIIMOTE, " manufacturer: %i", Reply.manufacturer);
LOG(WII_IPC_WIIMOTE, " lmp_subversion: %i", Reply.lmp_subversion);
SendEventCommandComplete(HCI_CMD_READ_LOCAL_VER, &Reply, sizeof(hci_read_local_ver_rp));
}
@ -1134,9 +1134,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadBDAdrr(u8* _Input)
Reply.status = 0x00;
Reply.bdaddr = m_ControllerBD;
LOG(WIIMOTE, "Command: HCI_CMD_READ_BDADDR:");
LOG(WIIMOTE, "return:");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_BDADDR:");
LOG(WII_IPC_WIIMOTE, "return:");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
Reply.bdaddr.b[0], Reply.bdaddr.b[1], Reply.bdaddr.b[2],
Reply.bdaddr.b[3], Reply.bdaddr.b[4], Reply.bdaddr.b[5]);
@ -1157,9 +1157,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadLocalFeatures(u8* _Input)
Reply.features[6] = 0x00;
Reply.features[7] = 0x80;
LOG(WIIMOTE, "Command: HCI_CMD_READ_LOCAL_FEATURES:");
LOG(WIIMOTE, "return:");
LOG(WIIMOTE, " features: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_LOCAL_FEATURES:");
LOG(WII_IPC_WIIMOTE, "return:");
LOG(WII_IPC_WIIMOTE, " features: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
Reply.features[0], Reply.features[1], Reply.features[2],
Reply.features[3], Reply.features[4], Reply.features[5],
Reply.features[6], Reply.features[7]);
@ -1186,15 +1186,15 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadStoredLinkKey(u8* _Input)
}
// logging
LOG(WIIMOTE, "Command: HCI_CMD_READ_STORED_LINK_KEY:");
LOG(WIIMOTE, "input:");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_STORED_LINK_KEY:");
LOG(WII_IPC_WIIMOTE, "input:");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
ReadStoredLinkKey->bdaddr.b[0], ReadStoredLinkKey->bdaddr.b[1], ReadStoredLinkKey->bdaddr.b[2],
ReadStoredLinkKey->bdaddr.b[3], ReadStoredLinkKey->bdaddr.b[4], ReadStoredLinkKey->bdaddr.b[5]);
LOG(WIIMOTE, " read_all: %i", ReadStoredLinkKey->read_all);
LOG(WIIMOTE, "return:");
LOG(WIIMOTE, " max_num_keys: %i", Reply.max_num_keys);
LOG(WIIMOTE, " num_keys_read: %i", Reply.num_keys_read);
LOG(WII_IPC_WIIMOTE, " read_all: %i", ReadStoredLinkKey->read_all);
LOG(WII_IPC_WIIMOTE, "return:");
LOG(WII_IPC_WIIMOTE, " max_num_keys: %i", Reply.max_num_keys);
LOG(WII_IPC_WIIMOTE, " num_keys_read: %i", Reply.num_keys_read);
// generate link key
for (size_t i=0; i<m_WiiMotes.size(); i++)
@ -1217,11 +1217,11 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteUnitClass(u8* _Input)
hci_write_unit_class_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_UNIT_CLASS:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " COD[0]: 0x%02x", pWriteUnitClass->uclass[0]);
LOG(WIIMOTE, " COD[1]: 0x%02x", pWriteUnitClass->uclass[1]);
LOG(WIIMOTE, " COD[2]: 0x%02x", pWriteUnitClass->uclass[2]);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_UNIT_CLASS:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " COD[0]: 0x%02x", pWriteUnitClass->uclass[0]);
LOG(WII_IPC_WIIMOTE, " COD[1]: 0x%02x", pWriteUnitClass->uclass[1]);
LOG(WII_IPC_WIIMOTE, " COD[2]: 0x%02x", pWriteUnitClass->uclass[2]);
SendEventCommandComplete(HCI_CMD_WRITE_UNIT_CLASS, &Reply, sizeof(hci_write_unit_class_rp));
}
@ -1236,9 +1236,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteLocalName(u8* _Input)
hci_write_local_name_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_LOCAL_NAME:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " local_name: %s", pWriteLocalName->name);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_LOCAL_NAME:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " local_name: %s", pWriteLocalName->name);
SendEventCommandComplete(HCI_CMD_WRITE_LOCAL_NAME, &Reply, sizeof(hci_write_local_name_rp));
}
@ -1253,9 +1253,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePinType(u8* _Input)
hci_write_pin_type_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_PIN_TYPE:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " pin_type: %x", pWritePinType->pin_type);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_PIN_TYPE:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " pin_type: %x", pWritePinType->pin_type);
SendEventCommandComplete(HCI_CMD_WRITE_PIN_TYPE, &Reply, sizeof(hci_write_pin_type_rp));
}
@ -1273,12 +1273,12 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandHostBufferSize(u8* _Input)
hci_host_buffer_size_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_HOST_BUFFER_SIZE:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " max_acl_size: %i", pHostBufferSize->max_acl_size);
LOG(WIIMOTE, " max_sco_size: %i", pHostBufferSize->max_sco_size);
LOG(WIIMOTE, " num_acl_pkts: %i", pHostBufferSize->num_acl_pkts);
LOG(WIIMOTE, " num_sco_pkts: %i", pHostBufferSize->num_sco_pkts);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_HOST_BUFFER_SIZE:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " max_acl_size: %i", pHostBufferSize->max_acl_size);
LOG(WII_IPC_WIIMOTE, " max_sco_size: %i", pHostBufferSize->max_sco_size);
LOG(WII_IPC_WIIMOTE, " num_acl_pkts: %i", pHostBufferSize->num_acl_pkts);
LOG(WII_IPC_WIIMOTE, " num_sco_pkts: %i", pHostBufferSize->num_sco_pkts);
SendEventCommandComplete(HCI_CMD_HOST_BUFFER_SIZE, &Reply, sizeof(hci_host_buffer_size_rp));
}
@ -1294,9 +1294,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageTimeOut(u8* _Input)
hci_host_buffer_size_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_PAGE_TIMEOUT:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " timeout: %i", pWritePageTimeOut->timeout);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_PAGE_TIMEOUT:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " timeout: %i", pWritePageTimeOut->timeout);
SendEventCommandComplete(HCI_CMD_WRITE_PAGE_TIMEOUT, &Reply, sizeof(hci_host_buffer_size_rp));
}
@ -1321,9 +1321,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteScanEnable(u8* _Input)
};
#endif
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_SCAN_ENABLE:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " scan_enable: %s", Scanning[pWriteScanEnable->scan_enable]);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_SCAN_ENABLE:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " scan_enable: %s", Scanning[pWriteScanEnable->scan_enable]);
SendEventCommandComplete(HCI_CMD_WRITE_SCAN_ENABLE, &Reply, sizeof(hci_write_scan_enable_rp));
@ -1359,9 +1359,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryMode(u8* _Input)
{ "Inquiry Result with RSSI format or Extended Inquiry Result format" }
};
#endif
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_INQUIRY_MODE:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " mode: %s", InquiryMode[pInquiryMode->mode]);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_INQUIRY_MODE:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " mode: %s", InquiryMode[pInquiryMode->mode]);
SendEventCommandComplete(HCI_CMD_WRITE_INQUIRY_MODE, &Reply, sizeof(hci_write_inquiry_mode_rp));
}
@ -1385,9 +1385,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWritePageScanType(u8* _Input)
};
#endif
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_PAGE_SCAN_TYPE:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " type: %s", PageScanType[pWritePageScanType->type]);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_PAGE_SCAN_TYPE:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " type: %s", PageScanType[pWritePageScanType->type]);
SendEventCommandComplete(HCI_CMD_WRITE_PAGE_SCAN_TYPE, &Reply, sizeof(hci_write_page_scan_type_rp));
}
@ -1403,10 +1403,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandSetEventFilter(u8* _Input)
hci_set_event_filter_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_SET_EVENT_FILTER:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " filter_type: %i", pSetEventFilter->filter_type);
LOG(WIIMOTE, " filter_condition_type: %i", pSetEventFilter->filter_condition_type);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_SET_EVENT_FILTER:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " filter_type: %i", pSetEventFilter->filter_type);
LOG(WII_IPC_WIIMOTE, " filter_condition_type: %i", pSetEventFilter->filter_condition_type);
SendEventCommandComplete(HCI_CMD_SET_EVENT_FILTER, &Reply, sizeof(hci_set_event_filter_rp));
}
@ -1419,13 +1419,13 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandInquiry(u8* _Input)
memcpy(lap, pInquiry->lap, HCI_LAP_SIZE);
LOG(WIIMOTE, "Command: HCI_CMD_INQUIRY:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " LAP[0]: 0x%02x", pInquiry->lap[0]);
LOG(WIIMOTE, " LAP[1]: 0x%02x", pInquiry->lap[1]);
LOG(WIIMOTE, " LAP[2]: 0x%02x", pInquiry->lap[2]);
LOG(WIIMOTE, " inquiry_length: %i (N x 1.28) sec", pInquiry->inquiry_length);
LOG(WIIMOTE, " num_responses: %i (N x 1.28) sec", pInquiry->num_responses);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_INQUIRY:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " LAP[0]: 0x%02x", pInquiry->lap[0]);
LOG(WII_IPC_WIIMOTE, " LAP[1]: 0x%02x", pInquiry->lap[1]);
LOG(WII_IPC_WIIMOTE, " LAP[2]: 0x%02x", pInquiry->lap[2]);
LOG(WII_IPC_WIIMOTE, " inquiry_length: %i (N x 1.28) sec", pInquiry->inquiry_length);
LOG(WII_IPC_WIIMOTE, " num_responses: %i (N x 1.28) sec", pInquiry->num_responses);
SendEventCommandStatus(HCI_CMD_INQUIRY);
SendEventInquiryResponse();
@ -1442,9 +1442,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteInquiryScanType(u8* _Input
hci_write_inquiry_scan_type_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_INQUIRY_SCAN_TYPE:");
LOG(WIIMOTE, "write:");
LOG(WIIMOTE, " type: %i", pSetEventFilter->type);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_INQUIRY_SCAN_TYPE:");
LOG(WII_IPC_WIIMOTE, "write:");
LOG(WII_IPC_WIIMOTE, " type: %i", pSetEventFilter->type);
SendEventCommandComplete(HCI_CMD_WRITE_INQUIRY_SCAN_TYPE, &Reply, sizeof(hci_write_inquiry_scan_type_rp));
}
@ -1462,10 +1462,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandVendorSpecific_FC4F(u8* _Input,
hci_status_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: CommandVendorSpecific_FC4F: (callstack WUDiRemovePatch)");
LOG(WIIMOTE, "input (size 0x%x):", _Size);
LOG(WII_IPC_WIIMOTE, "Command: CommandVendorSpecific_FC4F: (callstack WUDiRemovePatch)");
LOG(WII_IPC_WIIMOTE, "input (size 0x%x):", _Size);
Debugger::PrintDataBuffer(LogTypes::WIIMOTE, _Input, _Size, "Data: ");
Debugger::PrintDataBuffer(LogTypes::WII_IPC_WIIMOTE, _Input, _Size, "Data: ");
SendEventCommandComplete(0xFC4F, &Reply, sizeof(hci_status_rp));
}
@ -1476,9 +1476,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandVendorSpecific_FC4C(u8* _Input,
hci_status_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: CommandVendorSpecific_FC4C:");
LOG(WIIMOTE, "input (size 0x%x):", _Size);
Debugger::PrintDataBuffer(LogTypes::WIIMOTE, _Input, _Size, "Data: ");
LOG(WII_IPC_WIIMOTE, "Command: CommandVendorSpecific_FC4C:");
LOG(WII_IPC_WIIMOTE, "input (size 0x%x):", _Size);
Debugger::PrintDataBuffer(LogTypes::WII_IPC_WIIMOTE, _Input, _Size, "Data: ");
SendEventCommandComplete(0xFC4C, &Reply, sizeof(hci_status_rp));
}
@ -1489,7 +1489,7 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandInquiryCancel(u8* _Input)
hci_inquiry_cancel_rp Reply;
Reply.status = 0x00;
LOG(WIIMOTE, "Command: HCI_CMD_INQUIRY_CANCEL");
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_INQUIRY_CANCEL");
SendEventCommandComplete(HCI_CMD_INQUIRY_CANCEL, &Reply, sizeof(hci_inquiry_cancel_rp));
}
@ -1499,14 +1499,14 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandRemoteNameReq(u8* _Input)
// command parameters
hci_remote_name_req_cp* pRemoteNameReq = (hci_remote_name_req_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_REMOTE_NAME_REQ");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_REMOTE_NAME_REQ");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pRemoteNameReq->bdaddr.b[0], pRemoteNameReq->bdaddr.b[1], pRemoteNameReq->bdaddr.b[2],
pRemoteNameReq->bdaddr.b[3], pRemoteNameReq->bdaddr.b[4], pRemoteNameReq->bdaddr.b[5]);
LOG(WIIMOTE, " page_scan_rep_mode: %i", pRemoteNameReq->page_scan_rep_mode);
LOG(WIIMOTE, " page_scan_mode: %i", pRemoteNameReq->page_scan_mode);
LOG(WIIMOTE, " clock_offset: %i", pRemoteNameReq->clock_offset);
LOG(WII_IPC_WIIMOTE, " page_scan_rep_mode: %i", pRemoteNameReq->page_scan_rep_mode);
LOG(WII_IPC_WIIMOTE, " page_scan_mode: %i", pRemoteNameReq->page_scan_mode);
LOG(WII_IPC_WIIMOTE, " clock_offset: %i", pRemoteNameReq->clock_offset);
SendEventCommandStatus(HCI_CMD_REMOTE_NAME_REQ);
SendEventRemoteNameReq(pRemoteNameReq->bdaddr);
@ -1517,17 +1517,17 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandCreateCon(u8* _Input)
// command parameters
hci_create_con_cp* pCreateCon = (hci_create_con_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_CREATE_CON");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_CREATE_CON");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pCreateCon->bdaddr.b[0], pCreateCon->bdaddr.b[1], pCreateCon->bdaddr.b[2],
pCreateCon->bdaddr.b[3], pCreateCon->bdaddr.b[4], pCreateCon->bdaddr.b[5]);
LOG(WIIMOTE, " pkt_type: %i", pCreateCon->pkt_type);
LOG(WIIMOTE, " page_scan_rep_mode: %i", pCreateCon->page_scan_rep_mode);
LOG(WIIMOTE, " page_scan_mode: %i", pCreateCon->page_scan_mode);
LOG(WIIMOTE, " clock_offset: %i", pCreateCon->clock_offset);
LOG(WIIMOTE, " accept_role_switch: %i", pCreateCon->accept_role_switch);
LOG(WII_IPC_WIIMOTE, " pkt_type: %i", pCreateCon->pkt_type);
LOG(WII_IPC_WIIMOTE, " page_scan_rep_mode: %i", pCreateCon->page_scan_rep_mode);
LOG(WII_IPC_WIIMOTE, " page_scan_mode: %i", pCreateCon->page_scan_mode);
LOG(WII_IPC_WIIMOTE, " clock_offset: %i", pCreateCon->clock_offset);
LOG(WII_IPC_WIIMOTE, " accept_role_switch: %i", pCreateCon->accept_role_switch);
SendEventCommandStatus(HCI_CMD_CREATE_CON);
SendEventConnectionComplete(pCreateCon->bdaddr);
@ -1546,12 +1546,12 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandAcceptCon(u8* _Input)
};
#endif
LOG(WIIMOTE, "Command: HCI_CMD_ACCEPT_CON");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_ACCEPT_CON");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pAcceptCon->bdaddr.b[0], pAcceptCon->bdaddr.b[1], pAcceptCon->bdaddr.b[2],
pAcceptCon->bdaddr.b[3], pAcceptCon->bdaddr.b[4], pAcceptCon->bdaddr.b[5]);
LOG(WIIMOTE, " role: %s", s_szRole[pAcceptCon->role]);
LOG(WII_IPC_WIIMOTE, " role: %s", s_szRole[pAcceptCon->role]);
SendEventCommandStatus(HCI_CMD_ACCEPT_CON);
@ -1569,9 +1569,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadClockOffset(u8* _Input)
// command parameters
hci_read_clock_offset_cp* pReadClockOffset = (hci_read_clock_offset_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_READ_CLOCK_OFFSET");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " ConnectionHandle: 0x%02x", pReadClockOffset->con_handle);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_CLOCK_OFFSET");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%02x", pReadClockOffset->con_handle);
SendEventCommandStatus(HCI_CMD_READ_CLOCK_OFFSET);
SendEventReadClockOffsetComplete(pReadClockOffset->con_handle);
@ -1586,9 +1586,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadRemoteVerInfo(u8* _Input)
// command parameters
hci_read_remote_ver_info_cp* pReadRemoteVerInfo = (hci_read_remote_ver_info_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_READ_REMOTE_VER_INFO");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " ConnectionHandle: 0x%02x", pReadRemoteVerInfo->con_handle);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_REMOTE_VER_INFO");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%02x", pReadRemoteVerInfo->con_handle);
SendEventCommandStatus(HCI_CMD_READ_REMOTE_VER_INFO);
SendEventReadRemoteVerInfo(pReadRemoteVerInfo->con_handle);
@ -1599,9 +1599,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandReadRemoteFeatures(u8* _Input)
// command parameters
hci_read_remote_features_cp* pReadRemoteFeatures = (hci_read_remote_features_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_READ_REMOTE_FEATURES");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " ConnectionHandle: 0x%04x", pReadRemoteFeatures->con_handle);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_READ_REMOTE_FEATURES");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%04x", pReadRemoteFeatures->con_handle);
SendEventCommandStatus(HCI_CMD_READ_REMOTE_FEATURES);
SendEventReadRemoteFeatures(pReadRemoteFeatures->con_handle);
@ -1612,10 +1612,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteLinkPolicy(u8* _Input)
// command parameters
hci_write_link_policy_settings_cp* pLinkPolicy = (hci_write_link_policy_settings_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_WRITE_LINK_POLICY_SETTINGS");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " ConnectionHandle: 0x%04x", pLinkPolicy->con_handle);
LOG(WIIMOTE, " Policy: 0x%04x", pLinkPolicy->settings);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_WRITE_LINK_POLICY_SETTINGS");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%04x", pLinkPolicy->con_handle);
LOG(WII_IPC_WIIMOTE, " Policy: 0x%04x", pLinkPolicy->settings);
SendEventCommandStatus(HCI_CMD_WRITE_LINK_POLICY_SETTINGS);
@ -1631,9 +1631,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandAuthenticationRequested(u8* _In
// command parameters
hci_auth_req_cp* pAuthReq = (hci_auth_req_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_AUTH_REQ");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " ConnectionHandle: 0x%04x", pAuthReq->con_handle);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_AUTH_REQ");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%04x", pAuthReq->con_handle);
SendEventCommandStatus(HCI_CMD_AUTH_REQ);
SendEventAuthenticationCompleted(pAuthReq->con_handle);
@ -1644,13 +1644,13 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandSniffMode(u8* _Input)
// command parameters
hci_sniff_mode_cp* pSniffMode = (hci_sniff_mode_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_SNIFF_MODE");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " ConnectionHandle: 0x%04x", pSniffMode->con_handle);
LOG(WIIMOTE, " max_interval: 0x%04x", pSniffMode->max_interval);
LOG(WIIMOTE, " min_interval: 0x%04x", pSniffMode->min_interval);
LOG(WIIMOTE, " attempt: 0x%04x", pSniffMode->attempt);
LOG(WIIMOTE, " timeout: 0x%04x", pSniffMode->timeout);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_SNIFF_MODE");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%04x", pSniffMode->con_handle);
LOG(WII_IPC_WIIMOTE, " max_interval: 0x%04x", pSniffMode->max_interval);
LOG(WII_IPC_WIIMOTE, " min_interval: 0x%04x", pSniffMode->min_interval);
LOG(WII_IPC_WIIMOTE, " attempt: 0x%04x", pSniffMode->attempt);
LOG(WII_IPC_WIIMOTE, " timeout: 0x%04x", pSniffMode->timeout);
SendEventCommandStatus(HCI_CMD_SNIFF_MODE);
SendEventModeChange(pSniffMode->con_handle, 0x02, pSniffMode->max_interval); // 0x02 - sniff mode
@ -1661,10 +1661,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandDisconnect(u8* _Input)
// command parameters
hci_discon_cp* pDiscon = (hci_discon_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_DISCONNECT");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " ConnectionHandle: 0x%04x", pDiscon->con_handle);
LOG(WIIMOTE, " Reason: 0x%02x", pDiscon->reason);
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_DISCONNECT");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " ConnectionHandle: 0x%04x", pDiscon->con_handle);
LOG(WII_IPC_WIIMOTE, " Reason: 0x%02x", pDiscon->reason);
SendEventCommandStatus(HCI_CMD_DISCONNECT);
SendEventDisconnect(pDiscon->con_handle, pDiscon->reason);
@ -1683,10 +1683,10 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandWriteLinkSupervisionTimeout(u8*
// command parameters
hci_write_link_supervision_timeout_cp* pSuperVision = (hci_write_link_supervision_timeout_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_OCF_WRITE_LINK_SUPERVISION_TIMEOUT");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " con_handle: 0x%04x", pSuperVision->con_handle);
LOG(WIIMOTE, " timeout: 0x%02x", pSuperVision->timeout);
LOG(WII_IPC_WIIMOTE, "Command: HCI_OCF_WRITE_LINK_SUPERVISION_TIMEOUT");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " con_handle: 0x%04x", pSuperVision->con_handle);
LOG(WII_IPC_WIIMOTE, " timeout: 0x%02x", pSuperVision->timeout);
hci_write_link_supervision_timeout_rp Reply;
Reply.status = 0x00;
@ -1700,9 +1700,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandLinkKeyNegRep(u8* _Input)
// command parameters
hci_link_key_neg_rep_cp* pKeyNeg = (hci_link_key_neg_rep_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_LINK_KEY_NEG_REP");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_LINK_KEY_NEG_REP");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pKeyNeg->bdaddr.b[0], pKeyNeg->bdaddr.b[1], pKeyNeg->bdaddr.b[2],
pKeyNeg->bdaddr.b[3], pKeyNeg->bdaddr.b[4], pKeyNeg->bdaddr.b[5]);
@ -1718,9 +1718,9 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::CommandLinkKeyRep(u8* _Input)
// command parameters
hci_link_key_rep_cp* pKeyRep = (hci_link_key_rep_cp*)_Input;
LOG(WIIMOTE, "Command: HCI_CMD_LINK_KEY_REP");
LOG(WIIMOTE, "Input:");
LOG(WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
LOG(WII_IPC_WIIMOTE, "Command: HCI_CMD_LINK_KEY_REP");
LOG(WII_IPC_WIIMOTE, "Input:");
LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x",
pKeyRep->bdaddr.b[0], pKeyRep->bdaddr.b[1], pKeyRep->bdaddr.b[2],
pKeyRep->bdaddr.b[3], pKeyRep->bdaddr.b[4], pKeyRep->bdaddr.b[5]);
LOG_LinkKey(pKeyRep->key);
@ -1771,7 +1771,7 @@ CWII_IPC_HLE_WiiMote* CWII_IPC_HLE_Device_usb_oh1_57e_305::AccessWiiMote(u16 _Co
void CWII_IPC_HLE_Device_usb_oh1_57e_305::LOG_LinkKey(const u8* _pLinkKey)
{
LOG(WIIMOTE, " link key: "
LOG(WII_IPC_WIIMOTE, " link key: "
"0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x "
"0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x "
, _pLinkKey[0], _pLinkKey[1], _pLinkKey[2], _pLinkKey[3], _pLinkKey[4], _pLinkKey[5], _pLinkKey[6], _pLinkKey[7]

View File

@ -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);
}

View File

@ -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;
}

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++)
{

View File

@ -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);