Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: DOSBox update #108352
    fanatixx
    Participant

    I don’t know if this is related, but I added a functionality to my “+Start DOSBox.sh” script so that it uses a custom “dosbox.conf” config file if it exists in the %ROM% directory, similarly to retroarch’s custom config files. If there’s no custom config file, it just uses the default one (normal behavior).

    It works for me because I have my DOS games and apps each in its own subdirectory (mostly). This way I don’t need to create a .sh file for every game/app in order to launch it through Emulationstation, but I need to copy custom config files to the folders I need them customized.

    For those who might want it, I am posting the code bellow.

    Content of my patched “+Start DOSBox.sh”:

    
    #!/bin/bash
    params="$1"
    if [[ "$params" =~ "+Start DOSBox.sh" ]]; then
    	params="-c \"MOUNT C /home/pi/RetroPie/roms/pc\""
    elif [[ "$params" =~ \.sh$ ]]; then
    	bash "$params"
    	exit
    else
    	dir=$(dirname "${params}")
    	configfile="$dir/dosbox.conf"
    	if [[ -f $configfile ]]; then
    		params+=" -conf \"$configfile\""
    	fi
    	params+=" -exit"
    fi
    /opt/retropie/supplementary/runcommand/runcommand.sh 0 "/opt/retropie/emulators/dosbox/bin/dosbox $params" "dosbox"
    
    
Viewing 1 post (of 1 total)