monokulo / chatpad-super-driver

Automatically exported from code.google.com/p/chatpad-super-driver
0 stars 0 forks source link

Wireless Controller Support #46

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Here is how to make chatpad work on a Xbox360 wireless controller:

All the data below has to be send to endpoint 1 (assuming endpoint 2, 3, 4 for 
controller 2, 3, 4). The chatpad will return data on endpoint 1, the same 
endpoint as the normal controller events.

To turn off the Xbox360 controller send: 00 00 08 C0 00 00 00 00 00 00 00 00

To enable wireless controller chatpad events, send: 00 00 0C 1B 00 00 00 00 00 
00 00 00

You will have to send alternating 1E/1F keep-alive packets (every second or so, 
I guess) to keep the chatpad events flowing: 00 00 0C 1E/1F 00 00 00 00 00 00 
00 00

After doing this, you'll start getting 00 02 00 F0 event packets (the 02 
signifying chatpad data). The same data as the wired chatpad starts appearing 
at offset 0x18.

LED activation works much the same as with the wired controller, but the 
control codes have to be send to endpoint one, the same as the init and 
keep-alive stuff:

00 00 0C  8 00 00 00 00 00 00 00 00 capslock
00 00 0C  9 00 00 00 00 00 00 00 00 square
00 00 0C  a 00 00 00 00 00 00 00 00 circle
00 00 0C  b 00 00 00 00 00 00 00 00 people
00 00 0C  c 00 00 00 00 00 00 00 00 backlight
00 00 0C 11 00 00 00 00 00 00 00 00 capslock
00 00 0C 12 00 00 00 00 00 00 00 00 square
00 00 0C 13 00 00 00 00 00 00 00 00 square and capslock
00 00 0C 14 00 00 00 00 00 00 00 00 circle
00 00 0C 15 00 00 00 00 00 00 00 00 capslock and circle
00 00 0C 16 00 00 00 00 00 00 00 00 circle, square
00 00 0C 17 00 00 00 00 00 00 00 00 circle, square, capslock
00 00 0C 1b 00 00 00 00 00 00 00 00 makes backlight led go on on keypress

Original issue reported on code.google.com by grum...@gmail.com on 1 Jan 2013 at 8:24

GoogleCodeExporter commented 8 years ago
Okay it looks like vJoy was working, but I think this is a libusb device error, 
sorry to bug you but if you have a chance there should be a testlibusb-win.exe 
in the same directory of the install-filer-win.exe program. If you can run that 
and send me the information, that would be incredibly helpful. It might be a 
simple vendor id/product id mismatch from my wireless receiver.

Thanks!

Original comment by ryan...@gmail.com on 24 Mar 2013 at 2:41

GoogleCodeExporter commented 8 years ago
sorry for the delay. i think i made a mistake when installing the filter. The 
filter I installed is fore "Microsoft Wireless Transceiver for Bluetooth". Is 
this the same thing as the wireless gaming adapter? I don't think so because i 
also have a microsoft bluetooth mouse and I think this is what it is seeing. 
which device is the gaming receiver? is it one of the USB composite devices?

also you should know...
i am using a knock-off wireless gaming receiver with the microsoft drivers and 
I am running windows via Parallels on my Macbook pro. I'm thinking I may have 
to boot into windows naturally for all of the USB stuff to work 

Original comment by mrt0...@gmail.com on 24 Mar 2013 at 3:51

GoogleCodeExporter commented 8 years ago
ok, i can confirm that the "Microsoft Wireless Transceiver" is definitely not 
the gaming adapter. this means it's one of the usb composite devices, or usb 
input devices (i think). 

Original comment by mrt0...@gmail.com on 24 Mar 2013 at 3:53

GoogleCodeExporter commented 8 years ago
so i found the Hardware ID for my gaming receiver, and it's not showing up in 
libusb filter installer :(
I'll try booting into windows naturally and see if it makes a difference

Original comment by mrt0...@gmail.com on 24 Mar 2013 at 3:57

GoogleCodeExporter commented 8 years ago
Complex configuration you have :) It is definitely not the Transceiver for 
Bluetooth. It has to be one of the composite device, but I'm not sure what. I 
didn't even realize they make knock-off adapters, but if the vendor id and 
product id match it should work. It doesn't seem like it would, though if the 
windows driver can find it, I think it would need to be. I can always look for 
the knock-off adapters too, if the vendor id and product id are different.

