Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Discussions about using non Windows and Linux guests such as FreeBSD, DOS, OS/2, OpenBSD, etc.

Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby javispedro » 27. Feb 2022, 22:58

I have extended my Windows 3.x mouse driver into a more complete suite of "guest additions" for DOS guests.
Note: don't expect miracles, this is not professional-level, mostly for fun, I only tried with a couple programs overall.
But they work for me and would like to hear if they worked for you!

There are basically 3 pieces:
  • VBMOUSE.EXE -- a DOS mouse driver. This allows seamless mouse integration to work with many DOS applications. E.g. MS-DOS EDIT. For the applications where it doesn't work, you can still disable mouse integration from the VirtualBox menu. It can also simulate scroll wheel by faking arrow key presses.
  • VBSF.EXE -- a client for Shared Folders. This allows shared folders to be mounted as drives inside MS-DOS (and Windows 3.x) directly, without any network stack.
  • VBMOUSE.DRV -- a Windows 3.x mouse driver (requires VBMOUSE.EXE to be loaded first). This allows seamless mouse integration with MS Windows 3.x, or even with DOS applications running inside MS Windows 3.x.
Here is the current website with some extra screenshots, videos and documentation: https://git.javispedro.com/cgit/vbados.git/about/
Or you can directly download a floppy image to play with: VBADOS.FLP.
Just insert the virtual floppy into your DOS VM and run VBMOUSE directly from the floppy. Or VBSF (but you'll need to configure some shared folders first!).
To "install" just copy them to C: if you like them. The Windows 3.x driver needs some extra steps.

The source code is also available under a GPLv2.0 license (that is also the git clone URL). Should build with OpenWatcom 2.x on any platform.
If you are interested, I have written also some pointers to the source code.
javispedro
 
Posts: 30
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby mpack » 20. Apr 2022, 11:45

That's very impressive. Will the shared folder feature work for Win98x as well? I would have thought so, if the drive is mounted in DOS, but in that case I'm wondering then why you mention Win3.x but not Win98.
mpack
Site Moderator
 
Posts: 37883
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby javispedro » 20. Apr 2022, 13:58

mpack wrote:That's very impressive. Will the shared folder feature work for Win98x as well? I would have thought so, if the drive is mounted in DOS, but in that case I'm wondering then why you mention Win3.x but not Win98.

Actually I didn't think of that.
It does work in Win95/98 if you load VBSF in DOS, e.g. right in Autoexec.bat , and do all the mounts before 9x is loaded (via automounts).
I can copy files around in explorer and even open them in other programs.
But notepad crashes when opening a file from the mounted drive. Seems to be just notepad out of all programs :)
It'll probably be more useful to write an actual 32-bit redirector, since I believe they are documented (unlike DOS), and you'd get actual long file name support.
javispedro
 
Posts: 30
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby mpack » 21. Apr 2022, 09:21

The "Third Party Applications" forum is heavily moderated and does not lend itself to discussion. So, I've created this topic to contain the related discussion.
mpack
Site Moderator
 
Posts: 37883
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby javispedro » 21. Apr 2022, 12:28

mpack wrote:The "Third Party Applications" forum is heavily moderated and does not lend itself to discussion. So, I've created this topic to contain the related discussion.

Thanks, I was going to ask that perhaps something should be done about that forum, like allowing unmoderated discussion inside an existing topic.

I fixed the 9x notepad crash, actually. Notepad was calling the equivalent of malloc(lseek(file, 0, SEEK_END)) -- without checking if lseek returns an error/ -1, which it was since SEEK_END was not really implemented (DOS does not seem to use it). So yes, if you can stand the 8.3 filenames, VBSF can be used under win9x. It's fun to see that the shell will actually bend itself to 8.3 filenames (e.g. "New folder" becomes "Fldr", and "New document.txt" becomes "Document.txt").
javispedro
 
Posts: 30
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby mpack » 21. Apr 2022, 18:47

javispedro wrote:It's fun to see that the shell will actually bend itself to 8.3 filenames (e.g. "New folder" becomes "Fldr", and "New document.txt" becomes "Document.txt").

I was under the impression that long filename support was already possible in DOS using the filename aliasing (VFAT) mechanism. Of course to see the long filenames in DOS you'd have to be using a version of DOS that recognizes the VFAT rules, which includes the version of DOS (7) that underlays Win98.
mpack
Site Moderator
 
Posts: 37883
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby javispedro » 21. Apr 2022, 22:16

mpack wrote:I was under the impression that long filename support was already possible in DOS using the filename aliasing (VFAT) mechanism. Of course to see the long filenames in DOS you'd have to be using a version of DOS that recognizes the VFAT rules, which includes the version of DOS (7) that underlays Win98.

