ibi

MAME Shell (4DOS)

ibi
May 12th, 2014 (edited)
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.37 KB | None | 0 0
  1. @echo off
  2. cls
  3. rem ###### "shell" fuer MAME
  4. rem ######  by -BINGEN- 12/97
  5. setlocal
  6. if "%1" == "/?" goto usage
  7. if "%1" == "-?" goto usage
  8. iff "%1" != "" goto directwix
  9. if not exist mame.exe goto nomame
  10. echo.
  11. echo extracting complete gamelist from mame.exe...
  12. mame -listfull >fulllist.$$$
  13. set il=%@lines[fulllist.$$$]
  14. do iz = 1 to %il
  15. echo %@line[fulllist.$$$,%iz]>>fulllist.txt
  16. enddo
  17. bigsort fulllist.txt gamelist.$$$ >nul
  18. del fulllist.* /q
  19. echo ---------------------------------------------------------->>mamavail.$$$
  20. echo Games available in this directory>>mamavail.$$$
  21. echo ---------------------------------------------------------->>mamavail.$$$
  22. echo ---------------------------------------------------------->>missing.$$$
  23. echo Games *NOT* available in this directory>>missing.$$$
  24. echo ---------------------------------------------------------->>missing.$$$
  25. set il=%@lines[gamelist.$$$]
  26. do iz = 0 to %il
  27.  set afile=%@line[gamelist.$$$,%iz]
  28. rem echo %afile ^echo %@findfirst[%@trim[%@substr[%afile,0,8]].zip,n]^echo %@trim[%@substr[%afile,0,8]].zip
  29.  iff "%@findfirst[%@trim[%@substr[%afile,0,8]].zip,n]" == "%@trim[%@substr[%afile,0,8]].zip" then
  30.  echo %@line[gamelist.$$$,%iz]>>mamavail.$$$
  31.  else
  32.  echo %@line[gamelist.$$$,%iz]>>missing.$$$
  33.  endiff
  34.  echos .
  35. enddo
  36. mame -? >mameinfo.txt
  37. echo %@line[mameinfo.txt,0]>mameinfo.$$$
  38. echo %@line[mameinfo.txt,1]>>mameinfo.$$$
  39. echo Supported Games in this Mame-Version:>>mameinfo.$$$
  40. copy mameinfo.$$$+mamavail.$$$+missing.$$$ mamlist.tmp
  41. del mameinfo.txt /q
  42. del *.$$$ /q
  43. cls
  44. goto start
  45. :directwix
  46. set mfile=%1
  47. goto do_it
  48. :start
  49. iff "%1" != "" goto usage
  50. set mfile=%@select[mamlist.tmp,1,10,23,70, MAME-Shell [/] by -BiNGEN- ]
  51. if "%mfile" == "" goto tschuess
  52. :do_it
  53. set gfile=%@trim[%@substr[%mfile,0,8]].zip
  54. if exist %gfile goto playit
  55. cls
  56. echo THE FILE %gfile DOESN'T EXIT IN THIS DIRECTORY!
  57. pause
  58. cls
  59. goto start
  60. if "%@ext[%gfile]" != "zip" goto start
  61. :playit
  62. md %@name[%gfile]
  63. pkunzip -o %gfile %@name[%gfile]
  64. mame %@name[%gfile]
  65. deltree /y %@name[%gfile]
  66. if "%1" != "" goto bye
  67. goto start
  68. :nomame
  69. echo.
  70. echo *** MAME.EXE not found!
  71. :usage
  72. echo.
  73. echo USAGE: msh [filename.zip]
  74. echo        msh (all supported mame-files in current directory are displayed)
  75. echo.
  76. echo.
  77. goto exit
  78. :tschuess
  79. del mamlist.tmp /q
  80. :bye
  81. echo.
  82. echo thnx for using the mame-shell!
  83. echo [/] by -BiNGEN- 1942
  84. :exit
  85. endlocal
Add Comment
Please, Sign In to add comment