• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Controllers v
« Previous 1 … 228 229 230 231 232 … 322 Next »

Possible solution for 3rd party Wiimote disconnections?
View New Posts | View Today's Posts

Pages (2): 1 2 Next »
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Possible solution for 3rd party Wiimote disconnections?
12-30-2012, 12:20 PM (This post was last modified: 01-02-2013, 12:17 AM by DaveyJC.)
#1
DaveyJC Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: Dec 2012
Hello all,

I'm new here though i've been using Dolphin for a long time.

I have a 3rd party Wiimote I bought from DX for my sister last year that wasn't
working, so I've downloaded Dolphin code and made some little
modification.

I would like anyone whose Wiimote is not working/disconnecting to try this build of mine of 3.5-108 x64 (just the .exe) --> http://depositfiles.com/files/bsacfjsbv

Tell me if it works for your previously disconnecting wiimotes! My lil sis' wiimote now works!

Thank you! Smile
Find
Reply
12-30-2012, 03:17 PM (This post was last modified: 12-30-2012, 03:21 PM by pauldacheez.)
#2
pauldacheez Offline
hot take: fascism is bad
*******
Posts: 1,527
Threads: 1
Joined: Apr 2012
Put up a .patch or .diff so we can look at what exactly you did to try to fix it, would you? (Distributing a modified binary without providing source violates the GPL anyway, if you needed more incentive.)
<@skid_au> fishing resort is still broken: http://i.imgur.com/dvPiQKg.png
<@neobrain> dafuq
<+JMC47> no dude, you're just holding the postcard upside down
----------------------------------------
<@Lioncash> pauldachz in charge of shitposting :^)
Website Find
Reply
12-31-2012, 02:37 PM (This post was last modified: 12-31-2012, 02:38 PM by DaveyJC.)
#3
DaveyJC Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: Dec 2012
I simply lowered the time the real Wiimote thread sleeps from 2ms to 1ms when m_audio_reports FifoQueue is empty, which seems to be most of the time.
This change is done in WiimoteReal.cpp, function Wiimote::ThreadFunc().

This fixes a no-brand-Wiimote bough in Dealextreme last year that was working correctly with GlovePie but not with Dolphin (vibrated but disconnected right away 99% of the times), so I thought it should be related to Dolphin's code. Another wiimote I have, also bought in DX but branded "Nintendo", worked perfectly with Dolphin.

I infer by this chage in code that this 3rd party Wiimote has to be read/written at least once each millisecond not to get disconnected. I've tried this change with Win7 MS stack & Toshiba 8 bluetooth stack.
As performance impact seems to be minimal (same FPS or maybe 1fps lower) on my machine, I think this change should be pushed to master, cause it probably will help with many 3rd party Wiimote connections/disconnections.

Should I do a push? Never did one :-)

diff --git a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
index 204a1fc..3c1d0f8 100644
--- a/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
+++ b/Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
@@ -323,7 +323,8 @@ void Wiimote::ThreadFunc()
{
if (m_audio_reports.Size() && !read)
Read();
- Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 2);
+ //Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 2);
+ Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 1);
read = false;
}
#endif
Find
Reply
12-31-2012, 04:32 PM
#4
pauldacheez Offline
hot take: fascism is bad
*******
Posts: 1,527
Threads: 1
Joined: Apr 2012
You can't push this into master yourself if you don't have commit access, of course. But a dev who knows somethin' about Wii Remotes might come by, look at the change and consider merging it in (crediting you, of course).

The change certainly looks like it'll help, but it may not be that 2 ms was too long an interval - my crackpot theory is that misbehaving remotes expect audio data every 5 ms (since that's the interval at which the DSP receives audio data from the CPU), and if the thread only wakes up every 2 ms, it was waking up at 4 and 6 ms but not at 5 ms, which third-party remotes don't enjoy. Feel free to test this out, of course, since I'm likely incorrect.
<@skid_au> fishing resort is still broken: http://i.imgur.com/dvPiQKg.png
<@neobrain> dafuq
<+JMC47> no dude, you're just holding the postcard upside down
----------------------------------------
<@Lioncash> pauldachz in charge of shitposting :^)
Website Find
Reply
01-02-2013, 10:08 AM (This post was last modified: 01-02-2013, 10:10 AM by DaveyJC.)
#5
DaveyJC Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: Dec 2012
My tests with this 3rd party wiimote of mine (fps on NSMBW intro with all 4 characters running, on a Phenom II@3.8/4G/5770/DX11):

Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 0); -> works (138 fps)
Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 1); -> works (144-145 fps)
Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 2); -> x (146-147 fps)
Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 3); -> x
Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 4); -> x
Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 5); -> x
Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 6); -> x
Common::SleepCurrentThread(m_audio_reports.Size() ? 5 : 10); -> x

I would be glad to see this change included in Dolphin code.
Find
Reply
01-02-2013, 10:15 AM
#6
pauldacheez Offline
hot take: fascism is bad
*******
Posts: 1,527
Threads: 1
Joined: Apr 2012
Aww, my crackpot theory was wrong...

Oh, well. I'll ask the devs in the IRC to put this fix in.
<@skid_au> fishing resort is still broken: http://i.imgur.com/dvPiQKg.png
<@neobrain> dafuq
<+JMC47> no dude, you're just holding the postcard upside down
----------------------------------------
<@Lioncash> pauldachz in charge of shitposting :^)
Website Find
Reply
01-02-2013, 03:32 PM
#7
frainsa Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Aug 2012
Smile 
thank working with 3 wimote unoficial excellent.
Find
Reply
01-03-2013, 07:28 AM
#8
DaveyJC Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: Dec 2012
(01-02-2013, 03:32 PM)frainsa Wrote: thank working with 3 wimote unoficial excellent.
3 wiimotes that weren't previously working, right?

Smile
Find
Reply
01-03-2013, 07:59 AM
#9
frainsa Offline
Junior Member
**
Posts: 8
Threads: 2
Joined: Aug 2012
yes they have´t trouble before, now working fine. only thing is don´t work game metroid prime other m after screem game pad. turn black. another think wirk fine LLE and speaker wimote sound great.
I think good option take this for newers revisions. sorry my english
Find
Reply
01-08-2013, 09:05 AM
#10
DaveyJC Offline
Junior Member
**
Posts: 7
Threads: 1
Joined: Dec 2012
I need to say this 3rd party wiimote wasn't previously working on 2 different pc's with 2 different bluetooth chips. Now this wiimote is working on both.
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma