djsim101 Posted April 16, 2022 Share Posted April 16, 2022 Hey fellow gamers, I have an issue that is starting to bug me and I dont ever remember this been an issue in all the years I am playing. Issue is, I set the controllers in Mame (using DS4 and PS4 controllers) When I come back again for my retro fix the controller configs are no more. When I try to set them up again, using the same controllers, it would come up as P4 , instead of P1, is that makes sense? Its like every time the controller connects via Bluetooth, it is getting assigned a different config. Please help :-0) Quote Link to comment Share on other sites More sharing options...
neil9000 Posted April 17, 2022 Share Posted April 17, 2022 13 hours ago, djsim101 said: Its like every time the controller connects via Bluetooth, it is getting assigned a different config. That is what is happening, windows uses different controller positions every time and MAME is getting the controller ID from windows, so your controllers will be in a different order every time you switch them on, or reboot Windows. Have a google around for programs that maintain controller positions, there are a couple, allthough i have never used them personally. Also, if you start MAME without your controller switched on MAME WILL wipe your config, i set my config to read only so that it cant be overwritten. Quote Link to comment Share on other sites More sharing options...
djsim101 Posted April 17, 2022 Author Share Posted April 17, 2022 Thanks Neil9000 for pointing me in the correct path. I went down the route of setting the PID using the mapdevice method https://docs.mamedev.org/advanced/devicemap.html I am at this hours and still cannot get it working 😞 <system name="default"> <input> <mapdevice device="PID_0101&" controller="KEYCODE_0" /> <mapdevice device="VID&0002054c_PID&09cc" controller="JOYCODE_1" /> <mapdevice device="VID&0002054c_PID&05c4" controller="JOYCODE_2" /> </input> </system> </mameconfig> The above is my cfg and I have set the name in mame.ini. mame.exe - v gives the the following error: Attempting to parse: james.cfg Fatal error: Could not load controller file james.cfg Any help on this would be gratefully appreciated. James. Quote Link to comment Share on other sites More sharing options...
proghodet Posted April 18, 2022 Share Posted April 18, 2022 Are you missing an opening tag at the top of the file? <mameconfig> Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 18, 2022 Share Posted April 18, 2022 12 hours ago, djsim101 said: The above is my cfg and I have set the name in mame.ini. @proghodet is correct. You're missing the opening tag for 'mameconfig'. Also, I'm pretty confident that KEYCODE_0 is not a controller. Another thing is the ampersands (&) need to be escaped. Add amp; after the & symbol. & <mameconfig version="10"> <system name="default"> <input> <mapdevice device="VID&0002054c_PID&09cc" controller="JOYCODE_1" /> <mapdevice device="VID&0002054c_PID&05c4" controller="JOYCODE_2" /> </input> </system> </mameconfig> The above example is based off the info you supplied. However, I think you might have transposed some characters. Double check your mame.exe -v output. 12 hours ago, djsim101 said: VID&0002054c_PID&09cc This maybe should be...?.?.?... VID_0002054c&PID_09cc Even then, the VID #'s look off. But if that's what the output showed, then ok. (and don't forget to escape the & symbol(s)) Quote Link to comment Share on other sites More sharing options...
djsim101 Posted April 22, 2022 Author Share Posted April 22, 2022 Thanks so much for your help so far guys, but it is not working unfortunately. I doubled checked the VID's and they seem correct. I thought I worked when I tried the other HID-Compliant Game Controller config but no joy. This is what I see in the control panel: Wireless Controller P1 - BTHENUM\{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&09cc HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&09cc P2 - BTHENUM\{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&05c4 HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&0002054c_PID&05c4 HID-Compliant Game Controller 1) HID\VID_045E&PID_028E&IG_03 2) HID\VID_045E&PID_028E&IG_00 Could be a really stupid question on my part, but I will ask anyways 🙂 In the .cfg file, do I have to enter each button \ direction config as well? I see in the other samples, xarcade for example, has entries for each config: <port type="UI_UP"> <newseq type="standard">KEYCODE_UP OR KEYCODE_8PAD</newseq> I dont have any of this in my cfg file. I had been setting the controller config instead within mame itself. Thanks guys Quote Link to comment Share on other sites More sharing options...
djsim101 Posted April 22, 2022 Author Share Posted April 22, 2022 so, I tried copying the button layout config from the default.cfg into my personal cfg file and it looked something like this: <input> <mapdevice device="VID_045E&PID_028E&IG_03" controller="JOYCODE_1" /> <mapdevice device="VID_045E&PID_028E&IG_00" controller="JOYCODE_2" /> <port type="P1_JOYSTICK_UP"> <newseq type="standard"> OR JOYCODE_3_UNKNOWN_UP_SWITCH </newseq> </port> no joy 😞 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 23, 2022 Share Posted April 23, 2022 1 hour ago, djsim101 said: so, I tried copying the button layout config from the default.cfg into my personal cfg file and it looked something like this: Is that your whole james.cfg file contents? (hope not) Have you been able to assign and keep the respective controllers as Player-1, Player-2, ect. (your initial issue)? On 4/17/2022 at 2:45 PM, djsim101 said: Attempting to parse: james.cfg Fatal error: Could not load controller file james.cfg I re-read this and it sounds like you added "james" to the appropriate section in mame.ini. Did you also put the file (james.cfg) in the /ctrl/ folder? Quote Link to comment Share on other sites More sharing options...
djsim101 Posted April 23, 2022 Author Share Posted April 23, 2022 (edited) Hey JoeViking245, sorry for been a pain in the behind 🙂 I have attached the complete file. Would you mind taking a look to see if there is something missing? That is correct, I have edited the mame.ini and added the file to the ctrl folder. I also tried both HID\VIDs from the controller and the HID-Compliant Game Controller to see. Does it matter that when I configure the buttons in mame, they are showing as Player 2 and Player 3? Thanks Edited April 23, 2022 by djsim101 Quote Link to comment Share on other sites More sharing options...
djsim101 Posted April 23, 2022 Author Share Posted April 23, 2022 Sorry, this was the latest file I created... james.cfg Quote Link to comment Share on other sites More sharing options...
djsim101 Posted April 23, 2022 Author Share Posted April 23, 2022 okay...... I have it working, well I am 90% there :-):-) ---> I changed the Joycode back from 3 and 4 to 1 and 2 and it seems to be remembering the config...happy days. One thing though. It will only work with both controllers connected. If I wanted to play a one player game , presently, I have to power on both PS4 controllers. Anyway around that? Thanks guys. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted April 24, 2022 Share Posted April 24, 2022 Glad to hear you got it working! Myself, I only have one controller to test with. But with yours, if one fails to load, I wouldn't think it would make them both not work. But I've been wrong many times before. Try making sure you have the controller that's assigned to player one (they won't be interchangeable because of the controller specific ID's) plugged in (give it a sec to fully register) before starting MAME. I assume when you changed the mapdevice to JOYCODE_1 and JOYCODE_2 respectively, all the stick and button reassignments were changed to 1 & 2 as well. Also try to keep where you plug then in relatively consistent. They shouldn't need to be exact, but don't try using them both in a USB hub and then later, just one in a USB port right at the computer. 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.