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
Lightguns Arcade1Up Try the site in https mode Site News

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

  

Author Topic: mamewah broadcast selected game to all windows  (Read 4110 times)

0 Members and 1 Guest are viewing this topic.

eightbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1849
  • Last login:September 07, 2019, 07:38:11 pm
  • My cab is never done...
mamewah broadcast selected game to all windows
« on: October 27, 2003, 09:50:25 pm »
Is there a way in mamewah to "broadcast selected game to all windows" like you can in mame32? A friend of mine wrote a program to catch the broadcast and to change the screen on another computer (a laptop) to show artwork. We're in the design stage of the laptop screen and want it to show the marquee, a screen shot and eventually controls.dat information. If broadcast isn't builtin is there some other way to execute something when a game is launched?
My statements are my own opinions. They have the value that the reader gives them. My opinion of my opinion varies between foolish and brilliant and these opinions often change with new information.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:mamewah broadcast selected game to all windows
« Reply #1 on: October 28, 2003, 05:08:35 am »
Sorry, I have no idea what the broadcast thing does, so I guess there isn't a way to do it.

How about using a batch file instead of the emulator exe?

eightbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1849
  • Last login:September 07, 2019, 07:38:11 pm
  • My cab is never done...
Re:mamewah broadcast selected game to all windows
« Reply #2 on: October 28, 2003, 08:38:11 am »
Of course the simple answer, I didn't think of that. We can do just about anything we want then. The only disadvantage is that it wouldn't change the laptop untill the game was selected. With mame32 it broadcasts the game when you select it in the list. So as you scroll through the list the laptop changes with whatever game is highlighted.

Still very cool, I love Mamewah, Thanks MinWAH!

What is mamewah written in and is the source open?
My statements are my own opinions. They have the value that the reader gives them. My opinion of my opinion varies between foolish and brilliant and these opinions often change with new information.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:mamewah broadcast selected game to all windows
« Reply #3 on: October 28, 2003, 09:17:23 am »
Of course the simple answer, I didn't think of that. We can do just about anything we want then. The only disadvantage is that it wouldn't change the laptop untill the game was selected. With mame32 it broadcasts the game when you select it in the list. So as you scroll through the list the laptop changes with whatever game is highlighted.

Still very cool, I love Mamewah, Thanks MinWAH!

What is mamewah written in and is the source open?

I see, I'm not sure how to do that although I could add it to my list of stuff to do...your project sounds pretty cool :)

MW is written in VB6, and atm is not open source...

Valence

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 151
  • Last login:June 15, 2004, 10:44:49 pm
  • I want my own arcade controls!
Re:mamewah broadcast selected game to all windows
« Reply #4 on: November 06, 2003, 09:37:00 pm »
Minwah: Here's a pretty good way The MB InterProcess Control. But it does limit the choices of how the other side would receive the messages. But it is real easy. Here's an article on another way. It includes source code. Little bit more work but it is also fairly easy.

Eightbit: I'm using a activeX called autoit. But I use if for getting the mame screen title but once it is already running. So it wouldn't do exactly what you want it to.


