Tutorial: Windows 95/98 guest OSes

Locked
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Tutorial: Windows 95/98 guest OSes

Post by Technologov »

Since this is now became a common request by many, I decided to write a tutorial about Windows 9x (95/98/98SE/Me) usage on VirtualBox.

Forenote: Windows 9x is not officially supported by VirtualBox team, which means, that it lacks Guest VM Additions, and it runs slowly, because VirtualBox is not optimized to run Win 9x.

1. Installation - I won't cover here in detail, except few points.

Most CD-ROMs available for Windows 95/98 are not bootable, which means, that you must boot from DOS floppy, install DOS first and only then install Windows 95/98.
*It does require DOS skills*
Official bootable CD media is starting from 98SE. So if you're newbie, you should use Windows 98 SE bootable CD.

Additionally I strongly suggest to limit system RAM to 512 MB for those OSes. Otherwise it will crash. (There are workarounds, that allow Win 9x run on modern physical systems, but I won't go into detail here)
In some cases enabling or disabling AMD-V/VT-x can help you install the O.S.

For this tutorial, I presume, that you are able to install the OS.

Installing with ACPI:
(contributed by Richard_S)

Contrary to what you may have read here in some of the other VirtualBox Win98 threads, this is NOT because Win98se is a poorly written piece of antiquated crap that doesn't even know how to properly handle CPU IDLE.

Back when a lot of todays young Linux geeks were still pooping their dipiys, Win98 was already supporting ACPI functions to create greener PCs and help keep laptops from running down their batteries in 10 minutes (which is exactly what DID happen to me the first time I installed Linux on a laptop that was working FINE in Win98).

So, long story short, there is NOTHING really wrong with Win98, the problem is that VirtualBox's emulated BIOS doesn't fully match up with what Win98 expects a real ACPI BIOS to look like, so by default Win98 will not install ACPI support (and unfortunately, the older APM support doesn't handle CPU IDLE, so we get problems).

The solution is to FORCE ACPI support to be installed, by using the

/p j

command line switch when running the setup program that installs Win98.

This means that you can't just jam the virtual CD into the virtual CD drive and let 'autorun' take care of everything.

The best way to handle this is to simply move the Win98 install folder from the Windows 98 SE CD onto your virtual C: drive in VirtualBox, then change directory to that folder in a DOS prompt and run the setup program manually:

setup /p j

This will force ACPI power management (and the associated CPU IDLE functions) to be installed, and your Win98 virtual machine will consume no more system resources when running than a similar XP or Linux virtual machine.

2. Sound /Audio Integration.

In VirtualBox, you must enable Sound, and use "Sound Blaster 16".
It is available since VBox 1.6.0.

The procedure for installation is rather simple:
NOTE: The procedure below is only needed if you switch from AC'97 to SB16.
It is not needed, if you create new VM with SB16, then install Win98 on it.

2.1. Delete your sound card device and all unknown devices from "Device Manager".
2.2 Add New Hardware (from Control Panel).

Code: Select all

[img]http://img178.imageshack.us/img178/2780/win98soundscreenshot01xg6.png[/img]
win98soundscreenshot01xg6.png
win98soundscreenshot01xg6.png (44.95 KiB) Viewed 948440 times

Code: Select all

[img]http://img502.imageshack.us/img502/3426/win98soundscreenshot02sd3.png[/img]
win98soundscreenshot02sd3.png
win98soundscreenshot02sd3.png (39.97 KiB) Viewed 948440 times
2.3 Select "no, device is not listed in the list".

Code: Select all

[img]http://img397.imageshack.us/img397/7972/win98soundscreenshot03so7.png[/img]
win98soundscreenshot03so7.png
win98soundscreenshot03so7.png (40.95 KiB) Viewed 948440 times
2.4 Let Windows search for non-plug'n'play devices.

Code: Select all

[img]http://img168.imageshack.us/img168/1111/win98soundscreenshot04gd2.png[/img]
win98soundscreenshot04gd2.png
win98soundscreenshot04gd2.png (42.2 KiB) Viewed 948440 times
2.5 It will manually detect non-plug-n-play devices. Click on "Details" to show them.

Code: Select all

[img]http://img413.imageshack.us/img413/9726/win98soundscreenshot05yx4.png[/img]
2.6. It will find "Soundblaster 16 or AWE 32 or compatible".

Code: Select all

[img]http://img413.imageshack.us/img413/2001/win98soundscreenshot06me3.png[/img]
win98soundscreenshot06me3.png
win98soundscreenshot06me3.png (39.92 KiB) Viewed 948440 times
2.7. Restart the VM.

3. Video driver integration.
By default Windows 98 will run only in 640x480 resolution, 16-colors.

Performance Note: VirtualBox is not optimized for 16-colors (4-bit) emulation. It works very slow this way.
Having 32-bit True Color driver makes Win98 VMs run on VirtualBox *much* faster.


If you want True color or high resolution, you need to download special drivers.
3.1. bearwindows driver (unstable)
http://bearwindows.zcm.com.au/

NOTE: You must install "Universal version" (2nd link), as the "VirtualBox" version is known to have problems.
WARNING: This driver is buggy, and many Windows fonts do not render correctly with it. Not recommended.

3.2. SciTech Display Doctor (recommended)
The second option is to get the SciTech Display Doctor version 7 beta driver (12 MB) -
scitech-display-driver-7.iso

The driver is a high quality commercial grade video driver (even includes some software emulated Open GL 3D support), and it does include an exe installer program.

Despite having an installer, the SciTech Display Doctor is a little tricky to get going. After the program launches, you have to find the little round radio button link to click to 'enable' the new driver (otherwise you still have VGA). Even then, you can't select any higher resolution modes until you ditch the 'default monitor' and select one of the 'Super VGA' types.

After fiddling around with the above changes and rebooting several times you should be able to select 800x600 or 1024x768 (or higher) resolutions with 32 bit color depth. (setting 32 bit color mode optimizes the interface with Virtualbox and really speeds things up)

4. Network
Easiest thing, is to setup VirtualBox to NAT, and AMD PCnet-II network chip. It will be auto-detected by Win 9x.

5. Mouse
(contributed by stefan.becker)

VirtualBox 4.1 provides for Windows-98-compatible USB tablet device.
Enable USB Tablet: VM->Settings->System->Enable Absolute pointing device

then do: (enable Windows-98 mode)
VBoxManage setextradata "VM name" "VBoxInternal/USB/HidMouse/0/Config/CoordShift" 0

docs: "12.3.8 USB tablet coordinates ... in Windows 98 guests"

6. Shared Folders
Since VirtualBox shared folders won't work, there are other ways, such as SMB/Windows File Sharing. Recommended for Windows hosts.

(Tested with VBox 2.1.2.-- and was successful with "bridged" network. I had no success with NAT.)
WARNING: I admit that with VirtualBox the network is very unstable, presumably due to very slow performance of Win 9x guests under VBox.

For Unix hosts, WinSCP is recommended.

Another way of read-only file sharing is to create a virtual CD-ROM *.iso file on the host and insert it into the guest VM.

7. Clipboard Host<=>Guest
(contributed by stefan.becker)

Clipboard integrated in VirtualBox only works with the Guest Additions, so not for Windows9x. But there is another solution: Clipboard over TCP/IP.

A Solution tested successfull with Linux Host is ShareClip: http://homepage.mac.com/bnej/shareclip/
 Edit: Dead link. This might refer to the same software. https://shareclip.me/ 
-Technologov
Written on 2.9.2008, updated on 18.07.2011.

Please discuss this tutorial here
This topic is only for additions to this tutorial. Do not ask questions about how to get something working. Use a separate topic for that.
Last edited by mpack on 28. Sep 2015, 19:52, edited 3 times in total.
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Post by fixedwheel »

avoid 100% CPU load

Win9x is using an idle loop instead of HLT: the loop lets the host CPU running the Win9x virtual machine consume 100% all the time. This only applies to DOS and DOS based Win (3.x, 95/98/ME) - NT based Windows and all other operating systems are not affected

Install rain, waterfall or cpuidle in the Win9x guest - my preference is rain as it only does what is needed -replace the idle loop with HLT execution- and nothing more

here is a link explaining something about, related to real hardware http://estu.nit.ac.jp/~e982457/other/cpuidle/idle.htm
 Edit: Link seems to be dead. Probably not needed anyway since the VBox BIOS now supports power management in Win98. 
d/l rain from here: http://www.benchtest.com/downloads/index.html
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Re: Tutorial: Windows 95/98 guest OSes

Post by stefan.becker »

Some hints to the bearwindows svga-driver (http://bearwindows.zcm.com.au/)

There is no automatic installation.

Unzip the driver in the guest. Start system control/display, chosse the settings/advanced/vga-card, change the vga-card and choose option to show drivers in a directory, there choose manually the directory where you unzipped the driver.

Another hint: With the bearwindows drivers you cant start the comamnd line direct on the desktop. So search all "*.PIF" Files in the guest and change the settings to fullscreen (screen/appearence, Bildschirm/Darstellung).
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Tutorial: Windows 95/98 guest OSes

Post by mpack »

USB Mass Storage Drivers for Windows 98.

As you may know, Win98 did not have native support for generic USB mass storage devices (thumb drives, external mechanical drives, digital cameras etc). You instead needed a specific driver for each device provided by the manufacturer, and of course those have become hard to find! However someone has posted a link to a site offering generic USB mass storage drivers.

http://www.synthmind.com/W98_USB_Drivers.htm

The site offers free generic USB mass storage drivers for both Win98 and Win98SE. Drivers for the former require you to install a big service pack first. Drivers for the latter are quite small. I have not yet tried either myself, I just thought it would be good to preserve the links here.
 Edit:  I have now tried the latter Win98SE driver, and it seemed to work well for me after I followed the instructions given in the linked page. Specifically I had to, before installing the new drivers, first make sure USB and USB 2.0 was enabled in the VM settings, then boot the guest, go into Win98SE device manager and basically remove any USB device I could find, particularly including old custom USB storage drivers (not a problem on a new Win98SE install inside a VM), plus the original Win98 USB controller and USB root hub drivers, plus any unknown device in case that too was USB related. Then install the new USB drivers, then reboot. After that I had no problem with reading from a modern USB flash drive - though of course the drive has to be FAT formatted since Win98SE doesn't understand NTFS or exFAT. 
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Tutorial: Windows 95/98 guest OSes

Post by mpack »

Solving Windows 95 "Protection Error" on boot.

Windows 95 was not designed for the speed of modern processors, and if the processor is too fast then it may crash on boot. Some resourceful users have developed a patch to fix the problem, and their fix is discussed in several places on the Internet (search for "Win95 fast cpu fix"), for example here: https://msfn.org/board/topic/141402-win ... it-broken/.

The patch itself is too big to attach directly here, but here is a direct download link for it: FIX95CPU_V3_FINAL.ZIP.

The download includes a readme with instructions on a couple of ways to apply the patch.

Thanks to user "pt58" for drawing my attention to this fix.
Attachments
file.png
file.png (1.95 KiB) Viewed 304708 times
javispedro
Posts: 58
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Tutorial: Windows 95/98 guest OSes

Post by javispedro »

fth0 wrote:
javispedro wrote:I have read some feedback that the paging issue also affects newer Intel CPUs too -- 12th generation at least.
I'm not so sure. The post was only two hours before the announcement of a newer version which additionally handles the CPU speed issue. Did you clearly read that it's related to the TLB invalidation issue somewhere?
I have now tried for myself a 13th gen Intel CPU and I can confirm that Win98 SE does suffer from the same issue. It is definitely not the CPU speed issue, but something new. The symptoms are exactly the ones described in the first screenshot at https://github.com/JHRobotics/patcher9x . And the issue disappears after applying that patch.

At this point, I would ask for a mod to edit the tutorial to add a link to https://github.com/JHRobotics/patcher9x , since without such a patch, win98 at least is definitely unbootable on "newer" CPUs.

(And while at it maybe also add a link to http://www.os2museum.com/wp/windows-9x- ... driver-hd/ as yet another alternative to scitech / vbemp :) ).
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Tutorial: Windows 95/98 guest OSes

Post by mpack »

javispedro wrote:win98 at least is definitely unbootable on "newer" CPUs.
The picture below shows my unpatched Win98SE VM running quite happily on an Intel i9-10900K (see picture-in-picture insert). I was under the impression that's a fairly new processor when I bought this PC a few months ago. At which point did this "new CPU" incompatibility appear? And certainly this is not a speed issue - individual CPU cores stopped getting faster quite some time ago.

I need to understand this "new CPU" claim much more clearly before I'm willing to refer to it in the tutorial. People have been making similar claims the entire time I've been using VirtualBox, and they always boiled down to one guy having difficulty getting a VM to work and then assuming that it was due to having a new CPU.
Attachments
Capture.jpg
Capture.jpg (29.81 KiB) Viewed 47942 times
javispedro
Posts: 58
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Tutorial: Windows 95/98 guest OSes

Post by javispedro »

mpack wrote:I need to understand this "new CPU" claim much more clearly before I'm willing to refer to it in the tutorial. People have been making similar claims the entire time I've been using VirtualBox, and they always boiled down to one guy having difficulty getting a VM to work and then assuming that it was due to having a new CPU.
Fair enough, albeit I rather doubt it, since it happens with VirtualBox, VMware, kvm/qemu, and when booting barebones, with exactly the same symptom, and, in all cases, the issue disappeared when I applied the extra TLB invalidation patch.
mpack wrote: The picture below shows my unpatched Win98SE VM running quite happily on an Intel i9-10900K (see picture-in-picture insert). I was under the impression that's a fairly new processor when I bought this PC a few months ago. At which point did this "new CPU" incompatibility appear? And certainly this is not a speed issue - individual CPU cores stopped getting faster quite some time ago.
I don't have enough budget to personally analyze all CPU models to see which ones are affected or not, but there's definitely something in the newer CPUs that makes Windows 98 unbootable. My impression is that it appeared on the 12th gen on Intel, and on AMD in the Ryzen 2nd gen. In your screenshot you are showing a 10th gen CPU, much older than that.

I was suggesting to mention it in the tutorial because I have already been getting emails asking about this problem for a while (which I could not reproduce either until I got my hands on a 13rd gen). Even here I saw at least one thread complaining about this very same problem, and someone rightly noted that there's no mention of it in the win9x tutorial. It's easy enough to recognize the issue with a screenshot of the error message, we don't really have to give a detailed list of affected / not affected CPUs. It's also not difficult to patch, and there doesn't seem to be any repercussions from applying the patch, even if your CPU wasn't affected by the issue in the first place.

There's also another workaround that we mentioned a couple pages ago -- disabling "nested paging" -- but it's VirtualBox-specific and it seems to decrease performance noticeably.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Tutorial: Windows 95/98 guest OSes

Post by mpack »

I agree that it would be rather expensive to buy a new PC every time someone makes an incompatibility claim regarding the latest batch of CPUs (which is EVERY generation of CPUs). Ok, I will copy these these last few posts to the tutorial. People should take them as well intended, whether or not the assertion is truly tested.
FranceBB
Posts: 104
Joined: 20. May 2017, 05:07
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows XP x86
Contact:

Re: Tutorial: Windows 95/98 guest OSes

Post by FranceBB »

New Display Driver

So, the drivers you find here: https://github.com/JHRobotics/vmdisp9x/releases are a continuation of the 2022 Michal Necasek's VirtualBox driver project and fix some of the bugs his driver had.

I went on to test with it and the key thing is to set VRAM to 64MB.
If you exceed 64MB, the driver will lead to a blue screen (128MB) or a Guru Meditation crash (256MB), however, as long as you stick to 64MB, it will work like a charm in FULL HD 1920x1080 RGB32:
Screenshot from 2023-06-17 00-21-42.png
Screenshot from 2023-06-17 00-21-42.png (41.66 KiB) Viewed 27344 times
So, now that I've finally got my Windows98SE to work in FULL HD, my mission is actually accomplished. :)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Tutorial: Windows 95/98 guest OSes

Post by mpack »

Thanks to FranceBB for investigating and proving the alternative and improved graphics driver described above. I would only like to add for future reference that in order to install this driver my current suggested method would be:
  1. Download the appropriate binary files blob from the Github article (I only tested the Win98SE driver).
  2. Unpack the binary files on your PC then make them available to the Win98 VM somehow, e.g. copy them to an ISO, or create a virtual ISO, or install the Win98SE USB mass storage drivers described earlier and then mount a real or virtual USB drive.
  3. In Win98 you right click the desktop, and from the menu select Properties|Settings|Advanced|Adapter|Change, navigate to the new driver and let it be installed.
  4. Shut down the VM and then change the display settings. As Frances mentions, remember not to exceed 64MB graphics RAM. VirtualBox won't like it, but you'll have to force it to accept VBoxSVGA chipset and 3D acceleration. Alternatively you could try changing to the Win7-32bit template.
Note that I don't have a way to prove to myself that 2D/3D acceleration was actually enabled. The UI does seem snappier.
Locked