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: Power off when Mame is running from Mamewah!  (Read 3131 times)

0 Members and 1 Guest are viewing this topic.

arcaic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:October 05, 2007, 09:15:04 am
Power off when Mame is running from Mamewah!
« on: September 15, 2004, 10:53:48 am »
Hi all,

Trying to make my cab as simple as possible for the kids and missus and I have come across this problem I think is in Mamewah!

If Mamewah has launched Mame and then I press the PC on/off button Mame seems to exit cleanly but Mamewah doesnt. It just keeps its head down while XP puts the not responding dialogue up and finally kills it before shuting down.

If a screen saver is running and I shut down via the PC on/off button everything shuts down cleanly.

Whether Mamewah, Mame or a screen saver is active I want the whole lot to shutdown cleanly when the PC on/off button is pressed.

Any idea's. Minwah?

Cheers

Andy

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Power off when Mame is running from Mamewah!
« Reply #1 on: September 15, 2004, 11:35:50 am »

arcaic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:October 05, 2007, 09:15:04 am
Re:Power off when Mame is running from Mamewah!
« Reply #2 on: September 15, 2004, 11:54:35 am »
Ok, thanks for that I gave it a try but no difference.

I used TaskManager to take a look at what was running when I hit the PC on/off button.

Although WinXP complains that Mamewah is not reponding I can see that Mame itself is still running and this is presumably why Mamewah doesnt wake up and process any shutdown request itself.

I then quit mamewah and ran mame from a cmd prompt. In this case the machine shut down cleanly without any delay or complaint.

So it looks like Mame doesnt respond to shutdown requests when launched by Mamewah. Doesnt really make any sense to me.

Can anyone else try and see if they have the same behaviour?

Cheers

Andy

PedroSilva

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:August 01, 2018, 08:37:57 am
  • Grettings !
Re:Power off when Mame is running from Mamewah!
« Reply #3 on: September 15, 2004, 12:03:28 pm »
Hi,

I believe Mamewah has an option for shutdown without asking anything so ... the only thing you need is to have an ESC button ...

I know ... I know you need to hit it 2 times when you're in mame ... but doesn't seem bad anyway ...

I'm doing that on may cab ...

Mr. Dude

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 477
  • Last login:March 03, 2019, 05:12:50 am
  • Hi...
Re:Power off when Mame is running from Mamewah!
« Reply #4 on: September 15, 2004, 12:08:41 pm »
It sounds from your explaination that you are launching mame32 from mamewah and then just pushing the PC power button to try and turn it off... is this correct?  To shut it down properly you should exit from mame32 and then exit from mamewah.  Mamewah gives you an option to exit to windows or exit and shutdown.  

arcaic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:October 05, 2007, 09:15:04 am
Re:Power off when Mame is running from Mamewah!
« Reply #5 on: September 15, 2004, 12:22:32 pm »
No I am not using mame32.

I am using the windows command line version of Mame .86 and I am aware of the mamewah options for shutdown from within Mamewah. This issue has nothing to do with those options.

On a ATX PC the on off button can usually be set to hibernate/standby/power off as you require. If I press the pc on off button in my Mame cab then if I am in the Mamewah fron end all shuts down nicely but if mamewah has launched mame then it hangs on shutdown and it seems that mame doesnt exit.

I think this is more a Mame issue than mamewah but I'd like to get it working.

Minwah. What api call / command do use use to launch the emulator. If you could post enough of a snippet so I can duplicate what you do then I could play around and explore further what is going on and not bother you with it.

Cheers

Andy

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Power off when Mame is running from Mamewah!
« Reply #6 on: September 15, 2004, 01:14:34 pm »
I use a routine called ExecCmd (you should be able to find it with a search on Google, don't have any code to hand atm).

You are correct in that MAMEWAH will 'not respond' until MAME has finished.  To be honest it doesn't surprise me that you have problems trying to shut down this way.  Personally I would recommend you just quit MAME and exit MW when you've had enough - map 'EXIT_AND_SHUTDOWN' in the \mamewah\ctrlr\default.ini file to shut down on a key/input.

edit: sp
« Last Edit: September 15, 2004, 01:14:55 pm by Minwah »

Benzinger

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 4
  • Last login:September 26, 2006, 11:03:52 pm
  • I'm a llama!
Re:Power off when Mame is running from Mamewah!
« Reply #7 on: September 18, 2004, 07:16:44 am »
For what it's worth...  :)  (I'm a super-newbie)
I am running Mame32 through Mamewah (not recommended, I know), and I can tell you two things...

First, if I should try to shut down the computer using the front power button while actually playing a game (I tried this playing Dig-Dug under Mame32, and a pinball game under VPinMame,) I will get the end program and then the subsequent program not responding dialog for Mamewah.  If I then click "end now" or whatever it is, I get a clean shutdown.

