Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: 1 Coin 2 Credits... ideas?  (Read 10431 times)

0 Members and 1 Guest are viewing this topic.

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
1 Coin 2 Credits... ideas?
« on: October 28, 2010, 09:37:11 am »
Hello,
My high school students build a MAME cabinet as an engineering projects. They designed and built it from scratch (they even build the computer!) and now it's to the point where it's working in all it's glory (well almost). We're putting the finishing touches on.

Here's my problem, I want to use the machine as a reward system, let the kids use it in their free time, and as a basis for lectures (electrical, design, etc). One of the things I want to do is make 1 coin give two credits in all games (for the reward system). This allows me to have some control over the system w/out being force to babysit the keyboard (and I can keep the back closed up!).

For some games I can simply adjust the dip switches (38 games done like that thus far) but some games don't have dip switches in MAME, some do but don't have the option to manipulate credits, etc etc. I also can't simply register all games as 1 coin 2 credits because games like NBA Jam need more credits then say a game like Pac-Man. Well, I want to make it so that ALL games give you approximately the same play time with 1 coin.

How can I do this? I've tried dip switching as many games as I can and I don't mind going game by game (as there will only be approx 125 games) but I need the know how/software. Any thoughts?

Thanks for the help, the students and I are incredibly grateful!

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: 1 Coin 2 Credits... ideas?
« Reply #1 on: October 28, 2010, 09:43:01 am »
You can write an AutoIt or AutoHotkey script to insert another coin by sending the coin key (probably after a delay). The problem is newer versions of MAME use RawInput and you can't easily send keystrokes to it. The easiest way around this is to compile MAME with the following #define set in src\osd\windows\input.c to force it to use DirectInput.

Code: [Select]
#define FORCE_DIRECTINPUT    1

wxforecaster

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 105
  • Last login:February 28, 2019, 01:19:24 pm
Re: 1 Coin 2 Credits... ideas?
« Reply #2 on: October 28, 2010, 10:23:04 am »
You can write an AutoIt or AutoHotkey script to insert another coin by sending the coin key (probably after a delay). The problem is newer versions of MAME use RawInput and you can't easily send keystrokes to it. The easiest way around this is to compile MAME with the following #define set in src\osd\windows\input.c to force it to use DirectInput.

Code: [Select]
#define FORCE_DIRECTINPUT    1

headkaze,

I would consider myself a pretty advanced programmer (and thus AHK scripter), but a MAME noob. I am in the planning/design stages of my cab, and would like to be able to use AHK extensively --- case in point the script I wrote in a recent thread to utilize a single button as pause/exit based on press vs. hold. With that said, I have read here as well as on the HyperSpin forums (which utilizes AHK) that forcing Direct Input will somehow break MAME's capability to interpret multiple inputs (mice, keyboards, guns, etc...). I have not wrapped my head around to what extent this would impact CP design and future planning, and was hoping you could provide some ley-term specifics as to what the truth/reality is.

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
Re: 1 Coin 2 Credits... ideas?
« Reply #3 on: October 28, 2010, 10:45:11 am »
erm... this is a bit over my head, I'll study it to the best of my ability but I'm not sure I'm it's in my capabilities.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: 1 Coin 2 Credits... ideas?
« Reply #4 on: October 28, 2010, 11:11:20 am »
You're right, without RawInput MAME cannot use multiple mouse or keyboards. This is only a problem if you plan on using 2 keyboards or mice at the same time.

HaRuMaN

  • Supreme Solder King
  • Global Moderator
  • Trade Count: (+45)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 10328
  • Last login:Yesterday at 04:24:36 pm
  • boom
    • Arcade Madness
Re: 1 Coin 2 Credits... ideas?
« Reply #5 on: October 28, 2010, 11:15:37 am »
Why not just give the kids 2 coins?  :P

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
Re: 1 Coin 2 Credits... ideas?
« Reply #6 on: October 28, 2010, 11:24:41 am »
Why not just give the kids 2 coins?  :P

Because if they select NBA Jam (example) or something I've gotta hand them quite a bit m ore than a game like pac man

ptinolv

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 97
  • Last login:January 20, 2024, 01:37:18 am
Re: 1 Coin 2 Credits... ideas?
« Reply #7 on: October 28, 2010, 04:32:31 pm »
I don't know if this works, but you could map a single physical slot to both player 1 and 2 coins in Mame. Like that when you put a coin it will credit twice (most games share the credits but it would only work for 2 players game).

Donkbaca

  • Our reptillian overlords would be pleased
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2648
  • Last login:May 09, 2012, 06:28:10 pm
    • Slim built MAME/Xbox cab
Re: 1 Coin 2 Credits... ideas?
« Reply #8 on: October 28, 2010, 07:29:03 pm »
I figured it out!  google, or look for "usb timer control board" on ebay.

here is a link:
http://cgi.ebay.com/USB-Time-timer-Control-Board-Power-Supply-kiosk-cafe-/250656126583?pt=LH_DefaultDomain_0&hash=item3a5c44f677

