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: Soft Power Off Exit with MAMEWAH  (Read 2744 times)

0 Members and 1 Guest are viewing this topic.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Soft Power Off Exit with MAMEWAH
« on: March 01, 2005, 09:34:08 pm »
I'm having an issue with running MAMEWAH as the shell.

Normally, I don't have the front end configured to be exitable.  When I push the power button on my cab, Windows XP sends a shutdown signal to running applications, so MAME would shut down, then the front end, then Windows, and the cabinet would power off.

This worked fine when MAMEWAH was running as an application, but when it's running as the shell, it just exits to Windows, and since Explorer isn't running, there's nothing to tell Windows to shut down, so I have to hold down the button to hard-power off.  I have the SHUTDOWN property set for exit_action, but that only seems to apply if MAMEWAH is shut down by the menu.  Am I doing something wrong, or would MAMEWAH need to be changed to shutdown Windows when receiving a shutdown message from the OS?  I believe the message in question is WM_QUERYENDSESSION.

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Soft Power Off Exit with MAMEWAH
« Reply #1 on: March 07, 2005, 02:39:54 pm »
Bump. Is anyone getting MAMEWah as shell to shut down in response to a power off request?

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

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: Soft Power Off Exit with MAMEWAH
« Reply #2 on: March 07, 2005, 02:47:10 pm »
Bump. Is anyone getting MAMEWah as shell to shut down in response to a power off request?

  I think the number of people that use MAMEWAH as their Windows shell is very small, so I'm too sure many people will be able to help.

  As far as I know, Minwah is on vaca for a while so he might not be around for a little bit to answer the low-level questions.

  What benefit do you get with having MAMEWAH as the shell?  MAMEWAH is a lot more stable than it used ot be... Having it as your shell causes more problems than it's worth, IMO.

-Steve

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

SadGamerGeek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:November 27, 2005, 06:23:54 pm
  • I want to build my own arcade controls!
    • Sad Gamer Geek
Re: Soft Power Off Exit with MAMEWAH
« Reply #4 on: March 07, 2005, 06:01:48 pm »
How about this for an idea.......

Instead of starting Mamewah as your shell, start a batch file that contains these two lines:

/<whatever the path is>/mamewah.exe
shutdown -s -t 00


I would hope that this would start Mamewah, and then control would only pass to the shutdown command once Mamewah had closed.

What do you think?

Richard

Truz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 147
  • Last login:February 23, 2009, 12:03:01 pm
Re: Soft Power Off Exit with MAMEWAH
« Reply #5 on: March 07, 2005, 06:15:01 pm »
hmm thats odd, i use mamewah as a shell and it shuts down the pc fine for me. I have it set to when i hit the button mapped to esc that it gives you the option to either shut down or exit to windows. This allows me to shutdown the computer completely, dont know why yours is having that problem tho.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re: Soft Power Off Exit with MAMEWAH
« Reply #6 on: March 07, 2005, 06:28:21 pm »
I believe he doesn't want to use the mamewah exit key (ESC by default) but actually hit the power button on the PC (or a switch connected to).

I don't run mamewah as a shell but I do shut my PC down this way, the power button is on the top of the cab where my kids can't reach it. exiting mamewah through the ESC key is fully disabled.
« Last Edit: March 07, 2005, 07:10:58 pm by papaschtroumpf »

SadGamerGeek

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 42
  • Last login:November 27, 2005, 06:23:54 pm
  • I want to build my own arcade controls!
    • Sad Gamer Geek
