An alternative playback.bat

General discussion on MAME, MARP, or whatever else that doesn't belong in any of the other forums

Moderators: mahlemiut, seymour, QRS

Post Reply
User avatar
Barthax
MARP Seer
MARP Seer
Posts: 691
Joined: Fri Sep 27, 2002 1:13 pm
Contact:

An alternative playback.bat

Post by Barthax » Fri Oct 17, 2014 2:15 pm

Hi all,

I've been working on a Windows machine again & have developed a little batch file which extends the standard WolfMAME-distributed playback.bat somewhat.

The batch file takes two parameters at a minimum: the version of MAME and the game to play back. The batch file should (fingers crossed) do the rest: extract the zip file contents, renamed the .inp and .wlf (where applicable), fire up the relevant MAME exectuable (wrapped in a customised DOS Box if required) and initiate playback. When MAME is exited (DOS Box is automatically exited if required) the .inp, .wlf are removed from the INP directory and some cleanup work is done: move the zip file to a storage location and hopefully cleanup the download directory (must be a separate directory).

Example execution: playback.bat 154 pacman

There are a lot of assumptions to how your MAME is configured, so if you're comfortable with your current MAME set up, probably best not to bother. :)

Assumptions:
1: MAME executables are all located in the same directory.
2: Windows-MAME executables are all named mameversion.exe: e.g., mame154.exe or mame154wolf.exe for example.
3: DOS-MAME executables are dependent on having DOS Box installed.
4: A DOS Box config file is named dosbox.conf and lives in the same directory as the MAME executables.
5: DOS-MAME executables are all named mversion.exe: e.g., m30.exe or m35tg3.exe
6: Any supporting tools (CWSDPMI.EXE, zlib.dll, etc.) live in their expected places.
7: You sort your own ROM collection out so that it works best for your configuration.
8: 7-Zip is installed.
9: Your MARP downloads go to one folder and that folder is *empty* of other files.


Configuration options:
A few changes may be needed to the playback.bat attached - I'm running a Windows XP so the attached version has some assumptions therein. I'm also assuming you understand what you're looking at to change the options!
1: MAME exectuables. Alter the SET MAMELOCATION= to that path.
2. DOWNLOCATION: where the downloaded zip files get placed.
3: DONELOCATION: where the downloaded zip files will be moved to after use (saves downloading again if you need to playback multiple times or want to keep).
4: DOSBOXEXE: The path to the DOS Box executable. Not required if you don't want DOS MAME exectuables.
5: ZIP: the path to 7-zip.
6: ZIPFLAGS: the options to give to 7-Zip.

5 & 6 can be changed to an alternative Zip package but you'll have to figure them out.


Sample configuration assumes the following:
MAME executables live in C:\MAME
INPs are in C:\MAME\INP
Zip files downloaded from MARP (one at a time) are in C:\MAME\INP\MARP
After playback, Zip files are moved to C:\MAME\INP\MARP\Done

I'm sure I've missed something and this probably is only for a few people as there is some configuration work to get going but once it is set up, playback is as easy as download + playback.bat.
Attachments
playback.zip
(1.14 KiB) Downloaded 120 times

User avatar
Barthax
MARP Seer
MARP Seer
Posts: 691
Joined: Fri Sep 27, 2002 1:13 pm
Contact:

Re: An alternative playback.bat

Post by Barthax » Fri Oct 24, 2014 11:55 am

- Updated to cope with introduction of -iv in WolfMAME in 85+ (treats 84u5 as non-iv capable).
- Early WolfMAMEs: rename mameplib.dll to mamep<ver>lib.dll and the batch file will copy the relevant mamep<ver>lib.dll to mameplib.dll for versions 0.74-0.81 when run.
- Other minor fixes.
playback.zip
(1.32 KiB) Downloaded 103 times

kranser
MARP Knight
MARP Knight
Posts: 333
Joined: Wed Mar 13, 2002 11:23 am
Location: London, UK

Re: An alternative playback.bat

Post by kranser » Tue Nov 04, 2014 9:50 am

Looks good. The only issue is it does not deal with backing up, deleting and restoring the nvram folder (as newer MAMEs make a folder with game name rather than gamename.nv).

This is an issue I also recently discovered with my playback.bat file.

In your version it should not cause an issue as you use the nvram_directory NUL option, but I thought I'd mention it.

Kranser.

User avatar
Barthax
MARP Seer
MARP Seer
Posts: 691
Joined: Fri Sep 27, 2002 1:13 pm
Contact:

Re: An alternative playback.bat

Post by Barthax » Wed Nov 05, 2014 5:18 am

kranser wrote:Looks good. The only issue is it does not deal with backing up, deleting and restoring the nvram folder (as newer MAMEs make a folder with game name rather than gamename.nv).

This is an issue I also recently discovered with my playback.bat file.

In your version it should not cause an issue as you use the nvram_directory NUL option, but I thought I'd mention it.

Kranser.
I also tend to use a file called nvram myself so the nvram folder doesn't get created in the first place. I'll look into enhancing the playback to cope. :)

In the meantime, here's an updated version which also runs a relevant wlfview<ver>.exe if it exists. Obviously this means the wlfview that arrives with each WolfMAME needs to be renamed (wlfview106.exe for the WolfMAME 0.106, for example).
playback.zip
(1.45 KiB) Downloaded 101 times

User avatar
Barthax
MARP Seer
MARP Seer
Posts: 691
Joined: Fri Sep 27, 2002 1:13 pm
Contact:

Re: An alternative playback.bat

Post by Barthax » Wed Nov 05, 2014 5:49 am

Three playback options available (split across two posts due to attachment limits):

Standard playback/record (as per WolfMAME) with improved directory renaming:
standardplayback.zip
(393 Bytes) Downloaded 86 times
/
record.zip
(388 Bytes) Downloaded 106 times

User avatar
Barthax
MARP Seer
MARP Seer
Posts: 691
Joined: Fri Sep 27, 2002 1:13 pm
Contact:

Re: An alternative playback.bat

Post by Barthax » Wed Nov 05, 2014 5:50 am

Enhanced playback as begun at the start of this thread:
playback.zip
(1.51 KiB) Downloaded 101 times
[Edit: updated - fixed bug if version doesn't exist for M<ver>.exe nor MAME<ver>.exe.]

Stupidly enhanced playback with too many options for any sane person (read REMs around SETs to figure out what is needed):
check.zip
(3.4 KiB) Downloaded 100 times

Post Reply