Game won't launch via .sh file on Retropie with Dosbox emulator
-
Hello!
I have a problem launching PC games on a Raspberry Pi 4 model B with the Retropie operating system via the Dosbox SVN emulator (I installed it via Retropie Setup / Manage packages / Manage optional packages / line 113 dosbox).
I'll say right away that I'm not good at Linux code, but by the method of selection and a bunch of examples on the Internet, I understood the basics of creating .conf files .sh .map
And I'm also from Russia, so everything that you are reading now has been translated through Google, don't be offended, I'm trying.)I'll show with an example what I got:
I copied the AlienCarnage game on the Pi to / roms / pc (/ home / pi / RetroPie / roms / pc /) where I created a shared folder for all games and named it all. That is, I have all the files with the game here: / home / pi / RetroPie / roms / pc / all / AlienCarnage /In order for the game to work quickly, I created the AlienCarnage .conf file
In order for the keyboard to work correctly, I created the aliencarnage .map file
and put them in the game folder.Here are my files: .conf and .map and .sh
In the .conf file, I registered the necessary paths:
[sdl] mapperfile = aliencarnage.map [autoexec] MOUNT c / home / pi / RetroPie / roms / pc / all C: CD AlienCarnage carnage.exe EXIT
Next, in the main directory / home / pi / RetroPie / roms / pc / I created the file AlienCarnage .sh
in order to launch it was more convenient to launch the game without going into the game folder.
In it, I registered the necessary paths to the AlienCarnage .conf and carnage .exe game launch file.AlienCarnage .sh file content:
#! / bin / bash / opt / retropie / emulators / dosbox / bin / dosbox -conf "/home/pi/RetroPie/roms/pc/all/AlienCarnage/AlienCarnage.conf" -c "mount c / home / pi / RetroPie / roms / pc / all / "-c" c: "-c" cd AlienCarnage "-c" carnage.exe "-c" exit "
In theory, launching the AlienCarnage .sh file should start the game as I have built the entire chain of communication between the files.
But it doesn't work! What have I done wrong?
Please help me, I'm already worn out to erase the same pages on the Internet to the holes (
-
EmulationStation recognizes
.conf
files already, so you don't need to create an additional.sh
file to launch the game.Unless is a typo, you shouldn't have spaces around the path separator (
/
):mount c / home / pi / RetroPie / roms / pc / all
should be
mount c /home/pi/RetroPie/roms/pc/all
If it's just a typo, post the contents of
/dev/shm/runcommand.log
, where any errors fromdosbox
should be displayed. You can starting Dosbox only (no game) and type the commands you have put in the[autoexec]
section of the.conf
, to see if you get any errors. -
@mitu Thanks for the quick response.
There are no spaces in the file. I posted my files above in the post!Unfortunately I don't know how to get data from this file and how to get to it ... I'm newbie, sorry.
/dev/shm/runcommand.log -
@wood12 How did you edit the
.conf
/.sh
files ? Did you use File Shares or did you enable SSH ?You can look at the files on your system using the File Manager in RetroPie - you browse to the
/dev/shm
folder and then look at theruncommand.log
file. The file is present only after you launch a game - so first launch the game, wait for the error to occur, then open the file from the File Manager (F3 I think will view the file). -
@mitu I edited and created all files through Windows with an ordinary text editor (.txt)
Спасибо за объяснение вот содержание runcommand.log фала:
-
OK, we're getting somewhere.
- Install the
dosbox-sdl2
package, this will add the fluidsynth soundfonts that cause thetimidity
error - Remove everything from the
.conf
file, except the part that you posted here:
[sdl] mapperfile = aliencarnage.map [autoexec] MOUNT c / home/pi/RetroPie/roms/pc/all C: CD AlienCarnage carnage.exe EXIT
After these steps, re-launch the game and see if it works.
EDIT: when posting log/text files, use pastebin.com, don't zip the files and upload them - it's easier to look at the text online, without downloading/unpacking an archive first.
- Install the
-
- Installed dosbox-sdl2 package
- Remove unnecessary from the .conf file
Next, I rebooted EmulationStation and tried to launch the game via the .sh file. The game still doesn't work.
Here is the content of the runcommand.log file:
-
@wood12 said in Game won't launch via .sh file on Retropie with Dosbox emulator:
Next, I rebooted EmulationStation and tried to launch the game via the .sh file. The game still doesn't work.
Use the
.conf
file - with the contents I mentioned earlier to launch the game. Remove the.sh
file. -
@mitu Understood, I deleted the AlienCarnage .sh file, but you understand that I need some kind of shortcut in the general directory to launch each game in order to bypass the search for a /home/pi/RetroPie/roms/pc/all/AlienCarnage/ AlienCarnage .conf file in each game folder to launch it.
I did as you said:
Deleted AlienCarnage .sh file
I went to the folder with the game, which is located and launched it through the AlienCarnage .conf fileThe game did not start, here is the log:
-
You can copy the
.conf
file in thepc
folder directly, the.conf
file doesn't have to be in the game's folder. This way the game can be launched directly from the PC gamelist.In fact, if you want to organize things, you can create a
roms/pc-games
folder and store the game there.This folder is not shown in EmulationStation, you can just add.conf
- files for each game - in thepc
folder. Of course, you'll have to adjust the[autoexec]
section in the.conf
to point toroms/pc-games
.About the log file - the only error I see is the resolution message (Cannot detect..), but Dosbox appears to start correctly. Is the game still not launching ?
-
@mitu I understand you, and I'll do it: I will leave the AlienCarnage .conf file in the pc folder and I moved all the folders with games to the pc-games folder to the level with the pc folder.
Next, I changed in the AlienCarnage .conf file the paths to the aliencarnage .map and carnage .exe file of the game launch:[sdl] mapperfile=/home/pi/RetroPie/roms/pc-games/AlienCarnage/aliencarnage.map [autoexec] MOUNT c /home/pi/RetroPie/roms/pc-games C: CD AlienCarnage carnage.exe EXIT
Next, I rebooted EmulationStation. The game did not start!
Here is the log:
-
@wood12 said in Game won't launch via .sh file on Retropie with Dosbox emulator:
Next, I rebooted EmulationStation. The game did not start!
OK, so what exactly does happen - do you see the Dos prompt, do you see any errors reported on screen, are you booted back to EmulationStation, etc. ?
-
@mitu Nothing happens, it just doesn't start and that's it ...
Here is the launch video, take a look! -
Ok, so you're booted back to EmulationStation. This would be the time to apply what I said earlier:
You can starting Dosbox only (no game) and type the commands you have put in the [autoexec] section of the .conf, to see if you get any errors.
But my bet is that the folder name is at fault - it's too long for DOS. Try renaming the game folder to something shorter -
AlienC
for instance - and adjust the.conf
file. -
@mitu You were right, the problem is in the too long name of the game folder. After renaming, the game started! I even edited the .conf file to add the rest of the performance specs for this game and everything still works. Many thanks for the help!
There was a very small question about launching games through .sh, which, as it turned out, does not work in EmulationStation and I deleted it earlier. The fact is that games are launched through it that require a disc in the drive. How then to get out of the situation? Where and what to register if there is no .sh file?
In it, the code for running games with SD was published as follows:
#!/bin/bash /opt/retropie/emulators/dosbox/bin/dosbox -c "mount c ~/RetroPie/roms/pc-games" -c "c:" -c "cd LBA/cd" -c "imgmount d LBA.BIN -t iso" -c "cd .." -c "call LBA.EXE" -c "exit"
-
@wood12 if you look at the launching command, you can take anything that's added via the
-c
parameter and stuff it in the[autoexec]
section of the.conf
.
The command/opt/retropie/emulators/dosbox/bin/dosbox -c "mount c ~/RetroPie/roms/pc-games" -c "c:" -c "cd LBA/cd" -c "imgmount d LBA.BIN -t iso" -c "cd .." -c "call LBA.EXE" -c "exit"
can be translated into the following
.conf
file (a bit simplified)[autoexec] mount c ~/RetroPie/roms/pc-games c: cd LBA imgmount d CD\lba.bin -t iso LBA.EXE exit
-
@mitu The way you advised works!
Thank you again for the quick answers to my possibly stupid questions.)I think that this topic can be closed!
-
@mitu There was also a problem to mount the CDROM, and not the ISO or BIN disk image!
I created a folder where the game is located (/home/pi/RetroPie/roms/pc-games/Rayman/) and it contains a folder with a disk, which I named cdrom.
But the commands that I registered in [autoexec] do not work and the game does not start:
[autoexec] MOUNT c /home/pi/RetroPie/roms/pc-games c: cd Rayman MOUNT d cdrom -t cdrom RAYMAN.EXE EXIT
What did I do wrong?
-
What's the error message ?
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.