Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird mounting behavior #479

Open
DarkCTO opened this issue Feb 27, 2024 · 6 comments
Open

Weird mounting behavior #479

DarkCTO opened this issue Feb 27, 2024 · 6 comments

Comments

@DarkCTO
Copy link

DarkCTO commented Feb 27, 2024

When I use

mount c .\lsl7dos

I expect C: to be the inside of ls7dos

But in Pure, C: only lists the ls7dos folder

So to access C:\subfolder I have to cd ls7dos

This messes up any .bat script that use hard path like C:\subfolder

That was meant to be C:\lsl7dos\subfolder

But since Pure mounted it differently so subfolder is not found~

Any fix on this?

@schellingb
Copy link
Owner

What OS is this on?
Also, what is the output of your mount c .\lsl7dos command?

For me, I get

Drive C is mounted as local directory \lsl7dos\

And afterwards when I do dir C: it lists the content of the lsl7dos folder and not a single lsl7dos folder. This matches the behavior in original DOSBox.

Any other idea what could be different in your environment?

@DarkCTO
Copy link
Author

DarkCTO commented Feb 27, 2024

Note that I'm using dosbox.conf with the same name as the game.zip... so it's named game.conf on the same level of game.zip

Leisure Suit Larry 7 - Love for Sail (1996).conf

# Config file for Dosbox-0.74
[sdl]
fullscreen=false
fulldouble=false
fullresolution=0x0
windowresolution=1280x960
output=openglnb
mapperfile=mapper.map
[dosbox]
machine=svga_s3
memsize=32
[render]
aspect=true
scaler=normal2x
[cpu]
core=auto
cycles=45000
cycleup=500
[mixer]
blocksize=2048
prebuffer=10
[midi]
[sblaster]
[gus]
gus=true
[speaker]
[joystick]
buttonwrap=true
[serial]
[dos]

keyboardlayout=none
[ipx]
[autoexec]
mount c .\lsl7dos
imgmount d ".\lsl7dos\cd\Leisure Suit Larry 7.iso" -t cdrom
dir c:

2024-02-26-180432_2559x1079_scrot

I'm using retroarch on my machine

neofetch:

                 `:osssssss+-              OS: EndeavourOS Linux x86_64 
               `:+sssssssssso/.            Host: 82K6 Legion 7 16ITHg6 
             `-/ossssssssssssso/.          Kernel: 6.7.6-zen1-1-zen 
           `-/+sssssssssssssssso+:`        Uptime: 1 hour, 44 mins 
         `-:/+sssssssssssssssssso+/.       Packages: 1215 (pacman) 
       `.://osssssssssssssssssssso++-      Shell: bash 5.2.26 
      .://+ssssssssssssssssssssssso++:     Resolution: 2560x1080, 2560x1600 
    .:///ossssssssssssssssssssssssso++:    WM: i3 
  `:////ssssssssssssssssssssssssssso+++.   Theme: Arc-Dark [GTK2/3] 
`-////+ssssssssssssssssssssssssssso++++-   Icons: Qogir [GTK2/3] 
 `..-+oosssssssssssssssssssssssso+++++/`   Terminal: xfce4-terminal 
   ./++++++++++++++++++++++++++++++/:.     Terminal Font: Source Code Pro 10 
  `:::::::::::::::::::::::::------``       CPU: 11th Gen Intel i9-11980HK (16) @ 4.900GHz 
                                           GPU: NVIDIA GeForce RTX 3080 Mobile / Max-Q 8GB/16GB 
                                           Memory: 2819MiB / 31946MiB 

@schellingb
Copy link
Owner

Oh, I see.

If there is a ZIP, the ZIP will be mounted as C: long before the [autoexec] part of dosbox.conf gets executed. You imagine a scenario where the ZIP is loaded but not mounted and then the mount command can selectively mount parts of the ZIP but that is not how things work. Running mount c .\lsl7dos will try to mount a physical directory and not a sub-part of the ZIP file. A ZIP can only be mounted as a drive (which is C: by default) and then DOSBox can work with that drive.
So the output of the mount command you have in the autoexec is an error and it does nothing:

Drive C already mounted with {ZIP}

The solution is to modify the ZIP to have the structure you want or to change the autoexec commands.

@DarkCTO
Copy link
Author

DarkCTO commented Feb 27, 2024

modify the ZIPs will be laborious...
I can change autoexec by doing cd LSL7DOS
But the inside of the zip have other files that use hard path like C:\subfolder so it breaks
At least could we modify the mount command to use relative path like imgmount
so I can workaround by

mount y .\ls7dos
mount -u c:
mount c y:

I would prefer to change the outside .conf than to change every all files that use hard path inside ZIPs

@schellingb
Copy link
Owner

mount y .\ls7dos

Again, this will try to mount a physical folder (on the host systems real hard drive) called "ls7dos" into DOSBox as drive Y:. This will never mount a part of a ZIP file. DOSBox Pure does not have any means to do that. DOSBox has the "subst" command which looks like it almost could be used, but "subst" is limited to local drive mounts, it is implemented rather poorly.

In theory something like this could be implemented in a future update:

remount C Y
submount C Y:\lsl7dos

We already have the remount command but a new submount command would need to get introduced that maps a sub-folder of a emulated drive as a new drive. Or we could fix the subst command to actually work properly.

@DarkCTO
Copy link
Author

DarkCTO commented Feb 27, 2024

Yes that would do nicely. Thank you. Would submount be an easy change on your part?

Also imgmount supports relative path with respect to zip but mount needs host path

imgmount d ".\lsl7dos\cd\Leisure Suit Larry 7.iso" -t cdrom

schellingb added a commit that referenced this issue May 31, 2024
SUBST X: [Y:]PATH  -  Assign PATH from Y: to drive X:
SUBST X: /D  -  Delete substituted drive X:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants