Jump to content
Due to a large amount of spamers, accounts will now have to be approved by the Admins so please be patient. ×
IGNORED

Limiting credits in MAME?


Recommended Posts

 

Other than just telling them off repeatedly, I'd like to somehow limit the credits per game so that they're forced to do it the right way... if they're not actually losing money by playing bad then they dont try as hard...

 

 

 

maybe your taking game playing a litte too seriously.

 

remember, games are there for fun.

 

man, being a kid is all about making memories.

who care who many coins they feed in, let them have fun.

Link to comment
Share on other sites

I thought I'd bump this (over a year old) thread.

 

Thanks for the :bump: I'd have never found this otherwise! very very very nice.

 

The only thing that would be better is if you could use a configuration file to set the 'max credits' amount without having to change the code and re-compile. Anybody want to have a crack at improving the code?

 

I'll have a look at it. A little busy on some other stuff, so may be a little bit before I do it, but this should be easy to do. Personally I would rather do this in C++ or something. C# is a tad more accessible right now, but I doubt it that will help people on win98.

 

maybe your taking game playing a litte too seriously.

 

remember, games are there for fun.

 

man, being a kid is all about making memories.

who care who many coins they feed in, let them have fun.

 

Hmm I havta disagree with that mate. I've got three boys and what I have found is that all they wanna do is surf the net to find the cheats so they can finish their game that they have. Often they will try until they get to a bit that they don't know how to get past, their reaction is to either ask me to get em past it or to find cheat codes so they can cheat past the hard bit. :(

 

And once they finish it they don't wanna play it any more. :(

 

I gotta wonder what's the bloody challenge in beating a game via cheats? I think it's more a case of they wanna see what the game does, than beat it. Also makes buying them games for the PS2 or Xbox 360 bloody exy as they just don't last. :cry

 

The only exception would be games like some of the racing ones where you rack up points and can upgrade cars. But knowing my eldest I reckon he would cheat if it got him a better car quicker! :o

 

Personally I think this is a great idea and I would be setting the limit to 2 coins.

 

But of course it does depend on the individuals involved. However I've noticed something easily gained loses it's value, as there is no appreciation of it's value.

 

:D

Link to comment
Share on other sites

Here here! As a kid I'm sure we would have loved unlimited credits but I bet the novelty of arcades would have worn off fast if that were the case, and we wouldn't be very good at games.

 

Thats why I want my kids to learn to try harder. I'm not limiting their time on the arcade - they are... get better and your turn goes longer :)

 

PS Metal Skin, I'm running WinXP now anyway.

Link to comment
Share on other sites

  • 4 weeks later...

Thanks for bringing up this old thread!

 

It is exactly what I was trying to do and asking about over at arcadecontrols.com in this thread.

 

I'm so glad someone's found a simple solution! It's exactly what I'm looking for, although I always wanted to have the option for allowing a few different limits... I was thinking of going the 4017 decade counter route as mentioned in the above thread using a 3 position switch to swap between allowing 5, 10 and 20 credits (or whatever combination you want from 1 - 20).

 

It wouldn't be too hard to make a simple circuit that uses a couple of 4017's to get your count of 20 and a 555 timer... but it's beyond my electronic abilities.

 

If anyone has the ability to make this circuit I would be extremely indebted!

Link to comment
Share on other sites

A trivial circuit as you said... are you not OK with the sofwtare solution though?

 

I'm a bit lazy and would be tempted to use a small microcontroller as these days they cost the same as a couplle of 40XX chips...

 

When I was thinking about this My 1st thought was something like a Neo Geo credit board kind of hardware device, configurable like you mentioned, but with the bonus of a 7-segment LED credit display (as an option).

 

IS there really any demand for a hardware version? If so, I can knock one together if someone wants to try it out.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 9 years later...
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/user3853574654/arcade-joystick-x4-plus-simon-game-384309 and https://github.com/gambaman/ArcadeJoystickX4PlusSimonGame. You can also see a video demo at

.

cabinet.thumb.jpg.1cee6ac888f0b2bbc89c191e8c52d833.jpg

Link to comment
Share on other sites

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/user3853574654/arcade-joystick-x4-plus-simon-game-384309 and https://github.com/gambaman/ArcadeJoystickX4PlusSimonGame. You can also see a video demo at

.

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

Link to comment
Share on other sites

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.

 

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:

table.thumb.png.5f31c8f8fca12fe25f58adc1b90358f8.png

Anyway the source code is at github and can be modified to fit your needs.

Link to comment
Share on other sites

  • 3 weeks later...

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 @adn0r’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

Edited by buttersoft
Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...