Homebrew Official HID to VPAD

Azel

Well-Known Member
Member
Joined
Dec 16, 2014
Messages
632
Trophies
0
Age
41
XP
656
Country
France
Amazing homebrew :o
I hope you can add support for other controllers at some point like the hori fight commander 4 for ps4 :D
 

AdmiralToucan

Well-Known Member
Member
Joined
Feb 22, 2016
Messages
106
Trophies
0
Age
33
XP
144
Country
Canada
I wish I could patch in more controllers. I guess the only one who knows how to update something like this is Maschell himself
 
  • Like
Reactions: Azel

FunThomas

Well-Known Member
Member
Joined
Jan 10, 2016
Messages
652
Trophies
0
XP
2,016
Country
Gambia, The
I wish I could patch in more controllers. I guess the only one who knows how to update something like this is Maschell himself

i think the easiest way is to start loadiine with hid to vpad enabled and the udp logger for loadiine

and when you connect you will get something like (in udp log window):

handle 001f2f33
physical device inst 00000000
vid 06a3
pid 5f0d
interface index 00
sub class 00
protocol 00
max packet in 07
max packet out 08
00000020(3) attached!

you need to make sure its a hid device (that can be done under windows)
and you will get some message when attaching your new device -> write down the pid and vid of the new device
then you only have to add it to the sources :)

in \src\controller_patcher\controller_patcher.h
is an
enum Controller_Patcher_Devices
where you have to add your new device
and the defines for the buttons you have to set for the new controller

and in \src\controller_patcher\controller_patcher.c

you see some sections for each controller:

//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Saitek P2600
//!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VID], 0x06,0xA3);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_PID], 0x5F,0x0D);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_A], 0x05,HID_SP2600_BUTTON_3);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_B], 0x05,HID_SP2600_BUTTON_2);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_X], 0x05,HID_SP2600_BUTTON_4);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_Y], 0x05,HID_SP2600_BUTTON_1);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_DPAD_MODE], CONTROLLER_PATCHER_VALUE_SET,CONTRPDM_Hat);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_DPAD_MASK], CONTROLLER_PATCHER_VALUE_SET,0xF0);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_N], 0x06,HID_SP2600_BUTTON_DPAD_N);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_NE], 0x06,HID_SP2600_BUTTON_DPAD_NE);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_E], 0x06,HID_SP2600_BUTTON_DPAD_E);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_SE], 0x06,HID_SP2600_BUTTON_DPAD_SE);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_S], 0x06,HID_SP2600_BUTTON_DPAD_S);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_SW], 0x06,HID_SP2600_BUTTON_DPAD_SW);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_W], 0x06,HID_SP2600_BUTTON_DPAD_W);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_NW], 0x06,HID_SP2600_BUTTON_DPAD_NW);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_NEUTRAL], 0x06,HID_SP2600_BUTTON_DPAD_NEUTRAL);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_PLUS], 0x06,HID_SP2600_BUTTON_FPS);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_MINUS], 0x06,HID_SP2600_BUTTON_Analog);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_L], 0x05,HID_SP2600_BUTTON_5);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_R], 0x05,HID_SP2600_BUTTON_6);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_ZL], 0x05,HID_SP2600_BUTTON_7);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_ZR], 0x05,HID_SP2600_BUTTON_8);

setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_PAD_COUNT], CONTROLLER_PATCHER_VALUE_SET,HID_SP2600_PAD_COUNT);

setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_L_STICK_X], 0x01,0x80);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_L_STICK_X_MINMAX], 0x00,0xFF);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_L_STICK_Y], 0x02,0x80);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_L_STICK_Y_MINMAX], 0x00,0xFF);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_R_STICK_X], 0x03,0x80);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_R_STICK_X_MINMAX], 0x00,0xFF);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_R_STICK_Y], 0x04,0x80);
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_R_STICK_Y_MINMAX], 0x00,0xFF);


you have to add such a block for the new controller or at least for the first try the lines with the vid and pid for the device

for the other lines the last 2 parameters are only relevant for changes
for example:
setConfigValue((u8*)&config_controller[CONTRPD_SP2600][CONTRPS_VPAD_BUTTON_DPAD_N], 0x06,HID_SP2600_BUTTON_DPAD_N);

0x06 means the sixth byte is taken from the hid readbuffer
and the HID_SP2600_BUTTON_DPAD_N is the define for the button/direction you will set

when you enable the log in
https://github.com/Maschell/control...3b483cfccab36cea39/controller_patcher.c#L1093

you will see the buffer output of your controller with some bytes (i think it were about 8 bytes -> too long ago)

