Hi! I'm trying to solve the issue in this thread:
http://forums.dolphin-emu.org/thread-9145-page-1.html
I've compiled dolphin and wiiuse so I'm ready to start.
In my first tests I've seen the next log:
27:07:121 .\Src\wiimote_real.cpp:203 N[Wiimote]: wiiuse_io_read: unexpected
disconnect. handle: 00000000
So my first objective was to see why the handle turn to 0000000.
I've modified the wiiuse library to test in another way the errors produced, because it turned the handle to 000000 under some situations. Now it doesn't give any error.
To see if my patch is correct, I've put some logs in the ReadData method of the wiimote_real.cpp class, to print the buffer before the wiiuse_io_write and after the wiiuse_io_read.
After close the wiimote plugin window, if I press A button in the remote, it appears in the logs:
10:48:064 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 08 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 00 00 00 00 00 00 00
10:48:074 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 08 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 f8 00 00 00 00 00 00
10:48:154 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 f8 f8 00 00 00 00 00
10:48:159 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 f8 f8 f8 00 00 00 00
If I start a game, it assigns a channel:
11:36:032 Src\main.cpp:325 D[Wiimote]: Wiimote_InterruptChannel
11:36:032 Src\main.cpp:326 D[Wiimote]: Channel ID: 0041
11:36:032 Src\main.cpp:328 D[Wiimote]: Data: a2 17 00 00 17 70 00 01
11:36:033 Src\wiimote_real.cpp:159 D[Wiimote]: ReadData write to wiimote: a2 17 00 00 17 70 00 01
11:36:055 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 21 00 00 f8 17 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 f8 f8 f8 f8 f8 f8
So It seems that it can write and read from the wiimote without problem.
This logs continues without problem with more info of the actions I made in the Wiimote, but when I arrives to the fist screen of any game (push A button, or A+B buttons), the info seems that not arrives to the core. In my logs appears the A button pressed:
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:913 I[Wiimote]: ====================
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:914 I[Wiimote]: Callback_WiimoteInterruptChannel: (Wiimote: #0)
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:915 D[Wiimote]: Data: a1 30 00 08 90 00 20 80 7d 83 02 99 94 98 09 40 e5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:916 D[Wiimote]: Channel: 65
but nothing happens in the game.
I don't know how to continue. I'm wrong or the last log is a A pressed button? Where must I look at to see what happens with this info?
Do you have more info in this issue http://code.google.com/p/dolphin-emu/iss...&start=100 but some of the posts writes in this issue for me are wrong.
Thanks to all!
http://forums.dolphin-emu.org/thread-9145-page-1.html
I've compiled dolphin and wiiuse so I'm ready to start.
In my first tests I've seen the next log:
27:07:121 .\Src\wiimote_real.cpp:203 N[Wiimote]: wiiuse_io_read: unexpected
disconnect. handle: 00000000
So my first objective was to see why the handle turn to 0000000.
I've modified the wiiuse library to test in another way the errors produced, because it turned the handle to 000000 under some situations. Now it doesn't give any error.
To see if my patch is correct, I've put some logs in the ReadData method of the wiimote_real.cpp class, to print the buffer before the wiiuse_io_write and after the wiiuse_io_read.
After close the wiimote plugin window, if I press A button in the remote, it appears in the logs:
10:48:064 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 08 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 00 00 00 00 00 00 00
10:48:074 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 08 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 f8 00 00 00 00 00 00
10:48:154 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 f8 f8 00 00 00 00 00
10:48:159 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 30 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 90 24 fd 02 80 f8 f8 f8 f8 00 00 00 00
If I start a game, it assigns a channel:
11:36:032 Src\main.cpp:325 D[Wiimote]: Wiimote_InterruptChannel
11:36:032 Src\main.cpp:326 D[Wiimote]: Channel ID: 0041
11:36:032 Src\main.cpp:328 D[Wiimote]: Data: a2 17 00 00 17 70 00 01
11:36:033 Src\wiimote_real.cpp:159 D[Wiimote]: ReadData write to wiimote: a2 17 00 00 17 70 00 01
11:36:055 Src\wiimote_real.cpp:180 D[Wiimote]: ReadData read from wiimote: a1 21 00 00 f8 17 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 f8 f8 f8 f8 f8 f8
So It seems that it can write and read from the wiimote without problem.
This logs continues without problem with more info of the actions I made in the Wiimote, but when I arrives to the fist screen of any game (push A button, or A+B buttons), the info seems that not arrives to the core. In my logs appears the A button pressed:
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:913 I[Wiimote]: ====================
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:914 I[Wiimote]: Callback_WiimoteInterruptChannel: (Wiimote: #0)
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:915 D[Wiimote]: Data: a1 30 00 08 90 00 20 80 7d 83 02 99 94 98 09 40 e5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
25:12:836 Src\IPC_HLE\WII_IPC_HLE_WiiMote.cpp:916 D[Wiimote]: Channel: 65
but nothing happens in the game.
I don't know how to continue. I'm wrong or the last log is a A pressed button? Where must I look at to see what happens with this info?
Do you have more info in this issue http://code.google.com/p/dolphin-emu/iss...&start=100 but some of the posts writes in this issue for me are wrong.
Thanks to all!