Last modified: 2023-08-05 13:26
IRQs and DMAs for ISA cards
Award Modular BIOS
Phoenix OEM BIOS (Dell and Gateway)
USB legacy emulation
DOS
W98SE
Multiboot considerations
At a minimum, a sound card is going to need one IRQ and one DMA to emulate a Sound Blaster. The most likely choices are IRQ 5 and DMA 1. Additional IRQs may be needed for native-mode sound, the MPU-401, and/or the CD-ROM interface (tertiary IDE or SCSI controller). Additional DMAs may be needed for 16-bit sound, full-duplex operation, and/or the CD-ROM interface.
The standard fixed claims for 486 and newer PCs are shown in the table below. Additional IRQs may be claimed by USB controllers, network devices, video cards, and IDE/SCSI controllers. Additional DMAs may be claimed by SCSI controllers. Resources can be freed up by disabling unneeded devices or tweaking PCI interrupt sharing in the BIOS.
IRQ | DMA | Normally claimed by |
---|---|---|
3 | Serial port COM2 (if present) | |
4 | Serial port COM1 | |
6 | 2 | Floppy drive controller |
7 | 3 | Parallel port |
9 | ACPI (if present) | |
12 | PS/2 mouse port | |
14 | Primary IDE (1 cable 2 drives) | |
15 | Secondary IDE |
Toward the end of the ISA era some motherboards gained I/O APICs which made it possible for PCI devices to use IRQs above 15. This at least reduces competition for the low-numbered IRQs.
Always set it to LBA. If left on the default AUTO it will use the weird "Large" (extended CHS) remapping scheme on some disks, which screws up LILO.
Some of the memory tweaks appear on this page for some reason.
I have not found these settings to have any impact on UMBPCI's ability to repurpose shadow RAM to create UMBs. There seems to be no harm in leaving them all enabled. If necessary, the addresses used by ROMs can be determined by probing with DEBUG in DOS. They are pretty obvious in the hex dump.
Enable!!! (Worst BIOS default ever!)
Set this to the CL (CAS Latency) of the DIMMs, or just say 2 if the DIMMs are rated for a higher frequency than the motherboard.
The exact meaning is mysterious, but Turbo is a good choice if it works. The KT133A system had memory stability problems that required reducing this setting to Medium. PC100 = 10 ns (reciprocal of 100 MHz); PC133 = 7.5 ns (reciprocal of 133 MHz).
I changed this to Hi to try to help stabilize the memory. Don't know if it made a difference.
Other more or less obscure speedup options available on this page seem to be mostly harmless. Some in the 1999 versions clearly apply only to 72-pin SIMMs.
Yes: The BIOS will initialize mainboard devices, PCI and AGP cards but not ISA PnP cards.
No: The BIOS will also attempt to initialize ISA PnP cards. This is a desperate way to maybe get a PnP card to work when you have no drivers for it.
If the BIOS is grabbing IRQs or DMAs that are needed, set this to Manual and then change the assignments for those resources from PCI/ISA PnP to Legacy ISA. A setting of Legacy ISA is just a reservation to prevent the BIOS from grabbing a particular IRQ or DMA for the devices that it initializes. It has no effect on initializations of PnP cards by DOS or W98 drivers.
If not using the USB headers on the motherboard, disable this to reduce IRQ contention.
Disable unneeded serial and parallel ports to free up three IRQs and one DMA.
If BIOS is used at all for disk access, these options will do something. Block mode is always good, but prefetch might be redundant.
The following are all under the Advanced tab.
Yes: The BIOS will initialize mainboard devices, PCI and AGP cards but not ISA PnP cards.
No: The BIOS will also attempt to initialize ISA PnP cards. This is a desperate way to maybe get a PnP card to work when you have no drivers for it.
Disable unneeded serial and parallel ports to free up three IRQs and one DMA.
A setting of Reserved prevents the BIOS from grabbing a particular IRQ for the devices that it initializes. Note that IRQ 9 is permanently grabbed for ACPI and there's no menu to reserve DMAs.
If set to Share One IRQ, all PCI and AGP devices share IRQ 9. On Auto, all non-reserved IRQs get grabbed. This option did not appear on the Dell (1999, PhoenixBIOS 4.0 Release 6.0).
USB legacy emulation (a BIOS feature) is necessary for a USB mouse or keyboard to be visible in plain DOS (not yet tested: USBDOS driver), W98 Safe Mode, and the early stages of W98 installation.
The BIOS may try to be "smart" about when to enable the emulation. Example: EeePC 1000, booting DOS through LILO, enables legacy emulation for the touchpad. However, if the first bootloader is Grub2 and it chainloads LILO to boot DOS, the touchpad doesn't work.
If the motherboard has just one PS/2 port that supports either keyboard or mouse, let the mouse have it. Legacy emulation is more likely to work right for the keyboard.
N.B., PCI cards that add PS/2 ports don't work without drivers.
The relevant flavors of DOS are FreeDOS and occasionally MS-DOS 7.1 (FORMAT /S of W98). See empirical comparison of candidate DOS kernels (98SE, ME, FreeDOS).
I'm currently using W98SE FDISK to get partitions that work with everything (i.e., no complaints from FreeDOS, W98, or LILO). Sometimes both that and the FreeDOS FDISK will crash on launch and there is no choice but to use Linux fdisk.
FreeDOS's FORMAT will sometimes crash when attempting to save unformat information. To avoid this, do FORMAT /S /Q /U C: (optionally adding /V:DOS to specify the volume label). The /Q /U combo means "Quick formats the disk but does NOT preserve unformat data and does NOT wipe or scan the surface. Just deletes everything FAST. This is the default if an unformatted harddisk is detected."
I use a software package known as "the Ellis drivers" or just "drivers." As of the 2022-07-01 release, these are the relevant programs:
Since 2003, this collection of drivers has changed form many times without significant changes to function. The drivers have been revised, updated, deleted, re-added, merged, split, renamed, refactored, open-sourced, closed-sourced, plagiarized, and embargoed. See archaeological dig of Ellis drivers for a complete history and links to the current software.
I did most of my sound card testing using the 2015-03-05 release, in which UIDE.SYS provided the combined functions of XHDD.SYS and XDVD2.SYS in one driver. Since then I have updated to new releases without systematically retesting to determine whether compatibility or performance had changed.
Although real mode is better for game performance, some PCI sound card drivers require an EMM. In these cases I use Jemm.
In my testing (a long time ago) I found the combination of XMGR + Jemm386 to be more reliable than JemmEx, which provides the functionality of HIMEM.SYS + EMM386.EXE together in a single driver.
DEVICE=C:\LOCAL\DRIVERS\XMGR.SYS /B /N24 ; Temporary "boot" DEVICE=C:\LOCAL\JEMM\JEMM386.EXE NOEMS I=B000-B7FF X=B800-CBFF I=CC00-E7FF X=E800-FFFF DEVICEHIGH=C:\LOCAL\DRIVERS\XMGR.SYS DOS=HIGH,UMB
UMBPCI followed by XMGR provides XMS, HMA, and UMBs in real mode on supported chipsets. This is the best option if it works, but UMBPCI causes a slowdown on chipsets where UMBs are not cacheable (e.g., MVP3) and does not work at all on some chipsets.
Much is said in the UMBPCI documentation about chipsets that don't allow DMA to UMBs, but I haven't had any resulting problems. XHDD works around. SCSI drives and TSRs that cache the floppy drive might have trouble.
DEVICE=C:\LOCAL\UMBPCI\UMBPCI.SYS DEVICE=C:\LOCAL\DRIVERS\XMGR.SYS /W DOS=HIGH,UMB
If UMBPCI causes problems, XMGR alone is enough to get DOS loaded high, which frees enough conventional memory for most purposes.
DEVICE=C:\LOCAL\DRIVERS\XMGR.SYS DOS=HIGH
With FreeDOS, free space in the HMA is unavailable to drivers loaded in CONFIG.SYS. It is available to drivers loaded later using DEVLOAD.COM.
With MS-DOS, adding AUTO after UMB on the DOS= line will move DRIVEDATA to the UMA, but will also attempt to automatically load HIMEM.SYS, IFSHLP.SYS, DBLBUFF.SYS, and SETVER.EXE if they exist.
XMGR stops at 4 GiB. JemmEx and HimemSX support larger amounts of XMS memory.
If problems occur with sound card drivers complaining that they can't allocate memory below some magic address boundary, try HimemX2, try the /R and /G switches of Drivers.
Starting (aggressive) configuration as of Drivers release 2022-07-01:
DEVLOAD /H C:\LOCAL\DRIVERS\XHDD.SYS /S128 /H /O DEVLOAD /H C:\LOCAL\DRIVERS\XDVD2.SYS /H
DEVLOAD /H | Load drivers high (into UMBs) |
XHDD & XDVD2 /H | Move parts of drivers into the HMA |
XHDD /S | Cache size in MiB. Accepted values: 5 to 4093. |
XHDD /O | "Overlap" for speedup. /O is ignored when /E is given. |
The default DVD-ROM device name is UDVD1.
Fallback configurations:
An alternative to XDVD2 is available as a JEMM Loadable Module (JLM). It uses only XMS memory and does not cache.
DEVICE=C:\LOCAL\JEMM\JLOAD.EXE C:\LOCAL\JEMM\XCDROM32.DLL /D:UDVD1
FreeDOS:
SHELLHIGH=C:\COMMAND.COM C:\ /E:2048 /P BUFFERSHIGH=30 FILESHIGH=40 STACKSHIGH=9,256 LASTDRIVEHIGH=E IDLEHALT=1
MS-DOS:
SHELL=C:\COMMAND.COM C:\ /E:2048 /P BUFFERSHIGH=30 FCBSHIGH=4 FILESHIGH=40 STACKSHIGH=9,256 LASTDRIVEHIGH=E
LH C:\LOCAL\BIN\SHSUCDX.COM /C /D:UDVD1
DOSLFNMS is the one that worked. Cautions:
LH C:\LOCAL\DOSLFN\DOSLFNMS.COM
CTMOUSE works with all normal serial and PS/2 mice and never conflicts with anything. Version 2.1 beta4 seems to be the de facto stable release.
LH C:\LOCAL\BIN\CTMOUSE.EXE
For FreeDOS, just put IDLEHALT=1 in CONFIG.SYS. For MS-DOS, FDAPM served the purpose.
LH C:\LOCAL\BIN\FDAPM.COM APMDOS
Untested alternative: EIDL
To avoid unnecessary splash screens and logs, install the following in the root directory as MSDOS.SYS:
[Options] SystemReg=0 DisableLog=1 Logo=0
Getting W98 working on a newer PC involves satisfying, working around, or patching its outdated assumptions about memory size, hard disk size, and hard disk access mode. Binary patches for all of these issues that R. Loew sold commercially were released to the public after his death. As yet I have not tried anything but the memory size patch.
Whenever W98 complains that it can't find a file and pops up a dialog box to let you locate it, the place to browse to is either the WIN98 directory of the installation CD or the directory from which you are trying to install something. It will generally pick it up even though it's buried in a CAB file.
If maximum patching up is desired, there is an unofficial service pack maintained by PROBLEMCHYLD, or see the ostensibly complete list of hotfixes & updates for Windows 98SE on MSFN. See also, tons of miscellaneous stuff from MDGx. The following is my short list.
W98 must reside entirely within the first 128 GiB (137 GB) of the hard drive to avoid overflowing its 28-bit LBA implementation. Setup is basically wack when it comes to large disks, so run FDISK and FORMAT manually before entering it. Use the patched versions noted above and ignore any incorrectly printed sizes.
FDISK
Various disk-trashing misbehaviors can occur if one does not walk on eggshells around W98 FDISK and FORMAT. Repartitioning (as opposed to creating a new partition table) should always be done using Linux fdisk, never a Windows installation CD. Windows will trash your partition table every time.
FORMAT /S /U C:
After launching setup, just continue past the warnings about there already being an OS in the partition and about NT file system. Any unrecognized partition type is assumed by setup to be NT.
When setup finishes its first phase, you are instructed to remove the floppy (meaning take the CD out) and reboot. Setup has already clobbered the MBR, so when you reboot you enter the GUI portion of setup. It is at this point that memory size hacks become necessary if 1 GiB or more of RAM is present.
Two reboots later, W98's hardware wizard is busy installing drivers. You have to humor it until it goes away. Even when it has no driver for a particular device, it must be allowed to search for it; if you just cancel out, the dialog will come back again every time you reboot.
W98 fails in a variety of ways when more than 512 MiB of RAM is installed. Usually the error says "Insufficient memory" or "There is not enough memory available."
In limited testing, I found that Loew's patch resolved the initial problem of the OS failing to boot, but some apps were glitchy.
The HIMEM.SYS that W98 loads automatically is bugged and unstable when there is a lot of RAM. Loading a different XMM in CONFIG.SYS works around that, but the amount of XMS left available to Windows still must be limited to avoid subsequent failures.
Option 1, using XMGR (in CONFIG.SYS) and XMSFIXER (in AUTOEXEC.BAT):
DEVICE=C:\DRIVERS\XMGR.SYS
C:\XMSFIXER.COM
Option 2, using HimemX or HimemX2:
DEVICE=C:\HIMEMX.EXE /MAX=523264
(523264 KiB = 511 MiB; reasoning that the first 1 MiB is not included)
If the amount of memory in play is not limited to 512 MiB using the HIMEM workarounds in the previous section, it is still possible to get W98 to boot by adding the following settings to WINDOWS\SYSTEM.INI per kb184447 and kb253912:
[386Enh] MaxPhysPage=30000 [vcache] MaxFileCache=131072
The numbers are subject to adjustment, as the interactions are weird and the best numbers depend on the amount of memory. MaxPhysPage is a count of 4 KiB pages in hexadecimal, so 30000 means 768 MiB and 40000 means 1 GiB. MaxFileCache is KiB in decimal, so 131072 means 128 MiB.
AMNHLT appears to be redundant if ACPI is enabled. I did not notice
a wattage drop after installing it on a P4 PC. According to this forum
post, in case the regular installation fails to enable ACPI, setup
/p j
forces it.
To install AMNHLT, run the batch file.
4in1 4.43 for older chipsets, Hyperion Pro 5.24A for newer ones.
These drivers include INF. Intel or VIA INF may prevent them from working, as will any previously installed drivers for USB cards.
If Windows fails to see some device but you have a driver that works in plain DOS, you can install that manually in CONFIG.SYS and/or AUTOEXEC.BAT and Windows might work with it. In recent times, the issue has been SATA Blu-Ray drives not showing up. I had success by changing the SATA mode in BIOS setup from AHCI to IDE and then installing a known good DOS driver similar to Microsoft's advice.
CONFIG.SYS:
DEVICE=C:\XMGR.SYS DEVICE=C:\XDVD2.SYS /H SHELL=C:\COMMAND.COM C:\ /E:1024 /P BUFFERS=20 FCBS=4 FILES=20 STACKS=9,256 LASTDRIVE=E DOS=HIGH
AUTOEXEC.BAT:
C:\XMSFIXER.COM C:\SHSUCDX.COM /C /D:UDVD1,D
Sound drivers can be either VxD or WDM. Microsoft's GS softsynth only works with WDM drivers. However, all WDM sound drivers cause glitching of sound effects in DOOM. kb242937 does not fix that.
Commonly, the only mixer will be hidden underneath the Microsoft volume control in the bottom right corner of the screen: single-click the tiny icon for volume, double-click it for the mixer.
If no good vendor drivers exist, W98's plain old "Standard PCI Graphics Adapter (VGA)" driver usually works. However, it is limited to 640×480 16-color mode and is slow. In my experience, it is reliable across a broad range of video cards, including older PCIe ones, but with a GTX 970 it produced glitched graphics.
The VBEMP 9x Universal VESA/VBE Video Display Driver (or here) works on a similar principle. It too is slow, but unlike the Microsoft driver it allows access to high resolution, true color modes supported by the video BIOS. It worked without glitching at 1920×1080 32 bpp on the GTX 970. To install it, navigate through device manager or right click on desktop → Properties → Settings → Advanced → Adapter to the current display driver, choose Update Driver or Change, navigate some more through to "Have Disk" and "Browse," and browse to the 128MB directory of the VBEMP distribution.
Milestones in Nvidia Windows driver version history:
96.85 | Last "ForceWare" drivers. |
93.71 | Last Windows version "supporting" GeForce2 MX, GeForce3, and GeForce4. |
81.98 | Last version supporting Windows 98 SE. Does NOT work with TNT2 64. |
77.72 | Last W98 version in the 7x series. Does NOT work with TNT2 64. |
72.14 | Last Windows version "supporting" GeForce 256 and non-MX GeForce 2. |
71.89 | Best Nalu benchmark under Windows XP. |
71.84 | Last W98 version prior to 72.14. Last W98 version that works with TNT2 64. |
66.94 | Last W98 version in the 6x series (no release notes). Works with TNT2 64 (PCI) and TNT (AGP). |
61.76 | First Windows version to support 6800 series GPUs. |
56.72 | Last Windows version that "supports" Vanta and TNT2. |
56.64 | Last W98 version in the 5x series. Did not work with TNT (AGP). |
53.04 | Last Windows version that "supports" TNT. |
45.23 | Last "Detonator" drivers (allegedly better for old GPUs). DID NOT WORK with TNT (AGP): "unable to locate a detected device's PCI ID in NVAGP.INF." |
GPU "support" was determined from the release notes. The User's Guide for 66.93 still claims support for Vanta, TNT, and TNT2. Neither the release notes nor the users guides are correct—when tested, a TNT2 64 actually worked up through version 71.84!
Nvidia's official support for W98 ended with the GeForce 6 series GPUs. Maximus-Decim's modded 82.69 drivers supposedly work some of the time up through the GeForce 9 series, but they didn't work for me.
When DOOM running in a DOS box tries to switch to full-screen 320×200 mode, Nvidia drivers often give a black screen (maybe just with LCD monitors?). The standard VGA driver and the VBEMP VESA driver don't have that problem.
The 71.84 and 81.98 ForceWare drivers did not render 640×400 mode correctly for DOOM 95. Versions 12.41, 53.04 and 66.94 all worked.
Image quality in 640×400 mode is improved by checking the box NVIDIA Display → Display Mode Timing → Enable doublescan for lower resolution modes (if it exists in the version used).
For some versions, EnableRefreshRateLock.reg is needed to enable setting a non-default refresh rate that will stick within games.
As described here and here, most installation prompts can be pre-configured using a batch tool that is provided on the W98 installation CD (under tools\reskit\batch). Burn the resulting msbatch.inf file into the WIN98 subdirectory of the installation CD and most prompts go away. It still has a few nits:
To get rid of the task scheduler, run msconfig, select Startup tab, uncheck Scheduling Agent, reboot.
The W98 install CD's boot image has this in CONFIG.SYS for both the SETUP_CD and CD menu options, which makes for a slow and messy boot:
device=himem.sys /testmem:off device=oakcdrom.sys /D:oemcd001 device=btdosm.sys device=flashpt.sys device=btcdrom.sys /D:oemcd001 device=aspi2dos.sys device=aspi8dos.sys device=aspi4dos.sys device=aspi8u2.sys device=aspicd.sys /D:oemcd001
Replace that with this:
DEVICE=XMGR.SYS DEVICE=XDVD2.SYS /H /D:oemcd001
And in AUTOEXEC.BAT:
REM LH MSCDEX.EXE /D:oemcd001 /L:D REM We haven't loaded any UMB provider, so LH is useless. SHSUCDX.COM /C /D:oemcd001 /L:D
This only affects the environment for Setup.
Dropping the patched FORMAT.COM and FDISK.EXE into the WIN98 subdirectory of the installation CD apparently causes these versions to be installed automatically.
TBD: CAB edits to reduce the amount of post-install patching that is required.
Using W98SE as a version of plain DOS is actually much easier than getting it to work in Windows mode. DOS has no failures triggered by memory over 512 MiB and will use BIOS calls for disk access.
AUTOEXEC.BAT
and CONFIG.SYS
to taste.FreeDOS has a better installer and bundles superior, enthusiast-maintained replacements for many of the DOS programs that come with W98SE. As a compromise, one can take the kernel, COMMAND.COM, FORMAT.COM, FDISK.EXE, and SYS.COM from W98SE for better MS-DOS compatibility, but throw out everything else and use free replacements.
If you installed Linux before W98, you will need the Linux install CD or an emergency boot something to get you back into Linux to reinstall LILO or GRUB after W98 does its damage. Alternately, you can back up your MBR before installing W98 and then just restore it afterward.
Every version of Windows insists on owning the C: drive, so some workaround is always needed to get two Windows installations to coexist without jumbling their system files together in the same partition. The easiest way to get XP and W98 to be good neighbors is to exploit the fact that W98 ignores NTFS partitions. If you put XP on NTFS in the first partition and put W98 on FAT32 in the second partition, then each OS will see its own partition as the C: drive. If for some reason this approach is unusable then you will have to fall back to more drastic options such as hiding and unhiding partitions or remapping drives at boot time. N.B., even when the NTFS partition comes first, if XP is allowed to see W98's file system it will activate System Restore on it and create a subdirectory called System Volume Information in the root directory. So while it is not strictly necessary to do so, you might want to hide the W98 partition just to keep the taint of XP off of it.
If you run Linux, it is generally easier and more reliable to boot W98 and/or XP using LILO or GRUB than using Microsoft's own boot loader. LILO and GRUB support partition hiding and drive remapping if you should need those features. On the other hand, the XP boot loader provides access to XP's safe mode.
The XP boot manager can be used to boot a W98 and/or Linux partition by
following the example in the
antiquated NT OS
Loader + Linux mini-HOWTO (v1.11, 2 September 1997). Copy Microsoft's
boot sector (instead of a LILO boot sector as described in the HOWTO) from
the W98 partition to a file on XP's C: drive and reference it in XP's
BOOT.INI file: C:\W98.BIN="Windows 98 SE"
.
Please note:
Nowadays, modern BIOSes include their own multiboot menus that are launched by hitting a hotkey during POST. When things get out of hand, you can install a different boot manager on every disk and use the BIOS menu to choose among them.