its a timer that you can hook up to your coin mech.  You can set the time for whatever you want it to be.  Then you can maybe mount the little display on the CP that counts down the time.  You can set it up so that each coin gives you, say, 5 minutes or something like that.  After that time, from what I gather, it will disable whatever you have plugged into it.

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4419
  • Last login:Yesterday at 10:11:32 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: 1 Coin 2 Credits... ideas?
« Reply #9 on: October 28, 2010, 10:11:08 pm »
if the games are in v.106 and Working, give ADVMAME a try. There is a script you can put in the RCC file (CFG/INI) that you can tell for what you want (insert a coin and give XXX credits) globably.

You can even set games in FREE PLAY all done in the config file (globaly).

It's been a while since I played with the RCC file cause my CAB is been done long ago and no need for me to fiddle with it.

I dunno of any Frontends that will do what you want.

You can however do something in MAME settings.

Goto the Global setting and change the:

Input 5 (coin 1) to Input 5 & 6
Input 6 (coin 2) to Input 5 & 6

so when you insert a coin in either slot, it will give 2 credits per coin inserted

Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: 1 Coin 2 Credits... ideas?
« Reply #10 on: October 30, 2010, 08:26:42 am »
if the games are in v.106 and Working, give ADVMAME a try. There is a script you can put in the RCC file (CFG/INI) that you can tell for what you want (insert a coin and give XXX credits) globably.

You can even set games in FREE PLAY all done in the config file (globaly).

and some games will break because they're badly programmed, seriously.  I can think of two semicom games off the top of my head that will glitch badly if you put them into freeplay (Cookie & Bibi 3, Puzzle Break) this happens on the real hardware.

Anyway I have nothing more on the subject, I just wanted to point out that it wasn't a good suggestion.  The developers in general don't encourage / support anybody trying to use actual coin mechs with MAME for obvious reasons.

It's been a while since I played with the RCC file cause my CAB is been done long ago and no need for me to fiddle with it.

I dunno of any Frontends that will do what you want.

You can however do something in MAME settings.

Goto the Global setting and change the:

Input 5 (coin 1) to Input 5 & 6
Input 6 (coin 2) to Input 5 & 6

so when you insert a coin in either slot, it will give 2 credits per coin inserted

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
Re: 1 Coin 2 Credits... ideas?
« Reply #11 on: November 01, 2010, 11:13:32 am »
Setting MAME to register 2 credits per "coin" globaly sounds like a pretty easy solution. I wouldn't want it to give one to each player though, rather, two to one player. I guess I'll mess with this and see what happens. I'm sure it's not as easy as registering the keypress "5" twice in MAME. Perhaps as Kaze said and coding something.... now to brush up on my software and coding haha.

Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14019
  • Last login:July 02, 2025, 09:03:11 pm
  • Have you played with my GingerBalls?
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: 1 Coin 2 Credits... ideas?
« Reply #12 on: November 02, 2010, 04:01:10 pm »
well NBA Jam has dips and a CMOS you can change =)

Id just see which games they wanna play that need the dip changed and change as you go. Odds are they are only gonna play a handful of games most of which can be changed. Once they figured out what they are actually gonna play, youre done.
If you're replying to a troll you are part of the problem.
I also need to follow this advice. Ignore or report, don't reply.

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
Re: 1 Coin 2 Credits... ideas?
« Reply #13 on: November 09, 2010, 11:28:18 am »
We've already generated a list of games (approximately 100) and there's a good deal of them (40 or so) that lack dips or the dips they have don't allow us to change them how we'd like.

We tried wiring up the coin the two buttons (coin 1 = 5 & 7) and switched it so that 5 & 7 are both set to coin one. The idea here was that if you put a coin it in would register 5 & 7 which would then give you a 1 coin for each press. Problem is since there's no delay it only registers one coin (but it does actually register both keys, we tested in notepad)

Donkbaca

  • Our reptillian overlords would be pleased
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2648
  • Last login:May 09, 2012, 06:28:10 pm
    • Slim built MAME/Xbox cab
Re: 1 Coin 2 Credits... ideas?
« Reply #14 on: November 09, 2010, 11:37:13 am »
I am still not clear on why registering two credits with one coin is any better/easier than just giving two coins...

HaRuMaN

  • Supreme Solder King
  • Global Moderator
  • Trade Count: (+45)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 10328
  • Last login:Yesterday at 04:24:36 pm
  • boom
    • Arcade Madness
Re: 1 Coin 2 Credits... ideas?
« Reply #15 on: November 09, 2010, 11:46:09 am »
Why not wire a second coin switch below the first one, and tie them both to the same input (5).  As the coin drops, it would hit the first switch, sending '5', then hit the second switch, and send '5' again.

Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14019
  • Last login:July 02, 2025, 09:03:11 pm
  • Have you played with my GingerBalls?
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: 1 Coin 2 Credits... ideas?
« Reply #16 on: November 09, 2010, 12:41:18 pm »
"change it how we'd like"

