Author Topic: Jry's MAME Batch File  (Read 5277 times)

0 Members and 1 Guest are viewing this topic.

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2821
  • Stop using 0.106
    • Twitch
    • Awards
Jry's MAME Batch File
« on: February 24, 2016, 05:17:17 pm »
For those that are interested, this is the batch file I use when I record INPs. It differs from the default WolfMAME record.bat in two significant ways: 1) It does NOT move or rename the cfg files (meaning that your DIPs and key mapping will the stay the same as what they were before you started recording) and 2) it creates a new, uniquely named INP every time.

To run it, all you need to type at the command line is "record dkong", or whatever romset you want to play (record dkongjr, record dkong3, record intrepid, etc.). You do NOT need to specify a name for your record INP; a name is created automatically.

I've attached the file to this post, but here's an explanation of what's inside.

Code: [Select]
@echo off
This keeps the rest of the commands from being display on the screen when you run the file.

Code: [Select]
For /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set mydate=%%d-%%b-%%c_%%a)
For /f "tokens=1-4 delims=/:/./ " %%a in ("%TIME%") do (set mytime=%%a-%%b-%%c-%%d)

This takes my system time and assigns variables to it.

Code: [Select]
mamearcade %1 -rec jpy_%1_()_wolf171_%mydate%_%mytime%JST.inp -nvram_directory NUL -w -nofilter -noafs -fs 0 -noc
This actually runs MAME.

mamearcade = the actual MAME program
%1 = whatever game you're recording
-rec = the record command
jpy_%1_()_wolf171_%mydate%_%mytime%JST.inp = the unique name that is timestamped with the system time variables
-nvram_directory NUL = disables NVRAM
-w = runs MAME in a window
-nofilter = disables the fuzzy default filter
-noafs -fs 0 = forces the game to run without frame skipping
-noc = disables cheats

So when I run this I get a file named something like this:

jpy_dkong_()_wolf171_2016-02-25_Thu_9-59-08-36JST.inp

As you can see, this is very customized to my own needs: my initials, my timezone, the version of WolfMAME I'm using, etc. If I want to save the INP I usually replace the () with a score. If you want to customize it for yourself, you can change stuff to meet your needs. Just edit the batch file in Notepad or another text editor and replace my info with yours. The timestamp is YYYY-MM-DD_Day_HH-MM-SS-000.

I'm not sure if that's a clear explanation of what's going on, so you programming types...help me out. :D It's intended for new MAME versions, but it will probably work for naming WLF files in 106 too.
"Do not criticize, question, suggest or opine anything about an upcoming CAG event, no matter how constructive or positive your intent may be. You will find nothing but pain and frustration, trust me. Just go, or don't go, and :-X either way!" -ChrisP, 3/29/15
Member for 11 Years snek CK Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline ChrisP

  • Spring Jumper
  • *
  • Posts: 1763
  • I'm going to jump next to your leg.
    • Donkey Blog
    • Awards
Re: Jry's MAME Batch File
« Reply #1 on: February 24, 2016, 06:57:32 pm »
The thread title alone was enough to excite me.  <Pigger>

nerdlinger hype.  <Tim>
http://donkeykongblog.blogspot.com

4 Quarters :-* - 800K Avg. Per Qtr. :o - No Restarts 8) - No Proof :'(

7/26/2013   Coin 35,946   710,800   18-1
7/28/2013   Coin 35,947   903,700   22-1
8/16/2013   Coin 35,948   694,100   17-6
8/17/2013   Coin 35,949   893,100   22-1

3,201,700: the $1 World Record?
Member for 11 Years DK Masters - Rank D DKJR Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member Blogger Twitch Streamer DK Killscreener CK Killscreener

Offline ChrisP

  • Spring Jumper
  • *
  • Posts: 1763
  • I'm going to jump next to your leg.
    • Donkey Blog
    • Awards
Re: Jry's MAME Batch File
« Reply #2 on: February 24, 2016, 07:25:37 pm »
-nofilter = disables the fuzzy default filter

This makes me happy.