Original comment by ryan...@gmail.com on 24 Mar 2013 at 4:08

GoogleCodeExporter commented 8 years ago
well i can't find the wireless receiver in the install-filter program, but if i 
go to devices, then right click the gaming receiver, on the hardware tab, under 
'type' it says "libusb-win32" so maybe everything is installed correctly. 
here's the testlibusb-win info.. not sure if it's displaying information from a 
correct install because i have no filters installed.

Original comment by mrt0...@gmail.com on 24 Mar 2013 at 4:08

Attachments:

GoogleCodeExporter commented 8 years ago
New build up. The driver now officially supports a very specific knock-off 
receiver :) Try it again and let me know. No guarantees that this fixes it as I 
can't test against your receiver.

Original comment by ryan...@gmail.com on 24 Mar 2013 at 4:28

GoogleCodeExporter commented 8 years ago
haha thanks for the love but your program still won't load. (and I'm not sure 
if I can get the controller to connect to my computer anymore because the 
little Microsoft controller status popup doesn't appear when I press the Xbox 
Guide button)
 I'll send you a bunch of new reading material :)

Original comment by mrt0...@gmail.com on 24 Mar 2013 at 4:43

Attachments:

GoogleCodeExporter commented 8 years ago
Yeah the guide button won't work once libusb is installed as you can only have 
one driver per device, so the MS driver stops. You can always remove libusb 
from that device and reinstall the MS driver. I'm looking through the logs, it 
still seems to be having trouble finding the device, but I'm not sure why yet.

Thanks for all the logs!

Original comment by ryan...@gmail.com on 24 Mar 2013 at 5:16

GoogleCodeExporter commented 8 years ago
Heya Ryan, got a quick question for you, was wondering if/ when you have full 
controller (both sticks) & chatpad support in your driver, will it be usable in 
games via their native gamepad support?
As in, will the gamepad still register as a gamepad? I'm asking because there 
are games that have a very specific control scheme that sometimes can't be 
replicated by Xpadder or others. 
Thanks in advance, and awesome work!

Original comment by MailboxJ...@gmail.com on 24 Mar 2013 at 12:59

GoogleCodeExporter commented 8 years ago
That is how it is supposed to work :) I included vJoy which creates a virtual 
gamepad. You can see it and calibrate it in Windows as a gamepad. I have it 
working in several games, but there are a few that require an XInput device 
that are causing me problems. The other options would be to add yet another 
layer, https://code.google.com/p/x360ce/, which translates the generic vJoy 
gamepad into XInput, though I am checking to see if I can do that in my app, 
the problem is, since this isn't a true driver, I don't have a physical 
controller mapped.

Anyway long story short, yes it should, and it is in most the games I try, but 
I working to improve functionality with XInput games.

Original comment by ryan...@gmail.com on 24 Mar 2013 at 4:32

GoogleCodeExporter commented 8 years ago
I found a threading issue that was causing the program not to close, if you 
have run the program you will have to either restart or kill the running 
instance.

I also added more logging so I can try to pinpoint your issue mrt0. Try running 
it and sending me more logs.

Original comment by ryan...@gmail.com on 24 Mar 2013 at 5:06

GoogleCodeExporter commented 8 years ago
Okay, I made a few minor changes. I also updated the blog to include running 
the libusb inf-wizard.exe which needs to be run to install the driver, which I 
forgot.

Original comment by ryan...@gmail.com on 25 Mar 2013 at 2:31

GoogleCodeExporter commented 8 years ago
Hello, I just bought a chatpad 3 days ago out of the blue not knowing this has 
not been worked out. I've tried the alpha but get an address error 0x000020b... 
is my order of operations wrong or something i have lilusb and vJoy.

Original comment by prestone...@gmail.com on 25 Mar 2013 at 4:57

GoogleCodeExporter commented 8 years ago
prestone, 
do you mind attaching the logs I reference above, it looks like a lot of libusb 
issues.

Original comment by ryan...@gmail.com on 25 Mar 2013 at 5:03

GoogleCodeExporter commented 8 years ago
hey, sorry i haven't sent any more logs, I've been really busy with school and 
uninstalled everything temporarily (had to delete stuff in system32 for libusb 
to go away completely). I'll 'probably' reinstall everything within a week and 
send you some more knock-off logs

Original comment by mrt0...@gmail.com on 26 Mar 2013 at 4:05

