Archived from groups: alt.games.mame (
More info?)
On 22 Aug 2005 07:21:19 -0700, "coinoparcade" <coinop@comcast.net>
wrote:
>I would like to configure either windows 2000 or windows xp to run
>mame. The thing is I can get it to run mame but I would like to make
>the machine operate like DOS mame where I can just pull the plug out
>and not have to worry about it. Like you can do in dos. I have heard of
>people mentioned the swapfile and other things. Has anyone done this
>and if so please send me a e-mail how. Remember I just want to be able
>to turn it off and on like a regular arcade just like you can do in DOS
>using arcadeos.
>
>Thanks a TON!
>
>Mike
Let's see... With Win2K and WinXP you have a few options, but I think
the following should meet your needs pretty well. (assuming that you
are willing to exit out of MAME and let the machine automatically
shutdown...)
Note: Some of the following paths may need to be slightly changed to
reflect where your MAME is installed... My example uses C:\MAME as
the home directory for MAME.
1. In C:\MAME, create a file called MAMELAUNCH.BAT that contains the
following:
@echo off
c:
cd\mame
echo/
echo Launching MAME
start /W mame32.exe
echo/
echo Shutting down Windows
start mamedown.vbs
exit
2. In C:\MAME, create a file called MAMEDOWN.VBS that contains the
following:
Set oArgs = WScript.Arguments
ShutDown ".", "Reboot_Force"
Sub ShutDown(sNode, sAction)
On Error Resume Next
Set oWMI = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" _
& sNode & "\root\cimv2")
Set colOperatingSystems = oWMI.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each obj in colOperatingSystems
Set oOS = obj : Exit For
Next
If Err.Number <> 0 Then
Exit Sub
End If
sAction = LCase(sAction)
oOS.Win32shutdown 8
End Sub
' Possible values for oOS.Win32shutdown:
' 0 Log Off
' 0 + 4 Forced Log Off
' 1 Shutdown
' 1 + 4 Forced Shutdown
' 2 Reboot
' 2 + 4 Forced Reboot
' 8 Power Off
' 8 + 4 Forced Power Off
3. Add a shortcut in your Windows Startup folder pointing to
C:\MAME\MAMELAUNCH.BAT.
When you boot your machine, the following will happen:
1. Windows will load
2. The startup link will launch MAMELAUNCH.BAT
3. A Command prompt will open
4. A "Launching Mame" message will appear in that window
5. MAME32 will launch (with a wait until MAME terminates)
Play whatever games you want, but don't close MAME32 until you're done
with it.
6a. If you want the machine to shutdown, just close out of MAME32
6b. If you want to stay in Windows, switch to the command prompt
window and click the X in the top right corner to close it.
7. Assuming you wanted the shutdown, a VBS file will be called that
will properly shutdown windows, and in a perfect world, power off the
computer.
The only thing that you *might* have to play with is the
"oOS.Win32shutdown 8" part of the VBS file. I set it to "8" which
should just be a simple poweroff sequence, but you might have to
change it to "8 + 4" for force the sequence to allow a shutdown. If
your computer can't handle a power off, try "1" or "1 + 4" as a
fallback.
Let me know if this is what you had in mind...
--
Cordata
http://abem.mametitles.com - alt.binaries.emulators.mame FAQ