I'm gonna go (sorta) off-topic for a minute: I just discovered the other day that I like it better to keep the default filter off too, I think the games look great "raw." I noticed that the colors are brighter and sharper, and I have no problem with classic arcade games looking "pixelated". They look pixelated because they're low-res, there's nothing wrong with that.

I could tell when playing with the more advanced HLSL and GLSL stuff that I'm just not interested in the shaders and filters, which are attempting to get an LCD to look like a CRT, for "nostalgia" purposes, since that's the type of display that the games originally used.

From my seat (<FF>), A CRT is a CRT, which displays a certain way, and an LCD is an LCD, which displays another way. They both have their plusses and minuses and each creates a certain ambiance, but as someone who plays these games because I like the games, and not "out of nostalgia", I don't need to make them look like they're displaying on a CRT, any more than I need a Blu-ray of Back to the Future that looks like it's playing from a VHS tape.

So anyway, I just thought it was cool that you turn the filter off too.  :)

My record batch file is simpler, since I do most of the stuff that you do just by setting the defaults in my mame.ini, but here it is:

Code: [Select]
0169w %1 -record "169 - %1 %date:~0,4%-%date:~5,2%-%date:~8,2% - %time:~0,2%.%time:~3,2%.%time:~6,2%.inp" %2 %3 %4 %5 %6 %7 %8 %9
- 0169w: this is my MAME executable (I have all my MAMEs in the same folder, using a shared mame.ini, and just rename them by version (with a "w" if it's WolfMAME).
- %1: variable for the game name
- -record: the record command (which I guess could be -rec too)
- %2-%9: any additional switches I wanna throw in there.

In the command window I just type "record <gamename> -<options>", and the output file will be something like "169 - dkong 2016-02-20 -  1.25.14.inp"

I have cfg and nvram turned off by default.

My MAME.ini cfg path is "NUL;cfg/important".

That says "first look in NUL (which means, nowhere, as in, don't load it), second, look in "cfg/important".

For most games, I don't need a custom cfg, and I don't like that MAME automatically creates a file for every game that I run. I also don't like that it overwrites these files on exit. Sometimes I wanna just test something, but then go back to the way it was before, but then it writes the changes when I exit.

So my solution is that if I DO have a specific set of settings for a game, I will turn cfg on temporarily, tweak my settings, then put the file in "cfg/important." From then on, MAME will look only in cfg/important, and if it finds <gamename>.cfg, it will load it, otherwise it will go defaults. And on exit, it will NOT write any changes anywhere, since the default path is "NUL".

Nvram (usually) just causes a bunch of problems, and, again, is auto-created by tons and tons of games, most of the time being useless. So if I need it to run a game a certain way (like Williams games with custom settings), I just add an nvram directory to the command line, make or load the nvram that I need, and go from there.
http://donkeykongblog.blogspot.com

4 Quarters :-* - 800K Avg. Per Qtr. :o - No Restarts 8) - No Proof :'(

7/26/2013   Coin 35,946   710,800   18-1
7/28/2013   Coin 35,947   903,700   22-1
8/16/2013   Coin 35,948   694,100   17-6
8/17/2013   Coin 35,949   893,100   22-1

3,201,700: the $1 World Record?
Member for 11 Years DK Masters - Rank D DKJR Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member Blogger Twitch Streamer DK Killscreener CK Killscreener

Offline marky_d

  • Spring Jumper
  • *
  • Posts: 677
    • Awards
Re: Jry's MAME Batch File
« Reply #3 on: February 24, 2016, 07:46:31 pm »
 <confused>
Member for 11 Years IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member DK 1.1M Point Scorer IGBY 2014 DKF Team Member DK 1M Point Scorer DK Killscreener Former DKJR World Record Holder - Arcade DKJR Killscreener Twitch Streamer

Offline mameshane

  • Full Member
  • *
  • Posts: 63
    • Awards
Re: Jry's MAME Batch File
« Reply #4 on: February 24, 2016, 10:08:44 pm »
thanks :)
that works really well. i had been trying to figure out why mame 106 looked different to newer versions. and its that fuzzy filter thats being applied. good to know how to turn it on or off :)
Member for 9 Years DKJR Killscreener DK Masters - Rank D CK Killscreener Winner of a community event DK Killscreener Blogger Twitch Streamer