joncampbell123 / dosbox-x

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

Drive menu redesign #1988

Open rderooy opened 4 years ago

rderooy commented 4 years ago

Is your feature request related to a problem? Please describe.

The drive menu can be a bit confusing as it is right now, and at the same time it is lacking some features such as:

As such I am thinking of some kind of refactoring of the drive menu and this Feature Request is to discuss this.

One example of a menu system that allows a bit more flexibility is that of DBGL. Obviously it is not made for our use case, and we are limited to the SDL created GUI.

Screenshot from 2020-11-08 12-59-46 Screenshot from 2020-11-08 13-00-32

Wengier commented 4 years ago

@rderooy I don’t think we will change the UI in such a radical way like that of DBGL, but I agree that the abilities to change mounted images once an OS is booted, to mount disks read-only and to create a blank disk images as you stated are certainly helpful. Thanks for the suggestions!

Wengier commented 3 years ago

@rderooy I have already added the "Create blank disk image" menu option in "DOS" menu to create blank floppy or hard disk images of a common disk size, including 1.2MB,1.44MB, 2.88MB for floppy images as well as 250MB, 520MB, 1GB, 2GB, 4GB and 8GB for hard disk images. Previously I had already added the option(s) to mount disks in read-only mode from the menu.

rderooy commented 3 years ago

@Wengier nice! I do however miss the options for 360 and 720KB disk sizes. The 360kB in particular was pretty common during the XT era. Other formats like 160, 180, 320kB are all pretty rare and may just confuse people.

I guess I should update the wiki instructions to mention that you can create disk images now also from the menu...

rderooy commented 3 years ago

@Wengier I have done a bunch or updates to the wiki pages. I also noticed the wiki pages still mentioned that the mount from the Drives menu was Windows only, so I removed that also.

Wengier commented 3 years ago

@rderooy Good suggestion! I have added 360KB, 400KB and 720KB disk sizes in the updated code. Please check it out.

Diatonator commented 3 years ago

Oh boy I'm waiting for the ability to change the disk images inside the booted OS. VMs and PCem allow this and I can feel how smoother the work goes here contrary to constant OS rebooting and [autoexec] editing in Dosbox-X. I can swap the already mounted images, but first it adds the need for constant [autoexec] editing and unnecessary long strings to incorporate several image paths for one virtual drive, second I cannot choose the exact mounted image to swap onto - if I mounted say 10 ISOs, I have to press 10 times to access the last in the queue. This makes setting a ton of ISOs for mounting unpractical, and if I just use different drive letters - I get blasted in Windows with all the autorun splash screens it throws at me! I of course can disable autorun, but it's still pretty inconvenient. Also typical issue - changing some settings.. please insert Win98 CD! Damit, now I have to reboot. Of course I could copy windows install folder to the HDD image, or always keep the WinCD mounted, but again I have to do another workaround when the whole thing could be just so much easier with the proper mounting!

rderooy commented 3 years ago

For booted OS the drives would have to be declared before booting DOS or Win9x, if they are empty on startup.

I'm thinking about something like:

imgmount a -t fd_1440
imgmount b -t fd_1200
imgmount d -t cd
imgmount e -t dvd

Basically, because no image file was specified they would get allocated as "empty" drives of the given type. The dosbox-x menu would then need to be updated to allow adding disk images for booted OS's.

For floppy drives, we can use the same flags as for IMGMAKE:

Disk type Capacity IMGMAKE option
5.25" SSDD (8 sector) 160KB -t fd_160
5.25" SSDD 180KB -t fd_180
5.25" SSDD (10 sector) 200KB -t fd_200
5.25" DSDD (8 sector) 320KB -t fd_320
5.25" DSDD 360KB -t fd_360
5.25" DSDD (10 sector) 400KB -t fd_400
5.25" HD 1200KB (1.2MB) -t fd_1200
3.5" DSDD (2DD) 720KB -t fd_720
3.5" HD 1440KB (1.44MB) -t fd_1440 or -t fd
3.5" ED 2880KB (2.88MB) -t fd_2880

There is a small issue, in that technically 3.5" SSDD 360KB also existed. But it was pretty rare on PCs (more common on MSX computers, which also use the same FAT12 filesystem, and MS-DOS back in the day could read them).

For optical drives, DVDs can obviously read both types, and therefore emulating only a DVD drive may be good enough. Not sure if this causes any issues with older OSs prior to the introduction of DVD drives. As such allowing -t cd may make sense.

tokumeiwokiboushimasu commented 3 years ago

imgmount a -t fd_1440 imgmount b -t fd_1200 imgmount d -t cd imgmount e -t dvd

Seems nice. I think it's better if we can specify these settings in a config file.

Wengier commented 3 years ago

@Diatonator Yes, I agree that the ability to change the CD images inside the booted OS is a needed feature. I have already added a menu option "Change current CD image..." under "DOS" menu to change the current active CD image on all available CD drives, including after a guest Windows 9x is booted, in PR #2519. Hope this addresses the problem.

@rderooy The menu option requires the CD drives to be mounted to any CD image(s) beforehand. Currently for both IMGMOUNT and IMGMAKE commands if no image file is specified then it defaults to IMGMAKE.IMG (so that the image file is already optional for these commands).

rderooy commented 3 years ago

Nice Wengier! this is the major issue I think, being able to change mounted CD images after booting a guest OS.

Obviously it still leaves a few items open ;-)

Wengier commented 3 years ago

The code in PR #2519 already supports the same behavior for floppy disks. On the other hand, you cannot really eject just the media (not the drive) in DOSBox-X at this time though, not even from the built-in shell.

Diatonator commented 3 years ago

I tried this and it works! Good stuff! Though while looking at all of this I think from the UI perspective some work could be done.

As you added the new option "Change disk", I don't see the real use of the swap feature now. But all of this is sitting in the menu: image I think for a newcomer words swap/change could be not very descriptive, and it may easily confuse people. Instead of that I propose some sort of dialog (call it like "Removable media" or something) which will be accessed by one button/menu item:

image

Of course I don't suggest to change current keyboard shortcuts or something - just to change how things are accessible via the menu.

Also there is this dialog appears as I try to change the image: image I see this dialog has the purpose of telling what exact drive we are changing the image for, when there are more than 1 drive, but with a dialog like the above the need for this message vanishes - you press Mount when you're sure what you are changing and on what drive.

EDIT: also "Swap" thing could be renamed whatsoever to like "Next image" or something, as the words Swap/Change are again fairly interchangable here

EDIT2: Also the list of CD images could be shared between all the CD drives, and list of floppy images could be shared between all the floppy drives.

Diatonator commented 3 years ago

Oh actually I looked at the top comment and there are some suggestions too! It's because I just came here because I got frustrated with unability to change disks inside the booted OS. So yeah, a good place for some UI improvements.

Wengier commented 3 years ago

@Diatonator Thanks for the suggestion! The swap feature may still be useful for some people since they simply want to mount all needed disk/CD images beforehand (such as in the config file) and use a keyboard shortcut to swap them, instead of opening some UI to change disk images manually. Also, while I agree that it is certainly helpful to have better UI for such functions, the built-in UI features are relatively limited, so the UI itself needs to be done within its function limits. In any case, thanks again for your ideas.

rderooy commented 3 years ago

Regarding menus in general. I think some kind of overlay menu you can access with a hot-key for full-screen use would be useful. Right now you can only have access to the menus if you run in a "windowed" mode with the menu bar accessible. But that would require building menus using SDL.

An example of an SDL2 application doing just that: image