Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Inukaze - pcsxr custom config replacer by each game title
- # you can see too in : http://ubuntuforums.org/showthread.php?p=11277492#post11277492
- # You must create a "folder"/"directory" or simbolyc link inside "/home/my_user/.pcsxr/" called "config"
- # and you must put the same name of file of "CD IMAGEN" , for example
- # if you game its : "Final Fantasy VII CD1.iso" , the must create a new sub-folder inside the "config"
- # folder , called "Final Fantasy VII CD1" , and put there the files
- # "dfcdrom.cfg" , "dfinput.cfg" , "dfsound.cfg" .
- # For 2D Games you should use : 1 - "dfxvideo.cfg" or 2 - "gxvideo.cfg"
- # For 3D Games you should use : 3 - "PeopsMesaGL.cfg"
- # Copy to the "Config"/"Game Name" , the file called "pcsxr.cfg" and rename it to "Gamename" for example "Final Fantasy VII CD1.cfg" . and now , you can run games with my mini script :
- # Mini-Script - pcsxr-launcher / CODE :
- #!/bin/bash
- filename="${1%.*}"
- gamename="${filename##*/}"
- basename="${filename##*/}"
- gamedir="${basename%.*}"
- # Copy the Config File for Emulator :
- cd "$HOME/.pcsxr/config/$gamedir"
- cp "$gamename.cfg" "$HOME/.pcsxr/"
- cd "$HOME/.pcsxr"
- mv "pcsxr.cfg" "pcsxr.cfg.bak"
- mv "$gamename.cfg" "pcsxr.cfg"
- echo " STEP 01 - Backup Original File & Replace it "
- # Backup current cfgs plugins files
- cd "$HOME/.pcsxr/plugins"
- mv dfcdrom.cfg dfcdrom.cfg.bak
- mv dfinput.cfg dfinput.cfg.bak
- mv dfsound.cfg dfsound.cfg.bak
- mv dfxvideo.cfg dfxvideo.cfg.bak
- mv gpuPeopsMesaGL.cfg gpuPeopsMesaGL.cfg.bak
- mv gxvideo.cfg gxvideo.cfg.bak
- echo " STEP 02 - Backup current config files of plugins "
- # Remove current cfgs plufins files
- cd "$HOME/.pcsxr/plugins"
- rm -rf dfcdrom.cfg
- rm -rf dfinput.cfg
- rm -rf dfsound.cfg
- rm -rf gxvideo.cfg
- rm -rf dfxvideo.cfg
- rm -rf gpuPeopsMesaGL.cfg
- echo " STEP 03 - Cleaned current config files of plugins "
- # Using the Config Files for Plugins :
- cd "$HOME/.pcsxr/config/$gamedir"
- if [ -e dfcdrom.cfg ] || [ -e dfinput.cfg ] || [ -e dfsound.cfg ]
- then
- cp -rf dfcdrom.cfg "$HOME/.pcsxr/plugins"
- cp -rf dfinput.cfg "$HOME/.pcsxr/plugins"
- cp -rf dfsound.cfg "$HOME/.pcsxr/plugins"
- fi
- if [ -e dfxvideo.cfg ]
- then
- cp -rf dfxvideo.cfg "$HOME/.pcsxr/plugins"
- fi
- if [ -e gxvideo.cfg ]
- then
- cp -rf gxvideo.cfg "$HOME/.pcsxr/plugins"
- fi
- if [ -e gpuPeopsMesaGL.cfg ]
- then
- cp -rf gpuPeopsMesaGL.cfg "$HOME/.pcsxr/plugins"
- fi
- echo " STEP 04 - Using config files for $gamedir "
- # Begin Emulator & wait emulator exit :
- echo " STEP 05 - Begin emulation of $gamedir "
- pcsxr -slowboot -nogui -cdfile "$@"
- wait $pid
- # Finish Emulation
- # Restore Files :
- cd "$HOME/.pcsxr"
- rm -rf pcsxr.cfg
- mv pcsxr.cfg.bak pcsxr.cfg
- echo " STEP 05 - Emulation of $gamedir finished "
- # Remove current cfgs plufins files
- cd "$HOME/.pcsxr/plugins"
- rm -rf dfcdrom.cfg
- rm -rf dfinput.cfg
- rm -rf dfsound.cfg
- rm -rf gxvideo.cfg
- rm -rf dfxvideo.cfg
- rm -rf gpuPeopsMesaGL.cfg
- # Restore originals cfgs
- mv dfcdrom.cfg.bak dfcdrom.cfg
- mv dfinput.cfg.bak dfinput.cfg
- mv dfsound.cfg.bak dfsound.cfg
- mv gxvideo.cfg.bak gxvideo.cfg
- mv dfxvideo.cfg.bak dfxvideo.cfg
- mv gpuPeopsMesaGL.cfg.bak gpuPeopsMesaGL.cfg
- echo " STEP 06 - Restoring original config files "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement