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.
    • 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
                                  • GtBFilmsG
                                    GtBFilms
                                    last edited by

                                    Thanks for all the help.

                                    I'm away from my cab at the moment so won't be able to post the details for a couple of days.

                                    I have a spare micro sd card so could try a fresh install as well - I did make changes to set up my USB sound card and also my powerblock switch, so may have screwed something up. That will at least tell me if it's something I've done or something about my setup.

                                    I agree exiting the emulator is a basic thing - I've never had an issue with it before!

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

                                      I took @jonnykesh advice and did a fresh install to a new SD card - and everything works - pressing COIN and SELECT exits MAME2003 as expected.

                                      The only thing I can think of which I did differently was this time I set up the hotkey as soon as I started up the new install - I think last time I left the hotkey unassigned, and then tried to assign it later. However I'd probably messed about with retroarch.cfg too much by then.

                                      Thanks for the help.

                                      1 Reply Last reply Reply Quote 1
                                      • 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.