robmich Posted June 10, 2019 Share Posted June 10, 2019 MAME losing it's controller settings is a known issue and most of the "fixes" don't seem to do it for me. The biggest problem is to make sure that the controller (Wireless Xbox One) is turned on prior to selecting a MAME game. So I am looking for a way to "remind" everyone to do so. Does LB have a way to me to add a Pop up or a screen that after you go to MAME, select a game, select play but BEFORE MAME is actually started, everything pauses, a pop-up comes up stating "Make sure you controller is on", any button to continue". This would have high WAF. And yes, if you always use the controller to move around, there would not be an issue, but remember I indicated WAF. It is pointless to even try to explain that.... lol Rob Quote Link to comment Share on other sites More sharing options...
LaunchRoo Posted June 10, 2019 Share Posted June 10, 2019 (edited) Good idea! I'm all for that idea too! Edited June 10, 2019 by LaunchRoo Quote Link to comment Share on other sites More sharing options...
DOS76 Posted June 10, 2019 Share Posted June 10, 2019 https://docs.mamedev.org/advanced/devicemap.html You guys might want to give that a read. I've yet to mess with it as I'm only using the one controller but it looks pretty interesting but also a little complex. Quote Link to comment Share on other sites More sharing options...
sundogak Posted June 10, 2019 Share Posted June 10, 2019 @robmichyou can always set the Default.CFG in the MAME CFG folder as read only after you setup the way wanted. It will not overwrite then. Haven't heard that doesn't work (although "hacky"). There are various threads discussing this with one recent here : Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted June 10, 2019 Share Posted June 10, 2019 The losing controller settings "issue" is by design. That said, there are a few workable solutions to fix that. The simplest way making default.cfg Read Only. Beyond that, the controller does need to be loaded (turned on) before Mame starts. You could create an AutoHotKey script and set it to run before a game launches that will display a MsgBox or SplashImage stating what you said. Quote Link to comment Share on other sites More sharing options...
robmich Posted June 11, 2019 Author Share Posted June 11, 2019 The "read only" solution just doesn't seem to work 100%. I am not a good scripter. If anyone is and wants to donate to the cause, it would be appreciated. Rob Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted June 11, 2019 Share Posted June 11, 2019 1 hour ago, robmich said: The "read only" solution just doesn't seem to work 100%. It should in that if the controller is NOT plugged in, the default.cfg file you painstakingly created by setting all the controller inputs when the controller was plugged in, exited Mame and made it Read Only, it won't be overwritten to 'default' (stock inputs only) if you start Mame without the controller plugged in. Granted you still need to exit, turn on the controller then restart. If that truly doesn't seem to 100% protect your cfg file, follow the last paragraph in this post. (click "JoeViking245 replied to a topic") I just stress tested having a script (with a MsgBox, then wait for user to press a key before continuing) Automatically Run Before Main Application and it doesn't work fully as intended. It'll show the MsgBox and wait for you to press a key but at the same time continue to load the game. Which is actually the way it should work. Just doesn't help in this situation. So no. LB doesn't check to make sure your controller is plugged in/turned on. And if you look at the link @DOS76 referenced, I don't believe there's a reasonably simple way that Jason could program that in to cover the 1000's (10's of 1000's?) of possibilities of detectable devices, and that one of them is actually the controller (device) you're intending to use. As a Hail Mary, edit the Startup Theme for "Arcade" so that is says/shows "Dude. If you controller's not turned on, hit Escape NOW!" and increase the Startup Load Delay a little (5+ seconds?). Or... start a game, slap yourself in the forehead "DOH!", hit Escape, turn on the controller and restart the game. ? 1 Quote Link to comment Share on other sites More sharing options...
darrenmarchand Posted March 28, 2020 Share Posted March 28, 2020 Do I need to leave my controllers plugged in all the time? Will Mame reset to default and forget what I had mapped out for the games if I unplug? The reason I ask, is that I have 2 arcade type joystick controllers connected and one has LED lights that I don't want on 24/7. I just don't want to keep having to remap my controllers all the time. Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted March 29, 2020 Share Posted March 29, 2020 3 minutes ago, darrenmarchand said: Do I need to leave my controllers plugged in all the time? Will Mame reset to default and forget what I had mapped out for the games if I unplug? The reason I ask, is that I have 2 arcade type joystick controllers connected and one has LED lights that I don't want on 24/7. I just don't want to keep having to remap my controllers all the time. Yes MAME will reset them. This is why you set the file to read only to prevent that. Can you give a little more details on your arcade joysticks? If it's like something with an iPac, the lights are normally controlled via a 3rd party applciation like LEDBlinky and not MAME per sa. Is it just LED lighting that's always on when attached? Quote Link to comment Share on other sites More sharing options...
darrenmarchand Posted March 29, 2020 Share Posted March 29, 2020 It's always on when plugged in. It's a Tron type joystick and LED rollerball. So basically, I'd have to map out General and Game specific controls, then set the cfg file to read only? It's my understanding that there will be many different cfg files if you've mapped out different controls for different games. Is that right? Do you know if I'd have to do the same for Retroarch emulated games? Set it to read only I mean. thanks for the feedback btw Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted March 29, 2020 Share Posted March 29, 2020 I don't know your set up well enough to say exactly the steps you need but here are some steps. (Other devices you might have for example) 1) Use the link above that DOS76 gave and set up static IDs. 2) Attach all devices and go into MAME and configure as needed. The nice thing is MAME while allow multiple devices to be assigned to a single MAME input. (So for example, Button 1 in MAME inputs settings you can set to a keyboard key and a joystick button) Exit MAME and set the needed cfg file to read only. If it's just general input default.cfg will work or game specific will be the gamename.cfg So now, whether the device is attached when MAME starts or not, both should work and not change. Retroarch is totally different in how it supports devices and is tailored for dynamically attached/de-attached devices. You won't have to do the same thing, but there could be device indexing issues. You'll have to try it as different devices behave differently. Hope that's helpful. Quote Link to comment Share on other sites More sharing options...
darrenmarchand Posted March 29, 2020 Share Posted March 29, 2020 Thanks for the help. I'll give it a try. Quote Link to comment Share on other sites More sharing options...
darrenmarchand Posted April 27, 2020 Share Posted April 27, 2020 On 3/28/2020 at 8:38 PM, Headrush69 said: I don't know your set up well enough to say exactly the steps you need but here are some steps. (Other devices you might have for example) 1) Use the link above that DOS76 gave and set up static IDs. 2) Attach all devices and go into MAME and configure as needed. The nice thing is MAME while allow multiple devices to be assigned to a single MAME input. (So for example, Button 1 in MAME inputs settings you can set to a keyboard key and a joystick button) Exit MAME and set the needed cfg file to read only. If it's just general input default.cfg will work or game specific will be the gamename.cfg So now, whether the device is attached when MAME starts or not, both should work and not change. Retroarch is totally different in how it supports devices and is tailored for dynamically attached/de-attached devices. You won't have to do the same thing, but there could be device indexing issues. You'll have to try it as different devices behave differently. Hope that's helpful. Hi, Me again. So I've been playing around with this, and it's still not working. I went into MAME, set up the controls with the joystick. Exited Mame. Found the default.cfg file (in Mame folder), set that to Read Only. Then, I go to LB and start a Mame game, but the controls don't work. I hit TAB and look at the controls, but they aren't what I mapped in Mame. I checked in the LB folder, and there's also a default.cfg file, so I copied the one from Mame in there to see if that was the issue. It didn't have any effect. Same result. When I open the default.cfg file, I can see everything that I mapped. any idea what I'm doing wrong? Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted April 27, 2020 Share Posted April 27, 2020 (edited) Make sure you don’t have a game specific file in the MAME -> cfg directory as it will override the default config. Also, did you use the LB full MAME set importer? If so, make sure you are launching the exact same game from LB. it could be you are running a different variant of the same game. if you right click a game and pick edit, under the additional application a tab you can see all the variants. Edited April 27, 2020 by Headrush69 1 Quote Link to comment Share on other sites More sharing options...
ItchyRobot Posted April 27, 2020 Share Posted April 27, 2020 (edited) 37 minutes ago, Headrush69 said: Make sure you don’t have a game specific file in the MAME -> cfg directory as it will override the default config. Also, did you use the LB full MAME set importer? If so, make sure you are launching the exact same game from LB. it could be you are running a different variant of the same game. if you right click a game and pick edit, under the additional application a tab you can see all the variants. Good ideas. I was thinking the same thing. Especially the last tip about variants (aka 'addition app'). I remember when first setting up MAME, I had a couple games that required specific controller remapping, compared to the default.cfg. Once set up using MAME, I then went into launchbox and started the same game, only to find the new controls were not the same as when in MAME. That was because the game was defaulting to a different rom (but same game). This all can be very confusing for new users. Especially those that are used to console games only having one rom per game. MAME is a weird, but wonderful beast ? Tip, when in MAMEs default browser GUI, when you highlight a game (one that you have set the controls for), you should also be able to see what rom it is referencing. Write that down, then when you go into Launchbox, edit the same game to see what rom file it is referencing. This should be the same rom. Edited April 27, 2020 by ItchyRobot Quote Link to comment Share on other sites More sharing options...
darrenmarchand Posted April 27, 2020 Share Posted April 27, 2020 (edited) 1 hour ago, Headrush69 said: Make sure you don’t have a game specific file in the MAME -> cfg directory as it will override the default config. Also, did you use the LB full MAME set importer? If so, make sure you are launching the exact same game from LB. it could be you are running a different variant of the same game. if you right click a game and pick edit, under the additional application a tab you can see all the variants. Hi, So I made sure the game didn't have any variants. It still isn't working. I deleted the default.cfg file from the Mame folder (and the one in the LB folder just in case). Then, I launched Mame and set up the controller. I saved it. I closed Mame and went into LB and tried a game. Didn't work. Am I supposed to go through LB (hit Tab) and set up the controller, then set the file to Read only? Or, did I follow the correct steps? Why would it show a different controller mapping when I hit Tab and check it in Launchbox? That's Mame so it should be the same. I set it as the general controls btw, not game specific. thx Edit I should give you an idea of my setup jic. I have a Tron style arcade stick that I made with various buttons, and I have a Mayflash arcade stick. Both are connected to a usb hub, which is connected to another hub with switches. The main stick I want for most games is the Mayflash, so that's what I mapped in Mame. It shows as joystick 1 (which is what it shows in the default.cfg file). When I go into LB and hit Tab, most but not all controls show as joystick 2 (which is the Tron joystick). Edit #2 So I removed Read Only. Went into a game in LB and set up the controller (Mayflash) under General controls. Then, I went back and set the default.cfg file to Read Only. I went back into LB and tried a couple games. It worked (which I expected). Then, I shut off the USB switch where the 2 joysticks are connected (they were disconnected). I turned the switch back on and launched a game in LB and the Mayflash was still set up! I'm not sure if this will keep working or not though. What if I shut the computer off? Edited April 27, 2020 by darrenmarchand Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted April 27, 2020 Share Posted April 27, 2020 (edited) Let’s narrow down the issue. Forget your controller for now. Delete the default.cfg and any game specific cfg. Start a game and set custom keyboard commands. 1) Quit Mame. Was a Mame specific cfg for the game created? 2) Start the same game from LB. is the changed mapping still there? Are you 100% sure you are point to the same Mame executable in LB. Edit: Sounds from your added info that your static device ids are setup correct. Can you post you ctlr file and the output from running Mame with the -v option from a command line. Edited April 27, 2020 by Headrush69 Quote Link to comment Share on other sites More sharing options...
darrenmarchand Posted April 27, 2020 Share Posted April 27, 2020 12 minutes ago, Headrush69 said: Let’s narrow down the issue. Forget your controller for now. Delete the default.cfg and any game specific cfg. Start a game and set custom keyboard commands. 1) Quit Mame. Was a Mame specific cfg for the game created? 2) Start the same game from LB. is the changed mapping still there? Are you 100% sure you are point to the same Mame executable in LB. Edit: Sounds from your added info that your static device ids are setup correct. Can you post you ctlr file and the output from running Mame with the -v option from a command line. I deleted the default.cfg file from the Mame folder. I went into LB and chose a game. The Mayflash is still setup! How is that possible? I go into the Mame folder, the cfg folder, and that where the default.cfg was. Quote Link to comment Share on other sites More sharing options...
Headrush69 Posted April 27, 2020 Share Posted April 27, 2020 The cfg files should always be in the MAME -> cfg folder. Not sure how you got one just in the MAME folder and the LB folder Quote Link to comment Share on other sites More sharing options...
darrenmarchand Posted April 27, 2020 Share Posted April 27, 2020 1 minute ago, Headrush69 said: The cfg files should always be in the MAME -> cfg folder. Not sure how you got one just in the MAME folder and the LB folder Yep. That's where it was. I deleted it but the controller is still working properly 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.