GoogleCodeExporter commented 8 years ago
just so you know, the reason I want this project to succeed is so I can use the 
chatpad on my controller while playing Battlefield 3 on PC (I just can't adapt 
to keyboard and mouse haha). So then hopefully your project will let XPadder 
map all of the keys on the chatpad

Original comment by mrt0...@gmail.com on 26 Mar 2013 at 4:07

GoogleCodeExporter commented 8 years ago
This is an incredible accomplishment you have achieved here; I, along with the 
support of many strongly encourage you to continue your development! I foresee 
a hefty donation heading your way. 

Original comment by mrm0rbi...@gmail.com on 30 Mar 2013 at 9:30

GoogleCodeExporter commented 8 years ago
I appreciate it but don't thank me until we have a working driver :) So 
everyone knows I am tearing out vjoy as that has been the source of most of my 
issues and researching an xinput based system. I'm out of town next week so 
don't expect a new build for another couple of weeks. Hopefully this new 
approach will be easier to install and more stable.

Original comment by ryan...@gmail.com on 30 Mar 2013 at 4:06

GoogleCodeExporter commented 8 years ago
Awesome to see updates on this, I'm also hoping for a working chatpad on 
wireless, perfect Steambox controller if so :D

Which "knock off" receiver are you using Ryan? I need to pick up one, I mind as 
well aim for the brand you got ;-)  thank you for the great work

Original comment by sicj...@gmail.com on 31 Mar 2013 at 7:01

GoogleCodeExporter commented 8 years ago
Mine is genuine Microsoft but the code supports pretty much any if them. They 
are all implemented in the same way, but there are a couple different product 
ids for the different versions.

Original comment by ryan...@gmail.com on 31 Mar 2013 at 4:03

GoogleCodeExporter commented 8 years ago
I would just like to add that I would absolutely pay for a fully working 
wireless driver. 

Original comment by ggabrie...@gmail.com on 31 Mar 2013 at 4:29

GoogleCodeExporter commented 8 years ago
Paying for a working driver is something I'd be willing to do as well. Been 
watching the whole chatpad driver ecosystem flesh out for a while and I'm very 
excited for a more reliable, possibly wireless keyboard solution for those of 
us who use a HTPC or Steambox Big Picture type platform.

Original comment by nuubmas...@gmail.com on 2 Apr 2013 at 3:37

GoogleCodeExporter commented 8 years ago
I also would pay some money if it will work :) 

Original comment by jonnyrim...@gmail.com on 2 Apr 2013 at 12:22

GoogleCodeExporter commented 8 years ago
As with the previous guys, I would gladly toss you a few bucks for your hard 
work if I could use my wireless controller + chatpad for MMO gameplay.

(PSO2 in my case)

Original comment by yami...@gmail.com on 3 Apr 2013 at 4:51

GoogleCodeExporter commented 8 years ago
I was able to get my genuine Microsoft wireless controller/chatpad to function 
on Windows 8 x64 thru both methods listed above, (http://brandonw.net/udraw and 
https://github.com/ryandb2/XBOX360WIRELESSCONTROLLERCHATPAD) but the 
functionality definitely still needs work. I will also happily make a donation 
to whoever can develop/support a fully functional driver package, it seems like 
it shouldn't be too much more work at this point. Good job so far dudes, been 
waiting forever for this!

Original comment by zack...@gmail.com on 4 Apr 2013 at 6:02

GoogleCodeExporter commented 8 years ago
Works great!!!  But my thumb sticks and triggers don't work.  Any ideas?  Keep 
up the amazing work, and I too would gladly make a donation to the cause!

Original comment by dorsia...@gmail.com on 21 Apr 2013 at 5:02

GoogleCodeExporter commented 8 years ago
I appreciate the enthusiasm but I'm not sure it works great if you can't get 
the thumb sticks and triggers working ;) Best buy is to run the vJoy config if 
you haven't already and then run the Windows joystick config in control panel. 
It takes some fidgeting but can be made to work.

I'm working on a direct filter driver that will cut out the vJoy and Libusb 
components, but to say progress is slow would be an understatement. In fact it 
may not be possible to apply a standard filter driver, libusb doesn't work as 
it should and the libusb guys think it may never work, but I'm still working on 
it.

Original comment by ryan...@gmail.com on 21 Apr 2013 at 7:16

