-
Notifications
You must be signed in to change notification settings - Fork 0
/
games.sh
executable file
·67 lines (52 loc) · 1.38 KB
/
games.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#welcome
echo "===============
Welcome to EDNA
==============="
game ()
{
#select a system
read -p "[0] NES
[1] SNES
[2] SEGA Genesis
[3] TurboGrafx 16
=====================
Select a system: " EMU
#config
GDIR="~/Games" #root path to roms folder
XRES="1920" #x res...
YRES="1080" #y res...
FS="1" #fullscreen
STRCH="1" #stretch
if [ "$EMU" = "0" ]; then #NES
GPATH="NES"
OPTIONS="-nes.no8lim 1 -nes.clipsides 1 -nes.stretch $STRCH -nes.xres $XRES -nes.yres $YRES -vdriver sdl -video.fs $FS"
elif [ "$EMU" = "1" ]; then #SNES
GPATH="SNES"
OPTIONS="-snes.stretch $STRCH -snes.xres $XRES -snes.yres $YRES -vdriver sdl -video.fs $FS"
elif [ "$EMU" = "2" ]; then #SEGA
GPATH="SEGA"
OPTIONS="-md.stretch $STRCH -md.xres $XRES -md.yres $YRES -vdriver sdl -video.fs $FS"
elif [ "$EMU" = "3" ]; then #TG16
GPATH="TG16"
OPTIONS="-pce.stretch $STRCH -pce.xres $XRES -pce.yres $YRES -vdriver sdl -video.fs $FS"
else
echo "==================
You have to select a system, biscuit head! trying again...
=================="
game #restart
fi
#get file and run game
getrun () {
#get file
GAME=`zenity --file-selection --title="Select a Game" --filename="${GDIR}/${GPATH}/"`
#run game
mednafen $OPTIONS "$GAME"
echo "==================
LETS TRY A DIFFERENT GAME
=================="
game #select another game?
}
getrun #get file and run game
}
game #start