Main > Software Forum

Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!

(1/3) > >>

Howard_Casto:
In the recent versions of mame, the output system has changed.  To use apps built with the old system, please set "outputs" to "windows" in the mame.ini  Thanks!

Please Sticky this thread.

PL1:
The MAME Windows output system sends commands to control the hardware on the original arcade cabinet that was controlled by commands from the original game PCB.

Examples of this include the Q*bert knocker, the flashing start button LED after adding a coin in Dig Dug (0:55-1:00), and lighting up the selected mission on the Lunar Lander Mission Control Panel.







    NOTE: This should not be confused with using LEDBlinky and "controls.ini" to light RGB LED buttons.  That is an external process not controlled by MAME because the original cabinets did not have RGB LED buttons.

There are two five important questions that need to be answered:

  1. Which version of MAME broke the old output system?  0.170
(so people with earlier versions know that they can disregard this post)

  2. Which version of MAME did the old output system start working again?  0.176 (?)
(so people know that they need to upgrade to that version or newer to use the old output system)

  3. How do I use the old output system with MAME 0.176 and later?

--- Quote from: headkaze on August 06, 2016, 03:48:40 pm ---Just set the following in mame.ini:


--- Code: ---#
# OSD OUTPUT OPTIONS
#
output                    windows
--- End code ---

--- End quote ---

  4. Which version of MAME added the new Windows output system?  Headkaze's patch was added in 0.175.

  5. Which version of MAME has the new Windows output system working?  To be determined.
(As mentioned here there is still testing to do and further patches to implement and software developers will need to rewrite their .DLL library files to work with the new system)


Scott
EDIT: Added probable version #s.
EDIT 2: Added more questions and examples.

Howard_Casto:
I'm not sure.  The changes were never documented, so we are just stumbling upon answers.  I'll download a few versions tomorrow and see if I can figure it out.

PL1:
Thanks, Howard.   :cheers:


Scott

EDIT: I think I found a good starting point in the LEDBlinky thread.

--- Quote from: arzoo on August 05, 2016, 03:56:47 pm ---As of mame .170 the output system is broken and LEDBlinky can't detect any mame output events. A patch has been submitted and implemented as of .176 but the interface library (between LEDBlinky and mame) is still in the process of getting updated.
--- End quote ---

Arbee:
I have some news.  I used the long holiday weekend just now in the US to seriously upgrade the "network" output system.  It should now be usable in a similar way to the legacy Windows window message passing.  The changes are in Github top of tree now and will ship in 0.188.

Here's how it works:
- Connect to TCP port 8000 on the MAME machine (this is valid starting when the first info screen appears)
- MAME will say "hello =1\1" (more on the \1 later)
- To get the game's name, send "send_id = 0\1" to MAME.  MAME will reply "req_id = propcycl\1" or whatever the game's set name is.
- To get the output IDs, send "send_id = 1\1" (and 2, 3, 4, etc) to MAME, just as you did with the legacy Windows setup.
- MAME will send outputs as they happen, stuff like "led0 = 0\1" (led 0 off) and "led0 = 1\1" (led 0 on).
- When MAME is exiting, it will send "mamerun = 0\1" to indicate impending shutdown.
- Closing the TCP connection automatically removes your client from the system, you don't need to send an explicit removal command as you did with the Windows output.

A few notes:
- If you're busy while MAME has a lot to say, you may get multiple messages in one data read.  Crack the incoming data apart on the \1 (hex 0x01) boundries to make sure you don't miss anything.
- \1 was chosen because it's OS-neutral; the more logical \n is two bytes on Windows and one on everything else.  You should be able to talk to MAME with identical high-level code across platforms now, just the low-level sockets details differ.
- I have a working Linux/Mac client in C++ which I will post soon, I'm working on a sample Windows one.

Navigation

[0] Message Index

[#] Next page

Go to full version