• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Some games giving two credits despite DIP switch coinage set for one credit per coin

Scheduled Pinned Locked Moved Help and Support
mame 2003mame-libretroarcade cabinetcoincoin-ops
21 Posts 6 Posters 5.4k 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.
  • M
    mbert0 @herb_fargus
    last edited by 14 May 2017, 22:46

    @herb_fargus while I couldn't agree more with what you said perhaps postpone judgement? :)

    1 Reply Last reply Reply Quote 0
    • D
      dankcushions Global Moderator @mbert0
      last edited by 14 May 2017, 22:49

      @mbert0 things that happen 'sometimes' definitely don't sound like software problems. ipacs and coin mechs seem much more likely to be causing the problem.

      Confirmed coin mech is sending a single key (IPAC) when a coin drops.

      if it's only sometimes, i don't know how you can confirm this?

      i think the best way to debug this would be to play the same games on your setup without your ipac/coin mech disconnected entirely. use a joypad or whatever.

      i've played a lot of 1942 in mame2003 and never had this issue.

      M 1 Reply Last reply 14 May 2017, 22:56 Reply Quote 0
      • M
        mbert0 @dankcushions
        last edited by 14 May 2017, 22:56

        @dankcushions Indeed. Aforementioned behavior has been very consistent across games since blowing away the cfg files (e.g. always happens on some games, never on others). List of games is small, roughly ~12 so will do some tests and look for any correlations. Will try and go through the list later a few times and build a list of results.

        Regarding the IPAC, I failed to mention removing it completely and testing using a regular ol' keyboard. Same behavior. I really wish it was an IPAC/coin mech issue, probably be much easier to sort.

        Appreciate the reply.

        D 1 Reply Last reply 14 May 2017, 23:07 Reply Quote 0
        • D
          dankcushions Global Moderator @mbert0
          last edited by 14 May 2017, 23:07

          @mbert0 ah, i know this issue now. it IS software, but it's not really fixable.

          the problem is this: mame2003 reads the keyboard and the 'joystick' state every frame. the 'joystick' in this case is the retropad abstraction.

          so, when you press your bound 'select' (insert coin) button on your keyboard, mame2003 sees both retropad select AND that keyboard key as well. i guess in this case, when you insert coin it sends two inputs:

          1. retropad select button (insert coin)
          2. the keyboard insert coin key

          so that's two insert coins in the same frame. evidently some games will ignore that, but others might take that as two credits.

          the same issue applies when you use the ipac, as it appears as a keyboard to the system.

          i believe the only way to fix this is to make all the retropad buttons 'null' in your config so it only sees the keyboard keys. or vice versa. i think @caver01 has hit this same issue, and probably explains it better :)

          M 1 Reply Last reply 14 May 2017, 23:12 Reply Quote 0
          • M
            mbert0 @dankcushions
            last edited by mbert0 14 May 2017, 23:12

            @dankcushions hah, that makes sense! Thanks for your insight.

            If there is value to devs I'd be more than happy to open an issue in GitHub and be debug monkey.

            In the meantime for the games the kid and I compete at most often (Frogger, Moon Patrol, and 19XX) I suppose our playtime just doubled before bedtime. I believe this is a win for the kid :)

            Edit: Dumped main and mame-libretro retroarch.cfg files to a Gist (https://gist.github.com/moosebert/bba44b01523ffba9a5998cf0d361bd46). These are the only configurations in play, no other mapping, remapping, etc. files/configs.

            C D 2 Replies Last reply 15 May 2017, 00:29 Reply Quote 0
            • C
              caver01 @mbert0
              last edited by 15 May 2017, 00:29

              @mbert0 I think @dankcushions explained this problem better than I could have. Another workaround might be to remap the coin key using the MAME GUI menu <TAB>. You could just map it to the same key, but when you do, MAME will see BOTH keys at the same time (your raw keyboard/ipac key + the Retropad virtual button). When MAME sees both keys at the same time, it saves the mapping as a <CODE_AND> type of key press. It is effectively saving coin input so that BOTH keys have to be pressed at the same time, as opposed to the default which may allow either to be pressed.

              Remapping is a very easy thing to do that might be a quick way to test. Otherwise, @dankcushions suggestion about setting all retroarch inputs to "nul" would be even better. Or, simply set the SELECT to "nul" as this doubles as the coin button. That way, when you press your coin button/key it only comes from the ipac.

              I ran into a related issue that dank is remembering with this dual key press issue with respect to my early attempts to map <CODE_NOT> key combos to make a single joystick work to control a game that uses dual tanksticks. There is a complicated mapping formula you can use (stuff like, "Left but NOT DOWN" and so on) by pressing one key, they quickly pressing another key twice. It would fail when I tried because MAME thought I was already pressing two keys at the same time (raw keyboard + retropad virtual button). Setting the retroarch inputs to "nul" in the retroarch.cfg allowed me to map only my ipac keys.

              Anyway, didn't think there were other use cases. This is interesting.

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

              P M 2 Replies Last reply 15 May 2017, 00:41 Reply Quote 0
              • P
                pjft @caver01
                last edited by 15 May 2017, 00:41

                I have recently been considering, when in the future I do build a cabinet at home, to add such coin mechanisms and buy tokens to reward the kids every now and then, so that they also learn the value of money to some extent, and control their game time. Right now it's just in the living room, with two PS 3 controllers, which is hard to take away :)

                I didn't think someone would have done such a thing already though, though I suppose if at times a second credit would come up I'd more likely tell them that they got lucky rather than worry :) Either way, glad you solved it.

                If you'd want to share the specs/build for your cabinet, would love to hear about it - the more ideas and feedback on what works, the merrier.

                M 1 Reply Last reply 16 May 2017, 04:07 Reply Quote 0
                • D
                  DarkWolf @mbert0
                  last edited by 15 May 2017, 04:03

                  @mbert0 Ok, apologies for that...
                  That was the first thing that comes to my mind first, never thought of something like that...
                  I should think about it more next time, sry

                  System: Raspberry 3 Model B, RetroPie 4.2.1
                  Storage: 16gb Micro SD, 64gb USB Drive
                  Theme: Updated NBBA

                  Documentation solves many problems: https://retropie.org.uk/docs/

                  M 1 Reply Last reply 15 May 2017, 04:05 Reply Quote 0
                  • M
                    mbert0 @DarkWolf
                    last edited by 15 May 2017, 04:05

                    @DarkWolf no worries, and no offense taken. Join the foot-in-mouth club... I'm a member myself ;)

                    1 Reply Last reply Reply Quote 2
                    • M
                      mbert0 @caver01
                      last edited by 16 May 2017, 04:05

                      @caver01 @dankcushions thanks very much for the insight and advice. I followed the suggestion to nul-out things in the retroarch config and re-bind MAME itself. Worked, like, a, champ!

                      1 Reply Last reply Reply Quote 2
                      • M
                        mbert0 @pjft
                        last edited by 16 May 2017, 04:07

                        @pjft Absolutely. PM me and I'd be happy to share. Don't want to hijack this thread.

                        D P 2 Replies Last reply 16 May 2017, 04:12 Reply Quote 0
                        • D
                          DarkWolf @mbert0
                          last edited by 16 May 2017, 04:12

                          @mbert0
                          You could open a new topic in the "Projects and Themes" section so everyone can look at it and maybe find something usefull for them in it

                          System: Raspberry 3 Model B, RetroPie 4.2.1
                          Storage: 16gb Micro SD, 64gb USB Drive
                          Theme: Updated NBBA

                          Documentation solves many problems: https://retropie.org.uk/docs/

                          1 Reply Last reply Reply Quote 0
                          • P
                            pjft @mbert0
                            last edited by 16 May 2017, 09:33

                            @mbert0 said in Some games giving two credits despite DIP switch coinage set for one credit per coin:

                            @pjft Absolutely. PM me and I'd be happy to share. Don't want to hijack this thread.

                            If only there were PMs here :)

                            @DarkWolf 's suggestion is definitely the best!

                            Thanks.

                            1 Reply Last reply Reply Quote 0
                            • D
                              dankcushions Global Moderator @mbert0
                              last edited by 19 May 2017, 12:24

                              @mbert0 i just had a little brain-wave about this, and thought i'd share:

                              i tested frogger with my retropad select button (insert player 1 coin) bound to my keyboard button 5, which is the same as the insert player 1 coin keyboard button in frogger. one button doing insert player 1 coin in two different ways.

                              i tested, and only 1 credit appeared every time i pressed, and it only seemed to hit the keyboard part of the code. curious...

                              in your .cfg:
                              input_player1_select = "num6"
                              so your retropad select button (insert player 1 coin) is '6' on the keyboard. however, in frogger in mame2003, this is also the default player 2 insert coin. keyboard button so, every time you press this button, you insert a coin for player 1 AND player 2. 2 credits!

                              the mame core itself seems to be clever enough to ignore two presses of one button, but it (correctly) registers two separate (as far as it knows) buttons.

                              so hopefully this explains the issue a bit better :) i don't think i can fix this. one thing i could do is remove all the default keyboard bindings in mame, which isn't a bad idea, actually.

                              C 1 Reply Last reply 19 May 2017, 16:22 Reply Quote 1
                              • C
                                caver01 @dankcushions
                                last edited by 19 May 2017, 16:22

                                @dankcushions Good catch. That would definitely drop two coins I would think.

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

                                1 Reply Last reply Reply Quote 0
                                21 out of 21
                                • First post
                                  21/21
                                  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.

                                  This community forum collects and processes your personal information.
                                  consent.not_received