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

    Dosbox Configs

    Scheduled Pinned Locked Moved Help and Support
    dosboxretropie 4.2configuration
    7 Posts 4 Posters 8.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.
    • X
      XeroOmega
      last edited by

      Hi there,

      i'm having some trouble finding clear up to date info on how to setup configs for my dosbox games in emulationstation.
      i would like to have .sh scripts setup for each individual game. this is less for my convenience more for my roommates as i understand and can type the commands in to get anything going.

      for instance, i want a launcher to run a custom dosbox config, mount a cd, mount a c:\ and set -freespace then launch said game.

      the commands i would use to accomplish this are:
      dosbox -conf /path/to/conffile
      mount d /path/to/cdcontents -t cdrom ((-label gamedisc id)for required games)
      mount c /path/to/roms/pc ((-freespace 1000)for required games/installers)
      cd /path/to/game
      game.exe

      I want to combine all that into a launcher i can launch from emulationstation, and make more launchers for various games as i optimize them. Any help would me greatly appreciated.

      my hardware is,
      rpi3, heatsink & fan, 65c max temp, 3.5A powersupply
      overclock settings:
      arm_freq=1400
      over_voltage=6
      sdram_freq=500
      core_freq=550
      gpu_freq=500
      gpu_mem=320
      v3d_freq=525
      temp_limit=80
      With these settings i'm rock solid stable, and get generally good performance across emulators.

      D 1 Reply Last reply Reply Quote 0
      • D
        Dochartaigh @XeroOmega
        last edited by Dochartaigh

        @XeroOmega

        In RetroPie, when I click on the MS-DOS logo (for the DOSBox "games"), it gives me a list of all the folders on the "C:" drive, AND any .EXE's or .BAT's I have in the root C:\ folder. In the root C:\ for example I have a "war2.bat" with the below code to mount the Warcraft 2 CD image and boot the game:

        imgmount d "/home/pi/RetroPie/roms/pc/war2cd/Warcraft 2.bin" -t iso -fs iso
        cd \war2
        war2
        

        You could simply drop in all .BAT files here to load all the games (and just tell the person to ignore the folders in the DOSBox menu...I think those are color-coded even, but maybe there's a way to hide those?).

        OR, you can have one single non-folder .BAT file on the root C:\ which loads an easy to write DOS Batch menu where they just press up/down and enter to choose the game they want to run (those can simply load the game's .exe file, OR load a .BAT which has further instructions to mount a CD and such if they need that). Here's a tutorial on how to make an easy MS-DOS batch menu:

        http://mintywhite.com/software-reviews/productivity-software/create-multiple-choice-menu-batchfile/

        1 Reply Last reply Reply Quote 0
        • X
          XeroOmega
          last edited by XeroOmega

          Hi thanks for the suggestion, although that would work out for most things, what i'm trying to accomplish is to be able to run dosbox -conf /path/to/gameconf. while bat files are easy it only gets access to dosbox after it has booted(with the default config)

          Also for you, hiding folders(or most of them) is really easy, what i do is have all games installed to ~/RetroPie/roms/pc/z
          this keeps all my files contained and not cluttering up my menu(i use z so its at the bottom on my list). you could then drop and .bat(or .sh) files to ~/RetroPie/roms/pc/

          thanks again, close but not quite what i'm looking for.
          i know i can define -c when launching dosbox to get it to spit out commands on the dos terminal. so something like:

          dosbox -c "mount c ~/RetroPie/roms/pc" -c "imgmount d /home/pi/RetroPie/roms/pc/war2cd/Warcraft 2.bin -t iso -fs iso" -c "cd \war2" -c "war2.exe"

          would work(from your above example) from retropie terminal(not dosbox)
          ideally i would like to launch that command from a .sh script sitting in /RetroPie/roms/pc

          Dosbox command line peramaters
          Scroll down to bottom for example

          I'll dig into it a little more, when i come across a clear solution i'll post it here.

          markyh444M 1 Reply Last reply Reply Quote 0
          • markyh444M
            markyh444 @XeroOmega
            last edited by

            @XeroOmega I just followed the guide here linked from the Wiki http://dosonthepi.blogspot.co.uk/2015/02/dosbox-configuration-for-individual.html

            Is that not what you're after?

            Retropie in a NES - Pi 3 with Mausberry circuit shutdown switch wired to buttons and 8bitdo NesPro30 controller
            Retropie in a Saturn Controller - Pi Zero, GPIO controls using DB9 driver
            Retropie in a PSX - Pi3
            https://markyh444.wordpress.com

            X 1 Reply Last reply Reply Quote 0
            • X
              XeroOmega
              last edited by XeroOmega

              Alright, made some headway, i'm able to launch from an .sh and .bat files.
              For anyone interested here's an example of how i accomplished this.

              p.s. i don't know how to make a code box, if someone could explain that to me i'll edit this to be cleaner.

              For a .bat file

              • goto terminal(from emulation station press start>quit>quit emulationstation)
              • cd /(path to your game) (ex. /home/pi/RetroPie/roms/pc/(path to game)/)
              • nano (GAMENAME).bat

              (make sure to put each new command on a new line)
              (fyi this will only run commands from within an already running dosbox, to run a command before dosbox starts use a .sh)

              imgmount d "/home/pi/RetroPie/roms/pc/(path to iso)" -t iso -fs iso
              ((or to mount a folder as cd rom use) mount d /home/pi/RetroPie/roms/pc/(game cd contents folder) -t cdrom )
              cd /(path to game)
              (game executable)

              (Example from Dochartaigh) (Thanks, tested working)
              imgmount d "/home/pi/RetroPie/roms/pc/war2cd/Warcraft 2.bin" -t iso -fs iso
              cd \war2
              war2

              For a .sh file

              • goto terminal(from emulation station press start>quit>quit emulationstation)
              • cd /(path to your C Drive) (ex. /home/pi/RetroPie/roms/pc/)
              • nano (GAMENAME).sh

              (make sure to NOT put each new command on a new line, it's all 1 long command)

              #!/bin/bash
              (new line)/opt/retropie/emulators/dosbox/bin/dosbox -c "mount c /home/pi/RetroPie/roms/pc/" -c "mount d /(game cd contents folder) -t cdrom" -c "c:" -c "cd /(game folder)" -c "(gameame).exe" -c "exit"

              (Example from me)(tested, working)
              #!/bin/bash
              /opt/retropie/emulators/dosbox/bin/dosbox -c "mount c /home/pi/RetroPie/roms/pc/z/ -freesize 1000" -c "mount d /home/pi/RetroPie/roms/pc/z/ES2/dfcd -t cdrom -label Daggerfall" -c "c:" -c "cd /ES2/" -c "dagger.exe" -c "exit"

              (how it works)
              #!/bin/bash(tells the .sh script this is to be run in bash(terminal))

              /opt/retropie/emulators/dosbox/bin/dosbox (runs dosbox with the default config)

              -c "" (is a new command to be run WITHIN dosbox (be sure to enclose in quotes)

              mount c (drive letter) /(path to c) -freesize (sets freesize so the game knows there is available space to install)

              mount d /(path to cd contents) -t cdrom(sets device type as cdrom) -label (gives the disc a label, some games require this)

              exit(exits back to retropie after game closes)

              NOTES

              • for cleanliness i have all my games in "/home/pi/RetroPie/roms/pc/z" now emulationstation will show only z folder, any .sh's i add to "/home/pi/RetroPie/roms/pc" will show in emulation station, this stops confusion of game folders and executables
              • note how i mount my c to "/home/pi/RetroPie/roms/pc/z" then when i cd into the game folder i only need to use the path from C:\ in dosbox, not the full linux path.
              • to run custom configs add -conf /(path to your conf file) right after /opt/retropie/emulators/dosbox/bin/dosbox (-conf)
              • You can boot a .bat from a .sh if .bat's are your preferred method, This means you can run a .bat with different dosbox configs easily.i would accomplish this via :

              #!/bin/bash
              /opt/retropie/emulators/dosbox/bin/dosbox -c "mount c /home/pi/RetroPie/roms/pc/" -c "cd /(path to game folder)" -c "(gamename).bat

              1 Reply Last reply Reply Quote 0
              • X
                XeroOmega @markyh444
                last edited by

                @markyh444
                just got it all sorted, thanks though, yes the guide explained it okay, but i was having some problems due to wanting to run a specific conf, with a little bit of a custom setup. also a bunch of those links are down, i was not sure how accurate/uptodate it was.

                1 Reply Last reply Reply Quote 0
                • T
                  tebl
                  last edited by

                  Old topic, but it's the one I found via Google after spending some time trying to figure out how to easily launch DOSBox games. Tried to follow both guides, but seemed very manual and finicky so ended up scripting it for my own Pie3 instead - basically it just takes an extracted copy of the game and allows you to select the executable and that will be saved to an init-file. Put it up on github if anyone wants it (https://github.com/tebl/retropie-dosbox-configure).

                  1 Reply Last reply Reply Quote 1
                  • 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.