IPC_HLE: Remove dead code (Wiimote and emulated BT)

Neither needed or used in the emulated Bluetooth code.
This commit is contained in:
Léo Lam 2016-10-22 17:16:33 +02:00
parent f82051a365
commit 20f2955ad9
4 changed files with 0 additions and 251 deletions

View File

@ -185,20 +185,6 @@ IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IOCtl(u32 _CommandAddr
IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IOCtlV(u32 _CommandAddress)
{
/*
Memory::Write_U8(255, 0x80149950); // BTM LOG // 3 logs L2Cap // 4 logs l2_csm$
Memory::Write_U8(255, 0x80149949); // Security Manager
Memory::Write_U8(255, 0x80149048); // HID
Memory::Write_U8(3, 0x80152058); // low ?? // >= 4 and you will get a lot of event messages
of the same type
Memory::Write_U8(1, 0x80152018); // WUD
Memory::Write_U8(1, 0x80151FC8); // DEBUGPrint
Memory::Write_U8(1, 0x80151488); // WPAD_LOG
Memory::Write_U8(1, 0x801514A8); // USB_LOG
Memory::Write_U8(1, 0x801514D8); // WUD_DEBUGPrint
Memory::Write_U8(1, 0x80148E09); // HID LOG
*/
bool _SendReply = false;
SIOCtlVBuffer CommandBuffer(_CommandAddress);
@ -222,17 +208,6 @@ IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IOCtlV(u32 _CommandAdd
*(u8*)Memory::GetPointer(CommandBuffer.InBuffer[5].m_Address) == 0,
"WIIMOTE: Termination != 0");
#if 0 // this log can get really annoying
DEBUG_LOG(WII_IPC_WIIMOTE, "USB_IOCTL_CTRLMSG (0x%08x) - execute command", _CommandAddress);
DEBUG_LOG(WII_IPC_WIIMOTE, " bRequestType: 0x%x", m_CtrlSetup.bRequestType);
DEBUG_LOG(WII_IPC_WIIMOTE, " bRequest: 0x%x", m_CtrlSetup.bRequest);
DEBUG_LOG(WII_IPC_WIIMOTE, " wValue: 0x%x", m_CtrlSetup.wValue);
DEBUG_LOG(WII_IPC_WIIMOTE, " wIndex: 0x%x", m_CtrlSetup.wIndex);
DEBUG_LOG(WII_IPC_WIIMOTE, " wLength: 0x%x", m_CtrlSetup.wLength);
DEBUG_LOG(WII_IPC_WIIMOTE, " m_PayLoadAddr: 0x%x", m_CtrlSetup.m_PayLoadAddr);
DEBUG_LOG(WII_IPC_WIIMOTE, " m_PayLoadSize: 0x%x", m_CtrlSetup.m_PayLoadSize);
#endif
// Replies are generated inside
ExecuteHCICommandMessage(m_CtrlSetup);
}
@ -339,16 +314,6 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::SendToDevice(u16 _ConnectionHandle
void CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IncDataPacket(u16 _ConnectionHandle)
{
m_PacketCount[_ConnectionHandle & 0xff]++;
// I don't think this makes sense or should be necessary
// m_PacketCount refers to "completed" packets and is not related to some buffer size, yes?
#if 0
if (m_PacketCount[_ConnectionHandle & 0xff] > (unsigned int)m_acl_pkts_num)
{
DEBUG_LOG(WII_IPC_WIIMOTE, "ACL buffer overflow");
m_PacketCount[_ConnectionHandle & 0xff] = m_acl_pkts_num;
}
#endif
}
// Here we send ACL packets to CPU. They will consist of header + data.
@ -1003,7 +968,6 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::SendEventLinkKeyNotification(const
DEBUG_LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x", link_key_info->bdaddr.b[0],
link_key_info->bdaddr.b[1], link_key_info->bdaddr.b[2], link_key_info->bdaddr.b[3],
link_key_info->bdaddr.b[4], link_key_info->bdaddr.b[5]);
LOG_LinkKey(link_key_info->key);
}
AddEventToQueue(Event);
@ -1378,7 +1342,6 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::CommandLinkKeyRep(const u8* input)
DEBUG_LOG(WII_IPC_WIIMOTE, " bd: %02x:%02x:%02x:%02x:%02x:%02x", key_rep->bdaddr.b[0],
key_rep->bdaddr.b[1], key_rep->bdaddr.b[2], key_rep->bdaddr.b[3], key_rep->bdaddr.b[4],
key_rep->bdaddr.b[5]);
LOG_LinkKey(key_rep->key);
hci_link_key_rep_rp reply;
reply.status = 0x00;
@ -1923,13 +1886,3 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::DisplayDisconnectMessage(const int
Core::DisplayMessage(
StringFromFormat("Wii Remote %i disconnected by emulated software", wiimoteNumber), 3000);
}
void CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::LOG_LinkKey(const u8* _pLinkKey)
{
DEBUG_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], _pLinkKey[8], _pLinkKey[9], _pLinkKey[10], _pLinkKey[11],
_pLinkKey[12], _pLinkKey[13], _pLinkKey[14], _pLinkKey[15]);
}

