joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.76k stars 381 forks source link

Mount doesn't work at all in SDL and lost Z: path in mingw/hx builds if trying to open .bat file with dosbox-x #657

Open Corak667 opened 6 years ago

Corak667 commented 6 years ago

In mingw and hx-dos build: http://picsee.net/upload/2018-04-08/c90fe87fd9c8.png If trying to start some batch file with dosbox "dosbox-x.exe .\SOFT\AUTOEXEC.BAT".
illegal command: mount. It doesnt adds Z: virtual disc to path, so mount doesnt works. adding "path Z:" to autoexec - fixes this problem

Starting only Dosbox-x.exe without parameters and if mount added in .conf [autoexec] options - works.

In SDL 1-2 build: http://picsee.net/upload/2018-04-08/02de61460fd5.png Cannot find folders at all, not relative nor absolute.

yksoft1 commented 6 years ago

What Windows and MSVCRT.DLL version do you use? It must be the _wstat() problem.

Corak667 commented 6 years ago

I use Windows XP SP3 x32 MSVCRT - 7.0.2600.5512 (xpsp.080413-2111), build 14/04/2008 19:12:11
It seems have _wstat func: http://picsee.net/upload/2018-04-08/e08c685cce7e.png

for SDL builds i just changed target-os subversion numbers for binaries, and it started, but mount doesnt find local dirs. Mingw and HX works from start... but losts Z: path if dosbox-x started with parameter (for ex. if i want to start some batch file) adding "path Z:" to "dosbox.conf":[autoexec] - fixes this problem

yksoft1 commented 6 years ago

Confirmed that Dosbox-X (built with both VS and mingw) cannot run commands which isn't in the same directory (using both obsolute and relative path) as dosbox-x.exe.

For example, such a command:

dosbox e:\demos\autoexec.bat
dosbox demos\autoexec.bat

Dosbox SVN could handle both correctly but Dosbox-X wrongly mount C as the current directory instead of e:\demos.

emendelson commented 6 years ago

Would it be possible to clarify the preceding comment? With DOSBox-X built in VS, after I mount (for example) drive E:, then I can easily run commands in any directory or relative directory on drive E:, no matter what the current directory is. And the path correctly has drive Z:.

But I may be misunderstanding the comment.

yksoft1 commented 6 years ago

In Dosbox SVN, it would be this situation running: dosbox e:\demos\autoexec.bat 1. Dosbox mounts e:\demos as drive C and change (emulated) current directory to C:\. 2. Dosbox runs autoexec.bat . However in current Dosbox-X (In Windows, no matter built by what), 1. Dosbox-X mounts the (physical) current directory as drive C and change (emulated) current directory to C:\. 2. Dosbox-X tries to run e:\demos\autoexec.bat, but fails as drive C is not mounted as e:\demos. 3. Dosbox-X unmounts drive C and change (emulated) current directory to Z:.

It seems to be a bit offtopic here so I opened #658 for this.

emendelson commented 6 years ago

Apologies - I misunderstood your very clear message.