I have a strange request that may make sense after all.
Would it be possible to add support to MQTT in mame?
What is MQTT?
MQTT is an easy way to transmit data from senders to receivers.
You first need a server - as an example mosquitto.
Publisher will send data to a "channel", as an example /mame/emu
Listeners will "listen" to a few channel and react to these messages.
MQTT is heavily standardised in IOT devices. It means lamps, lights, screen, temperature easily transmit data through this communication channel.
As an example if I have a philips hue lamp, I can easily integrate it in a home system.
If the home system see the message "left,red" on the channel "/mame/emu", it will change the color of the philips hue lamp to red.
It could be a really cool way to integrate mame games in a room.
As an example, in chase hq: https://www.youtube.com/watch?v=45mi0fFKXms
You have 2 lamps: red and blue that switch on at some levels.
I can easily in my home system setup a rule that change the color of the lamp based on the messages sent by mame.
As an example, the following MQTT messages sent by mame would be great.
- When we start a game, send the name of the game, send stop when we quit the game.
- When we insert a credit, send the information that the credit was inserted.
- When some signal are sent by mame. As an example when mame request to switch on/off some lights. ChaseHQ is an example. (Many of them in pinball)
- Request to start a game.
- Request to stop mame (example: shutdown from external source).
- When some signal are "received" by mame. As an example when I press a button or touch some surface. (Many of them in pinball)
It should not be too difficult as these systems were made for embedded systems and are mostly opensource.