Re: Soft Power Off Exit with MAMEWAH
« Reply #7 on: March 07, 2005, 06:38:39 pm »
Ah - sorry - I misunderstood!

 :-[ :-[

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: Soft Power Off Exit with MAMEWAH
« Reply #8 on: March 07, 2005, 10:06:12 pm »
I hit my power button and mamewah (as my shell) exits just fine. I'm using Windows XP (currently with SP2 but had SP1 before).

Possibly it's your motherboard that isn't sending the right signal to running programs.
Joseph Elwell.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Soft Power Off Exit with MAMEWAH
« Reply #9 on: March 07, 2005, 10:40:26 pm »
I hit my power button and mamewah (as my shell) exits just fine. I'm using Windows XP (currently with SP2 but had SP1 before).

Possibly it's your motherboard that isn't sending the right signal to running programs.
Joseph Elwell.
On mine, MAMEWah exits but Windows doesn't shut down.  If Explorer is the shell MAMEWah exits and Windows shuts down...
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re: Soft Power Off Exit with MAMEWAH
« Reply #10 on: March 07, 2005, 11:03:25 pm »
I wonder if it'll make a difference if you set mamewah to power down the machine on exit?

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Soft Power Off Exit with MAMEWAH
« Reply #11 on: March 08, 2005, 09:10:38 am »
I wonder if it'll make a difference if you set mamewah to power down the machine on exit?

MAMEWah has two different settings for this: one if it's exited by the menu and another if it's exited by the ESC key.  Neither one seems to cover the event of Windows requesting that the app shut down.

However, I have gotten around the problem by telling Windows to hibernate the system, rather than power it off, when the power button is pressed.  It takes slightly longer to shut down, but it does seem to work.

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: Soft Power Off Exit with MAMEWAH
« Reply #12 on: March 11, 2005, 03:13:12 am »
However, I have gotten around the problem by telling Windows to hibernate the system, rather than power it off, when the power button is pressed.

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Soft Power Off Exit with MAMEWAH
« Reply #13 on: March 11, 2005, 08:03:33 am »
So if I tell windows to hibernate, it'll actually shutdown?
It'll save off the contents of memory to disk and then power off.  So depending on how much memory you have and how fast your disk is, it will add a short delay, but it will power off.  Some motherboards support hibernate-to-RAM, which would be really fast; the motherboard shuts down almost completely except it keeps RAM refreshed.
Quote
And then what happens if I tell windows to hibernate and I load mamewah as my shell, but I actually end up launching explorer at some point...
Same thing, except when you power up next time, Explorer will still be running.  Theoretically, with Hibernate, you should be able to shut down mid-game and have it come back to the same point in the game when you start up, although I haven't tried it.  I have Hibernated with a MAMEWah options window open and when the machine restarted the same options window was still open...

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

jelwell

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 460
  • Last login:December 24, 2014, 03:47:21 pm
  • I'm a llama!
Re: Soft Power Off Exit with MAMEWAH
« Reply #14 on: March 11, 2005, 02:09:01 pm »
It'll save off the contents of memory to disk and then power off.

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: Soft Power Off Exit with MAMEWAH
« Reply #15 on: March 11, 2005, 06:29:34 pm »
Well, after just finishing my bartop I edited the registry to set MameWAH as my shell (Windows XP SP2) and my power button (hidden on rear of cabinet) which is hooked to the "pwr" header on my mobo shuts down everything gracefully. MameWAH exits, Windows flashes and shuts down and the system completely powers off (thanks to the SmartStrip). Perfect.

John

Chris

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4574
  • Last login:September 21, 2019, 04:59:49 pm
    • Chris's MAME Cabinet
Re: Soft Power Off Exit with MAMEWAH
« Reply #16 on: March 12, 2005, 08:56:25 am »
I wonder if it's an SP2 fix... I'm only running SP1.  (Didn't see the point of SP2 on an arcade cabinet, and SP2 mucks with Visual Pinball.)

--Chris
--Chris
DOSCab/WinCab Jukebox: http://www.dwjukebox.com

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: Soft Power Off Exit with MAMEWAH
« Reply #17 on: March 12, 2005, 10:14:37 am »
I wonder if it's an SP2 fix... I'm only running SP1.

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: Soft Power Off Exit with MAMEWAH
« Reply #18 on: March 12, 2005, 10:41:03 am »
In your BIOS there's usually a feature where you can set your power button to hard power off or to soft power off.  Soft will just send a shutdown message and then windows will properly shut down....yadda yadda yadda.  Hard power off would just kill the power and your computer would shut off immediately.

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: Soft Power Off Exit with MAMEWAH
« Reply #19 on: March 12, 2005, 10:49:26 am »
Exactly. Make sure it's set to soft power off. THere is also, usually an instant or delay option. Set it to instant so you don't have to hold the button for four or five seconds.

John

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: Soft Power Off Exit with MAMEWAH
« Reply #20 on: March 12, 2005, 11:51:56 am »
Actaully, now that I think about it, why do you want soft power off?  If you kill power, its off right away, which is fine, right?

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: Soft Power Off Exit with MAMEWAH
« Reply #21 on: March 12, 2005, 12:08:27 pm »
NO!!! You should ALWAYS allow Windows to unload itself properly. The registry is like a big database and can become corrupted if you don't allow Windows to write back to it and shutdown properly.

John

cholin

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:July 16, 2009, 09:22:25 pm
    • Nilok Productions
Re: Soft Power Off Exit with MAMEWAH
« Reply #22 on: March 13, 2005, 01:18:10 pm »
Sure, it CAN, but Ive been running my other computer fine for the last 3 years doing it the hard way.  My motherboard doesnt support pressing the button for soft, and XP takes too long on a 350mhz comp to shut down right, so I just press the button and it shuts off.  Sure, this could happen, that could happen, but who cares?

jcrouse

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1027
  • Last login:January 09, 2010, 05:53:51 pm
    • CPViewer
Re: Soft Power Off Exit with MAMEWAH
« Reply #23 on: March 13, 2005, 01:38:17 pm »
Many people care. How about the people that have many, many, many hours in setting up their systems. Don't come crying when you blue screen. ;D

John