RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    How to Exit Mame2003 with Escape Key

    Scheduled Pinned Locked Moved Help and Support
    mame 2003
    24 Posts 5 Posters 9.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • GtBFilmsG
      GtBFilms
      last edited by

      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

      caver01C 1 Reply Last reply Reply Quote 0
      • caver01C
        caver01 @GtBFilms
        last edited by

        @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.

        My 4-player cocktail style cabinet built as a custom "roadcase"

        caver01C GtBFilmsG 2 Replies Last reply Reply Quote 0
        • caver01C
          caver01 @caver01
          last edited by

          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.

          My 4-player cocktail style cabinet built as a custom "roadcase"

          1 Reply Last reply Reply Quote 0
          • GtBFilmsG
            GtBFilms @caver01
            last edited by GtBFilms

            @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)

            caver01C 2 Replies Last reply Reply Quote 0
            • caver01C
              caver01 @GtBFilms
              last edited by

              @gtbfilms can’t you set input_exit_emulator = c?

              My 4-player cocktail style cabinet built as a custom "roadcase"

              1 Reply Last reply Reply Quote 0
              • caver01C
                caver01 @GtBFilms
                last edited by

                @gtbfilms and in MAME, I thought setting UI_ cancel did the trick.

                My 4-player cocktail style cabinet built as a custom "roadcase"

                GtBFilmsG 1 Reply Last reply Reply Quote 0
                • GtBFilmsG
                  GtBFilms
                  last edited by GtBFilms

                  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.

                  caver01C 1 Reply Last reply Reply Quote 0
                  • caver01C
                    caver01 @GtBFilms
                    last edited by caver01

                    @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.

                    My 4-player cocktail style cabinet built as a custom "roadcase"

                    1 Reply Last reply Reply Quote 1
                    • GtBFilmsG
                      GtBFilms @caver01
                      last edited by

                      @caver01 UI_cancel only seems to reset Mame for me. I set it to player1_btn6 and it just resets the rom to startup.

                      caver01C 1 Reply Last reply Reply Quote 0
                      • caver01C
                        caver01 @GtBFilms
                        last edited by caver01

                        @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.

                        My 4-player cocktail style cabinet built as a custom "roadcase"

                        jonnykeshJ 1 Reply Last reply Reply Quote 0
                        • jonnykeshJ
                          jonnykesh @caver01
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 1
                          • GtBFilmsG
                            GtBFilms
                            last edited by

                            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.

                            caver01C 1 Reply Last reply Reply Quote 0
                            • caver01C
                              caver01 @GtBFilms
                              last edited by

                              @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.

                              My 4-player cocktail style cabinet built as a custom "roadcase"

                              GtBFilmsG 1 Reply Last reply Reply Quote 1
                              • GtBFilmsG
                                GtBFilms @caver01
                                last edited by GtBFilms

                                @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!

                                jonnykeshJ caver01C 2 Replies Last reply Reply Quote 0
                                • jonnykeshJ
                                  jonnykesh @GtBFilms
                                  last edited by jonnykesh

                                  @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.

                                  1 Reply Last reply Reply Quote 1
                                  • caver01C
                                    caver01 @GtBFilms
                                    last edited by

                                    @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".

                                    My 4-player cocktail style cabinet built as a custom "roadcase"

                                    jonnykeshJ 1 Reply Last reply Reply Quote 1
                                    • jonnykeshJ
                                      jonnykesh @caver01
                                      last edited by

                                      @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.

                                      caver01C 1 Reply Last reply Reply Quote 0
                                      • caver01C
                                        caver01 @jonnykesh
                                        last edited by

                                        @jonnykesh Well, he did say he started with a clean install of 4.3.

                                        My 4-player cocktail style cabinet built as a custom "roadcase"

                                        jonnykeshJ 1 Reply Last reply Reply Quote 0
                                        • jonnykeshJ
                                          jonnykesh @caver01
                                          last edited by

                                          @caver01 Then revert, revert, revert. He is reporting issues that are unique to him. so far. That tells me where the issue lies

                                          1 Reply Last reply Reply Quote 1
                                          • dankcushionsD
                                            dankcushions Global Moderator
                                            last edited by

                                            you really need to post your entire /all/retroarch.cfg for us to diagnose this issue properly.

                                            assuming it's ok, the other things that can override it are:
                                            /opt/retropie/configs/mame-libretro/retroarch.cfg
                                            or
                                            /opt/retropie/configs/arcade/retroarch.cfg (depending on where you are launching games from)
                                            retroarch overrides in
                                            /opt/retropie/configs/all/retroarch/config/MAME 2003 (list anything that is in here)
                                            per-game overrides:
                                            gamename.zip.cfg (in the rom directory)

                                            don't worry about MAME's tab overrides - they can't override retroarch's exit bindings, only supplement.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.