First post, by Sephiroth
- Rank
- Member
I've been working on a front-end that will mount a specified directory as C: in DOSBox, and run games from that directory. This part works flawlessly, and DOSBox 0.72 does an excellent job emulating the CPU and soundcards, but there is one minor problem that I am running into that is stumping me. When my front-end generates the DOSBox configuration for any selected game, it adds lines to the autoexec section to mount the specified directory, change to the game directory, start the game, and then exit. The problem is that while it starts the games and runs them beautifully, it never executes the "exit" command when you quit the game! The "-exit" command-line parameter won't work in this manner either.
Before it is recommended that I use "DOSBox C:\MyGame\MyGame.exe -conf whatever.conf -exit" to run the game, this won't work because unless I am mistaken, it would mount "C:\MyGame" as C:, which screws with games like Daggerfall. These games require the game to be in "C:\Game\game.exe", not the root of the drive. This is why I have to mount a specified folder where the games are installed as C:, and is why as far as I know, I cannot use the command-line method of launching games.
So, how can I make DOSBox exit once a game has exited and control returns to the OS? In real DOS, you could do this kind of thing with the autoexec.bat file, such as calling reboot.com to restart the computer after a game exits, maybe to return to a menu of games or Windows.
486 Launcher v2.0 is now under development!