Wii remote as a gaming controller
#1
I have always used my classic xbox to play snes and nes games through xbmc. Now that things are going to HD We are going to need to find a good control input for the games on our media center PCs. I have had great success using the wii remotes on my ubuntu machines with xwii. I did some digging at the beginning of the year and got it all going and I wrote a how-to. Would any one be interested in making this work seamlessly with xbmc? I think this would be a nice feature but it is going to require some one with a bit more know how than me.

The How-To is here.

and here is all the info

Step 1: download xwii from here.

Step 2: right click on the file click extract here. Copy the file into your home directory. Rename the file to
Code:
xwii
.


Step 3: Open a terminal window and
Code:
sudo apt-get install build-essential libbluetooth-dev libxtst-dev

Step 4: Again in the terminal window:
Code:
sudo apt-get install libsdl1.2-dev

Step 5: In terminal:
Code:
cd xwii

Step 6: In terminal:
Code:
make
If there are any errors you are most likely missing some dependencies. Post them here and we can try to resolve them.

Step 7: Your terminal should still be in the xwii folder. If it isn't
Code:
cd xwii

Step 8: run it. There are several profiles to choose from. I am using the classic controller for this example. You need to have your bluetooth adapter plugged in and the wiimote in front of you. As soon as you hit enter after this command you need to press the 1 & 2 button on the main wii remote to connect it.
Code:
./xwii profiles/classic.xwii

Hopefully that works. put a cursor in a text field you should get a response. You will need to map your buttons to those of the wiimote with what ever emulator you are using, In zsnes you have to go to config>input and then click on a and hit the a button on your classic controller. Up down left right and start should all be set already.

Step 9: Creat a custom launcher so you don't have to use the terminal every time. EDIT: I have had issues with this. I think a bash script will have to be written for this.

until then just use this code to run it in the terminal:
Code:
cd ~/xwii && ./xwii profiles/classic.xwii

thanks to fatalglory and para.
ﻪﻥﻋﺸﻷﻜﻈﭚ
Reply
#2
There is already an native WiiRemote EventClient (for XBMC's EventServer) that works under Linux but feel free to extend that if needed and submit a patch, ...you might also want to chat to Topfs2 as he wrote the code for the that WiiRemote EventClient

Please see the SVN for both C++ and Python examples of EventClients:
http://xbmc.svn.sourceforge.net/viewvc/x...ntClients/
also see:
http://wiki.xbmc.org/?title=EventServer#WiiRemote
http://www.xbmc.org/forum/showthread.php?t=30747

More information about EventClients and the EventServer in XBMC:
http://wiki.xbmc.org/?title=EventServer
http://wiki.xbmc.org/?title=WebServerHTTP-API
http://wiki.xbmc.org/?title=Appendix_D:_...ment_Notes
http://wiki.xbmc.org/?title=HOW-TO_submit_a_patch

Good luck!
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
I dont have my computer here that so I cant try out xwii but from what it seems its converting WiiRemote Signals into keyboard/mouse? if so the current WiiRemote EventClient converts WiiRemote signals into XBMC specific commands which is fully mappable without the need to muck up the keyboard map. Which gives a better experience IMHO

However the current WiiRemote eventclient does not support Classic Controller (the library do but I dont got a classic controller hence I havent coded the support >D )

THe guide is very good though for the people that needs the WiiRemote to work as a mouse outside XBMC aswell (the EventClient will only interact with XBMC and nothing else).

Have I understanded what xwii is correctly?
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply

Logout Mark Read Team Forum Stats Members Help
Wii remote as a gaming controller0