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.
    • wood12W
      wood12 @mitu
      last edited by

      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

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @wood12
        last edited by

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

        wood12W 1 Reply Last reply Reply Quote 0
        • wood12W
          wood12 @mitu
          last edited by

          @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
          • mituM
            mitu Global Moderator
            last edited by

            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 ?

            wood12W 1 Reply Last reply Reply Quote 0
            • wood12W
              wood12 @mitu
              last edited by

              @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

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @wood12
                last edited by mitu

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

                wood12W 1 Reply Last reply Reply Quote 0
                • wood12W
                  wood12 @mitu
                  last edited by

                  @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
                  • mituM
                    mitu Global Moderator
                    last edited by

                    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.

                    wood12W 1 Reply Last reply Reply Quote 0
                    • wood12W
                      wood12 @mitu
                      last edited by

                      @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"
                      
                      mituM 1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @wood12
                        last edited by

                        @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
                        
                        wood12W 2 Replies Last reply Reply Quote 0
                        • wood12W
                          wood12 @mitu
                          last edited by

                          @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
                          • wood12W
                            wood12 @mitu
                            last edited by

                            @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
                            • mituM
                              mitu Global Moderator
                              last edited by

                              What's the error message ?

                              wood12W 1 Reply Last reply Reply Quote 0
                              • wood12W
                                wood12 @mitu
                                last edited by

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

                                1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator
                                  last edited by

                                  You need to specify the correct path to mount, just like you did when mounting the c drive

                                  mount D /home/pi/RetroPie/roms/pc-games/Rayman/cdrom -t cdrom
                                  
                                  wood12W 1 Reply Last reply Reply Quote 0
                                  • wood12W
                                    wood12 @mitu
                                    last edited by

                                    @mitu Thank you so much! Indeed, it was precisely in the full path to the CDROM folder.

                                    As a result, the command looks like this:

                                    [autoexec]
                                    
                                    MOUNT c /home/pi/RetroPie/roms/pc-games
                                    c:
                                    cd Rayman
                                    MOUNT d /home/pi/RetroPie/roms/pc-games/Rayman/cdrom -t cdrom
                                    RAYMAN.EXE
                                    EXIT
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      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.