could you set all games to require 2 coins? then just give them two?
If you're replying to a troll you are part of the problem.
I also need to follow this advice. Ignore or report, don't reply.

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
Re: 1 Coin 2 Credits... ideas?
« Reply #17 on: November 09, 2010, 01:28:03 pm »
Why not wire a second coin switch below the first one, and tie them both to the same input (5).  As the coin drops, it would hit the first switch, sending '5', then hit the second switch, and send '5' again.

That was a thought but I thought it would be a more refined approach to change it within the software.

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
Re: 1 Coin 2 Credits... ideas?
« Reply #18 on: November 09, 2010, 01:29:04 pm »
"change it how we'd like"

could you set all games to require 2 coins? then just give them two?

That seems like I'd eventually get the same problem but with the opposite effect.

I've got it set to register two 2 keys but without a delay it ignores the second.

Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14019
  • Last login:July 02, 2025, 09:03:11 pm
  • Have you played with my GingerBalls?
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: 1 Coin 2 Credits... ideas?
« Reply #19 on: November 09, 2010, 01:31:13 pm »
"what game do you wanna play?"

if game is on list A give them 1 coin

if game is on list B give them 2 coins


am I over thinking this?
If you're replying to a troll you are part of the problem.
I also need to follow this advice. Ignore or report, don't reply.

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4419
  • Last login:Yesterday at 10:11:32 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: 1 Coin 2 Credits... ideas?
« Reply #20 on: November 09, 2010, 01:43:43 pm »
if you really want and the CAB is a 2-player cab.

Why not wire up 5 and 7 (p1-p3 coin) to one switch
                           6 and 8 (p2-p4 coin) to the other switch.

Now go into MAME and configure P1 (coin1) as 5 and 7
                                                     P2 (coin2) as 6 and 8
remove the p3 and p4 coin.

BINGO you get 2 credits for each slot for the correct player side.

Hope that made sense  :dizzy:
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Donkbaca

  • Our reptillian overlords would be pleased
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2648
  • Last login:May 09, 2012, 06:28:10 pm
    • Slim built MAME/Xbox cab
Re: 1 Coin 2 Credits... ideas?
« Reply #21 on: November 09, 2010, 01:50:56 pm »
I am a bit confused, I am with Malenko, I think your best suited by just regulating the number of coins.  So are you worried that one credit on NBA Jam won't last as long as one credit in Pacman?  If that is the case, having one coin register as two credits doesn't solve your problem.  Lets say one credit is good for 5 minutes of gameplay in NBA JAM, and a decent pacman player can play lets say for 10 minutes on one credit.  So, if you start registering 2 credits per coin , then the player on NBA JAM now gets 10 minutes of play, but the Pacman player now gets 20 minutes of play.  You still have that disparity.  Not sure how changing the number of credits that registers is going to solve the time per credit issue.  Seems a better solution is to set up a timer where one credit equals x number of minutes or just allocate coins based on a list of games like Malenko suggested.

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4419
  • Last login:Yesterday at 10:11:32 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: 1 Coin 2 Credits... ideas?
« Reply #22 on: November 09, 2010, 03:05:57 pm »
by then again

how is "let the kids use it in their free time" they suppose to have anyway (all night) ?

If they are limited in TIME, then a CREDIT BUTTON will be the easiest.
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: 1 Coin 2 Credits... ideas?
« Reply #23 on: November 09, 2010, 05:46:40 pm »
I think a wireless keyboard that you have in your desk should do the trick... instead of giving them 2 coins, they come over and you hit 5 twice...  This way you have a bit more control... and you don't have to play any games.

Donkbaca

  • Our reptillian overlords would be pleased
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2648
  • Last login:May 09, 2012, 06:28:10 pm
    • Slim built MAME/Xbox cab
Re: 1 Coin 2 Credits... ideas?
« Reply #24 on: November 09, 2010, 06:12:12 pm »
+1 to the wireless keyboard idea

notroubleclubber

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 176
  • Last login:October 07, 2023, 04:26:25 pm
Re: 1 Coin 2 Credits... ideas?
« Reply #25 on: November 10, 2010, 03:27:56 am »
All i do is map (using an ipac or minipac) the coin switch button to 5 and 6. When they put in 1 coin it gives 2 credits. Its handy then so if you want to play 1 player most games will give you 2 credits for 1Player. However it will only give 1 credit each for 2 players.

Lecithin

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 04, 2012, 10:15:48 am
Re: 1 Coin 2 Credits... ideas?
« Reply #26 on: November 10, 2010, 08:03:20 am »
All i do is map (using an ipac or minipac) the coin switch button to 5 and 6. When they put in 1 coin it gives 2 credits. Its handy then so if you want to play 1 player most games will give you 2 credits for 1Player. However it will only give 1 credit each for 2 players.


I tried that (and it worked) but I wanted to try the same w/5 & 7 as a pair (and then I set 5 & 7 as credit 1). It registers both key presses but without a delay MAME actually only registers one coin. I also thought of trying the 2 coin switch (one under the other) idea but I thought that it wasn't as elequent as other solutions might be.

As for the reason why I care so much, it's a student built and maintained project. I want them to problem solve how to do it. I'm on here posting because I haven't problem solved it either so when it becomes time for me to guide them I'm able to do so.