From 5c08df00b205639dc829d3490de775fdeccefe9c Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 2 Feb 2013 03:53:00 -0600 Subject: [PATCH] Re-increase max ACL queue size to 100. Better than possibly dropping a packet. Reduced IPC update freq some. Removed some other nonsense. --- Source/Core/Core/Src/HW/SystemTimers.cpp | 2 +- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 8 +++++--- .../Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp | 10 +++------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Source/Core/Core/Src/HW/SystemTimers.cpp b/Source/Core/Core/Src/HW/SystemTimers.cpp index 318b1213af..12f0e286b1 100644 --- a/Source/Core/Core/Src/HW/SystemTimers.cpp +++ b/Source/Core/Core/Src/HW/SystemTimers.cpp @@ -251,7 +251,7 @@ void Init() // Now the 1500 is (was) a pure assumption // We need to figure out the real frequency though - const int freq = 8000; + const int freq = 5000; const int fields = SConfig::GetInstance().m_LocalCoreStartupParameter. bVBeam ? 2 : 1; IPC_HLE_PERIOD = GetTicksPerSecond() / (freq * fields); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 7dca728f0f..7fc6bd073b 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -546,9 +546,12 @@ void EnqReply(u32 _Address, int cycles_in_future) // Takes care of routing ipc <-> ipc HLE void Update() { + if (!WII_IPCInterface::IsReady()) + return; + UpdateDevices(); - if (WII_IPCInterface::IsReady() && request_queue.size()) + if (request_queue.size()) { WII_IPCInterface::GenerateAck(request_queue.front()); INFO_LOG(WII_IPC_HLE, "||-- Acknowledge IPC Request @ 0x%08x", request_queue.front()); @@ -561,8 +564,7 @@ void Update() #endif } - // Avoiding a "Reply" and "Ack" on the same interrupt allowed Rhythm Heaven Fever's "Remix 1" to work. - if (WII_IPCInterface::IsReady() && reply_queue.size()) + if (reply_queue.size()) { WII_IPCInterface::GenerateReply(reply_queue.front()); INFO_LOG(WII_IPC_HLE, "<<-- Reply to IPC Request @ 0x%08x", reply_queue.front()); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp index c28b75bea7..e3c0247b46 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp @@ -509,14 +509,10 @@ u32 CWII_IPC_HLE_Device_usb_oh1_57e_305::Update() void CWII_IPC_HLE_Device_usb_oh1_57e_305::ACLPool::Store(const u8* data, const u16 size, const u16 conn_handle) { - if (m_queue.size() >= 10) + if (m_queue.size() >= 100) { - // Many simultaneous exchanges of ACL packets tend to cause the - // queue to fill up. Typically, this occurs when - // many emulated Wiimotes are requesting connections at once. - // See issue 4608 for more info. - ERROR_LOG(WII_IPC_WIIMOTE, "ACL queue size reached 10 - current packet will be " - "dropped! (Hopefully you never see this.)"); + // Many simultaneous exchanges of ACL packets tend to cause the queue to fill up. + ERROR_LOG(WII_IPC_WIIMOTE, "ACL queue size reached 100 - current packet will be dropped!"); return; }