Safe Detection in Windows 95 Setup

Devices and buses are grouped as classes in Windows 95 for purposes of detecting and installing device drivers and managing system resources. Windows 95 differentiates between devices and drivers that comply with the Plug and Play specification and earlier versions of devices and drivers (which are referred to in this book as legacy devices). Because of this differentiation, Windows 95 Setup detects hardware components and devices in two ways:

After Setup detects a device, it adds configuration information to the Registry and installs the appropriate device drivers. The same procedures used during Setup for detecting Plug and Play or legacy hardware devices are also used to detect or configure new devices after Windows 95 is installed.

Windows 95 supports detection for base computer components such as communications ports and processor type, and provides more robust detection of computer devices, such as display adapters, pointing devices, hard-disk controllers, floppy-disk controllers, and network adapters.

Windows 95 Setup also tries to detect any hardware resource conflicts early in the installation process. This helps to avoid the problems that occur when hardware resources such as IRQs, I/O addresses, or DMAs are used by more than one device.

To avoid computer failure during the detection process, Windows 95 uses a safe detection method to search for hints from configuration files, read-only memory (ROM) strings, or drivers loaded in memory to determine whether the computer contains each class of hardware. If no such hints are found, the detection process skips detecting the entire class. If hints are found, then the detection process seeks information from specific I/O ports.

Windows 95 automatically reads the command lines in CONFIG.SYS to find hints for device class detection. Then Windows 95 loads detection modules based on information in the MSDET.INF file, which lists the hardware to be detected and points to specific INF files for each device class (for example, SCSI.INF for SCSI host adapters). Device information from the INF files is written to the Registry. For more information about the format of these files, see Appendix C, "Windows 95 INF Files."

Windows 95 can also read a particular CONFIG.SYS device= line for resource information to be avoided (that is, protected) during the detection process. This is useful if Windows 95 Setup cannot detect or support a certain device when it's known that the detection process can cause such a device to fail. For example, the detection process could render a fax modem inoperative because scanning the I/O port might confuse the device driver. Windows 95 can read the device= line in CONFIG.SYS for this model and protect the associated I/O region from other detection modules.

Windows 95 Setup asks you to confirm which classes should be skipped in the detection process. If you know that the computer has a device in one of those classes, Setup can be forced to detect that device class.

Safe detection exists for four classes of devices:

Safe Detection for Network Adapters

Windows 95 Setup performs the following kinds of steps for safe detection of network adapters:

Safe Detection for SCSI Controllers

When trying to detect SCSI adapters, Windows 95 Setup checks for device drivers in CONFIG.SYS, and then scans ROM strings from the SCSI adapter for manufacturer names. If known drivers or known strings are found, then the corresponding detection procedure for that class is used; otherwise, the entire class is skipped. A list of the known strings and drivers that Windows 95 Setup checks is stored internally in a detection DLL. (For more information about the SCSI devices and drivers that Windows 95 supports, see the Manufacturers and Models lists in the Add New Hardware option in Control Panel.)

Different SCSI devices require different methods for safe detection. For example, a SCSI card typically is used with a combination of hard disks, CD-ROM drives, tape backup drives, scanners, and similar devices. For everything to work (except the hard disk), some sort of device driver must be loaded in CONFIG.SYS.

For hard disk drives, however, the driver usually is not loaded in CONFIG.SYS, but INT 13 ROM are enabled. Therefore, safe detection for SCSI class devices looks for a ROM string with a manufacturer's name.

Safe Detection for Proprietary Adapters for CD-ROM

Windows 95 supports Mitsumi, SONY, and Panasonic proprietary adapters for CD-ROM. Because drivers for these devices are loaded in CONFIG.SYS, safe detection first scans CONFIG.SYS for the drivers that are present. If a device= line for such a driver is found, the corresponding detection module is loaded for that type of device.

Safe Detection for Sound Cards

Safe detection scans CONFIG.SYS and reads SYSTEM.INI for hints about sound cards. If known drivers are not found, the entire class is skipped.

If Windows 95 doesn't have detection code for certain hardware, the equipment manufacturer can force a device to be detected by adding information about it in the MSDET.INF file. Windows 95 detection behaves as if it has detected the device and installs the device according to the INF information provided by the equipment manufacturer.

Windows 95 Setup does not detect sound cards by scanning I/O ports; instead, it checks only CONFIG.SYS and SYSTEM.INI and performs detection prescribed in MSDET.INF. Detection of sound cards by scanning I/O ports can cause the computer to stall. This is because detection calls a driver specific to a device class to send a signal to an I/O port. The driver expects a predetermined response, such as a signature from the adapter's ROM. If the wrong driver sends a signal to an I/O port address occupied by a different device class, the computer can stall.