• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Game won't launch via .sh file on Retropie with Dosbox emulator

Scheduled Pinned Locked Moved Help and Support
dosbox configdosbox mapdosbox svnraspberry pi 4retropie
22 Posts 2 Posters 2.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W
    wood12
    last edited by 7 Sept 2020, 19:02

    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).

    1.jpeg

    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 (

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by mitu 9 Jul 2020, 20:24 7 Sept 2020, 19:24

      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 from dosbox 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.

      W 1 Reply Last reply 7 Sept 2020, 19:32 Reply Quote 0
      • W
        wood12 @mitu
        last edited by 7 Sept 2020, 19:32

        @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

        M 1 Reply Last reply 7 Sept 2020, 19:34 Reply Quote 0
        • M
          mitu Global Moderator @wood12
          last edited by 7 Sept 2020, 19:34

          @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 the runcommand.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).

          W 1 Reply Last reply 7 Sept 2020, 19:45 Reply Quote 0
          • W
            wood12 @mitu
            last edited by 7 Sept 2020, 19:45

            @mitu I edited and created all files through Windows with an ordinary text editor (.txt)

            Спасибо за объяснение вот содержание runcommand.log фала:
            WhatsApp Image 2020-09-07 at 22.42.20.jpeg

            1 Reply Last reply Reply Quote 0
            • M
              mitu Global Moderator
              last edited by mitu 9 Jul 2020, 20:55 7 Sept 2020, 19:53

              OK, we're getting somewhere.

              1. Install the dosbox-sdl2 package, this will add the fluidsynth soundfonts that cause the timidity error
              2. 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.

              W 1 Reply Last reply 7 Sept 2020, 20:17 Reply Quote 0
              • W
                wood12 @mitu
                last edited by 7 Sept 2020, 20:17

                1. Installed dosbox-sdl2 package
                2. 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:
                WhatsApp Image 2020-09-07 at 23.10.22.jpeg

                M 1 Reply Last reply 7 Sept 2020, 20:46 Reply Quote 0
                • M
                  mitu Global Moderator @wood12
                  last edited by 7 Sept 2020, 20:46

                  @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.

                  W 1 Reply Last reply 8 Sept 2020, 15:06 Reply Quote 0
                  • W
                    wood12 @mitu
                    last edited by 8 Sept 2020, 15:06

                    @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 file

                    The game did not start, here is the log:
                    WhatsApp Image 2020-09-08 at 17.53.13.jpeg

                    1 Reply Last reply Reply Quote 0
                    • M
                      mitu Global Moderator
                      last edited by 8 Sept 2020, 15:15

                      You can copy the .conf file in the pc 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 the pc folder. Of course, you'll have to adjust the [autoexec] section in the .conf to point to roms/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 ?

                      W 1 Reply Last reply 8 Sept 2020, 15:38 Reply Quote 0
                      • W
                        wood12 @mitu
                        last edited by 8 Sept 2020, 15:38

                        @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:
                        WhatsApp Image 2020-09-08 at 18.35.24.jpeg

                        M 1 Reply Last reply 8 Sept 2020, 16:07 Reply Quote 0
                        • M
                          mitu Global Moderator @wood12
                          last edited by mitu 9 Aug 2020, 17:07 8 Sept 2020, 16:07

                          @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. ?

                          W 1 Reply Last reply 8 Sept 2020, 16:20 Reply Quote 0
                          • W
                            wood12 @mitu
                            last edited by 8 Sept 2020, 16:20

                            @mitu Nothing happens, it just doesn't start and that's it ...
                            Here is the launch video, take a look!

                            1 Reply Last reply Reply Quote 0
                            • M
                              mitu Global Moderator
                              last edited by 8 Sept 2020, 16:27

                              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.

                              W 1 Reply Last reply 8 Sept 2020, 17:41 Reply Quote 0
                              • W
                                wood12 @mitu
                                last edited by 8 Sept 2020, 17:41

                                @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"
                                M 1 Reply Last reply 8 Sept 2020, 18:16 Reply Quote 0
                                • M
                                  mitu Global Moderator @wood12
                                  last edited by 8 Sept 2020, 18:16

                                  @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
                                  W 2 Replies Last reply 8 Sept 2020, 19:23 Reply Quote 0
                                  • W
                                    wood12 @mitu
                                    last edited by 8 Sept 2020, 19:23

                                    @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!

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      wood12 @mitu
                                      last edited by 11 Sept 2020, 17:56

                                      @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?

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        mitu Global Moderator
                                        last edited by 11 Sept 2020, 18:13

                                        What's the error message ?

                                        W 1 Reply Last reply 11 Sept 2020, 18:19 Reply Quote 0
                                        • W
                                          wood12 @mitu
                                          last edited by 11 Sept 2020, 18:19

                                          @mitu WhatsApp Image 2020-09-11 at 21.18.04.jpeg

                                          1 Reply Last reply Reply Quote 0
                                          20 out of 22
                                          • First post
                                            20/22
                                            Last post

                                          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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received