Minwah: I would also really appreciate if you implemented something like this. It would help me out a bunch.

)p(

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 964
  • Last login:March 27, 2009, 03:38:15 am
  • We are the Galaxians...
    • Emulaxian:cabinet and frontend
Re:mamewah broadcast selected game to all windows
« Reply #5 on: November 07, 2003, 02:21:45 am »
if the other programs are allowed to run in the background then an easy way to do is is just write the name to the clipboard.

the other program can be set to sleep for x milliseconds and then check the clipboard for changes...if not it goes a sleep again if it finds a changes it does its thing etc.

peter

eightbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1849
  • Last login:September 07, 2019, 07:38:11 pm
  • My cab is never done...
Re:mamewah broadcast selected game to all windows
« Reply #6 on: November 07, 2003, 08:34:20 am »
Eightbit: I'm using a activeX called autoit. But I use if for getting the mame screen title but once it is already running. So it wouldn't do exactly what you want it to.
That would be satisfactory, we've been working on it and haven't found a way to make it to work yet. It would be ideal if you could broadcast as you scroll through the list, like mame32 does but right now I would love to be able to broadcast when after a game was selected. Can you tell me more about the way your doing it?
My statements are my own opinions. They have the value that the reader gives them. My opinion of my opinion varies between foolish and brilliant and these opinions often change with new information.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:mamewah broadcast selected game to all windows
« Reply #7 on: November 07, 2003, 11:15:34 am »
if the other programs are allowed to run in the background then an easy way to do is is just write the name to the clipboard.

the other program can be set to sleep for x milliseconds and then check the clipboard for changes...if not it goes a sleep again if it finds a changes it does its thing etc.

peter

Mamewah also writes the current game to uits debug log in the main mamewah directory so you can probably read it there too.

Valence

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 151
  • Last login:June 15, 2004, 10:44:49 pm
  • I want my own arcade controls!
Re:mamewah broadcast selected game to all windows
« Reply #8 on: November 08, 2003, 08:55:04 pm »
Heres where you can find the object. Its pretty easy to use and has really good instructions. http://www.hiddensoft.com/

I use it with a timer that calls the function after a predetermined time.

Valence

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 151
  • Last login:June 15, 2004, 10:44:49 pm
  • I want my own arcade controls!
Re:mamewah broadcast selected game to all windows
« Reply #9 on: March 03, 2004, 07:52:50 pm »
I finally figured out what eightbits request meant when I ran into it.

He wasn't very precise in his request.

The 'windows' he was referring to was Mamewahs main window.
So all you have to do is send the selected game text to the caption property of the form.

Pretty simple..


eightbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1849
  • Last login:September 07, 2019, 07:38:11 pm
  • My cab is never done...
Re:mamewah broadcast selected game to all windows
« Reply #10 on: March 03, 2004, 09:03:55 pm »
Simple for you or someone with programming experience. If it doesn't have a GUI with a check box I'm lost... I still can't do it.
My statements are my own opinions. They have the value that the reader gives them. My opinion of my opinion varies between foolish and brilliant and these opinions often change with new information.

Valence

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 151
  • Last login:June 15, 2004, 10:44:49 pm
  • I want my own arcade controls!
Re:mamewah broadcast selected game to all windows
« Reply #11 on: March 03, 2004, 10:35:02 pm »
I meant the pretty simple to mean a very simple change to mamewah to fill this request.  ;D

MadEditor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:May 03, 2015, 10:09:44 am
Re:mamewah broadcast selected game to all windows
« Reply #12 on: March 04, 2004, 10:32:26 am »
Why not Simply use mame32 ??? as the options is in it ...

SORRY  i should have read the threat better :-)
« Last Edit: March 04, 2004, 10:34:41 am by MadEditor »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:mamewah broadcast selected game to all windows
« Reply #13 on: March 04, 2004, 11:27:32 am »
The controls.dat viewer already has prelimenary support for such options.  It currently can watch for a changed text file and reload itself accordingly (buggy though, it still needs work).  Dk has various alternatives to "broadcasting" that I think minwah should look into instead because:

A.  They don't require activeX plugins

B. They don't require changing the caption (which is good for you particular app but VERY bad for other apps that might be looking for mamewah via it's caption.)

C.  They are just are more acceptable standards.  

I use  (or should say use in theory, they are broken as of this build) both methods of winsock communication, which are great because they can broadcast over a lan or wan for that matter.  These are great methods because winsock is built into windows, so everyone has it and there are apis designed to call it, so no plugins are necessary.

I also use a simple "write to a text file the current game's data"  method.  This one is great because all the companion app has to do is open a text file every few seconds and react to any changes.  This makes programming a breeze.  

I only bring these otehr methods up because determining things via the caption is very unreliable.  Trust me on this, as my wrappers used to use this method to get some of their data (they don't now, thank god!).  It seems to be working in your case though, but I've actually seen windows and screen managment programs change captions before.   It's highly unlikey, but when it happens it can be a huge pain.

Hope that helps your problem some.  And remember "broadcasting" is bad ummk.  The prime example of this is the fact that the mame32 devs like it.  ;)

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:mamewah broadcast selected game to all windows
« Reply #14 on: March 04, 2004, 12:01:23 pm »
And remember "broadcasting" is bad ummk.  The prime example of this is the fact that the mame32 devs like it.  ;)

cheap shot, but funny anyway!

eightbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1849
  • Last login:September 07, 2019, 07:38:11 pm
  • My cab is never done...