Yes. Unfortunately, if my understanding is correct, the network redirector interface that I'm using doesn't really support long file names. This can be workarounded in pure DOS by simultaneously hooking the DOS LFN API (or by using DOSLFN), but as far as I can see Win9x just won't call the DOS LFN API at all for a DOS network redirector. You can probably also workaround that with a 32-bit hook, but at that point, I suppose a 32-bit redirector sounds more appetizing :)
javispedro
 
Posts: 30
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby ghr » 1. Jan 2023, 16:32

Good to have this, even more so because getting hosts into accepting SMB1 is more and more an issue. For all I checked it works with anything that boots into DOS primarily, so from DOS (including FreeDOS) up to and including Win9x. I guess you could change the title... Would you have any thoughts about something similar for HPFS (so not FAT) based OS/2 Warp? I know that we have "official" GA there but nevertheless... Just curious.
ghr
Volunteer
 
Posts: 364
Joined: 25. May 2007, 22:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: DOS, Win3x, Win95, WinXP, Ubuntu, OS/2

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby javispedro » 6. Jan 2023, 00:42

ghr wrote:Would you have any thoughts about something similar for HPFS (so not FAT) based OS/2 Warp? I know that we have "official" GA there but nevertheless... Just curious.

Unfortunately I have absolutely never used OS/2, and I have no idea what's involved. If it was some simple change, I would do it, but it doesn't look like that.
I can see that the TSRs load under OS/2, and actually communicate with the host, but the DOS from OS/2 doesn't seem to talk the redirector interface and so it never sees the mounted drive (the rest of OS/2 doesn't either, of course). I guess we would need a native OS/2 IFS for that.
javispedro
 
Posts: 30
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby ghr » 6. Jan 2023, 14:22

Looking at it from OS/2 point of view:
  1. The current GA mention as Prerequisites: the generic VESA gradd driver is being used (gengradd)
    That suggests Warp3 plus a number of FixPacks or Warp4 and up. So far I can only get it to work for Warp 4 up.
  2. recompiling your 0.64 source code: Watcom 1.9 has a problem there:
    mousetsr.c: 1502 lines, included 10585, 0 warnings, 0 errors
    mousetsr.c(1503): Error! E1122: Illegal register modified by 'ps2_mouse_handler' #pragma
    mousetsr.c(1503): Error! E1122: Illegal register modified by 'int33_handler' #pragma
    but can build vbsf.exe
    With Watcom 2.0 there's no problem at all. Used OS/2 as well as linux64 here.
  3. I agree with your driver statement. Moreover, because OS/2 boots into OS/2 (and not DOS) I don't expect vbsf to work in an OS/2 DOS window. Just noticing that OS/2 GA already have a VBOX.IFS.
Using OS/2 a lot did not make me a programmer of drivers so far, alas....
ghr
Volunteer
 
Posts: 364
Joined: 25. May 2007, 22:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: DOS, Win3x, Win95, WinXP, Ubuntu, OS/2

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby T4nkcommander » 18. Jan 2023, 22:47

Good stuff! I tried loading it up just now, and while I couldn't get it to launch through cmd I was able to open it up and run it through DOSSHELL. Mouse worked great in there, but due to graphical glitches upon exiting DOSSHELL (tied to my VM, not your additions) I was not able to test it anywhere else.

I ended up copying both vbmouse.exe and vbmouse.drv to a "drivers" folder I made under C, then added the following two lines to the AUTOEXEC.BAT file:

LH C:\Drivers\vbmouse.exe
LH C:\Drivers\vbmouse.drv

It works on restart now! I do notice some input glitches (specifically in DOSSHELL) from time to time that requires a restart to fix....I'll see if I can find what causes it.
T4nkcommander
 
Posts: 15
Joined: 12. Jul 2022, 20:57
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 7, XP

Re: Discuss: Unofficial guest additions for MS-DOS/FreeDOS/Windows3.x

Postby javispedro » 19. Jan 2023, 23:37

T4nkcommander wrote: while I couldn't get it to launch through cmd I was able to open it up and run it through DOSSHELL.

Glad to hear! You don't really have to do anything special to launch it, just type "vbmouse".

T4nkcommander wrote:I ended up copying both vbmouse.exe and vbmouse.drv to a "drivers" folder I made under C, then added the following two lines to the AUTOEXEC.BAT file:

LH C:\Drivers\vbmouse.exe
LH C:\Drivers\vbmouse.drv

vbmouse.drv is only for 3.x, that line shall do nothing on autoexec.bat, you can remove it :)
javispedro
 
Posts: 30
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux


Return to Other Guests

Who is online

Users browsing this forum: No registered users and 2 guests