libretro / dosbox-libretro

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

default location and relative path #92

Open legluondunet opened 6 years ago

legluondunet commented 6 years ago

Hello, I can not start any of my Dos game with Retroarch and I think I found the reason. When I launch DOS game with Retroarch, none drives are mounted. Does Libretro Dosbox core support relative path? I'm using relative path in all of my Dosbox config. For example:

mount C C imgmount D ../CD/Alone1VF.cue -t iso

For this Retroarch have to consider the default location is where is located the Dosbox config file. This work very well wth Dosbox, could it be supported by Libretro Dosbox core?

legluondunet commented 5 years ago

I just tested, the issue is still present, even with Dosbox SVN. There was the same issue on Lutris and the dev resolved it: https://github.com/lutris/lutris/issues/650 But I'm not sure if this issue is a Retroarch bug or libretro Dosbox core bug.

andres-asm commented 5 years ago

When you start a game C is mounted to the folder of the game. The problem with relative is... relative to what?

legluondunet commented 5 years ago

I know it could be a little confuse issue at first read if you don't use this Dosbox feature. Please read my comment on Lutris same issue, I think I explained it better.

For example this is my dosbox game config "AITD1_Dosbox.conf" file to launch "Alone in the Dark 1":


[autoexec]
@echo off
keyb fr
mount C C
imgmount D ../CD/Alone1VF.cue -t iso
c:
cd INDARK
INDARK.exe
#exit

I launched the game with this command line:

./retroarch -L dosbox_libretro.so '/home/legluondunet/Autres_applications/Jeux/Alone in the Dark/AITD1/AITD1_Dosbox_data_cd_fr/AITD1_Dosbox.conf'

and I obtained this error message in Dosbox: "Drive C does not exist"

When Retroarch launches a Dosbox game config.file, where is the active path? Normally it should be located where the Dosbox game config.file is stored.

But that is not the case actually, it is an issue. I think Retroarch active path is the path from where Retroarch is launched. Because if I launch this command line from where my Dosbox game config file is stored:

'/home/legluondunet/Autres_applications/Jeux/Emulateurs/RetroArch/RetroArch/retroarch' -L ~/.config/retroarch/cores/dosbox_libretro.so '/home/legluondunet/Autres_applications/Jeux/Alone in the Dark/AITD1/AITD1_Dosbox_data_cd_fr/AITD1_Dosbox.conf'

It works!

andres-asm commented 5 years ago

That seems oddly specific and I don't think it's something I want to tackle.

Cores can't change CWD, yes it's always relative to the launch location and I don't think it's something I can fix.

Lutris can fix it because it's just something that launches things.

legluondunet commented 5 years ago

Cores can't change CWD

So it is a Retroarch issue? Not a Dosbox libretro core issue? It's not a big issue to resolve isn't it? All you have to do is to change CWD before execute the Dosbox libretro core.

whocares0101 commented 5 years ago

I'm having the same problem. When using a .bat file the directory of the .bat file will be mounted as C but if I'm using a .conf file the C drive will not be mounted and there is no way of getting the path to the .conf file. Maybe if the directory of the .conf file is mounted the same way as for .bat files things will work?

niclashoyer commented 4 years ago

I just added a PR which adresses this issue: #128. As stated in the description, this might not be the most elegant solution, but it is working. I also gave examples on how this is useful (e.g. mounting current directory as cdrom, or launching a Win 3.11 program).