Open gabrielklein opened 4 years ago
-output was written basically to the exact specifications of the author of the MAMEHooker application, which uses it to control cabinet features like LEDs. It disconnects because it's very much intended to be a per-session thing, and therefore extending it to select games is not feasible.
-http at one time had a lot of features to control MAME. I believe you could grab a current screenshot and switch disks/cartridges in running computer/console drivers among other things.
However, it's been effectively abandoned since Micko retired (I think around 2014) and has been superseded by the Lua hooks which advanced frontends like BletchMAME use to exercise intimate control of MAME internals. Everything you want to do should already be possible through that interface; check out the BletchMAME source for details.
Thank you for the very informative answer to my ticket.
To describe a bit more what I'm trying to do.
I want to display things like current game and have small effects on my raspberry like lighting red, blue leds while running some games like ChaseHQ and have a small animation when inserting money and have a proper shutdown :).
Using "-console network", I can get the current game (and execute a simple command on the raspberry to show the snap image of the game). I can get the "LIGHT0 LIGHT1" messages.
My main issue is lack of documentation with these interfaces, it's why I tried to find more information in the code.
I was expecting to get image of the game using -http and some more information - but I haven't found the code that serve them. /api/machine is the only interface I found.
I was looking for some other wrappers, but with very limited success.
Where can I find as an example a list of promising messages returned by games! (like the LIGHT0, LIGHT1 returned by "ChaseHQ").
"lua" is definitely an interesting answer to my problems - but again the documentation is quite limited to understand how to access some registers, some information. Note: some documentation on https://github.com/mamedev/mame/blob/master/src/frontend/mame/luaengine.cpp
Thank you anyway for the time taken to answer my ticket! Now trying to understand a bit more BletchMAME.
The output stuff is not very clean yet, and as a result it's hard to tell what messages a given game can send. There are two main ways:
The existence of the dynamic way is why we can't inventory them at that point.
OG.
On Tue, Dec 3, 2019 at 12:20 PM Gabriel Klein notifications@github.com wrote:
Thank you for the very informative answer to my ticket.
To describe a bit more what I'm trying to do.
- I have a cabinet.
- I have mame running on a "normal computer" (running on ubuntu / linux).
- I have a simple raspberry on my cabinet with a 3.5 touch screen + 6 RGB leds (WS2812, 3 left and 3 right). Mame is NOT running on this raspberry (running on raspbian / linux)
I want to display things like current game and have small effects on my raspberry like lighting red, blue leds while running some games like ChaseHQ and have a small animation when inserting money and have a proper shutdown :).
Using "-console network", I can get the current game (and execute a simple command on the raspberry to show the snap image of the game). I can get the "LIGHT0 LIGHT1" messages.
My main issue is lack of documentation with these interfaces, it's why I tried to find more information in the code.
I was expecting to get image of the game using -http and some more information - but I haven't found the code that serve them. /api/machine is the only interface I found.
I was looking for some other wrappers, but with very limited success.
Where can I find as an example a list of promising messages returned by games! (like the LIGHT0, LIGHT1 returned by "ChaseHQ").
"lua" is definitely an interesting answer to my problems - but again the documentation is quite limited to understand how to access some registers, some information.
Thank you anyway for the time taken.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mamedev/mame/issues/5998?email_source=notifications&email_token=ACGSF4I3L52GEAWFVUHL6WLQWY6ITA5CNFSM4JTOOU3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFZBFOA#issuecomment-561124024, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGSF4MKW4VFIVC2SM64ET3QWY6ITANCNFSM4JTOOU3A .
Thank you for the very informative answer to my ticket.
To describe a bit more what I'm trying to do.
* I have a cabinet. * (On this cabinet) I have mame running on a "normal computer" (running on ubuntu / linux). * (On this cabinet) I have a simple raspberry on my cabinet with a 3.5 touch screen + 6 RGB leds (WS2812, 3 left and 3 right). Mame is NOT running on this raspberry (running on raspbian / linux)
I want to display things like current game and have small effects on my raspberry like lighting red, blue leds while running some games like ChaseHQ and have a small animation when inserting money and have a proper shutdown :).
Using "-console network", I can get the current game (and execute a simple command on the raspberry to show the snap image of the game). I can get the "LIGHT0 LIGHT1" messages.
My main issue is lack of documentation with these interfaces, it's why I tried to find more information in the code.
I was expecting to get image of the game using -http and some more information - but I haven't found the code that serve them. /api/machine is the only interface I found.
I was looking for some other wrappers, but with very limited success.
Where can I find as an example a list of promising messages returned by games! (like the LIGHT0, LIGHT1 returned by "ChaseHQ").
"lua" is definitely an interesting answer to my problems - but again the documentation is quite limited to understand how to access some registers, some information. Note: some documentation on https://github.com/mamedev/mame/blob/master/src/frontend/mame/luaengine.cpp
Thank you anyway for the time taken to answer my ticket! Now trying to understand a bit more BletchMAME.
maybe you what something like this: https://github.com/meduzapat/LEDSpicer
Hi, I try to find more informations concerning http and output options.
mame -output console and mame -output network
1) Would if be possible to explain a bit more what this option does in the mame documentation? https://docs.mamedev.org/commandline/commandline-all.html#mame-commandline-output
2) Why the "network interface" is disconnected every time we load a new game?
3) Would it be possible to support a few more messages?
x) I saw the mame -http option.
In the code, I found m_manager.http()->add_http_handler("/api/machine", [this](http_manager::http_request_ptr request, http_manager::http_response_ptr response)
What is the purpose of only having one option?
Could we imagine to output some files from mame? As an example http://localhost:8080/current/marquee or http://localhost:8080/current/snap return current snapshot or marquee.
My goal is to interact a bit more with remote applications. As an example an android (or raspberry) app to control mame remotely, have a list of games, start them, pause them.
As an example use an old android phone to integrate into a cabinet and show misc options linked to the game, have a "dynamic marquee" using a raspberry and a screen :) .