GoogleCodeExporter commented 8 years ago
100% Ryan!!
Ran the Windows Joystick config and everything is working perfect!  
This is amazing!  Thank-you so much!

Original comment by dorsia...@gmail.com on 21 Apr 2013 at 6:00

GoogleCodeExporter commented 8 years ago
Hello I have a bug. When I start to type, the Controller looses the connection 
after every 4 characters. a second later it reconnects and I can continue 
typing. But it is very annoying. Are you having the same issues? Maybe it's 
because I don't have an original chatpad... I have this one 
http://www.ebay.de/itm/Weis-Tastatur-Messenger-Keyboard-Chatpad-fur-Xbox-360-Wir
ed-Wireless-Controller-/281065714839?pt=PC_Viedeospielzubeh%C3%B6r&hash=item4170
d27497

Original comment by Matthias...@gmail.com on 23 Apr 2013 at 9:59

GoogleCodeExporter commented 8 years ago
@dorsia:  you need to calibrate the gamepad in the Windows system settings. 
Something with input devices.. try to google for "calibrate gamepad windows"

Original comment by matthias...@shopgate.com on 24 Apr 2013 at 3:29

GoogleCodeExporter commented 8 years ago
@ Ryan : the chatpad driver is working beautifully, would you mind adding 
support for the AZERTY chatpad?

Original comment by dries.th...@gmail.com on 6 May 2013 at 5:25

GoogleCodeExporter commented 8 years ago
No problem, I will start on the mapping file tonight, give me a couple of 
nights to work out the functionality and test.

Original comment by ryan...@gmail.com on 6 May 2013 at 5:34

GoogleCodeExporter commented 8 years ago
Thanks, the chatpad works but games stop recognizing the controller as a Xbox 
360 controller so I need to configure the controller manually, can this be 
fixed as well?

Keep up the good work.

Original comment by dries.th...@gmail.com on 6 May 2013 at 7:27

GoogleCodeExporter commented 8 years ago
Nope, there is no realistic fix for that. The Xbox controller uses a format 
that only a few select devices have access to (XInput). The only way to make it 
work is with a filter driver but Microsoft's implementation of their driver 
seems to prevent filter drivers. I also don't have the development tools 
necessary to really hit a full filter driver implementation successfully. Even 
if I did, I have my doubts that it is possible.

Original comment by ryan...@gmail.com on 6 May 2013 at 7:54

GoogleCodeExporter commented 8 years ago
Okay, the simple solution to AZERTY. I attached a new mapping file, just 
replace the file with the one attached. 

I was working on a better solution, but my current build is so broken trying to 
work on my filter driver, I don't dare upload it. So for now this is probably 
the best option :)

Original comment by ryan...@gmail.com on 7 May 2013 at 1:27

Attachments:

GoogleCodeExporter commented 8 years ago
The azerty layout works but the "m" is always a capital "M" no matter if you 
push down shift or not. The layout of the special characters aren't the same as 
on the azerty controller either (seems you didn't change these when converting 
the qwerty layout to a azerty layout).

But some good news, I managed to make the joysticks and triggers work by 
calibrating the vJoy Device in the USB Game Controller menu on Windows 7. All 
is working great now and I can use the controller and the chatpad in games.

Original comment by dries.th...@gmail.com on 7 May 2013 at 8:06

GoogleCodeExporter commented 8 years ago
Sorry about that, it is a typo in the ChatPadMappings file. It can actually be 
fixed pretty easily, just search for <Map>M</Map> in the file and replace it 
with a lower case m. I actually was not able to find a photo of the azerty 
chatpad that I could make out, so I was unable to test changes to the special 
character mappings. You can either make the changes to the mapping file or let 
me know what the correct values are. Unfortunately since I don't have one to 
test with, I can't do much better than that.

Original comment by ryan...@gmail.com on 7 May 2013 at 8:31

GoogleCodeExporter commented 8 years ago
The capital M issue is fixed, thanks. I don't know the corresponding values for 
the special characters, but I found an image of the azerty keyboard : 
http://img801.imageshack.us/img801/131/34944731.png.

The chatpad does work in notepad and I assumed it would work in games like 
Skyrim too but it seems Skyrim doesn't recognize the input of the chatpad just 
yet.

Original comment by dries.th...@gmail.com on 7 May 2013 at 8:40

GoogleCodeExporter commented 8 years ago
There was not an issue with using filter drivers with the wired 360 controller. 
 Are you saying that the wireless driver is not compatible with filter drivers?

