Nixx Posted December 14, 2023 Share Posted December 14, 2023 (edited) It's a project inspired by @Warped Polygon work to make a pre-configured pack for xinput controller (and arcade pads) It will autoconfigure your game inputs according to your xinput controllers. It's something that require a massive amount of work, and i'm not quite sure i can pull it. So i'm testing the water with an early alpha version with very few games to see if people are interested. How to make it work : 1- Run the exe, it will popup the config. . 2- You can now just run something like TeknoparrotAutoXinput.exe "C:\teknoparrot\UserProfiles\Daytona3.xml" and that's it. Easy to add in launchbox. Few notes : - The app will manage the controller setup, not the game settings ! Be sure the game is able to run and configured as xinput. This will maybe change in the future where some options will be set, but for now, i only focus on the controller settings. - The option, to enable Binding to Test, Service1, Service2 needs ViGEm Bus Driver (https://github.com/nefarius/ViGEmBus/releases) because to make it work, i create a virtual 360 controller that i bind to keyboard keys. - The launcher will not mess with your existing config, your xml file in UserProfile will never be altered, it's a new one that's created. - To differentiate between gamepad and arcade stick, i use the Arcade xinput subtype, but some arcade stick just mimic a 360 controller, so i will not be able to determine that's an arcade stick. I will make a command line argument later. - Source are here : https://github.com/nixxou/TeknoparrotAutoXinput Supported game list can be listed here : https://github.com/nixxou/TeknoparrotAutoXinput/tree/main/img TeknoparrotAutoXinput_alpha_v0.09.zip Edited April 10 by Nixx 5 4 Quote Link to comment Share on other sites More sharing options...
rexryan Posted December 15, 2023 Share Posted December 15, 2023 keep going..this is awesome Quote Link to comment Share on other sites More sharing options...
Nixx Posted December 18, 2023 Author Share Posted December 18, 2023 Version v0.02 with more games support TeknoparrotAutoXinput_alpha_v0.02.zip 1 Quote Link to comment Share on other sites More sharing options...
Nixx Posted December 22, 2023 Author Share Posted December 22, 2023 Work in progress in the configuration page. Not tested enough to upload a release, i will do that back from xmas. You can now edit how the app detect if an Xinput device detect if the controller is a gamepad, an arcade stick or a wheel. Like if the arcade stick falsy register as a gamepad, but have (for example), ProductID different from your controller, you can use that to match your ArcadeStick. Add the ability to configure different deadzone for Wheel and Gamepad. Add few extra command line : --passthrough : will ignore everything and launch TP with it's original config --forceslot<xinputsplot>=type (exemple : --forceslot0=arcade ) : will force the xinput slot to be recognise as the type (can be arcade, wheel or gamepad). Slot number start with 0, not 1. I want also to add the possibility to bind a DINPUT wheel as wheel, but i have some work to do to make that happen. Quote Link to comment Share on other sites More sharing options...
Nixx Posted December 22, 2023 Author Share Posted December 22, 2023 Started working on the interface option to bind a DINPUT Wheel instead of an XINPUT Wheel. Still have work to do, for now, i have the form and i'm able to register buttons pressed, but i have now to register them and use them in the main program. Not here for xmas, so not before few days. Quote Link to comment Share on other sites More sharing options...
Nixx Posted December 27, 2023 Author Share Posted December 27, 2023 Ok, time to drop the Alpha v0.03. Like explain earlier, it's mostly about the launcher and the ability to bind Dinput Wheel. TeknoparrotAutoXinput_alpha_v0.03.zip 1 Quote Link to comment Share on other sites More sharing options...
Nixx Posted December 27, 2023 Author Share Posted December 27, 2023 Minor update, added a gamepad option to favor A/B instead of LB/RB for gear Up/Down on racing games. TeknoparrotAutoXinput_alpha_v0.04.zip Quote Link to comment Share on other sites More sharing options...
Nixx Posted December 28, 2023 Author Share Posted December 28, 2023 Few more games, now over 100 games supported. TeknoparrotAutoXinput_alpha_v0.05.zip 1 Quote Link to comment Share on other sites More sharing options...
Nixx Posted January 5 Author Share Posted January 5 (edited) Big game update, now 187 games supported. Except Lightgun games and few games that wont run on my PC, i think i'm done. Now i have to figure out what to do next, i have few ideas of things to do before starting doing the light gun games. One of the thing i have in mind is doing some per-games options with the ability to run ahk code before/after, switch resolution, and auto add/remove files in the TeknoParrot/OpenParrotWin32/OpenParrotx64/ElfLdr2 to have 'per games' extra dll files (like ffb plugin, reshade, some wrapper or stuff like that) I'm using Siden gun and i need to apply border, so having some per game stuff to do that is kinda mandatory for me. TeknoparrotAutoXinput_alpha_v0.06.zip Edited January 5 by Nixx 1 Quote Link to comment Share on other sites More sharing options...
Light Gun Lunatics Posted January 5 Share Posted January 5 could this adapted for other ffb games / emulators e.g. flycast etc.? Quote Link to comment Share on other sites More sharing options...
Nixx Posted January 6 Author Share Posted January 6 5 minutes ago, drady said: could this adapted for other ffb games / emulators e.g. flycast etc.? You mean, modify the ffb ini file to put the device id inside ? Don't know, for now i'm just using it with teknoparrot, only got my wheel recently. But if it's the same ffb plugin, yeah, should be doable. I don't have the time right now, but i will get a look. Quote Link to comment Share on other sites More sharing options...
Sbaby Posted January 6 Share Posted January 6 (edited) @Nixx You are very good, congratulations nice work. I have several xinput controllers, considering that windows often keeps the controller position in memory even if you disconnect it, I often have to disconnect all of them in order to get back to the correct player 1. It would be nice to have a test of the controllers directly in launchbox, that way a person can start teknoparrot safely by choosing the correct controller. There has already been one person who has started to do this, unfortunately it is not yet completed, have a look here if you think it might be an idea to create an un plugin for launchbox https://forums.launchbox-app.com/topic/68276-ctrlr-cyclr-select-any-controller-you-want-from-launchbox/ Windows always assigns an id number to the connected xinput controller, often even if you disconnect the first controller, it doesn't turn the second controller into id number 1, sometimes it does, sometimes it doesn't, so you are forced to disconnect them all and reconnect them, and then start the game. If Launchbox with a plugin would detect the controller ide, that would be great, so that a person could see which player is connected. For example, if I disconnect player 1 and end up with only one xbox360 joypad connected, and windows doesn't assign the correct id1 but keeps the id2, launchbox should also see only one joypad connected but marked as player2, and at this point one can know in advance what to do before starting the game. ................. Now we come to my real problem, if I click on 'Show Xinput Devices Data' it gives me this error : Right now I had two controllers, 1)arcadestick 2) joypad ,,, both are seen as xinput by windows Edited January 6 by Sbaby Quote Link to comment Share on other sites More sharing options...
Nixx Posted January 6 Author Share Posted January 6 (edited) Hi. Thanks for submitting your issue. For the first point, in my app i do not simply take Xinput1 = player1, i use a priority order. If the game have wheel layout, i take wheel as priority, regardless of their xinput number. Then, i take arcade stick as priority (if there is an arcade layout available for the game) And only then gamepad. And for each of them, i take the first available xinput slot. So, if you have two gamepad, one in xinput 1, and one in xinput 2, if you disconnect the gamepad 1, it will use the xinput2 as player 1. If you plug your wheel as xinput 3 and the game have wheel support, it will just use your wheel regardless of the xinput number. I could probably make an option to have some timer on boot to reassign player number (like 5 seconds on start when you press start on the controller you want as P1) but that's not my priority right now. For the second point, that's really annoying. XinputEx.dll is a dll i make from some C++ code to get some extra info about xinput devices, the ProductID and VendorID. It's an undocumented feature of xinput, and i was not skilled enough to implement this directly in C# (if someone read this, and have the skill to do it, i would love to have a POC) It's based on this, i basically just turn it from a console executable to a dll : https://stackoverflow.com/questions/64251320/is-it-possible-to-get-an-xinput-devices-name-product-id-vendor-id-or-some-oth The point of having vendor and product id is to be able to auto detect some controller as arcade stick when they falsely report themself as arcade but still send their own product id / vendor Id. One user told me that his antivirus didn't like my dll and removed it, maybe that's what happen ? Do you still have the dll in your folder ? Is there other people having (or not having) this issue ? Edit : @Sbaby I worked on the issue to integrate the code i did previously in C++ directly inside my C# code, can you try this build, if that works fine, i will push the modification : TeknoparrotAutoXinput_alpha_v0.06b.zip Edited January 6 by Nixx Quote Link to comment Share on other sites More sharing options...
Sbaby Posted January 6 Share Posted January 6 (edited) 2 hours ago, Nixx said: For the first point, in my app i do not simply take Xinput1 = player1, i use a priority order. If the game have wheel layout, i take wheel as priority, regardless of their xinput number. Then, i take arcade stick as priority (if there is an arcade layout available for the game) And only then gamepad. And for each of them, i take the first available xinput slot. So, if you have two gamepad, one in xinput 1, and one in xinput 2, if you disconnect the gamepad 1, it will use the xinput2 as player 1. If you plug your wheel as xinput 3 and the game have wheel support, it will just use your wheel regardless of the xinput number. I could probably make an option to have some timer on boot to reassign player number (like 5 seconds on start when you press start on the controller you want as P1) but that's not my priority right now. Your work on teknoparrot is fantastic that's exactly why i was asking if you would be able, in the future, when you feel like it, to think of a launchbox plugin that could put a display with the controllers connected, the user link i showed you does this job, unfortunately though it doesn't distinguish xinputs and sees them all the same, so if i have a lightgun xinput and a joypad xinput it creates confusion. This is an example from Batocera, you can see in the top left corner the icons of the two controllers, one is the joypad and the other is the lightgun : Similarly, I have noticed that there are applications that correctly detect the controllers despite the fact that they are both xinput, I give you this example, one is arcadestick qanba in xinput mode, while the other is joypad360 : Windows instead detects both as xbox360 : ----------------- 2 hours ago, Nixx said: For the second point, that's really annoying. XinputEx.dll is a dll i make from some C++ code to get some extra info about xinput devices, the ProductID and VendorID. It's an undocumented feature of xinput, and i was not skilled enough to implement this directly in C# (if someone read this, and have the skill to do it, i would love to have a POC) It's based on this, i basically just turn it from a console executable to a dll : https://stackoverflow.com/questions/64251320/is-it-possible-to-get-an-xinput-devices-name-product-id-vendor-id-or-some-oth The point of having vendor and product id is to be able to auto detect some controller as arcade stick when they falsely report themself as arcade but still send their own product id / vendor Id. One user told me that his antivirus didn't like my dll and removed it, maybe that's what happen ? Do you still have the dll in your folder ? Is there other people having (or not having) this issue ? Dll file is intact, I have tried disabling the antivirus but the problem persists. ----------------- 2 hours ago, Nixx said: I worked on the issue to integrate the code i did previously in C++ directly inside my C# code, can you try this build, if that works fine, i will push the modification : TeknoparrotAutoXinput_alpha_v0.06b.zip This version works 😜 i really appreciate this 👍 one is qanba arcade stick in xinput mode, while the second is Ps4 joypad in Ds4windows mode Edited January 6 by Sbaby Quote Link to comment Share on other sites More sharing options...
Nixx Posted January 6 Author Share Posted January 6 (edited) @Sbaby I'm curious, can you give me the output when you click on the "Show Xinput Device Data" button ? I only have one arcade stick (a Madzcat Fightstick pro) and i lack info about how other brand report their xinput data. (And btw, if someone have a 8bit do arcade stick, i would love to see the result too) Edited January 6 by Nixx Quote Link to comment Share on other sites More sharing options...
Sbaby Posted January 6 Share Posted January 6 1 minute ago, Nixx said: @Sbaby I'm curious, can you give me the output when you click on the "Show Xinput Device Data" button ? I only have one arcade stick (a Madzcat Fightstick pro) and i lack info about how other brand report their xinput data. (And btw, if someone have a 8bit do arcade stick, i would love to see the result too) I was editing the message with new information, you can see it now, is it sufficient? Quote Link to comment Share on other sites More sharing options...
Nixx Posted January 6 Author Share Posted January 6 Ah, that's annoying, your Madcatz Fightstick pro mimic exactly an xbox 360 controller, so i can't tell it apart with the xinput library. In your case, i may have a way, to disting it from the DS4 controller (in fact the other way around, to distinct the DS4 controller from regular 360 gamepad), but i need to do some test. Quote Link to comment Share on other sites More sharing options...
Sbaby Posted January 6 Share Posted January 6 10 minutes ago, Nixx said: Ah, that's annoying, your Madcatz Fightstick pro mimic exactly an xbox 360 controller, so i can't tell it apart with the xinput library. In your case, i may have a way, to disting it from the DS4 controller (in fact the other way around, to distinct the DS4 controller from regular 360 gamepad), but i need to do some test. I do not own the Madcatz Fightstick Pro, my arcade stick is Qanba Quote Link to comment Share on other sites More sharing options...
Nixx Posted January 7 Author Share Posted January 7 @Sbaby Yeah, my bad. In case you need it, i use an home made custom version of DS4Win. Not fully tested, but that should work. https://github.com/nixxou/DS4Windows/releases/tag/V1 One option that can be relevant if the only type of xinput controller as gamepad you use are DS4, is the 360 knockoff option. It will force controller to use a different vendorId, productId than regular 360 controller. That way, instead of Type=ArcadeStick... you use "VendorID=0x045E<>ProductID=0x028E" and instead of Type=GamePad, you use "VendorID=0x046D<>ProductID=0xC21F" That way, you're arcade stick will be recognized as arcade stick. The bad thing is that regular wired 360 controller will also be recognized as arcade stick. Quote Link to comment Share on other sites More sharing options...
Sbaby Posted January 7 Share Posted January 7 8 hours ago, Nixx said: @Sbaby Yeah, my bad. In case you need it, i use an home made custom version of DS4Win. Not fully tested, but that should work. https://github.com/nixxou/DS4Windows/releases/tag/V1 One option that can be relevant if the only type of xinput controller as gamepad you use are DS4, is the 360 knockoff option. It will force controller to use a different vendorId, productId than regular 360 controller. That way, instead of Type=ArcadeStick... you use "VendorID=0x045E<>ProductID=0x028E" and instead of Type=GamePad, you use "VendorID=0x046D<>ProductID=0xC21F" That way, you're arcade stick will be recognized as arcade stick. The bad thing is that regular wired 360 controller will also be recognized as arcade stick. I have tried it, it works, thank you very much it will be useful to me Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.