and then you can press a button/ direction on the controller and you see changes in the hid readbuffer -> here you can see the changes for each button and you know what to define

have fun !

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

Do Xbox 360 controllers work?

xbox 360 controllers are no hid devices if i remember so they wont be supported (at least the wireless one with the usb dongle)

connect it to your windows and search for the device if its under HID-Section or not
 
Last edited by FunThomas,

splatu

Member
Newcomer
Joined
Jun 4, 2016
Messages
22
Trophies
0
Age
35
XP
42
Country
Brazil
I planned to add config files. With these config file it will be easily possible to add pads and remap the buttons of the gamepad.
I have no idea when I have actual time to implement it

Whats the model of your mice ? I tested with 4 differente types and only one worked well (not perfectly, sometimes it keeps moving to the side even though im not moving the mice).
 
Last edited by splatu,

Hucet_James

Member
Newcomer
Joined
Jun 6, 2016
Messages
22
Trophies
0
Age
54
XP
326
Country
United States
Hello everyone, first thank you both @Maschell and @dimok for your work on HIDtoVpad and LoadiineGx2.

I would like to report a problem occurring on LoadiineGX2 which I can't find any solution to it. I got 2 wavebirds controllers and a classic GC controller.
I recently tried to use both of them and it worked fine. I decided to update LoadiineGx2 from a build I can't remember to the new one.

It turned out now wavebird controllers are detected but when pressing any buttons nothing happens. More strange is when I plug one Wavebird on port 4, the only button working is analogue left searching online for covers...

Do you have any ideas of what is going on ?

Thank you for your time and help everyone.
 

FunThomas

Well-Known Member
Member
Joined
Jan 10, 2016
Messages
652
Trophies
0
XP
2,016
Country
Gambia, The
I would like to report a problem occurring on LoadiineGX2 which I can't find any solution to it. I got 2 wavebirds controllers and a classic GC controller.
I recently tried to use both of them and it worked fine. I decided to update LoadiineGx2 from a build I can't remember to the new one.

It turned out now wavebird controllers are detected but when pressing any buttons nothing happens. More strange is when I plug one Wavebird on port 4, the only button working is analogue left searching online for covers...

Do you have any ideas of what is going on ?

Thank you for your time and help everyone.

do you have any log from loadiine's udp logger ? that might help to analyse :)
 

Daisy

Well-Known Member
Member
Joined
Aug 17, 2015
Messages
397
Trophies
1
Location
UK
XP
3,303
Country
United Kingdom
I tried using this and I just got a white screen?

Edit: Okay, and now I can't get into the homebrew launcher at all since this happened.

"FSGetMountSource failed."

Fixed it all somehow, I have no idea what's going wrong.
 
Last edited by Daisy,

Jackall4BDN

Haunter of Daydreams and Nightmares
Member
Joined
Nov 8, 2013
Messages
780
Trophies
0
Age
30
Location
Within your Mind
XP
704
Country
Gambia, The
I tried using this and I just got a white screen?

Edit: Okay, and now I can't get into the homebrew launcher at all since this happened.

"FSGetMountSource failed."

Fixed it all somehow, I have no idea what's going wrong.
The WiiUs SD-Slot sucks, if you get that error just make sure you take out the sd, maybe clean the contacts and firmly put it back in, then retry

- Quick and Dirty with TT -
 

Hucet_James

Member
Newcomer
Joined
Jun 6, 2016
Messages
22
Trophies
0
Age
54
XP
326
Country
United States
Here is the log, I read it and no matter what I do with the wavebird, nothing happens. I even tried the fourth port and press analogue left, as said earlier it downloaded all the resources from gamedatabase, shomething loadiine gx2 shouldn't and isn't appearing into the log.

[0] Accepted connection from client 192.168.1.18:2940
[0] SD card mounted !
[0] LogString =>("OSDynLoad_Acquire: coreinit result: 0")
[0] LogString =>("OSDynLoad_Acquire: sysapp.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: coreinit.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: nsysnet.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: coreinit.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: nsyshid.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: vpad.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: vpadbase.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: coreinit.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: nsysnet.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: gx2.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: sysapp.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: vpad.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: vpadbase.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: padscore.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: sndcore2.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: nlibcurl result: 0")
[0] LogString =>("OSDynLoad_Acquire: nn_acp.rpl result: 0")
[0] LogString =>("OSDynLoad_Acquire: nn_aoc.rpl result: 0")
 

FunThomas

Well-Known Member
Member
Joined
Jan 10, 2016
Messages
652
Trophies
0
XP
2,016
Country
Gambia, The
Here is the log, I read it and no matter what I do with the wavebird, nothing happens. I even tried the fourth port and press analogue left, as said earlier it downloaded all the resources from gamedatabase, shomething loadiine gx2 shouldn't and isn't appearing into the log.

