Hacking GamePad to PC Controller [RELEASE/TUTORIAL]

Plunt

Well-Known Member
Member
Joined
Nov 21, 2010
Messages
204
Trophies
1
Age
39
Location
Ontario
XP
1,469
Country
Canada
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)
 

vashgs

Well-Known Member
OP
Member
Joined
Feb 1, 2008
Messages
236
Trophies
0
XP
234
Country
United States
Your log shows that only one end is connecting. You start the server, then connect from the GamePad side and PC side.
 

Plunt

Well-Known Member
Member
Joined
Nov 21, 2010
Messages
204
Trophies
1
Age
39
Location
Ontario
XP
1,469
Country
Canada
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.
 

Devin

"Local Hardware Wizard"
Member
Joined
Aug 17, 2009
Messages
5,955
Trophies
2
Age
29
Location
The Nexus
XP
4,538
Country
United States
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?
 

vashgs

Well-Known Member
OP
Member
Joined
Feb 1, 2008
Messages
236
Trophies
0
XP
234
Country
United States
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.
 

vashgs

Well-Known Member
OP
Member
Joined
Feb 1, 2008
Messages
236
Trophies
0
XP
234
Country
United States
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.
 

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
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?
 

vashgs

Well-Known Member
OP
Member
Joined
Feb 1, 2008
Messages
236
Trophies
0
XP
234
Country
United States
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 :)
 

crazyj3ss

hmm
Member
Joined
Jan 20, 2012
Messages
177
Trophies
0
Location
Ha, you thought I'd tell?
XP
202
Country
United States
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:
 

pwsincd

Garage Flower
Developer
Joined
Dec 4, 2011
Messages
3,686
Trophies
2
Location
Manchester UK
XP
4,462
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 ?
 

HtheB

Well-Known Member
Member
Joined
May 15, 2006
Messages
878
Trophies
1
Age
36
Location
Bize Her Yer Trabzon
Website
www.HtheB.com
XP
3,089
Country
Netherlands
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)
 

nuttyriv3r

Member
Newcomer
Joined
Feb 6, 2013
Messages
5
Trophies
0
Age
44
XP
41
Country
United States
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.
 

HtheB

Well-Known Member
Member
Joined
May 15, 2006
Messages
878
Trophies
1
Age
36
Location
Bize Her Yer Trabzon
Website
www.HtheB.com
XP
3,089
Country
Netherlands
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....
 

nuttyriv3r

Member
Newcomer
Joined
Feb 6, 2013
Messages
5
Trophies
0
Age
44
XP
41
Country
United States
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

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: You could say the same for a couple or so threads that used to be popular, I guess.