However, and more to the point perhaps, if I am actually in Mamewah, i.e. at the menu to select a game, and I press the front power button, everything shuts down just fine.

Looking back at that, it seems like a lot of commas.

But anyway, it seems the easiest way to get around this problem is to shut-down when in Mamewah, and not actually in a game.  I gather from re-reading your first post Arcaic that you or your family are shutting down from within a game.

Actually, the more I think about it (I've had a few tonight), I haven't really helped at all, except to say that (I think) I can duplicate what is happening to you.  But could it be possible to train the wife and kids to get back to the Mamewah selection screen before hitting the shutdown button?

arcaic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:October 05, 2007, 09:15:04 am
Re:Power off when Mame is running from Mamewah!
« Reply #8 on: September 18, 2004, 08:50:32 am »
Thanks for the replies.

I know how to shut down without the problems and yes it is an issue of training on the part of others but heck, I have a 15 year old who no matter what I tell him to do will almost certainaly forget and do what ever he wants anyway which probably means just hitting the power off button or alternativly forgeting and leavin it on all day  ::)

Anyway, I have found what seems to be a solution but it requires a change to Mamewah. I have notified Minwah but as this affects a fairly core part of the FE (launching the emulator) he may not want to put it in which is of course perfectly fair as its him who gets the grief if the change throws up new problems.

Cheers

Andy

daywane

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2570
  • Last login:December 26, 2024, 11:02:08 am
  • GRRRR!
Re:Power off when Mame is running from Mamewah!
« Reply #9 on: September 18, 2004, 11:22:16 am »
Thanks for the replies.

 I have a 15 year old who no matter what I tell him to do will almost certainaly forget and do what ever he wants

 ;D  I hear ya.  ;D
I have a 17 yr old quicly going on 30

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re:Power off when Mame is running from Mamewah!
« Reply #10 on: September 20, 2004, 09:25:47 am »
if you exit the mame game first, mamewah will close properly when you hit the power button

screaming

  • Sweet! I'mma go make me some popovers!
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2124
  • Last login:August 14, 2019, 03:15:34 pm
  • Registered lUser
    • shift eight (*) generation
Re:Power off when Mame is running from Mamewah!
« Reply #11 on: September 20, 2004, 03:50:57 pm »
....So it's a confirmed problem with MAME.  Why not take it up with the MAME devs?

Seems logical to me. shrug.

-Steve

arcaic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:October 05, 2007, 09:15:04 am
Re:Power off when Mame is running from Mamewah!
« Reply #12 on: September 21, 2004, 01:22:49 pm »
papaschtroumpf... I know how to shut down, your missing my point. See my message two before yours.  ::)

Screaming.... Its not a problem with Mame, I thought it might be but its not.  shrug ;) I was a (minor) Mamedev a long time ago back near its beginnings. I converted/enhanced a TI9900 cpu core to work in Mame and wrote the first pass at the Cosmic Guerilla driver.

If you run command line mame from a dos box and then hit the power button it will exit cleanly. If you do it when Mamewah! launched it it will not exit cleanly.

Its because of the way Mamewah launches mame and then waits for it to exit.

I won't go into technical details here as I have informed Minwah and its up to him as to whether he thinks its worth while implementing the change I suggested. If anyone wants me to elaborate on the details then I will but I don't see it helping much. I'm more than happy to leave it with Minwah.

Cheers

Andy

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Power off when Mame is running from Mamewah!
« Reply #13 on: September 21, 2004, 02:06:13 pm »
OK sorry I haven't commented for a while...

Arcaic: thanks for your mail, I now understand what is going on.  ATM I am not going to change the way I launch apps, purely because for the most part it seems to work well without any other issues I am aware of.  Aside from that, I am taking a bit of a break to get some stuff done on my cabinet (& some other things).  That said, I will keep the example you gave me and try it out sometime - if I can find no drawbacks then I'll switch over to that method.

But for now, perhaps give your lad a dead leg each time he forgets to shutdown properly. j/k  ;)  ;D

exibar

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 255
  • Last login:January 02, 2025, 11:38:59 pm
  • I'm the creator of Exibar's Lair!
