Announcement

Collapse
No announcement yet.

Limiting credits in MAME?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by AskJacob View Post
    IS there really any demand for a hardware version? If so, I can knock one together if someone wants to try it out.
    I don't mind the hardware solution, may make it easier to work with non mame cabs! Actually I like both solutions, specially if the hardware solution could be addressed by the software to set the limits! so you could change the configuration automatically based on which game it is!

    If you do hardware I would be interested in how you do it as it's something I'm wanting do get into.

    Comment


    • #32
      The way I see it there's 2 way to maintain "control" with hardware:

      1. The cheap way - Install a magnetic reed switch somewhere in the cabinet. Then either use a magnet (which the kids would figure out pretty quick) or make up a little electromagnet button wand thing to trigger it. They never see the inside of the cabinet, they never know how your magic wand works. A degaussing wand would be great, but expensive.

      2. The less cheap way - Install a remote keyfob controlled central locking kit, they run off 12v and simply switch to ground. If your worried about stuffing up the wiring or the ipac, use an automotive relay on the central locking kit's output to trigger the 5/coin button on the ipac straight to the ipac earth.

      When kids behave, you hit the button on the keyfob from anywhere in the house and kaplink, credits appear.

      Method 1 would cost $10 to $60 depending on complexity.
      Method 2 would cost $40-$80.

      Jaycar also sell a barrel lock with a momentary switch built in for about 8 bucks. That'd do the job too.

      I can relate to the thrill of losing something for bad playing, however the thrill of owning the machine or having it at home is that you don't have to feed the bugger money to enjoy it.

      Thrill #2 is a happy place.

      Thrill #3 is owning a cabinet, not having to feed it coins and being able to cheat your ass off and get further into a game than ever before, finish it, or simply just see the ending screen.

      But #3 really ruined it for me. Just be happy if they never discover #3 and are happy at #2.
      Retired

      Comment


      • #33
        Originally posted by dmworking247 View Post
        I had also hoped that it would stop the kids from putting in unlimited credits as they tend to do with the Mame shortcuts.
        I had the same problem designing an arcade cabinet for my kids. I thought infinite credits would make the games pointless but I didn't want to remove the continue option totally. That is why I designed a joystick system with an integrated credit counter. The system disables the insert coin buttons unless credits are available and includes a little challenge (a Simon Says game) that must be won in order to obtain them.

        You can see the project at https://www.hackster.io/user38535746...on-game-384309 and https://github.com/gambaman/ArcadeJo...4PlusSimonGame. You can also see a video demo at https://youtu.be/ENW7n0ni5kg.
        Click image for larger version

Name:	cabinet.jpg
Views:	1
Size:	158.1 KB
ID:	1830788

        Comment


        • #34
          Originally posted by gambaman View Post
          I had the same problem designing an arcade cabinet for my kids. I thought infinite credits would make the games pointless but I didn't want to remove the continue option totally. That is why I designed a joystick system with an integrated credit counter. The system disables the insert coin buttons unless credits are available and includes a little challenge (a Simon Says game) that must be won in order to obtain them.

          You can see the project at https://www.hackster.io/user38535746...on-game-384309 and https://github.com/gambaman/ArcadeJo...4PlusSimonGame. You can also see a video demo at https://youtu.be/ENW7n0ni5kg.
          [ATTACH=CONFIG]124490[/ATTACH]
          This is an interesting idea.

          It would be nice if it used the existing P1/P2(P3/P4) buttons rather than a separate set.

          Ideally 1 credit is given for each Simon sequence - Sequences getting longer for each credit.
          (The video shows multiple sequences being played to get a single credit for each P1 & P2)

          Looks a bit complicated as is - But a good concept.

          Comment


          • #35
            Originally posted by ozfalcon View Post
            This is an interesting idea.

            It would be nice if it used the existing P1/P2(P3/P4) buttons rather than a separate set.
            In fact it uses the existeng COIN1/COIN2/COIN3/COIN4 buttos, not a separate set. Also, in the new version of the firmware if an insert coin button is pressed when there are no available credits then a Simon game will start in the easiest level.

            Originally posted by ozfalcon View Post
            Ideally 1 credit is given for each Simon sequence - Sequences getting longer for each credit.
            (The video shows multiple sequences being played to get a single credit for each P1 & P2)

            Looks a bit complicated as is - But a good concept.
            The video is a bit outdated. In the first version had the 4 skill levels of the original Simon Says. In the last version I added an easiest level with a maximun sequence length of just 4. The number of credits you get depend on the skill level you select as shown in this table:
            Click image for larger version

