Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: twistedsymphony on October 03, 2014, 12:05:55 pm
-
I've been searching for a few days now to see if I could find a way to count how many times a game is played. My goal is so that after parties or just regularly I can keep track which games my friends and I are playing more than others.
Ideally I'd like a sort of "virtual coin counter" that would keep track of actual plays/continues within each game. but just being able to see how frequently each game is launched from the front end would be cool too.
I haven't been able to find anything that does this, and my only idea would be to have the front end launch a bat file instead of MAME and then write out the ROM name and time stamp to a CSV before launching MAME in order to keep track of how often each game is launched, but that seems like a cheesy solution.
If anyone knows of anything that does this I'd be interested in knowing about it :)
-
MaLa does it.
-
Which front end are you using?
-
hyperspin
-
Advmenu supports it too.
-
Hyperlaunch 3 does in Hyperspin.
-
Mameui also tracks it.
-
GameEX can also accomplish this.
-
+1 on HyperLaunch 3 (which incidentally is now designed to pair up with any front end, including Hyperspin itself)
-
So the answer to his question is..... yes. >:D
-
So the answer to his question is..... yes. >:D
Not really, the core question was if there was any way to count coin drops per game in MAME for a "virtual coin counter".
I suggested that I already had a way to count how many times a game has been selected from the front end, and that's cool too but not exactly what I was looking for. I appreciate the suggestions but I'd still really like something that counts coin pushes in each game.
-
MAME holds the coin counter in the XML .cfg file for the game.
Code something to parse that.
-
Based on the fact that JAMMA pinout has outputs leading to coin counters 1 and 2, I suspect that there's a coin counter output message being broadcast by MAME when a coin switch is closed, similar to the way LED output messages are sent to flash the volcano start buttons on Dig Dug, etc.
Check out the post on the MameInterop SDK here (http://forum.arcadecontrols.com/index.php/topic,62982.msg626384.html#msg626384) that should help with coding a program to add up coin drop outputs that have probably been in MAME since 0.107u4 (mentioned here (http://forum.arcadecontrols.com/index.php/topic,56939.msg559870.html#msg559870), relevant excerpt below) and further details in Aaron Giles' blog post here (http://aarongiles.com/?p=181#more-181).
Abstracted the notion of outputs. A new module, output.c, now controls
all outputs. Each output is tagged with a name; some standardization
eventually needs to happen on these names, but at the moment it's
fully open. The OSD layer can register with output.c to be notified
when outputs change. From there, it is free to do what it wants. LEDs
have now been converted to outputs with the name "led0", "led1", etc.
[Aaron Giles]
Added support for notifying external clients of changes in output
states in the Windows OSD system. See windows/output.h for a list of
messages that external clients can register to receive. Removed the
built-in hacky LED support in the Windows OSD layer. Created a sample
application ledutil.exe which subscribes to the external events and
routes the "led0", "led1", and "led2" outputs to the keyboard LEDs
just like before. If you want to continue to have LED support, simply
copy ledutil.exe into your startup folder and let it run in the
background. [Aaron Giles]
Scott
-
MAME holds the coin counter in the XML .cfg file for the game.
Code something to parse that.
Sounds like a good idea in theory.
Did a spot test on three games in MAMEUIFX 0.152 to see if the "bookkeeping info" menu displays that info -- came up with these somewhat discouraging results.
Bubble Bobble -- Coin A thru Coin H all show "NA" regardless of coins dropped in slot 1 or 2
Caveman Ninja -- Coin A thru Coin H all show "NA" regardless of coins dropped in slot 1 or 2
Centipede -- Coin A and Coin B show the total number of coins dropped in slots 1 and 2 respectively (keeps running tally, just like a coin counter would ;D)
I'm guessing that the coin counter outputs on the first two games may be mislabeled, but nobody has ever noticed. :dunno
Scott
-
Did a spot test on three games in MAMEUIFX 0.152 to see if the "bookkeeping info" menu displays that info -- came up with these somewhat discouraging results.
Bubble Bobble -- Coin A thru Coin H all show "NA" regardless of coins dropped in slot 1 or 2
Caveman Ninja -- Coin A thru Coin H all show "NA" regardless of coins dropped in slot 1 or 2
Centipede -- Coin A and Coin B show the total number of coins dropped in slots 1 and 2 respectively (keeps running tally, just like a coin counter would ;D)
I'm guessing that the coin counter outputs on the first two games may be mislabeled, but nobody has ever noticed. :dunno
Thats a real shame :(
I wonder if there is a way to run a sort of key-logger program that is set to launch just before MAME you could pass it the ROM name and it would count whenever the start button is pushed, that way it would also work for free-play games and non-MAME games the front end could then unload it on game exit.
the only games it wouldn't work on are those without a start button like TMNT or Primal Rage.
-
I recon you could have autohotkey log what rom is passed to mame and then log the number of times five is pressed. Output to a text file. Seems doable.
-
I recon you could have autohotkey log what rom is passed to mame and then log the number of times five is pressed. Output to a text file. Seems doable.
Sounds like a good idea if you also include the number of times six is pressed and write to the end of a spreadsheet-importable CSV (http://en.wikipedia.org/wiki/Comma-separated_values)-formatted text file when escape is pressed.
You'll see not only how many coin drops, but patterns like games that are launched a number of times, but only one or two coin drops before people move on to another game.
Another feature that you might want to include is start and stop times so you can tell the difference between games that last half an hour on one coin drop vs. those that last 30 seconds on one coin drop.
Scott
-
Mmmm this wouldn't work on my machine. My young one seems to think he needs 100 coins in just to play pacman. I don't know if he thinks he's going to run out, or he's going to be playing for hours (I only let him play for about 10-15 minutes at a time anyway).
-
Mmmm this wouldn't work on my machine. My young one seems to think he needs 100 coins in just to play pacman. I don't know if he thinks he's going to run out, or he's going to be playing for hours (I only let him play for about 10-15 minutes at a time anyway).
yeah, that's why in my last post I had suggested keying off of the start button instead of coin drops, keeping track of time as PL1 suggested is another good idea too but then you have the problem where someone might leave the machine sitting in game instead of quitting back to the menu.
I think no matter what you do there are going to be "bad habits" by players that can throw off the results.
I like the idea of recording all of it... for each game selected write out to a CSV:
rom_name, start_time, end_time, coins_p1, coins_p2, starts_p1, starts_p2
putting that into a real database would allow you to query it in all kinds of ways.
you might also be able to combat bad habits like building a timer circuit on the coin buttons that doesn't allow more than one coin drop within 3 seconds... I've seen this done for real arcade hardware in free-play arcades for games that don't support free-play, it prevents player from loading up the credits and walking away. maybe there's a way to do this in software?
maybe some other script to check idle time and if a game sits idle for say 5 minutes without any input from the sticks/buttons then it will auto-quit back to the menu.
-
So the answer to his question is..... yes. >:D
Not really, the core question was if there was any way to count coin drops per game in MAME for a "virtual coin counter".
I suggested that I already had a way to count how many times a game has been selected from the front end, and that's cool too but not exactly what I was looking for. I appreciate the suggestions but I'd still really like something that counts coin pushes in each game.
Hook up actual coin door to your system with a counter...
Everytime you play, drop a quarter...
I'd say "profit", but that's simply not the case. ;)
-
Remember to report games that don't record the stats as bugs in MAME ;)
-
So the answer to his question is..... yes. >:D
Not really, the core question was if there was any way to count coin drops per game in MAME for a "virtual coin counter".
I suggested that I already had a way to count how many times a game has been selected from the front end, and that's cool too but not exactly what I was looking for. I appreciate the suggestions but I'd still really like something that counts coin pushes in each game.
Hook up actual coin door to your system with a counter...
Everytime you play, drop a quarter...
I'd say "profit", but that's simply not the case. ;)
cute, but that wouldn't tell me how many coins were dropped on a game by game bases.... that and the J-PAC adapter doesn't support coin counter output, which means I'd have to develop my own debounce circuit and driver board for the coin counter.