@echo off cls rem ###### "shell" fuer MAME rem ###### by -BINGEN- 12/97 setlocal if "%1" == "/?" goto usage if "%1" == "-?" goto usage iff "%1" != "" goto directwix if not exist mame.exe goto nomame echo. echo extracting complete gamelist from mame.exe... mame -listfull >fulllist.$$$ set il=%@lines[fulllist.$$$] do iz = 1 to %il echo %@line[fulllist.$$$,%iz]>>fulllist.txt enddo bigsort fulllist.txt gamelist.$$$ >nul del fulllist.* /q echo ---------------------------------------------------------->>mamavail.$$$ echo Games available in this directory>>mamavail.$$$ echo ---------------------------------------------------------->>mamavail.$$$ echo ---------------------------------------------------------->>missing.$$$ echo Games *NOT* available in this directory>>missing.$$$ echo ---------------------------------------------------------->>missing.$$$ set il=%@lines[gamelist.$$$] do iz = 0 to %il set afile=%@line[gamelist.$$$,%iz] rem echo %afile ^echo %@findfirst[%@trim[%@substr[%afile,0,8]].zip,n]^echo %@trim[%@substr[%afile,0,8]].zip iff "%@findfirst[%@trim[%@substr[%afile,0,8]].zip,n]" == "%@trim[%@substr[%afile,0,8]].zip" then echo %@line[gamelist.$$$,%iz]>>mamavail.$$$ else echo %@line[gamelist.$$$,%iz]>>missing.$$$ endiff echos . enddo mame -? >mameinfo.txt echo %@line[mameinfo.txt,0]>mameinfo.$$$ echo %@line[mameinfo.txt,1]>>mameinfo.$$$ echo Supported Games in this Mame-Version:>>mameinfo.$$$ copy mameinfo.$$$+mamavail.$$$+missing.$$$ mamlist.tmp del mameinfo.txt /q del *.$$$ /q cls goto start :directwix set mfile=%1 goto do_it :start iff "%1" != "" goto usage set mfile=%@select[mamlist.tmp,1,10,23,70, MAME-Shell [/] by -BiNGEN- ] if "%mfile" == "" goto tschuess :do_it set gfile=%@trim[%@substr[%mfile,0,8]].zip if exist %gfile goto playit cls echo THE FILE %gfile DOESN'T EXIT IN THIS DIRECTORY! pause cls goto start if "%@ext[%gfile]" != "zip" goto start :playit md %@name[%gfile] pkunzip -o %gfile %@name[%gfile] mame %@name[%gfile] deltree /y %@name[%gfile] if "%1" != "" goto bye goto start :nomame echo. echo *** MAME.EXE not found! :usage echo. echo USAGE: msh [filename.zip] echo msh (all supported mame-files in current directory are displayed) echo. echo. goto exit :tschuess del mamlist.tmp /q :bye echo. echo thnx for using the mame-shell! echo [/] by -BiNGEN- 1942 :exit endlocal
Comments