Hacking GamePad to PC Controller [RELEASE/TUTORIAL]

  • Thread starter Thread starter vashgs
  • Start date Start date
  • Views Views 96,629
  • Replies Replies 134
  • Likes Likes 10
The only thing I can think might be your problem is that you're not using your local ip (from ipconfig). I'm not really sure, keep me posted, though!

The download files have been updated to a newer version which supports DirectInput. This means games (and emulators) relying on DirectInput scancodes rather than virtual keys can now be used with your GamePad.


Still having the same issues as last night, everything connects properly but none of the keys I set in the pc.html are responding to the gamepad button presses. I'm definitely using my local ip (which I get from ipconfig each time). The updated files are still doing the same.



This is what is displayed on any button press from the gamepad in the cmd window:
Code:
C:\xampp\htdocs\wiiu>node server.js
3xX9EYYjxY_pASrhD8Fz connected.
[TypeError: Property 'updateButtons' of object #<Object> is not a function]
TypeError: Property 'updateButtons' of object #<Object> is not a function
    at everyone.now.updateHold (C:\xampp\htdocs\wiiu\server.js:17:15)
    at Socket.rfcHandler (C:\xampp\htdocs\wiiu\node_modules\now\lib\user.js:111:
19)
    at Socket.EventEmitter.emit [as $emit] (events.js:96:17)
    at SocketNamespace.handlePacket (C:\xampp\htdocs\wiiu\node_modules\now\node_
modules\socket.io\lib\namespace.js:335:22)
    at Manager.onClientMessage (C:\xampp\htdocs\wiiu\node_modules\now\node_modul
es\socket.io\lib\manager.js:488:38)
    at XHRPolling.Transport.onMessage (C:\xampp\htdocs\wiiu\node_modules\now\nod
e_modules\socket.io\lib\transport.js:387:20)
    at XHRPolling.HTTPTransport.onData (C:\xampp\htdocs\wiiu\node_modules\now\no
de_modules\socket.io\lib\transports\http.js:99:10)
    at IncomingMessage.HTTPTransport.handleRequest.req.on.buffer (C:\xampp\htdoc
s\wiiu\node_modules\now\node_modules\socket.io\lib\transports\http.js:69:12)
    at IncomingMessage.EventEmitter.emit (events.js:93:17)
    at IncomingMessage._emitEnd (http.js:366:10)
[TypeError: Property 'updateButtons' of object #<Object> is not a function]
TypeError: Property 'updateButtons' of object #<Object> is not a function
    at everyone.now.updateHold (C:\xampp\htdocs\wiiu\server.js:17:15)
    at Socket.rfcHandler (C:\xampp\htdocs\wiiu\node_modules\now\lib\user.js:111:
19)
    at Socket.EventEmitter.emit [as $emit] (events.js:96:17)
    at SocketNamespace.handlePacket (C:\xampp\htdocs\wiiu\node_modules\now\node_
modules\socket.io\lib\namespace.js:335:22)
    at Manager.onClientMessage (C:\xampp\htdocs\wiiu\node_modules\now\node_modul
es\socket.io\lib\manager.js:488:38)
    at XHRPolling.Transport.onMessage (C:\xampp\htdocs\wiiu\node_modules\now\nod
e_modules\socket.io\lib\transport.js:387:20)
    at XHRPolling.HTTPTransport.onData (C:\xampp\htdocs\wiiu\node_modules\now\no
de_modules\socket.io\lib\transports\http.js:99:10)
    at IncomingMessage.HTTPTransport.handleRequest.req.on.buffer (C:\xampp\htdoc
s\wiiu\node_modules\now\node_modules\socket.io\lib\transports\http.js:69:12)
    at IncomingMessage.EventEmitter.emit (events.js:93:17)
    at IncomingMessage._emitEnd (http.js:366:10)
 
Your log shows that only one end is connecting. You start the server, then connect from the GamePad side and PC side.
 
I'm now tinkering with some keyboard mouse emus, so I can possible play a shooter with the gamepad. :yay:
 
I'm now tinkering with some keyboard mouse emus, so I can possible play a shooter with the gamepad. :yay:

If you sit tight for a while, I'm adding in the ability to bind either stick to the mouse. Should be up tonight sometime.
 
  • Like
Reactions: Devin
Your log shows that only one end is connecting. You start the server, then connect from the GamePad side and PC side.

That's exactly what I'm doing, I'm still getting the same error log no matter what I do. My gamepad doesn't seem to want to interact with the pc side.
 
Was thinking about how awesome it would be to save preset control schemes. Such as if I wanted to save one for Super Meat boy, one for Pokemon, etc. I know you probably have a high to do list, but it that possible?
 
That's exactly what I'm doing, I'm still getting the same error log no matter what I do. My gamepad doesn't seem to want to interact with the pc side.

Well, to start, if it doesn't say that two ends have connected in your server-end, you can safely assume that both ends have not connected properly. There is a problem with one end, most likely the PC end. Try changing localhost in the pc.html file to your local ip address instead.
 
Was thinking about how awesome it would be to save preset control schemes. Such as if I wanted to save one for Super Meat boy, one for Pokemon, etc. I know you probably have a high to do list, but it that possible?

It's certainly on the list of features to add in.
 
I've been searching a bit for something that can be used for the remote desktop but, of course, existing solutions wouldn't have the gamepad button detection that this has and aren't that customizable to be able to add it.

Is it possible to embed the webpage generated by an existing solution like ThinVNC into the web page that this generates, even if it is in a frame ... or on a different port, such that we can have both the benefits of this AND an existing web remote desktop program?
 
I've been searching a bit for something that can be used for the remote desktop but, of course, existing solutions wouldn't have the gamepad button detection that this has and aren't that customizable to be able to add it.

Is it possible to embed the webpage generated by an existing solution like ThinVNC into the web page that this generates, even if it is in a frame ... or on a different port, such that we can have both the benefits of this AND an existing web remote desktop program?

I was actually implementing my own solution for streaming content back to the GamePad. It is a work in progress :)
 
After tons of tinkering I got it to work. Now I can play Pokemon Emerald without using my keyboard. If you're somehow about to get video/audio from the computers to the gamepad I will love you forever. Thanks a bunch for this.

P.S. If you need any testing of more things let me know. :tpi:

Would this be possible to use with Project64? D:
 
This is cool , i know its a WIP , but it would be nice if the pc.html was laid out like the Pad , i was going to mess with this idea only wasnt sure if vashgs had this idea already and may implement it , using the screen of the pad to contain any info needed...

Why cant the Y button be used btw ?
 
I couldn't get it to work on my Windows 8 (dev. preview)

The server is running fine, I can also connect to the server with the wiiu gamepad, but the games just don't pick the buttons that I've assigned. (what is "Direct input"?)
:/
How can I find out what is wrong? (I've disabled the firewall aswell)
 
I couldn't get it to work on my Windows 8 (dev. preview)

The server is running fine, I can also connect to the server with the wiiu gamepad, but the games just don't pick the buttons that I've assigned. (what is "Direct input"?)
:/
How can I find out what is wrong? (I've disabled the firewall aswell)


I'm having the same problem. Aftering spending an hour or so just figuring out how to establish the correct http port scheme for apache and this app..It appeared everything was fine on the PC (capturing hotkeys) and the server (Gamepad showing number codes for button presses), but when I tried to test it out with say Dolphin or Steam, or just to move the cursor around in notepad...nothing happened. So if there is any enlightenment out there...because I'm feeling a bit 'tarded.
 
If your seeing the numbers on the wiiu screen you would assume your connection is fine , you did edit the pc.html to reflect your local IP ?
Yes, I see the numbers on my gamepad.
Edit pc.html?

What do I have to edit?
http://localhost:8080/nowjs/now.js just works fine if I enter it on my browser....
 
To set mine up, I had to set Apache to 8082 because it was the first open port available on this machine for some reason. To do so I had to modify the httpd.conf file to listen on 8082 (you don't have to do this if port 80 is open on your PC - mine isn't for some reason).

Code:
#Listen 0.0.0.0:80
#Listen [::]:80
#Listen 80
Listen 8082

I also added some VirtualHost specification above the ServerAdmin bit:
Code:
<VirtualHost 192.168.1.15:8082>
</VirtualHost>

Also, port 443 was being used, so I had to change httpd-ssl.conf by commenting out the Listen 443 line:

Code:
C:\xampp\apache\conf\extra\httpd-ssl.conf
 
#Listen 0.0.0.0:443
#Listen [::]:443
#Listen 443

This allowed apache to successfully start in the XAMPP control panel.

If you want to use a browser on a different PC other than the one the server.js is running on, then you must change PC.html from localhost/nowjs/now.js to serverip:8080/nowjs/now.js

Code:
    <script src="http://192.168.1.15:8080/nowjs/now.js"></script>

That's what I did. The controller can control nothing I've tested - but at least the client server situation is functioning properly. This isn't very noob friendly..so maybe these details might help someone...*shrugs*
 

Site & Scene News

Popular threads in this forum