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