summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/vdr-mame-launch.sh82
-rwxr-xr-xexamples/vdr-mame-lircrc87
2 files changed, 169 insertions, 0 deletions
diff --git a/examples/vdr-mame-launch.sh b/examples/vdr-mame-launch.sh
new file mode 100755
index 0000000..8f7bd77
--- /dev/null
+++ b/examples/vdr-mame-launch.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+
+
+#This is the launcher for the vdr-mame plugin
+
+
+
+#Please modify the following lines
+
+#Path to sdlmame
+MAME="/usr/games/sdlmame"
+
+
+
+#Joydev name
+JOYDEV="/dev/input/js"
+
+
+
+#Joystick type
+# 0 No joystick
+# 1 Standard joystick
+# 5 SDL joystick
+JOYTYPE="1"
+
+
+
+#lircrc file
+LIRCRC="/etc/lirc/vdr-mame-lircrc"
+
+
+
+#Command to stop VDR
+VDRSTOPCMD="vdr.sh stop"
+
+
+
+#Command to start VDR
+VDRSTARTCMD="vdr.sh start"
+
+
+
+#Stop VDR if stopping wanted
+STOPVDR=$1
+
+if [ $STOPVDR = "1" ]
+then
+ $VDRSTOPCMD
+ sleep 5
+fi
+
+
+
+ROMPATH=$2
+ROMNAME=$3
+
+COMMAND="$MAME -video opengl -resolution 1920x1080 -autoframeskip -throttle -switchres -joystick -mouse -lightgun -rompath $ROMPATH $ROMNAME"
+
+
+#Execute command
+export DISPLAY=:0.0
+svdrpsend.pl REMO off
+irexec $LIRCRC &
+
+$COMMAND
+
+killall -9 irexec
+svdrpsend.pl REMO on
+
+
+
+#Start VDR if stopping wanted
+if [ $STOPVDR = "1" ]
+then
+ sleep 5
+ $VDRSTARTCMD
+fi
+
+
+
+exit 0
diff --git a/examples/vdr-mame-lircrc b/examples/vdr-mame-lircrc
new file mode 100755
index 0000000..1a21d53
--- /dev/null
+++ b/examples/vdr-mame-lircrc
@@ -0,0 +1,87 @@
+#mame end
+begin
+prog = sdlmame
+button = POWER
+repeat = 0
+config = 1
+end
+
+#mame 1 player
+begin
+prog = sdlmame
+button = RED
+repeat = 0
+config = 2
+end
+
+#mame 2 player
+begin
+prog = sdlmame
+button = GREEN
+repeat = 0
+config = 3
+end
+
+#mame insert coin
+begin
+prog = sdlmame
+button = YELLOW
+repeat = 0
+config = 6
+end
+
+#mame menu
+begin
+prog = sdlmame
+button = MENU
+repeat = 0
+config = 15
+end
+
+#mame menu up
+begin
+prog = sdlmame
+button = UP
+repeat = 0
+config = 103
+end
+
+#mame menu down
+begin
+prog = sdlmame
+button = DOWN
+repeat = 0
+config = 108
+end
+
+#mame menu left
+begin
+prog = sdlmame
+button = LEFT
+repeat = 0
+config = 105
+end
+
+#mame menu right
+begin
+prog = sdlmame
+button = RIGHT
+repeat = 0
+config = 6
+end
+
+#mame enter
+begin
+prog = sdlmame
+button = OK
+repeat = 0
+config = 28
+end
+
+#mame pause
+begin
+prog = sdlmame
+button = PLAY
+repeat = 0
+config = 25
+end