Hacking How to use drc-sim?

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Basically, DRC-Sim is a DRC (Wii U Gamepad) Simulator.

It let you use your PC instead of your real gamepad.

You can't use this on Windows.
Only Linux, because you need to patch the kernel (or something like that).



Python 3.4 source code: https://github.com/aboood40091/drc-sim/
 
Last edited by AboodXD,

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Guys?

Update:
I have managed to run it but then I get this error:
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 43, in <module>
    MSG_S = udp_service(LOCAL_IP, PORT_MSG)
  File "drc-sim.py", line 31, in udp_service
    sock.bind((ip, port + service_addend(ip)))
OSError: [WinError 10049] The requested address is not valid in its context
 
Last edited by AboodXD,

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Is 192.168.1.11 actually your computer's local IP address?
What I know that Usendmii shows the address 192.168.1.13....
New error:
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 44, in <module>
    VID_S = udp_service(LOCAL_IP, PORT_VID)
  File "drc-sim.py", line 31, in udp_service
    sock.bind(('192.168.1.13', 80))
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
 

bobmcjr

Well-Known Member
Member
Joined
Apr 26, 2013
Messages
1,156
Trophies
1
XP
3,214
Country
United States
What I know that Usendmii shows the address 192.168.1.13....
New error:
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 44, in <module>
    VID_S = udp_service(LOCAL_IP, PORT_VID)
  File "drc-sim.py", line 31, in udp_service
    sock.bind(('192.168.1.13', 80))
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
Where did the sock.bind(('192.168.1.13', 80)) come from? PORT_VID isn't 80.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Where did the sock.bind(('192.168.1.13', 80)) come from? PORT_VID isn't 80.
I saw this IP and port in Usendmii, I said to myself: "Maybe if I used those, it might work!", but then...
oh by the way:
Code:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 
Last edited by AboodXD,

bobmcjr

Well-Known Member
Member
Joined
Apr 26, 2013
Messages
1,156
Trophies
1
XP
3,214
Country
United States
Reset the ports to their original values. Open command prompt and type ipconfig, and replace 192.168.1.13 with your IPv4 address.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Reset the ports to their original values. Open command prompt and type ipconfig, and replace 192.168.1.13 with your IPv4 address.
192.168.1.13 IS already the IPv4 address!?!? lol
The ports original value was: port + service_addend(ip)

--------------------- MERGED ---------------------------

New error:
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 378, in <module>
    VID_S : ServiceVSTRM(),
  File "drc-sim.py", line 170, in __init__
    pygame.display.get_surface().get_size())
TypeError: __init__() missing 2 required positional arguments: 'out_x' and 'out_y'
 

bobmcjr

Well-Known Member
Member
Joined
Apr 26, 2013
Messages
1,156
Trophies
1
XP
3,214
Country
United States
Not sure what the issue is there. For some reason python is treating (854,480) and get_size() as single arguments. I don't use python normally so I have no idea.
 

Crewman

Active Member
Newcomer
Joined
May 9, 2013
Messages
42
Trophies
0
Age
44
XP
142
Country
Gambia, The
I have looked into this code some time ago.

My conclution is that this code does not handle the pairing between Wii U and PC.

You have to do pairing with a modified wpa_supplicant in linux. But I don't know how.

You can find a tutorial for pairing between PC and Gamepad in the documentation of libdrc.
 

Kinnay

Active Member
Newcomer
Joined
Mar 20, 2015
Messages
29
Trophies
0
Age
24
XP
134
Country
Netherlands
Eh, did you modify H264Decoder.py?

The line that's wrong is different on the bitbucket.

On the bitbucket it's: def __init__(s, (in_x, in_y), (out_x, out_y)):
But in your code it's def __init__(s, in_x, in_y, out_x, out_y):

Change it back to the original.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Eh, did you modify H264Decoder.py?

The line that's wrong is different on the bitbucket.

On the bitbucket it's: def __init__(s, (in_x, in_y), (out_x, out_y)):
But in your code it's def __init__(s, in_x, in_y, out_x, out_y):

Change it back to the original.
*coughs*
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 13, in <module>
  from H264Decoder import H264Decoder
  File "H264Decoder.py", line 86
  def __init__(s, (in_x, in_y), (out_x, out_y)):
                  ^
SyntaxError: invalid syntax
*coughs*
I have looked into this code some time ago.

My conclution is that this code does not handle the pairing between Wii U and PC.

