libretro / dosbox-libretro

Port of DOSBox (upstream) to the libretro API.
GNU General Public License v2.0
61 stars 40 forks source link

Change working directory when loading conf file #128

Closed niclashoyer closed 1 year ago

niclashoyer commented 4 years ago

This is my quick "fix" for #92. I don't know if chdir is the best solution at this point. I would prefer a config option instead of changing the current working directory for the whole process.

This is needed if one is loading a dosbox.conf configuration file directly. Without this patch the following would not be possible:

[autoexec]
mount D .
D:
FOOBAR.EXE

My concrete use case is mounting the current directory as a cdrom image (which is not directly possible when calling the EXE):

[autoexec]
mount D . -t cdrom
D:
RAYMAN
EXIT

It is even possible to start Win 3.11 games using this technique. Just place a shared installed Win 3.11 directory in the parent path. Then:

[autoexec]
MOUNT C ../WIN311/drive_c
MOUNT D .
C:
cd WINDOWS
WIN D:\DRBRAIN3.EXE
EXIT
realnc commented 4 years ago

I think this core has been discontinued and replaced with DOSBox-SVN (https://github.com/libretro/dosbox-svn).

inactive123 commented 3 years ago

Note to self that I'd still like to look at doing something with this.

keithbowes commented 2 years ago

I think this core has been discontinued and replaced with DOSBox-SVN (https://github.com/libretro/dosbox-svn).

Someone really should clarify the states of DOSbox ports (perhaps archiving the obsolete ones and linking to the suggested replacement(s) in the README). You have this, DOSbox Core, DOSbox SVN, and DOSbox Pure.

The advantage of this one is that it's tried and true, without a bunch of changes that may or may not break something. DOSbox Pure has the advantage of being able to read ZIP files and having releases (it may just be me, but I like to only use stable releases when possible).