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
Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news


  

Author Topic: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!  (Read 2729 times)

0 Members and 1 Guest are viewing this topic.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15382
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
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

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6307
  • 2013 UCA Awardee
Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
« Reply #1 on: August 06, 2016, 05:43:34 pm »
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.

Q*bert knocker


Dig Dug


Lunar Lander


    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?
Just set the following in mame.ini:

Code: [Select]
#
# OSD OUTPUT OPTIONS
#
output                    windows

  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.
« Last Edit: August 22, 2016, 12:08:04 pm by PL1 »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15382
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
« Reply #2 on: August 06, 2016, 06:42:50 pm »
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

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 6307
  • 2013 UCA Awardee
Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
« Reply #3 on: August 06, 2016, 07:28:50 pm »
Thanks, Howard.   :cheers:


Scott

EDIT: I think I found a good starting point in the LEDBlinky thread.
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.
« Last Edit: August 06, 2016, 07:37:31 pm by PL1 »

Arbee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
« Reply #4 on: July 05, 2017, 02:41:05 pm »
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.

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
    • RGBcommander
Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
« Reply #5 on: July 05, 2017, 03:45:06 pm »
 :cheers: That's cool man. I'll code support for it in RGBcommander.
I'm glad you fixed this. I wanted to fix it too but never found the time to do it.
My initial thought was to let Mame send udp packets to an ini specified port - that way the client software would just need to listen and not pro actively connect or send commands.
That would have been perfect for my daemon but tcp is fine too.
Kudos to you! :)

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2927
  • 0x2b|~0x2b?
Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
« Reply #6 on: July 06, 2017, 01:45:44 am »
- I have a working Linux/Mac client in C++ which I will post soon, I'm working on a sample Windows one.

I've already written a working Windows client although it will need to be updated to support the new delimiter (I personally would have just gone with '\r')

You can download the source in the MameInterop SDK v1.2 thread.

Arbee

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 48
Re: Users of Mamehooker, LEDWiz, LedBlinky and Similar apps Please Read!
« Reply #7 on: July 17, 2017, 11:14:32 am »
Thanks Headkaze!

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31