You have to do pairing with a modified wpa_supplicant in Linux.
No Windows?
You can find a tutorial for pairing between PC and Gamepad in the documentation of libdrc.
OK..?! How am I going to find that?

Update:
I don't get that(out_x, out_y) error anymore, what I did was to change:
Code:
pygame.display.get_surface().get_size())
to
Code:
pygame.display.get_surface().get_size(), None, None)
Didn't expect that to work but it did. :P
But now I have to download Visual Studio since Python needs it. :(
Note: I tried MinGW, but it didn't work...
 
Last edited by AboodXD,

Kinnay

Active Member
Newcomer
Joined
Mar 20, 2015
Messages
29
Trophies
0
Age
24
XP
134
Country
Netherlands
*coughs*
Code:
Traceback (most recent call last):
  File "drc-sim.py", line 13, in <module>
  from H264Decoder import H264Decoder
  File "H264Decoder.py", line 86
  def __init__(s, (in_x, in_y), (out_x, out_y)):
                  ^
SyntaxError: invalid syntax
*coughs*
Run it on Python 2 instead of Python 3. If you're randomly changing things without knowing what you're doing you're most likely just going to get more errors or unintended behavior, even if it doesn't seem like that at first.
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
Run it on Python 2 instead of Python 3. If you're randomly changing things without knowing what you're doing you're most likely just going to get more errors or unintended behavior, even if it doesn't seem like that at first.
OK.

Update:
I've downloaded Visual Studio 2010 Express(the version that it's needed) on my Laptop(Windows 10) and the installation failed...
I downloaded and installed Visual Studio 2013 Express instead, then I used "SET VS100COMNTOOLS=%VS120COMNTOOLS%" command line but Python still says I need Visual Studio 2010... I found this method in Stackoverflow and I've followed it very carefully but it's not working.. :(
 

fiveighteen

Distractible Dabbler
Member
Joined
Jun 30, 2008
Messages
1,768
Trophies
2
XP
1,930
Country
United States
https://github.com/aboood40091/drc-sim/ said:
©2013 Mema Haxx, ©2015 AboodXD. This tool was made by Mema Haxx, it's used to stream the Wii U gamepad signal from the Wii U console to the PC, so you can use your PC as a "game controller" instead of the Wii U gamepad. It was modified by AboodXD to work with Python 3.4. This is really useful, if your Wii U gamepad is broken, you can use your PC instead.
But... you don't have it working? :huh:
 

fiveighteen

Distractible Dabbler
Member
Joined
Jun 30, 2008
Messages
1,768
Trophies
2
XP
1,930
Country
United States
Well, the only error I have is just not having Visual Studio 2010, if I had it, I'm pretty sure it would have worked.:yayu:
Almost(if not all) all errors listed here are caused by my computer settings... and IP address.
I'm not super familiar with Python to know the differences between things working on 2.x and 3.x, but what did you change from Mema Hexx's version to get it to "probably work" on 3.4?

The only differences I see are:
-changed "import construct" to "from construct import *"
-removed the parenthesis from print statements
-changed "def resize_output(s, (x, y)):" to "def resize_output(s, x, y):" (which as Kinnay stated about your change in H264Decoder.py, that's probably going to cause issues)

Are these things the necessary components to get things from 2.x to work on 3.4?
 

AboodXD

I hack NSMB games, and other shiz.
OP
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
what did you change from Mema Hexx's version to get it to "probably work" on 3.4?

The only differences I see are:
-changed "import construct" to "from construct import *"
That thing.... I don't know why did I put it there...
-removed the parenthesis from print statements
This is so important, so you wont get a SyntaxError.
-changed "def resize_output(s, (x, y)):" to "def resize_output(s, x, y):" (which as Kinnay stated about your change in H264Decoder.py, that's probably going to cause issues)
I don't know how to deal with this, but I'm trying to figure out how to make it work in Python 3.4.
Are these things the necessary components to get things from 2.x to work on 3.4?
Yes, we don't need to change anything else, except for LOCAL_IP.
 

Kinnay

Active Member
Newcomer
Joined
Mar 20, 2015
Messages
29
Trophies
0
Age
24
XP
134
Country
Netherlands
It's fine to remove the parentheses, but you can't just pass None as arguments. One possible solution would be to use the * operator to pass x and y as separate arguments.
 

elgruntox

Member
Newcomer
Joined
Jun 6, 2015
Messages
6
Trophies
0
Age
34
XP
59
Country
United States

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=4N-3vv4kzdk