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: Is there a way to track how many times a game has been played in MAME?  (Read 3943 times)

0 Members and 1 Guest are viewing this topic.

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
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 :)

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: Is there a way to track how many times a game has been played in MAME?
« Reply #1 on: October 03, 2014, 12:37:15 pm »
MaLa does it.
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.

Generic Eric

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4520
  • Last login:July 15, 2024, 09:18:25 pm
  • Restore! Don't maim for MAME, build from scratch!
    • forum.arcadecontrols.com/index.php/topic,143226.0.html
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #2 on: October 03, 2014, 12:45:20 pm »
Which front end are you using?

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #3 on: October 03, 2014, 01:02:35 pm »
hyperspin

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: Is there a way to track how many times a game has been played in MAME?
« Reply #4 on: October 03, 2014, 02:04:41 pm »
Advmenu supports it too.
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

Hunk_4TH

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 311
  • Last login:July 20, 2025, 05:35:50 pm
  • I DON'T ALLOW VANDALISM IN MY STOOOOOOOOOOORE!
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #5 on: October 03, 2014, 08:54:07 pm »
Hyperlaunch 3 does in Hyperspin.

JDFan

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3448
  • Last login:March 03, 2025, 10:29:54 am
  • I want to build my own arcade controls!
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #6 on: October 03, 2014, 10:07:06 pm »
Mameui also tracks it.

B2K24

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 216
  • Last login:June 10, 2025, 10:17:56 am
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #7 on: October 04, 2014, 12:36:52 am »
GameEX can also accomplish this.

DeLuSioNal29

  • Global Moderator
  • Trade Count: (+6)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4779
  • Last login:July 11, 2025, 09:17:44 am
  • Build the impossible -"There is no Spoon"
    • DeLuSioNaL's YouTube Videos
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #8 on: October 05, 2014, 02:30:33 pm »
+1 on HyperLaunch 3 (which incidentally is now designed to pair up with any front end, including Hyperspin itself)
Stop by my Youtube channel and leave a comment:

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19960
  • Last login:July 17, 2025, 10:00:30 pm
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #9 on: October 05, 2014, 02:37:02 pm »
So the answer to his question is..... yes.  >:D
***Build what you dig, bro. Build what you dig.***

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #10 on: October 06, 2014, 09:48:00 am »
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.
« Last Edit: October 06, 2014, 10:03:56 am by twistedsymphony »

cools

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 645
  • Last login:May 17, 2025, 02:24:48 pm
  • Arcade Otaku Sysadmin
    • Arcade Otaku
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #11 on: October 06, 2014, 10:15:01 am »
MAME holds the coin counter in the XML .cfg file for the game.

Code something to parse that.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 03:28:48 am
  • Designated spam hunter
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #12 on: October 06, 2014, 10:44:46 am »
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 that should help with coding a program to add up coin drop outputs that have probably been in MAME since 0.107u4 (mentioned here, relevant excerpt below) and further details in Aaron Giles' blog post here.

Quote
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
« Last Edit: October 06, 2014, 11:15:41 am by PL1 »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 03:28:48 am
  • Designated spam hunter
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #13 on: October 06, 2014, 11:14:23 am »
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
« Last Edit: October 06, 2014, 11:18:13 am by PL1 »

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #14 on: October 06, 2014, 03:05:31 pm »
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.

Le Chuck

  • Saint, make a poll!
  • Wiki Contributor
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5509
  • Last login:June 14, 2025, 06:26:06 pm
  • <insert personal text here>
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #15 on: October 06, 2014, 06:33:44 pm »
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.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9671
  • Last login:Today at 03:28:48 am
  • Designated spam hunter
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #16 on: October 07, 2014, 12:23:07 am »
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-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

ballboff

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 194
  • Last login:July 22, 2024, 02:25:17 am
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #17 on: October 07, 2014, 03:03:06 am »
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).

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #18 on: October 07, 2014, 08:46:31 am »
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.

Dungeonsdeep

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 94
  • Last login:March 20, 2015, 02:20:01 pm
  • Pizza!
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #19 on: October 07, 2014, 11:37:49 am »
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.  ;)

cools

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 645
  • Last login:May 17, 2025, 02:24:48 pm
  • Arcade Otaku Sysadmin
    • Arcade Otaku
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #20 on: October 07, 2014, 03:58:41 pm »
Remember to report games that don't record the stats as bugs in MAME ;)

twistedsymphony

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 584
  • Last login:February 03, 2024, 11:13:51 pm
  • Play stupid games... win stupid prizes.
    • solid-orange.com
    • CollectorsEdition.org
Re: Is there a way to track how many times a game has been played in MAME?
« Reply #21 on: October 08, 2014, 08:52:18 am »
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.