Re:mamewah broadcast selected game to all windows
« Reply #15 on: March 04, 2004, 01:03:47 pm »
Just to clarify things when I asked the question I was wondering if this broadcast was something that mamewah could already do or if there was another easy way to get mamewah to tell me what game was playing. In theory I should be able to do it in a batch file or read the log but I lack the knowledge to do either.

I still don't have a way to do this no matter how many people tell me how simple it is to do. I'm not bugging minwah to add it because if he wants it he'll get around to doing it. Mamewah is my favorite front end and I'm happy that Minwah has choosen to share it with us.

So if someone else has figured a reasonably easy reliable way to do this with mamewah I'd appreciate very much if they would share that information with me.
My statements are my own opinions. They have the value that the reader gives them. My opinion of my opinion varies between foolish and brilliant and these opinions often change with new information.

Valence

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 151
  • Last login:June 15, 2004, 10:44:49 pm
  • I want my own arcade controls!
Re:mamewah broadcast selected game to all windows
« Reply #16 on: March 04, 2004, 10:11:17 pm »
Howard Castro

I can not get DK to work with my old crappy video card. Not your fault.  You shouldn't have to support the lowest common denominator. I will upgrade and use it, but till then, I have mamewah.

I use an activeX control for what I am doing.  Its all I need.

While I think that your text file with game data is great. Are you suggesting that he would be able to remotely open a file and read it into his app fast enough for it to change data on the laptop screen while games are selected?

My prog works regardless of caption. Mamewah doesn't use a caption at all.  While you did things with your wrappers way beyond what he wants to do, Mame's caption has been consistent from all that I've used. When you are creating a playlist or text list of game data, I can see where a few different captions scattered in there are important, but he is just displaying a picture on a laptop based off the games name.

Windows sockets are great also and very efficient but we are talking about Minwah adding one short line of code to his app. Not coding api calls.

Eightbit

I would also like it implemented in Mamewah, which is why I brought it up again.
(With the activeX object and this change. It would be really easy to do what you want)

I agree with you in everyway about Mamwah and Minwah. I just brought it up again because I found out how to do it easily.


 :D
« Last Edit: March 04, 2004, 10:14:46 pm by Valence »

eightbit

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1849
  • Last login:September 07, 2019, 07:38:11 pm
  • My cab is never done...
Re:mamewah broadcast selected game to all windows
« Reply #17 on: March 04, 2004, 10:50:28 pm »
Valence is this something you could share? I would love to have this functionality.
My statements are my own opinions. They have the value that the reader gives them. My opinion of my opinion varies between foolish and brilliant and these opinions often change with new information.

Valence

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 151
  • Last login:June 15, 2004, 10:44:49 pm
  • I want my own arcade controls!
Re:mamewah broadcast selected game to all windows
« Reply #18 on: March 04, 2004, 10:56:03 pm »
I'm not sure what you mean?
Do you mean this
Heres where you can find the object. Its pretty easy to use and has really good instructions. http://www.hiddensoft.com/

I use it with a timer that calls the function after a predetermined time.
But as I said, It won't work for what you need it to do.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:mamewah broadcast selected game to all windows
« Reply #19 on: March 04, 2004, 11:59:25 pm »
Did you see my original suggestion of reading the debug.log file? it shows you which file is launched, but doesn't do anything while in the frontend

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19428
  • Last login:Yesterday at 01:14:11 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re:mamewah broadcast selected game to all windows
« Reply #20 on: March 06, 2004, 12:38:33 am »
Howard Castro

While I think that your text file with game data is great. Are you suggesting that he would be able to remotely open a file and read it into his app fast enough for it to change data on the laptop screen while games are selected?



It takes a vb app ~ 1.5 milliseconds to open a text file and read it.  And that's accouting for lag, and a complicated parsing process.  So yes, you could easily read a text file that fast.  


I think you are missing the big picture..... adding "broadcasting" via captions will work for eightbit's problem, but I'm guessing if minwah would be willing to do this he'd want to make a more universal solution don't you think?

Imo you should never code for one individual app unless you want to give youself more work int he future.  The best way is to make the structure as modular as possible, especially when it comes to external linking.  With that being said, I'll go ahead and add a broadcasting option to dk, just in case someone want's to use it or finds a closed source app that needs the info that way.  It never hurts to have an extra option or 2.  ;)