Name:	table.png
Views:	1
Size:	44.8 KB
ID:	1830810
            Anyway the source code is at github and can be modified to fit your needs.

            Comment


            • #36
              I have a mate who credit-feeds his way through everything despite the complaints, and it drives me bananas. The thought of my son growing up that way is untenable.

              Hence I’ve managed to get a credit limiter going for Mame, based on [MENTION=88]adn0r[/MENTION]’s script in this post. That script worked as written at the time, but at present a few more steps are needed. (EDIT: the MAME devs changed around version 0.110 or something to rawinput as being a faster option, and you have to enable dinput now among other things). My updated script is below, and I’ve attached the standalone .exe as a rar file.

              In short, each credit button works three times until you hit the mame exit key combo and then you go again. In Mame my exit key is actually three joystick buttons that individually are credit 1, p1 start and p2 start, which are also bound in joytokey to trigger w, a, and q + z depending on which you press, and my credit buttons in Mame are the default 5 and 6. The script should work with the standard esc key instead of q + z if you make that change.

              To get this to work, you need the setkeydelay line as recorded, as even with the new dinput options i don't think Mame will accept (virtual?) keypresses of zero duration. And in mame.ini you must set “keyboardprovider dinput”. I find this better than the –keyboardprovider dinput commandline parameter as i'm using a frontend, and, for example, I can disable the limit function in sf2.ini by adding “keyboardprovider auto” and just binding the physical credit buttons to directly give credits in that game’s inputs only. It's possible that with something like an ipac the dinput setting will cause problems, but my joysticks and keyboard are unaffected in vanilla Mame, GM, and GM wolf. You'll have to try it and see

              The ~ prefix means when I push the w key, I get w and then 5, the w does not get hidden from the system. Adn0r’s $ prefixes are not needed to hide the script's outputs from itself, as it is not using the 5 or 6 keys as inputs, so there is no danger of them triggering themselves off. This doesn't really make any difference to function, however.

              If you want to change the script, just change the keys, and possibly google autohotkey prefixes. Then download atuohotkey and it really is as simple as opening the compiler exe and pointing it to the .ahk script file, which is just a txt file with another name. You could also use something like "WinWaitActive, MAME" to get the script to only trigger when Mame is active. Authotkey is pretty easy to learn as you go along. It'd be pretty easy to write something like the H2seq program out in it, if that didn't already exist


              key5 := 0
              key6 := 0

              setkeydelay, 0, 50

              ~q & z::
              key5 := 0
              key6 := 0
              return

              ~w::
              key5++
              if key5 <= 3
              {
              send, 5
              }
              return

              ~a::
              key6++
              if key6 <= 3
              {
              send, 6
              }
              return
              Credit Limiter.rar
              Last edited by buttersoft; 23rd April 2018, 07:11 PM.

              Comment


              • #37
                Bump.

                Just ran into an issue with Ketsui. This cave shooter doesn't see brief keypresses on the credit button, you need to hold the button down a little longer. I wonder if this was done to thwart sparkers or other devices.

                Can be fixed by changing the script above to make setkeydelay 200ms:
                setkeydelay, 0, 200
                Doesn't seem to hurt other games i've tried.

                Comment

                Users Viewing Topic: 0 members and 1 (guests)
                Working...
                X