View File

@ -188,9 +188,6 @@ private:
static void DisplayDisconnectMessage(const int wiimoteNumber, const int reason);
// Debugging
void LOG_LinkKey(const u8* _pLinkKey);
#pragma pack(push, 1)
#define CONF_PAD_MAX_REGISTERED 10

View File

@ -6,141 +6,6 @@
#include "Common/Assert.h"
#include "Common/CommonTypes.h"
#if 0
// 0x00 (checked)
u8 ServiceRecordHandle[] = { 0x0a, 0x00, 0x01, 0x00, 0x00 };
// 0x01 (checked)
u8 SrvClassIDList[] = {
0x35, 0x03,
0x19, 0x11, 0x24
};
// 0x04 (checked)
u8 ProtocolDescriptorList[] = {
0x35, 0x0D,
0x35, 0x06,
0x19, 0x01, 0x00, // Element 0
0x09, 0x00, 0x11, // Element 1
0x35, 0x03,
0x19, 0x00, 0x11 // Element 0
};
// 0x5 (checked)
u8 BrowseGroupList[] = {
0x35, 0x03,
0x19, 0x10, 0x02
};
// 0x6 (checked)
u8 LanguageBaseAttributeIDList[] = {
0x35, 0x09,
0x09, 0x65, 0x6e,
0x09, 0x00, 0x6a,
0x09, 0x01, 0x00
};
// 0x09 (checked)
u8 BluetoothProfileDescriptorList[] = {
0x35, 0x08,
0x35, 0x06,
0x19, 0x11, 0x24,
0x09, 0x01, 0x00
};
// 0x0D (checked)
u8 AdditionalProtocolDescriptorLists[] = {
0x35, 0x0F,
0x35, 0x0D,
0x35, 0x06,
0x19, 0x01, 0x00,
0x09, 0x00, 0x13,
0x35, 0x03,
0x19, 0x00, 0x11
};
// 0x100
u8 ServiceName[] = { 0x25, 0x13, 'N','i','n','t','e','n','d','o',' ','R','V','L','-','C','N','T','-','0','1' };
// 0x101
u8 ServiceDescription[] = { 0x25, 0x13, 'N','i','n','t','e','n','d','o',' ','R','V','L','-','C','N','T','-','0','1' };
// 0x102
u8 ProviderName [] = { 0x25, 0x8, 'N','i','n','t','e','n','d','o'};
// 0x200
u8 HIDDeviceReleaseNumber[] = { 0x09, 0x01, 0x00 };
// 0x201
u8 HIDParserVersion[] = { 0x09, 0x01, 0x11 };
// 0x202
u8 HIDDeviceSubclass[] = { 0x09, 0x00, 0x04 };
// 0x203
u8 HIDCountryCode[] = { 0x09, 0x00, 0x33 };
// 0x204
u8 HIDVirtualCable[] = { 0x09, 0x00, 0x00 };
// 0x205
u8 HIDReconnectInitiate[] = { 0x09, 0x00, 0x01 };
// 0x206
u8 HIDDescriptorList[] = {
0x35, 0xDF,
0x35, 0xDD,
0x08, 0x22, // Element 0
0x25, 0xD9, // hmm... <- 0x25 is a string but there is Data
// 0xD9 Bytes - Element 1
0x05, 0x01, 0x09, 0x05, 0xa1, 0x01, 0x85, 0x10,
0x15, 0x00, 0x26, 0xff, 0x00, 0x75, 0x08, 0x95,
0x01, 0x06, 0x00, 0xff, 0x09, 0x01, 0x91, 0x00,
0x85, 0x11, 0x95, 0x01, 0x09, 0x01, 0x91, 0x00,
0x85, 0x12, 0x95, 0x02, 0x09, 0x01, 0x91, 0x00,
0x85, 0x13, 0x95, 0x01, 0x09, 0x01, 0x91, 0x00,
0x85, 0x14, 0x95, 0x01, 0x09, 0x01, 0x91, 0x00,
0x85, 0x15, 0x95, 0x01, 0x09, 0x01, 0x91, 0x00,
0x85, 0x16, 0x95, 0x15, 0x09, 0x01, 0x91, 0x00,
0x85, 0x17, 0x95, 0x06, 0x09, 0x01, 0x91, 0x00,
0x85, 0x18, 0x95, 0x15, 0x09, 0x01, 0x91, 0x00,
0x85, 0x19, 0x95, 0x01, 0x09, 0x01, 0x91, 0x00,
0x85, 0x1a, 0x95, 0x01, 0x09, 0x01, 0x91, 0x00,
0x85, 0x20, 0x95, 0x06, 0x09, 0x01, 0x81, 0x00,
0x85, 0x21, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0x85, 0x22, 0x95, 0x04, 0x09, 0x01, 0x81, 0x00,
0x85, 0x30, 0x95, 0x02, 0x09, 0x01, 0x81, 0x00,
0x85, 0x31, 0x95, 0x05, 0x09, 0x01, 0x81, 0x00,
0x85, 0x32, 0x95, 0x0a, 0x09, 0x01, 0x81, 0x00,
0x85, 0x33, 0x95, 0x11, 0x09, 0x01, 0x81, 0x00,
0x85, 0x34, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0x85, 0x35, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0x85, 0x36, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0x85, 0x37, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0x85, 0x3d, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0x85, 0x3e, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0x85, 0x3f, 0x95, 0x15, 0x09, 0x01, 0x81, 0x00,
0xc0 // end tag
};
// 0x207
u8 HIDLANGIDBaseList[] = {
0x35, 0x08,
0x35, 0x06,
0x09, 0x04, 0x09,
0x09, 0x01, 0x00
};
// 0x208
u8 HIDSDPDisable[] = { 0x28, 0x00 };
// 0x209
u8 HIDBatteryPower[] = { 0x28, 0x01 };
// 0x20a
u8 HIDRemoteWake[] = { 0x28, 0x01 };
// 0x20b
u8 HIDUnk_020B[] = { 0x09, 0x01, 0x00 };
// 0x20c
u8 HIDUnk_020C[] = { 0x09, 0x0c, 0x80 };
// 0x20d
u8 HIDUnk_020D[] = { 0x28, 0x00 };
// 0x20e
u8 HIDBootDevice[] = { 0x28, 0x00 };
#endif
static u8 packet1[] = {
0x00, 0x7b, 0x00, 0x76, 0x36, 0x01, 0xcc, 0x09, 0x00, 0x00, 0x0a, 0x00, 0x01, 0x00, 0x00, 0x09,
0x00, 0x01, 0x35, 0x03, 0x19, 0x11, 0x24, 0x09, 0x00, 0x04, 0x35, 0x0d, 0x35, 0x06, 0x19, 0x01,
@ -231,50 +96,3 @@ const u8* GetAttribPacket(u32 serviceHandle, u32 cont, u32& _size)
return nullptr;
}
// XXX keep these?
#if 0
CAttribTable m_AttribTable;
void InitAttribTable()
{
m_AttribTable.push_back(SAttrib(0x00, ServiceRecordHandle, sizeof(ServiceRecordHandle)));
m_AttribTable.push_back(SAttrib(0x01, SrvClassIDList, sizeof(SrvClassIDList)));
m_AttribTable.push_back(SAttrib(0x04, ProtocolDescriptorList, sizeof(ProtocolDescriptorList)));
m_AttribTable.push_back(SAttrib(0x05, BrowseGroupList, sizeof(BrowseGroupList)));
m_AttribTable.push_back(SAttrib(0x06, LanguageBaseAttributeIDList, sizeof(LanguageBaseAttributeIDList)));
m_AttribTable.push_back(SAttrib(0x09, BluetoothProfileDescriptorList, sizeof(BluetoothProfileDescriptorList)));
m_AttribTable.push_back(SAttrib(0x0D, AdditionalProtocolDescriptorLists, sizeof(AdditionalProtocolDescriptorLists)));
m_AttribTable.push_back(SAttrib(0x100, ServiceName, sizeof(ServiceName)));
m_AttribTable.push_back(SAttrib(0x101, ServiceDescription, sizeof(ServiceDescription)));
m_AttribTable.push_back(SAttrib(0x102, ProviderName, sizeof(ProviderName)));
m_AttribTable.push_back(SAttrib(0x200, HIDDeviceReleaseNumber, sizeof(HIDDeviceReleaseNumber)));
m_AttribTable.push_back(SAttrib(0x201, HIDParserVersion, sizeof(HIDParserVersion)));
m_AttribTable.push_back(SAttrib(0x202, HIDDeviceSubclass, sizeof(HIDDeviceSubclass)));
m_AttribTable.push_back(SAttrib(0x203, HIDCountryCode, sizeof(HIDCountryCode)));
m_AttribTable.push_back(SAttrib(0x204, HIDVirtualCable, sizeof(HIDVirtualCable)));
m_AttribTable.push_back(SAttrib(0x205, HIDReconnectInitiate, sizeof(HIDReconnectInitiate)));
m_AttribTable.push_back(SAttrib(0x206, HIDDescriptorList, sizeof(HIDDescriptorList)));
m_AttribTable.push_back(SAttrib(0x207, HIDLANGIDBaseList, sizeof(HIDLANGIDBaseList)));
m_AttribTable.push_back(SAttrib(0x208, HIDSDPDisable, sizeof(HIDSDPDisable)));
m_AttribTable.push_back(SAttrib(0x209, HIDBatteryPower, sizeof(HIDBatteryPower)));
m_AttribTable.push_back(SAttrib(0x20a, HIDRemoteWake, sizeof(HIDRemoteWake)));
m_AttribTable.push_back(SAttrib(0x20b, HIDUnk_020B, sizeof(HIDUnk_020B)));
m_AttribTable.push_back(SAttrib(0x20c, HIDUnk_020C, sizeof(HIDUnk_020C)));
m_AttribTable.push_back(SAttrib(0x20d, HIDUnk_020D, sizeof(HIDUnk_020D)));
m_AttribTable.push_back(SAttrib(0x20e, HIDBootDevice, sizeof(HIDBootDevice)));
}
const CAttribTable& GetAttribTable()
{
if (m_AttribTable.empty())
{
InitAttribTable();
}
return m_AttribTable;
}
#endif

View File

@ -6,23 +6,4 @@
#include "Common/CommonTypes.h"
#if 0
struct SAttrib
{
u16 ID;
u8* pData;
u16 size;
SAttrib(u16 _ID, u8* _Data, u16 _size)
: ID(_ID)
, pData(_Data)
, size(_size)
{ }
};
typedef std::vector<SAttrib> CAttribTable;
const CAttribTable& GetAttribTable();
#endif
const u8* GetAttribPacket(u32 serviceHandle, u32 cont, u32& _size);