How to Exit Mame2003 with Escape Key
-
Hey guys,
I used to be able to edit the retroarch.cfg file:
input_exit_emulator = escape
input enable_hotkey = nullbut it looks like the retroarch.cfg is completely different these days. I'm using the latest 4.3 update
I thought I would update my arcade machine with the latest, and have video snaps, but it's giving me some trouble lol
-
@lowres my retroarch.cfg isn’t completely different. For one thing you are missing an underscore.
-
I'm having the same issue, I've performed a clean install of Retropie 4.3 on a Pi 3. I have a picade with the controls mapped to keyboard keys. All the player 1 controls work fine.
Previously (pre 4.3) START and SELECT would exit lr-mame2003, without me having to set anything up, but now they don't.
I edited opt/retropie/configs/all/retroarch.cfg and added
Input_exit_emulator = "escape"
But the escape key (on a keyboard) doesn't exit mame2003 either.
There's nothing in my opt/retropie/configs/lr-mame/retroarch.cfg to override the generic one.
The only way I seem to be able to exit mame2003 is to press player1_y ("z") and player1_x ("alt") which brings up the retroarch.cfg menu, then I can exit retroarch.cfg and return to the rom list.
I have lr-snes9x2010 and lr-picodrive also running - the button mapped to the escape key (or escape on a keyboard) exit the emulator flawlessly in those.
I wondered if this was something I needed to manually set in mame2003, but the TAB menu has key mappings but nothing for exiting the emulator as far as I can see.
Am I missing something obvious?
Thanks
-
@gtbfilms That almost sounds like your hotkey changed from player1_select to player1_y ("z") since hotkey+X (alt) should invoke rgui. That would at least explain why it's not working with Player 1 START/SELECT.
Maybe if you had tried to press player1_y ("z") and START that would have done it. Either way, what is your hotkey set to according to retroarch.cfg? with your last addition to the file, it is now going to require the hotkey plus "escape" unless you have the hotkey disabled.
-
I just did the update last night, not a full download and reimage, but you should at least be able to configure the MAME exit with a raw key. In other words, there are two ways to exit lr-mame2003: either by exiting MAME using the MAME key to do so, or by using the EXIT from within RetroArch which by default is configured as a hotkey.
-
@caver01 you're right! Player1_y ("z") and START ("s") does exit Mame2003!
I have input_enable_hotkey = "null" but I think I changed that after reading the documentation, I think it was set to nothing originally.
Is there some way I can change the exit command from z and s to c and s?
Thanks for your help!
I can't see any setting in mame2003 itself to set an exit key (via the Tab menu)
-
@gtbfilms can’t you set
input_exit_emulator = c
? -
@gtbfilms and in MAME, I thought setting UI_ cancel did the trick.
-
Hmm my retroarch.cfg has double quotes round all the key assignments. I noticed in the documentation they aren't there. Do I need them?
I did try input_exit_emulator = "c"+"s" and also input_exit_emulator = "escape" but that didn't work. I'll try just using c.
Thanks for the pointer on the MAME setting, I'll have a look for that too, I was looking for something called exit or quit, so probably missed UI_cancel. (my excuse is it was quite late!)
Thanks for that.
-
@gtbfilms you don’t need quotes. In fact, some text editors make curly smart quotes and mess them up. As for using escape, that would work too, but because hotkey is enabled, you would have to press the hotkey at the same time as escape. You cannot use two mapping values with a plus (+) sign. That won’t work, but the hotkey does.
-
@caver01 UI_cancel only seems to reset Mame for me. I set it to player1_btn6 and it just resets the rom to startup.
-
@GtBFilms At minimum, it should back you out of menus, and resetting a ROM is normally an Fkey (f2?).
In any case, I thought this was an attempt to use the "ESCAPE" key (on an actual keyboard) to exit MAME. You are mapping to a gamepad button. By default, MAME will respond to raw keyboard keypresses (unless they are first grabbed by retroarch). So, removing the mapping of "ESCAPE" from your retroarch.cfg would eliminate conflicts with Retroarch, and that key should still exit the emulator.
I wonder if something is amiss in MAME's default configuration file (which it creates from scratch, and where the MAME GUI stores general mapping). You could rename it or make a backup and deleted, launch a ROM again. This will rebuild the default config and a raw ESCAPE keypress should exit MAME.
We sometimes see the same problem with TAB not working.
mame2003/cfg/default.cfg
in your ROMs folder is the file I am talking about.It's confusing, but we are really talking about two things together here. First is the hotkey exiting that can be done via RetroArch. You are basically exiting the emulator framework, and in turn, exiting the libretro core. The second is using MAME's built-in exit (escape) to quit the libretro core. Either will exit the emulator.
-
@caver01 It sounds to me like conflicting inputs are being given. If OP wants ESC to exit the emulator he needs to first of all make sure the ESC key is not mapped to anything else, either within the MAME TAB menu or within RetroArch. If he wants a one key exit then he needs to turn off hotkeys and simply map it to ESC from within RetroArch.
-
Thanks guys, I think I am further confusing myself because the picade has joystick and buttons but they are all interpreted as keyboard inputs - hence my coin button is c, starts is s, etc.
All I'm really after is c and a (coin and p1 start) quit - they did this previously, and still do it in the snes and Megadrive emulators.
Although if I could get Alt or escape (side buttons) to exit, that would be fine too.
I'll take out these retroarch.cfg settings and see if I can just get it to work in mame.
-
@gtbfilms You might also want to see what auto-configs are in
opt/retropie/configs/all/retroarch-joypads
. The configs in here are used first, then overridden by any explicit mapping in/opt/retropie/configs/all/retroarch.cfg
which are in turn overridden by anything in the system folders, and then in turn overridden by configs next to ROMs, and finally, TRANSLATED through any additional MAME keymaps done in the MAME GUI. -
@caver01 nothing in retroarch-joypads
In /opt/retropie/configs/all/retroarch.cfg I have:Input_player1_a="ctrl"
Input_player1_b="shift"
Input_player1_y="z"
Input_player1_x="alt"
Input_player1_start="s"
Input_player1_select="c"
Input_player1_l="space"
Input_player1_r="x"
Input_player1_left="left"
Inout_player1_right="right"
Input_player1_up="up"
Inout_player1_down="down"No mappings for any other player 1 keys. Or any other player keys.
Futher down, under # key to exit retroarch cleanly, I have:
Input_exit_emulator = "s"
My understanding is that won't do anything without a hot key also being pressed.
Almost at the bottom of the file I have:
Input_enable_hotkey ="c"
I start up Golden Axe in lr-mame2003, and pressing c and s together just inserts a coin.
In the Tab menu in mame2003, '1 player start' is set to 1 or retropad1 start, while 'coin 1' is set to 5 or retropad1 select.
Is this what's overriding the retroarch.cfg settings? I think it used to work!
Player 1 y and select together are exiting Mame2003 fine. Maybe I'm just being picky and should use them!I I don't understand why they still work though when both of these are also mapped to mame controls!
My Head A Splode!
-
@gtbfilms Man, you have mucked about and messed with these configs so much I would suggest a fresh start. At least then you know what you are battling against. Using ESC to exit an emulator is basic stuff. You have other things set that are conflicting with it. Obviously you know that in RetroArch the hotkey is either ON or OFF. This cannot be changed per core / emulator.
-
@gtbfilms First of all, I don't think you need to be so drastic as to start over from scratch--yet. Does the emulator exit when you press just player1_Y ("z")? if not, then you actually have the hotkey working when it exits with both pressed at the same time. That's some progress!
You could search for a duplicate entries in your retroarch.cfg. Your EXIT key might have more than one entry, and only one of them will survive.
Another thing you might test is exiting to a command prompt and typing on your buttons to make sure they map to what you think they should. For instance, if you press Select, does "c" appear?
As for what you see in mame2003 GUI, that is normal. MAME will show both the retropad (virtual mapping you do in retroarch.cfg) and a raw keyboard key. The MAME default for P1_Start is "1" and P1_Coin is "5".
-
@caver01 I know it's drastic! At some point you need to stop trying to de-bug something and just fall back to a known state. Even if you fix your immediate issue it can leave more problems for the future. It was just advice. Good advice in this case, I believe.
-
@jonnykesh Well, he did say he started with a clean install of 4.3.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.