How to use drc-sim?

Discussion in 'Wii U - Hacking & Backup Loaders' started by AboodXD, Jun 5, 2015.

  1. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    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, Jun 15, 2016
  2. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    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, Jun 6, 2015
  3. bobmcjr

    bobmcjr GBAtemp Advanced Fan

    Member
    897
    335
    Apr 26, 2013
    United States
    Is 192.168.1.11 actually your computer's local IP address?
     
  4. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    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
     
  5. bobmcjr

    bobmcjr GBAtemp Advanced Fan

    Member
    897
    335
    Apr 26, 2013
    United States
    Where did the sock.bind(('192.168.1.13', 80)) come from? PORT_VID isn't 80.
     
  6. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    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, Jun 5, 2015
  7. bobmcjr

    bobmcjr GBAtemp Advanced Fan

    Member
    897
    335
    Apr 26, 2013
    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.
     
  8. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    192.168.1.13 IS already the IPv4 address!?!? lol
    The ports original value was: port + service_addend(ip)

    — Posts automatically merged - Please don't double post! —

    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'
     
  9. bobmcjr

    bobmcjr GBAtemp Advanced Fan

    Member
    897
    335
    Apr 26, 2013
    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.
     
  10. Crewman

    Crewman Member

    Newcomer
    42
    20
    May 9, 2013
    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.
     
  11. Kinnay

    Kinnay Member

    Newcomer
    29
    58
    Mar 20, 2015
    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.
     
  12. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    *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*
    No Windows?
    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, Jun 6, 2015
  13. Kinnay

    Kinnay Member

    Newcomer
    29
    58
    Mar 20, 2015
    Netherlands
    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.
     
    ztoben, NEP and AboodXD like this.
  14. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    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.. :(
     
  15. fiveighteen

    fiveighteen High Hopes and Low Expectations

    Member
    1,755
    1,266
    Jun 30, 2008
    United States
    But... you don't have it working? :huh:
     
    AboodXD, dojafoja and Kinnay like this.
  16. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    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.
     
  17. fiveighteen

    fiveighteen High Hopes and Low Expectations

    Member
    1,755
    1,266
    Jun 30, 2008
    United States
    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?
     
  18. AboodXD
    OP

    AboodXD I hack NSMB games, and other shiz.

    Member
    2,700
    1,429
    Oct 11, 2014
    United Arab Emirates
    Not under a rock.
    That thing.... I don't know why did I put it there...
    This is so important, so you wont get a SyntaxError.
    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.
    Yes, we don't need to change anything else, except for LOCAL_IP.
     
  19. Kinnay

    Kinnay Member

    Newcomer
    29
    58
    Mar 20, 2015
    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.
     
  20. elgruntox

    elgruntox Newbie

    Newcomer
    6
    6
    Jun 6, 2015
    United States