Dolphin, the GameCube and Wii emulator - Forums

Full Version: Dolphin 2 or more Wiimotes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

bonkersdeluxe

Hi!

At first dolphin is a great emulator! Thanks!


I will use 2 or more wiimotes with the emulator.
I´ve downloaded the SVN 4560.

I changed the code below.
2 wiimotes were initiliazed. (LED 4 is shining on both wii motes)
I can save the setting for the 2 motes, but it don´t loads the settings again.
When i start a game only one wiimote will assign with a player.
The other wiimote will not assigned. (No LED is shining)

PS. I have only two wiimotes at this moment.
I can test it only with 2 wiimotes.


My code changes


Core\src\CoreParameters.h

...
#include "IniFile.h"
#include <string>

#define MAXPADS 4
#define MAXWIIMOTES 4 //old value 1
struct SCoreStartupParameter...


I changed the MAX_WIIMOTES value from 1 to 4


Plugin_Wiimotes\src\main.h

...#endif
// Definitions and declarations
void DoInitialize();
int GetUpdateRate();
void InterruptDebugging(bool Emu, const void* _pData);
void ReadDebugging(bool Emu, const void* _pData, int Size);
bool IsFocus();
#define MAX_WIIMOTES 4
....

I changed the MAX_WIIMOTES value from 1 to 4

Plugin_Wiimotes\src\config.cpp

...
void Config::Load(bool ChangePad)
{
Loaded = true;

std:Confusedtring temp;
IniFile iniFile;
iniFile.Load(FULL_CONFIG_DIR "Wiimote.ini");

// General
iniFile.Get("Settings", "SidewaysDPad", &bSidewaysDPad, false);
iniFile.Get("Settings", "ExtensionConnected", &iExtensionConnected, EXT_NONE);
iniFile.Get("Settings", "MotionPlusConnected", &bMotionPlusConnected, false);

// Real Wiimote
iniFile.Get("Real", "Connect", &bConnectRealWiimote, true);
iniFile.Get("Real", "Use", &bUseRealWiimote, true);
iniFile.Get("Real", "UpdateStatus", &bUpdateRealWiimote, true);
iniFile.Get("Real", "AccNeutralX", &iAccNeutralX, 0);
iniFile.Get("Real", "AccNeutralY", &iAccNeutralY, 0);
iniFile.Get("Real", "AccNeutralZ", &iAccNeutralZ, 0);
iniFile.Get("Real", "AccNunNeutralX", &iAccNunNeutralX, 0);
iniFile.Get("Real", "AccNunNeutralY", &iAccNunNeutralY, 0);
iniFile.Get("Real", "AccNunNeutralZ", &iAccNunNeutralZ, 0);

for (int i = 0; i < 4; i++) //old value 1
{
// Slot specific settings
char SectionName[32];
sprintf(SectionName, "Wiimote%i", i + 1);
iniFile.Get(SectionName, "NoTriggerFilter", &bNoTriggerFilter, false);
...

I changed the for (int i = 0; i < 1; i++) line to (int i = 0; i < 4; i++)


Plugin_Wiimotes\src\config.cpp

...
void Config::Save(int Slot)
{
IniFile iniFile;
iniFile.Load(FULL_CONFIG_DIR "Wiimote.ini");
iniFile.Set("Settings", "SidewaysDPad", bSidewaysDPad);
iniFile.Set("Settings", "ExtensionConnected", iExtensionConnected);
iniFile.Set("Settings", "MotionPlusConnected", bMotionPlusConnected);

iniFile.Set("Real", "Connect", bConnectRealWiimote);
iniFile.Set("Real", "Use", bUseRealWiimote);
iniFile.Set("Real", "UpdateStatus", bUpdateRealWiimote);
iniFile.Set("Real", "AccNeutralX", iAccNeutralX);
iniFile.Set("Real", "AccNeutralY", iAccNeutralY);
iniFile.Set("Real", "AccNeutralZ", iAccNeutralZ);
iniFile.Set("Real", "AccNunNeutralX", iAccNunNeutralX);
iniFile.Set("Real", "AccNunNeutralY", iAccNunNeutralY);
iniFile.Set("Real", "AccNunNeutralZ", iAccNunNeutralZ);

for (int i = 0; i < 4; i++) //old value 1
{
// Slot specific settings
char SectionName[32];
sprintf(SectionName, "Wiimote%i", i + 1);

iniFile.Set(SectionName, "Enabled", WiiMoteEmu:TongueadMapping[i].enabled);
iniFile.Set(SectionName, "NoTriggerFilter", bNoTriggerFilter);
...
I changed the for (int i = 0; i < 1; i++) line to (int i = 0; i < 4; i++)


With this changes, i will get the tabs Wiimote 1 - 4.
The wii motes are initialized, but it don´t loads the setting for the others players. I can´t found these lines in the sourcecode. I can save the setting. The wiimotes.ini contains the values. Also its saved my settings, but won´t load.

Please can anybody help me?

Thanks!

Bye

Sincerely Bonkersdeluxe
I can't help but just wanted to say thanks for maybe starting the necessary work on getting at least 2 wiimotes working with Dolphin. Hopefully, you and others can work together to achieve this goal. Good luck!!!
i got info from China forum ..
when you change any code (except the set option in Dolphin )
you also need to recompile Dolphin.exe or DolphinIL.exe ..
to pass the verification

sometimes , i copy .dll or plugin from older Dolphin SVN build
,then ... you may boot up the Dolphin , but just do nothing to start any game.

Barca

Perhaps this site will be able you being of help.
http://code.google.com/p/dolphin-emu/iss...ail?id=549
ayuanx Wrote:OK, let me explain a little from the perspective of development.

First of all, multi-wiimote requires a new SYSCONF file which can only be dumped from
a real wii that has multi-wiimote activated on it. (Because this file stores the link
keys.)

So we need someone to dump this and do some reverse engineering if necessary.

We can't go on until this has been done by somebody.

Barca

For the SYSCONF file, at the end of the page (Comment 47) of the link http://code.google.com/p/dolphin-emu/iss...ail?id=549 there is the download of the file. I think that it's what you need........
no , he ( or she ) posted that sysconf because ayuanx requested it to study it

That is a fresh sysconf obtained from a wii , It won't work in dolphin just like that