Citra: [Feature request] Add Wii U gamepad support

Created on 13 Mar 2018  路  1Comment  路  Source: citra-emu/citra

Hello, I was wondering if it could be possible to use the Wii U gamepad as an input, including its touchscreen, and stream the bottom screen to it. To me it would give a great experience!

There is the libdrc project, not in development anymore and GNU/Linux only; I found this fork but it only adds a commit to fix compilation.

I can try to add its support myself if you can help me with the citra architecture (I don't know where to start); you can find what libdrc needs on this page. Thanks.

enhancement proposal

Most helpful comment

Hello! I'm pretty familiar with libdrc myself, and while its a very technically impressive project, theres a very very limited number of wifi chips that would be able to support it properly. As i recall, in order to sync the screen display, you needed a chip that supported some time synchronization function, and finding one that did was really tough. Been a while since i last messed around with libdrc, but I don't see much point in working on this if you can't even get libdrc running on your machine first. :)

If you do want to proceed, you can make another controller backend in src/input_common/ and make a file drc.cpp or something like that. Essentially, you'll link libdrc to input common, and include it in your files, and implement the InputDevice interfaces and provide a factory to create these devices. When a button is mapped to use your controller backend (drc), then it'll use the factory and pass in the parameters, and your code will need to create the appropriate InputDevices. You can see how we do that for sdl controller input as an example. The gist of it is whenever the core 3ds HID code requests input, it'll call the InputDevice's Get method to get the latest reading from the device and send this data through the emulated system. In your case, you'll forward the call to get the input from drc (PollInput) and then find the button that the inputdevice is configured for and return this to HID.

Sorry if my explaination is lacking. Short on time right now. Hope it helps get you started a bit

>All comments

Hello! I'm pretty familiar with libdrc myself, and while its a very technically impressive project, theres a very very limited number of wifi chips that would be able to support it properly. As i recall, in order to sync the screen display, you needed a chip that supported some time synchronization function, and finding one that did was really tough. Been a while since i last messed around with libdrc, but I don't see much point in working on this if you can't even get libdrc running on your machine first. :)

If you do want to proceed, you can make another controller backend in src/input_common/ and make a file drc.cpp or something like that. Essentially, you'll link libdrc to input common, and include it in your files, and implement the InputDevice interfaces and provide a factory to create these devices. When a button is mapped to use your controller backend (drc), then it'll use the factory and pass in the parameters, and your code will need to create the appropriate InputDevices. You can see how we do that for sdl controller input as an example. The gist of it is whenever the core 3ds HID code requests input, it'll call the InputDevice's Get method to get the latest reading from the device and send this data through the emulated system. In your case, you'll forward the call to get the input from drc (PollInput) and then find the button that the inputdevice is configured for and return this to HID.

Sorry if my explaination is lacking. Short on time right now. Hope it helps get you started a bit

Was this page helpful?
0 / 5 - 0 ratings