stepes Posted September 5, 2003 Report Share Posted September 5, 2003 I don't know if there are any GUI frontends for tuxnes out there, and I got tired of typing in all the options I want and then the rom name everytime I wanted to launch a nes rom. So I decided to write a script to do it all for me. It's adabtable to probably any other rom based emulator, I use it for: snes9x stella boycotadvance and it seems to work fine. You just need to change some file names. I don't know if anyone would be able to use it, but I am going to post it anyway... (Mod's feel free to relocate this thread if it's in the wrong topic) Suggestions are welcome #!/bash/sh #***************************************************************# # # # tuxnesrun # # Written By: # # Stepes # # Sept. 3, 2003 # # # # # # Tuxnes Launcher # # # #***************************************************************# clear #===============================# # Functions # # that will be # # used # #===============================# checkdir() { if [ -d $HOME/.emulators ]; then clear else mkdir $HOME/.emulators fi } prntlst() { pr --width=65 $HOME/.emulators/nesroms | more -d } genchk() { if [ -e $HOME/.emulators/nesroms ]; then prntlst else echo "Generating Rom List" ls -x $dir > $HOME/.emulators/nesroms sleep 3 prntlst fi } romrun () { echo ________________________________ echo Which ROM would you like to run? read rom tuxnes -E -f $dir/$rom* } replay () { clear echo ________________________________ echo "Would you like to play another?" read again if [ $again = y ]; then echo __________________ echo "Display Rom List?" read romlst if [ $romlst = y ]; then prntlst romrun replay else romrun replay fi else exit 0 fi } #+++++++++++++++++++++++++++++++# # # # Code # # # #+++++++++++++++++++++++++++++++# checkdir if [ -e $HOME/.emulators/tuxnes.cfg ]; then read dir <$HOME/.emulators/tuxnes.cfg genchk else echo "Please enter location of Roms" read dir echo $dir 1>$HOME/.emulators/tuxnes.cfg echo "Is $dir correct?" read correct if [ $correct = n ]; then echo "Please enter location of Roms" read loc echo $loc 1>$HOME/.emulators/tuxnes.cfg echo "Saving" sleep 1 else echo "Saving" sleep 1 fi genchk fi romrun replay Hope that someone will find this usefull _______________________________ edits: Few minor updates, added rom directory check, got rid of .sh extension Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.