Original comment by gtsche...@gmail.com on 11 May 2013 at 2:14

GoogleCodeExporter commented 8 years ago
Im not positive as I'm not very good at driver building but I haven't gotten 
mine or libusb to work as a filter driver. It works and intercepts the packets, 
but the hub driver stops responding as soon as you claim an interface.

So far I have been stuck there which leaves the program without xinput.

Original comment by ryan...@gmail.com on 11 May 2013 at 4:41

GoogleCodeExporter commented 8 years ago
Ran into same problem as Mrt0. The controller won't connect. I will wait for a 
better tutorial on how to install this. So for now I will just uninstall it and 
use original driver. But I cant seem to uninstall libusb as driver. I 
uninstalled it from controll panel. But it just seems to stick. 

Original comment by siggi...@hotmail.com on 11 May 2013 at 8:40

GoogleCodeExporter commented 8 years ago
Sorry for the unessecary post. System restoring fixed it. I would be good to 
know what I did wrong tho. When I was going to install the filter the wireless 
adapter didn't show up. Is the guide up to date? Or doesn't it matter cause 
it's the same? And I wonder if you could make a video guide. It would also mean 
that more people will be able to do this, which equals more support. I have 
wanted this for a really long time. And appreciate you taking your time to make 
this happend. Thanks. Sorry for the spam

Original comment by siggi...@hotmail.com on 11 May 2013 at 10:09

GoogleCodeExporter commented 8 years ago
Hey guys,I am no programmer here so apologizing ahead of time. I have a bad 
wrist and have found this group to be the only legitimate group trying to 
enable a full honest-to-God emulator for a wireless 360 controller with full 
chatpad function. It seems you are only in an alpha phase with no functional 
driver yet. Anyways, I think I am going to donate because I have grown to enjoy 
MMOs very very much despite my pain. If you guys could give a rough timetable 
as to a basic release that would be much appreciated.
Thanks

Original comment by maniacal...@gmail.com on 13 May 2013 at 11:02

GoogleCodeExporter commented 8 years ago
I appreciate your interest and thank you and everyone for the donation offers. 
Honestly I haven't been looking to open up that path as I am not sure I can 
deliver a driver that will meet the needs of the group. I would say you should 
give the alpha release a shot. It isn't perfect but I know several people are 
running it happily. It doesn't work great with all games due to mapping issues 
but it is worth a shot. 

If I get to the point where I think this issue can be solved, then we can talk 
about donations :)

Original comment by ryan...@gmail.com on 14 May 2013 at 12:07

GoogleCodeExporter commented 8 years ago
I look forward to your driver is functional! I received chatpad just today, and 
like everyone else, I was disappointed that it can not run directly on the PC 
for the moment everything I have tried does not work (and I 'hope this is not 
because I got a QWERTY chatpad while I work in AZERTY on my PC (I'm french, so 
it is also possible that I speak evil if this is the case, I'm sorry in advance 
...)

Original comment by Fab...@gmail.com on 18 May 2013 at 2:58

GoogleCodeExporter commented 8 years ago
Not sure why it isn't working at all for you. I haven't dealt with a QWERTY 
chatpad with an AZERTY keyboard. Since I do keyboard commands directly and I 
ignore the keyboard settings and just send the key press event, so I don't 
think it should be an issue.

Can you send me the diagnostic information from libusb? Basically just try to 
install or remove it and send me the vid (vendor id) and pid (product id). It 
could be that you have a different revision of the hardware.

Original comment by ryan...@gmail.com on 18 May 2013 at 4:31

GoogleCodeExporter commented 8 years ago
I'm sorry, but I did not know enough, I unzip libusb-1.0.9.tar.bz2, and I have 
not found that I could make a diagnosis, sorry for my ignorance.

Original comment by Fab...@gmail.com on 19 May 2013 at 3:21

GoogleCodeExporter commented 8 years ago
Hey guys its great your on to this been searching the web for ages can't wait 
till it's all working proper keep it up :-)

Original comment by Cedrix...@gmail.com on 26 May 2013 at 7:30

GoogleCodeExporter commented 8 years ago
Ok I now have the offical chatpad from Microsoft and everything works great.!
Don't buy the chinese fake chatpads... they won't work properly and the buttons 
aren't as good as the original ones.

Original comment by Matthias...@gmail.com on 27 May 2013 at 8:49