Re:Power off when Mame is running from Mamewah!
« Reply #14 on: September 21, 2004, 09:37:12 pm »
Hmmm....  I have a 5 year old that loves to play the old driving games, and others too... He is always on my cab, a lot of times it's both of us on it :-)

  I taught him how to exit the Mame games, and then to shutdown the cab properly.  Well, he actually picked up most of the sequence from watching me a few times.  I just filled in the last step that he was missing, choosing shutdown and poweroff computer instead of hitting the master power switch ;-)

  If my 5 year old can shut down my cab properly, I'm sure that you're wife can be taught too :-)

  Although it's funny, my wife doesn't have a clue and my son has to show her!  :-)

  Try and make it as simple as possible, and just teach them.  Kids (and wives!) are wonderful beings, they are like sponges... anything you want to teach them, they really want to learn.
   My kid can also pick out about a dozen common Electronic components too (since he was 3 actually), a few on a schematic even (haven't shown him too many schematics though).  Don't think that you can't teach a 5 year old (or a wife!) something just because they're too young and "not supposed to know that stuff"  :-)  you see, THEY don't know that society thinks they shouldn't know that stuff :-)  

  Hmmm...oops... I got off on a tangent there didn't I... Can you tell that I'm proud of my son (and wife too! <grin>) )

   Please don't take this in the wrong way, I'm not telling you how to raise your wife (or child!),  or anything like that, I just wanted to use my son as an example of what kids can learn.  I mean no disrespect in any way or anything negative in any manner.

  Mike B

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Power off when Mame is running from Mamewah!
« Reply #15 on: September 22, 2004, 05:35:50 am »
 Try and make it as simple as possible, and just teach them.  Kids (and wives!) are wonderful beings, they are like sponges... anything you want to teach them, they really want to learn.

Maybe when your son is 15 he will be a bit less willing to learn! :)

exibar

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 255
  • Last login:January 02, 2025, 11:38:59 pm
  • I'm the creator of Exibar's Lair!
Re:Power off when Mame is running from Mamewah!
« Reply #16 on: September 22, 2004, 10:58:44 am »
If he's anything like me (he's basically my clone everyone says) at the age of 15, I thought I knew everything, so I'm sure he'll think that he knows everything at 15 as well.

  Ok, don't ALL teenagers think they know everything?  :-)

slycrel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 417
  • Last login:June 25, 2025, 07:42:34 pm
  • Mmm... Portal.
Re:Power off when Mame is running from Mamewah!
« Reply #17 on: September 22, 2004, 05:29:13 pm »
  I'll put a vote in here for Minwah to (eventually) get around to this.  I've already begun teaching people that they must exit MAME before hitting the power button.  And in win98 (probabloy not XP) sometimes windows doesn't wait for mamewah to completely shut down, so I lose my last selected game position.  I also have the power button on my PC hard-wired to a button on the top of my cab, specifically so that everything shuts down at once with the PC.  It's a minor annoyance right now, but I think it's worth fixing.

  Arcaic, it would be nice to have the code here (if you don't mind that is) so that other FE devs can look at this if they are so inclined.

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Power off when Mame is running from Mamewah!
« Reply #18 on: September 22, 2004, 07:14:48 pm »
 I'll put a vote in here for Minwah to (eventually) get around to this.  I've already begun teaching people that they must exit MAME before hitting the power button.  And in win98 (probabloy not XP) sometimes windows doesn't wait for mamewah to completely shut down, so I lose my last selected game position.  I also have the power button on my PC hard-wired to a button on the top of my cab, specifically so that everything shuts down at once with the PC.  It's a minor annoyance right now, but I think it's worth fixing.

Vote noted :)

FWIW I have a similar setup - power button on top of cab, so it might be some use to me too...

Mr. Dude

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 477
  • Last login:March 03, 2019, 05:12:50 am
  • Hi...
Re:Power off when Mame is running from Mamewah!
« Reply #19 on: September 22, 2004, 08:42:05 pm »
C'mon people how hard is this really?  Esc exits MAME back to Mamewah, that's one key.  It doesn't take a rocket scientist to say hit esc then push the power button. :P

arcaic

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 29
  • Last login:October 05, 2007, 09:15:04 am
Re:Power off when Mame is running from Mamewah!
« Reply #20 on: September 23, 2004, 03:31:02 am »
Arcaic, it would be nice to have the code here (if you don't mind that is) so that other FE devs can look at this if they are so inclined.

Sure, its not really 'my' code. There are many examples of ExecCmd on the web and I just looked in Google Groups, and found some remarks about its problems and some suggested alternatives. I just put it in a routine (MsgExecCmd) that Minwah can hopefully easily implement.

Using VB6 create a form, stick a single command button on it and paste the code into the code window. You will need to modify the path used for mame appropriatly.

« Last Edit: September 23, 2004, 03:32:07 am by arcaic »

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:Power off when Mame is running from Mamewah!
« Reply #21 on: October 13, 2004, 04:01:15 pm »
I just put it in a routine (MsgExecCmd) that Minwah can hopefully easily implement.

I have now implemented this...as well as for this reason it seemed to fix a launching problem which occured with a few systems.  Give it a try next release - it works great on my cab  ;D