1. Fixed the dual mode. You should now be able to change between the real and emulated Wiimote at any time, even when the Nunchuck is connected. It also supports third party Wireless Nunchucks that never sends any calibration values. The Nunchuck status should be automatically updated. The Nunchuck stick may get stuck, but that should fix itself if you disconnect and reconnect again. The only important problems seems to be that the real Wiimote fails to answer sometimes so that the Core functions disconnect it.

2. Began looking at how to reconnect the Wiimote after an unwanted HCI disconnect command

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2129 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-07 03:16:41 +00:00
parent 1d0e8ddf84
commit fcdd2a8e17
26 changed files with 466 additions and 259 deletions

View File

@ -370,6 +370,7 @@ void SendReadDataReply(u16 _channelID, void* _Base, u16 _Address, u8 _Size)
// Add header values
pReply->buttons = 0;
pReply->error = 0;
// 0x1 means two bytes, 0xf means 16 bytes
pReply->size = (copySize - 1) & 0xf;
pReply->address = Common::swap16(_Address + dataOffset);
@ -534,7 +535,7 @@ void WmWriteData(u16 _channelID, wm_write_data* wd)
request rs and all its eventual instructions it may include (for example turn off
rumble or something else) and just send the status report. */
// ----------------
void WmRequestStatus(u16 _channelID, wm_request_status* rs)
void WmRequestStatus(u16 _channelID, wm_request_status* rs, int Extension)
{
//PanicAlert("WmRequestStatus");
LOGV(WII_IPC_WIIMOTE, 0, "================================================");
@ -562,11 +563,22 @@ void WmRequestStatus(u16 _channelID, wm_request_status* rs)
0x55 - 0xff: level 4 */
pStatus->battery = 0x5f; // fully charged
// Read config value for this one
if(g_Config.bNunchuckConnected || g_Config.bClassicControllerConnected)
pStatus->extension = 1;
// Check if we have a specific order about the extension status
if (Extension == -1)
{
// Read config value for this one
if(g_Config.bNunchuckConnected || g_Config.bClassicControllerConnected)
pStatus->extension = 1;
else
pStatus->extension = 0;
}
else
pStatus->extension = 0;
{
if(Extension)
pStatus->extension = 1;
else
pStatus->extension = 0;
}
LOGV(WII_IPC_WIIMOTE, 0, " Extension: %x", pStatus->extension);
LOGV(WII_IPC_WIIMOTE, 0, " SendStatusReport()");