Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - spedinfargo

Pages: [1]
1
Scripting / Script to delete Save State (.sta) file? Windows
« on: January 29, 2019, 04:57:34 AM »
Hi - just starting to look into how custom commands work with Attract Mode.

I would like to create a custom script to delete the Save State file for the currently-selected game (Mame emulator).  The actual script would be pretty simple:  just grab the currently selected item, execute a windows "del" command on the \mame\sta\<name>\auto.sta file.

I see in the Configure/Controls menu there is a "Custom1" "Custom2" etc. that you can map to a key/button, so I'm assuming that's part of the puzzle.

Any thoughts on if and how this can be done?

Thanks...

2
On another thread there is some discussion about Attract Mode not getting focus sometimes when Mame exits (Windows 10 but might be other versions of Windows that have this issue as well).  Alt-tab or mouse clicking on Attract Mode seems to work, but if you don't have keyboard and mouse handy or if the kids aren't able to do this easily, a "kill everything and restart" might come in handy.

This is also helpful for me if something just freezes (either Mame or Attract Mode).  It is a very simple Auto Hotkey key command that calls a script that I call "The Nuclear Option".  Something I taught my six year old to do and it seems to work very well.

First of all, you need to create a batch file.  I have everything in my d:\mame folder so you'd need to change the following folders as necessary.  Here is the script:

Code: [Select]

@echo off
taskkill /IM attract.exe
taskkill /IM mame64.exe

timeout 2

d:
cd D:\Mame\attract-v2.1.0-win64\
start attract.exe



The last three lines can probably be changed to this as well:

Code: [Select]

start D:\Mame\attract-v2.1.0-win64\attract.exe --config d:\mame\attract-v2.1.0-win64


I seem to remember having problems with using it all on one line for some reason...

Name your batch file to "AttractReset.cmd".


Next, create the following .AHK file.  I have it mapped to "hold down 3 and then press 4" which is my Left and Right pinball buttons on my Xarcade.  This is a key combination that doesn't get pressed by accident on my control panel.  You might want to map it to something else that's easy for the kids to remember...

Code: [Select]
; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments.  They are not executed.


3 & 4::run, d:\mame\attractreset.cmd



Finally, have your .AHK launch when Windows boots up.  Download and install Auto Hotkey here:  http://ahkscript.org/ - look for instructions on having it launch with Windows.

Now if you ever have anything on the computer that just seems to mess up, Nuke everything and restart Attract Mode!

Note:  you may have to play around with making sure the batch file runs elevated if needed.  I think there are options in AHK for that.

Let me know if you have any ideas for improvements...


3
I think you're kind of on the right track with the focus problem, which explains why Alt-Tab or mousing clicking on the Attract Mode screen works.  Something appears to sometimes grab focus from Attract Mode - I also wonder if it might be something more common to Windows 10.

Since I don't have a full-sized keyboard, this is crappy when it happens for the kids (hard to explain how to alt-tab on the tiny keyboard or use the tiny touch pad to navigate the mouse and then click).  I have an Auto-Hot-Key script that I call the Nuclear Option that I've taught them to use.  This calls a batch file that kills all Mame and Attract Mode processes and restarts Attract Mode.  I have this mapped to a button combination on the control panel that they know how to use.  It's a little overkill but it works really well.

I'll post that to another thread...

4
General / Re: Two entries for same game with different control layouts?
« on: January 17, 2017, 08:19:23 AM »
Which version of Gauntlet?

This is a good question - it's the original Gauntlet 4-player MAME ROM.  Since I posted the question, I see that many of these types of games have 2-player cab ROMs which allow the user to choose their characters in-game.  I'll play around with that.  That would take care of most of the games I'm interested in.

It looks like there isn't a variation of for Rampage, though.  I'll keep thinking about a multiple config option for that game, though.

Thanks.

5
General / Two entries for same game with different control layouts?
« on: January 17, 2017, 06:46:23 AM »
Wondering the best way to do something like this.  My kids love playing Gauntlet and Rampage but we only have a two-player controller layout.

I thought it would be nice to set up a couple entries for each game with different layout mappings so they can play other characters.  For instance I could have one for "Gauntlet Warrior and Valkyrie" and another one "Gauntlet Elf and Wizard" - the second one would load a different config so the joysticks map to Player 3 and Player 4 in MAME. 

Another option would be to just have one entry for Gauntlet and then have a sub-menu pop up when they select the game and they could choose the layout (characters) they want to play.

Any ideas on the easiest way to do this in Attract Mode?

Pages: [1]