Page 1 of 1

Suggestion enhancement for record.bat and playback.bat

Posted: Mon Jun 18, 2012 9:01 pm
by BeeJay
Barry,

Because it came up in the hi-jacked thread the Paul and I have been using to try to get his playback of a Wolf108 recording going correctly, I wonder if it would be worth doing an "if exist" check around the move statements in the record.bat and playback.bat files to avoid the "file not found" errors that get logged if the files don't exist?

For example, the record.bat file would now look as follows:

Code: Select all

@echo off
if exist cfg\%1.cfg move cfg\%1.cfg cfg\%1.bak
if exist hi\%1.hi move hi\%1.hi hi\%1.bak
if exist nvram\%1.nv move nvram\%1.nv nvram\%1.bak
if exist diff\%1.dif move diff\%1.dif diff\%1.bak

mame %1 -record %2 %3 %4 %5 %6 %7 %8 %9

if exist cfg\%1.bak move cfg\%1.bak cfg\%1.cfg
if exist hi\%1.bak move hi\%1.bak hi\%1.hi
if exist nvram\%1.bak move nvram\%1.bak nvram\%1.nv
if exist diff\%1.bak move diff\%1.bak diff\%1.dif
... and the playback.bat file would now look as follows:

Code: Select all

@echo off
if exist cfg\%1.cfg move cfg\%1.cfg cfg\%1.bak
if exist hi\%1.hi move hi\%1.hi hi\%1.bak
if exist nvram\%1.nv move nvram\%1.nv nvram\%1.bak
if exist diff\%1.dif move diff\%1.dif diff\%1.bak

mame %1 -playback %2 %3 %4 %5 %6 %7 %8 %9

if exist cfg\%1.bak move cfg\%1.bak cfg\%1.cfg
if exist hi\%1.bak move hi\%1.bak hi\%1.hi
if exist nvram\%1.bak move nvram\%1.bak nvram\%1.nv
if exist diff\%1.bak move diff\%1.bak diff\%1.dif
Cheers,
BeeJay.

Re: Suggestion enhancement for record.bat and playback.bat

Posted: Tue Jun 19, 2012 1:32 am
by mahlemiut
Will do. (So long as the Wine Command Prompt supports it ;))

Re: Suggestion enhancement for record.bat and playback.bat

Posted: Fri Jan 11, 2013 8:21 pm
by mahlemiut
Added this finally, works fine under Wine also. Will be in 0.148 release (coming soon, still have to do SPI/CPS-3 driver updates first)