Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mame -output console or -output network #5998

Open
gabrielklein opened this issue Dec 2, 2019 · 4 comments
Open

mame -output console or -output network #5998

gabrielklein opened this issue Dec 2, 2019 · 4 comments

Comments

@gabrielklein
Copy link

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?

  • Something to run/change games.
  • Something to add coins (or make it more generic)
  • Notify every time we enter some coins?
  • A few more potential messages that may be useful?
  • A list of current configurations? (Something that return a list of keyboard mappings for the game)
  • List of all games

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 :) .

@rb6502
Copy link
Contributor

rb6502 commented Dec 2, 2019

-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.

@gabrielklein
Copy link
Author

gabrielklein commented Dec 3, 2019

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.

@galibert
Copy link
Member

galibert commented Dec 3, 2019 via email

@meduzapat
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants