francoisadt's Feed
How to automatically Generate MAME INP files - No Duplicates - DateTime based - No commandline
Hi Fellow gamers
Someone posted here on TG that Wolfmame version with GUI is annoying. I agree.
This also done away with commandline and with duplicate filenames !
So I created a batch file that will automatically generate a new .INP for each time you run a game
according the date and time appended at the end.
Steps:
Save the file in your wolfmame folder.
Create a desktop shortcut in windows desktop that link to the batchfilename in your wolfmame folder
Right click on the icon of the desktop icon.
All you have to do is set the gamename in the properties file of the desktop shortcut.
In my example I have set it to "msapcman"
So each time you want to record a different game just set the properties.
Note: Save the below command file as any name like recordgame.bat and save in your Wolfmame executable folder
Set the properties:
The batch file below:
@echo off
@REM ===================================
FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
IF NOT "%%~F"=="" (
SET /A SortDate = 10000 * %%F + 100 * %%D + %%A
set YEAR=!SortDate:~0,4!
set MON=!SortDate:~4,2!
set DAY=!SortDate:~6,2!
@REM SET THE DATE yyymmdd
@REM For Testing purposes only - view values
@echo on
@echo DATE=%DATE%, TIME=%TIME%
@echo HOUR=!HOUR! MIN=!MIN! SEC=!SEC!
@echo YR=!YEAR! MON=!MON! DAY=!DAY!
@echo %DATECODE%
@REM =======================
@REM Then the game name you are playing. In this case the game name is passsed in as a parameter on the
@REM settings, inside the target command on the line of text eecute the batch file name post fix the
@REM parameter. This is automactically numbered as "%1"
@REM Format of the Command to Execute
@REM "MAME Executeable" "Gamename" -record "ToRecord_INP_FILE_NAME" "Additional paramaters"
mame64 %1 -record %%INPFILENAME%% -nvram_directory NULSet the properties