(A) From a list of games, it plays the next game
(B) From the same list it plays a random game
(C) It loads your front end
say for example your list of games is :
The Batch File willMame32 cutieq
Mame32 cyvern
Mame32 dkong
Mame32 eyes
(1) Load Mame and run the first game on the list : CUTIEQ
(2) It will Load Mame and run a random game from the rest of the list : So you will get CVYERN or DKONG or EYES but not CUTIEQ
(3) It will move the first game (CUTIEQ) to the bottom of the list so next time the next game will by CYVERN
(4) It will Load your Front End
If you want to give this a go, your need to put two files in your Mame Executable Directory ;
File 1 : Gameslist.Txt
Depending on which Mame you use, change the "Mame32" part of text file ie "DMame" or "Mame"
This file can be as long as you want it. Please make sure there are no blank lines at top or bottom of file.
File 2 : Play.BatMame32 cutieq
Mame32 cyvern
Mame32 dkong
Mame32 eyes
Change the bottom three lines to take it to your front end.Echo Off
Cls
REM Play Next Game in List
Set/p PlayNextGame=<Gameslist.txt
Echo %PlayNextGame% > PlayNextGame.Bat
REM Move Game Played to Bottom of List
More +1 Gameslist.txt > Gameslist.001
Copy/b GamesList.001+PlayNextGame.Bat GamesList.002
Del Gameslist.txt
Del GamesList.001
Ren GamesList.002 GamesList.Txt
REM Count Lines in Gameslist.Txt
Set file=Gameslist.Txt
Set /a CountLines=0
For /f %%a in ('type "Gameslist.Txt"^|find "" /v /c') do set /a CountLines=%%a
REM Generate Random Number and Game
Set /a randnum=(%CountLines%+1)*%random%/32767+1
More +%randnum% Gameslist.Txt > Gameslist.003
Set/p PlayRandomGame=<Gameslist.003
Echo %PlayRandomGame% > PlayRandomGame.Bat
Del GamesList.003
REM Play and Delete
Call PlayNextGame.Bat
Call PlayRandomGame.Bat
Del PlayNextGame.Bat
Del PlayRandomGame.Bat
REM Launch Front End
C:
Cd\Emulators\Glaunch
Glaunch.Exe
Hope the above makes sense and helps.........
Hitesh