## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Summary of the 8514/A and XGA Virtual Device Drivers

DOS applications currently written to the 8514/A Adapter Interface (AI), the XGA AI, or directly to the 8514/A and XGA display adapters are able to run in a full-screen DOS session. This is due to the ability of each adapter's virtual device driver to:

Grant I/O privilege
Save or restore the video state
Provide video bitmap images to the shield layer when the DOS session is being windowed

A DOS application is allowed to run only in a full-screen foreground DOS session, and is immediately frozen if it attempts to access the hardware when switched to the background.

The virtual 8514/A device driver statements, which are required in the CONFIG.SYS file, are added during installation when the presence of an 8514 /A display adapter is noted:

             DEVICE=C:\OS2\MDOS\VVGA.SYS
             DEVICE=C:\OS2\MDOS\V8514A.SYS

The virtual XGA device driver statements, which are required in the CONFIG. SYS file, are added during installation when the presence of an XGA display adapter is noted:

             DEVICE=C:\OS2\MDOS\VVGA.SYS
             DEVICE=C:\OS2\MDOS\VXGA.SYS

The following items should be set in DOS to enable a DOS session:

Enable I/O trapping to permit the virtual video device driver to save and restore the hardware instance used by a DOS application when the application switches away from the foreground DOS session. The virtual video device driver allocates a buffer to save the video image. The maximum size of this buffer is 1MB and is obtained each time a full-screen DOS session is created.

Enabling I/O trapping is the default. Although multiple instances of XGA can be present on a system, the virtual XGA device driver saves or restores only the state of the first instance used by a DOS application. It is the application's responsibility to save or restore the other XGA instances.

Register for screen switch notification. This implies that a DOS application has hooked INT 2Fh so as to be notified when it is to be switched to full-screen foreground or background. This notification informs the application that it must restore the screen when switched to full- screen foreground, and must stop accessing video memory (to avoid freezing) when switched to background.

An application that uses more than one instance of XGA must specify this option to save and restore the states of the other XGA adapters. The default is no VIDEO_SWITCH_NOTIFICATION.

Any DOS session that is not saved or restored by the virtual video device driver cannot be displayed in a window. DOS 8514/A and XGA applications are not interactive in a window; they can only be viewed.