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: State messages  (Read 2553 times)

0 Members and 1 Guest are viewing this topic.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
State messages
« on: July 12, 2006, 03:08:26 pm »
I was just having a conversation with someone about skins and the messages that interface elements can respond to other than button presses... and I thought I'd throw this out here now and see if there are other status messages that would be useful to receive.  These messages can be used to toggle one or more icon images or to play a sound effect.

For example, I have messages to report when songs start and end, but I do not have a message to indicate the pause time between songs when on a real machine the disc would be changed.  Does it need a separate message?

State messages are about the easiest thing for me to add, so if there are any jukebox states that you would like to be able to trigger something, please let me know!

Currently supported status messages are:

MSG_FILTERED: Activated when a filter is in place; deactivated when the filter is cleared.  (Note that filters aren't actually implemented yet, but the message exists for when they are.)

MSG_POPULAR: Activated when the Most Popular list is shown;
deactivated when the Song Queue display is restored.

MSG_CREDITS: Activated when one or more credits are available; deactivated when no credits are remaining. When the jukebox is set to not require credits, this message is always active.

MSG_SONGSTART: Activated when a song is playing; deactivated when the song finishes.

MSG_SONGPAUSE: Activate when the Pause feature is activated; deactivated when play is resumed.

MSG_START: Activated when the jukebox is started.  This is the default action, and can be used to essentially apply "decals" to the jukebox without having to edit the skin background image.  Note that this message is never deactivated, so you cannot use this message to
trigger shutdown events, as the shutdown happens too quickly for the jukebox to respond to.

MSG_ISDOS: Activated for DOSCab Jukebox, deactivated for WinCab Jukebox. Useful if you wanted to show a different decal depending on which version is running.

MSG_RADIO: Activated when Radio Mode is started; deactivated when Radio Mode is exited.

MQ_MSG_MUTE: Activated when the Mute function is used; deactivated when normal volume is restored. This message is only sent if the actual mute function is used, not if the volume is simply turned down to minimum.

MSG_NOCREDITS: Activated when the user attempts to select a song when credits are required and no credits are available.  Deactivated two seconds later.

MSG_INVALID: Activated when the user attempts to select an empty song slot.  Deactivated two seconds later.

MSG_DUPSONG: Activated when a song is selected that is already in the queue if AllowDuplicatesInQueue is disabled in jukebox.ini. Deactivated two seconds later.

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

MrD

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 134
  • Last login:May 20, 2020, 04:34:05 pm
  • I want to build my own arcade controls!
Re: State messages
« Reply #1 on: July 13, 2006, 09:21:38 am »
How about when a coin is inserted?  Then you could have some kind of sound for when that happens?   Hmm...but that might interfere with the actual song playing.   Maybe when a song isn't currently playing?  Just a thought.   maybe an EVERY_COIN and an IDLE_COIN?

Would it also be possible have some kind of "load the keyboard buffer" associated with a msg state?  So that at startup you could preload a couple of credits, or pick an initial song to play, etc. 

Just putting in my two cents since you asked. 

Thanks for all your hard work.  It's a great program.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: State messages
« Reply #2 on: July 13, 2006, 09:32:29 am »
How about when a coin is inserted?  Then you could have some kind of sound for when that happens?   Hmm...but that might interfere with the actual song playing.   Maybe when a song isn't currently playing?  Just a thought.   maybe an EVERY_COIN and an IDLE_COIN?
See MSG_CREDITS above.  The default skin does indeed play a sound effect when receiving this message.  As far as interfering wit the song, there are separate volume settings for sound effects when a song is playing vs. when one isn't.  The default is for sound effects to play at 50% volume when no song is playing and 0 volume when a song is playing.

Quote
Would it also be possible have some kind of "load the keyboard buffer" associated with a msg state?  So that at startup you could preload a couple of credits, or pick an initial song to play, etc. 
Hmm.  This is theoretically easy, since inputs are handled by the same message system; all I have to do is set a way for a message to put other messages on the queue.  I had considered this, but wasn't sure if anyone would use it for anything, and of course for the possibility of message loops if a message triggers itself.  I do have 10 "user-defined" keys that  I set up ages ago but don't actually do anything but generate messages; with this, those 10 keys can essentially become "macro" keys. Hmm.  Is there anything useful for this system other than pre-loading credits (which would be easier handled with an InitialCredits option in JUKEBOX.INI)? 

--Chris

Just putting in my two cents since you asked. 

Thanks for all your hard work.  It's a great program.
[/quote]
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

MrD

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 134
  • Last login:May 20, 2020, 04:34:05 pm
  • I want to build my own arcade controls!
Re: State messages
« Reply #3 on: July 13, 2006, 11:20:10 am »
Sorry about that! I misunder what it meant.  I thought MSG_CREDITS only meant that when there was credits availble, (like turning on a graphic that said "select songs now") not when every credit was entered.   

I'm not sure what else loading up the keyboard buffer would be good for besides those things.  Maybe making it start in Radio mode start muted? Just thinking outloud.

Chris

  • Moderator
  • Trade Count: (+2)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: State messages
« Reply #4 on: July 13, 2006, 03:25:27 pm »
Sorry about that! I misunder what it meant.  I thought MSG_CREDITS only meant that when there was credits availble, (like turning on a graphic that said "select songs now") not when every credit was entered.   
Duh, Christopher.... you're right.  I don't even know my own jukebox...  :banghead:  The sound effects are keyed off the four BTN_COIN messages... so they're being triggered not off the act of adding a credit but the act of hitting a key, and MSG_CREDITS is sent when any credits are available and deactivated when they are not.  The question then becomes  is it useful to have a MSG_COIN in addition to BTN_COIN?  If a coin adds three credits, should it send one such message or three?

Let's see... The message queue has support for a delay timer in tenth of a second increments.  When credits are added, I can send a MSG_COININSERT, then one MSG_ADDCREDIT for each credit a tenth of a second apart, then a -MSG_COININSERT.  Most of the time these messages would be ignored, but someone might be able to use them...  messages could pile up quick that way though... hmm....
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com