VOGONS


First post, by Spiky

User metadata
Rank Newbie
Rank
Newbie

I use DOSBox 0.74 in RetroPie on Raspberry Pi3. In order to make Ignition run without calling several commands every time, I created a script:

#!/bin/bash
/opt/retropie/emulators/dosbox/bin/dosbox -c "imgmount d /home/pi/RetroPie/roms/pc/Ignition/Ignition.iso -t iso" -c "mount c /home/pi/RetroPie/roms/pc/Ignition/game" -c "c:" -c "IGN_DOS" -exit

It is working all good until I decide to stop playing and quit the game. As you can see, I added -exit option, but as I quit the game, the DOSBox console remains open and it won't let me back to RetroPie menu, unless I manually type exit in there, which is not what I want, since I play on joystick. I also tried -c "exit", but no effect as well.

Any idea how to make it work and close the DOSBox terminal once I exit the game?

Reply 1 of 2, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

For you system the command is -c "exit" as described in the documentation of DOSBox.
However if IGN_DOS is a "bat" file then you need to use "call IGN_DOS"
This is not a bug of DOSBox, but how DOS works.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 2, by Spiky

User metadata
Rank Newbie
Rank
Newbie

thank you quick response, Qbix

in the meantime I managed to find a solution by myself. reading documentation once again helped a lot 😁 it says that -exit will terminate dosbox when name program finishes.

I updated my script to use name parameter and it works now:

#!/bin/bash
/opt/retropie/emulators/dosbox/bin/dosbox /home/pi/RetroPie/roms/pc/Ignition/game/IGN_DOS.BAT -exit -c "imgmount d /home/pi/RetroPie/roms/pc/Ignition/Ignition.iso -t iso"