I have now managed to get the test script to read the following data.
Test script:system=$1 emulator=$2 path=$3 commandline=$4 echo $system > /home/pi/test.txt echo $emulator >> /home/pi/test.txt echo $path >> /home/pi/test.txt echo $commandline >> /home/pi/test.txt
Where do I enter the option Y for the game and how do I read this option into my script?
if type = Y then ./script1.sh
if type = X then ./script2.sh
Now I have a solution.
In the file /home/pi/4way.games are the names (.zip) of 4-way games.
My 4way.games file looks like this:
Entry in /opt/retropie/configs/all/runcommand-onstart.sh :bash "/home/pi/4or8way.sh" "$@"