i dont know from what your log is but mine looks like

Code:
Loading game list
Initialize video
Video size 1280 x 720
Initialize main font system
Initialize main window
Entering main loop
    handle                  001f7ccb
    physical device inst    00000000
    vid                     06a3
    pid                     5f0d
    interface index         00
    sub class               00
    protocol                00
    max packet in           07
    max packet out          08
00000020(3) attached!
 
Last edited by FunThomas,

Hucet_James

Member
Newcomer
Joined
Jun 6, 2016
Messages
22
Trophies
0
Age
54
XP
326
Country
United States
I used TCP instead of UDP thinking it was two possible solutions. Here is my log, I launched loadiine gx2, wavebird controller is recognised but not working, I press every buttons I can and use the gamepad to select and launch the rom Aria of Sorrow GBA. The game did not launch (that's not the problem) and I turned the WiiU off.

Here is my log:

Loading game list
Initialize video
Video size 1280 x 720
Initialize main font system
Initialize main window
Entering main loop
Found 0 update folders for Castlevania - Aria of Sorrow:
Loaded Games
ID6=;UpdateFolder=<none>;ExtraSaveFile=0;SaveMethod=255,LaunchMethod=255
ID6=AX5D01;UpdateFolder=<none>;ExtraSaveFile=0;SaveMethod=255,LaunchMethod=255
ID6=N64001;UpdateFolder=<none>;ExtraSaveFile=0;SaveMethod=255,LaunchMethod=255
End Loaded Games
Game Setting for: GBACAS

Update Folder: "<none>"
Extra Save: 0
Launch Method: 255
Save Method: 255
--------
Loading game Castlevania - Aria of Sorrow
Aria_of_Sorrow.rpx: loaded into 0x30B388FC, offset: 0x00000000, size: 0x00000000
Loaded RPX file sd:/wiiu/games/Castlevania - Aria of Sorrow [GBACAS]/code/Aria_of_Sorrow.rpx, result 0
gamePathStruct.os_game_path_base: /vol/external01/wiiu/games
gamePathStruct.os_save_path_base: /vol/external01/wiiu/saves
gamePathStruct.game_dir: Castlevania - Aria of Sorrow [GBACAS]
gamePathStruct.update_folder: <none>
gamePathStruct.save_dir_common: c
gamePathStruct.save_dir_user: u
gamePathStruct.extraSave: 0
Getting XML from game
XML Launching Parameters
rpx_name: Aria_of_Sorrow.rpx
version_cos_xml: 18
os_version: 000500101000400A
title_id: 000500101004A200
app_type: 80000000
cmdFlags: 00000000
max_size: 40000000
avail_size: 00000000
codegen_size: 00000000
codegen_core: 00000001
max_codesize: 03000000
overlay_arena: 00000000
sdk_version: 20909
title_version: 00000000
FS log server on 192.168.001.030
Main application stopped
Unmount SD
Release memory
Loadiine peace out...
 

FunThomas

Well-Known Member
Member
Joined
Jan 10, 2016
Messages
652
Trophies
0
XP
2,016
Country
Gambia, The
I used TCP instead of UDP thinking it was two possible solutions.

tcp server is for some other problems :) when you want to log the file usage

in your log i cant see when the the controller is attached

please start loadiine (hid-to-vpad has to be enabled in settings) without controller attached and then attach the controller after loadiine started

you dont need to start a game

but then in your log should be something about the controller like

handle 001f7ccb
physical device inst 00000000
vid 06a3
pid 5f0d
interface index 00
sub class 00
protocol 00
max packet in 07
max packet out 08
00000020(3) attached!
 

Hucet_James

Member
Newcomer
Joined
Jun 6, 2016
Messages
22
Trophies
0
Age
54
XP
326
Country
United States
Thank you for your time. Here is the log step by steps:

I launched, enabled HID-to-Vpad, put the gamecube USB system with no controllers:

Loading game list
Initialize video
Video size 1280 x 720
Initialize main font system
Initialize main window
Entering main loop
handle 001f2e0d
physical device inst 00000000
vid 057e
pid 0337
interface index 00
sub class 00
protocol 00
max packet in 25
max packet out 05
00000001(0) attached!

Testing the wavebird, not working.

Now I remove the USB GC Controllers, reboot loadiine, plug USB with the wavebird and here is another log:

Same log as written upper.

Wavebird is not working but the regular official cable GC controller is working perfectly fine. Which is strange because I assure you wavebird controler was perfectly working before I update loadiine GX2.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @salazarcosplay, I'm good. Thanks.