The Main VDD supplied by Microsoft provides virtual device support for standard VGA compatible devices. A virtual display minidriver (mini-VDD) is a VxD that allows a video hardware manufacturer to add virtual device support for hardware extensions beyond standard VGA capabilities. This chapter provides detailed information on how to implement a mini-VDD. For an overview of the Virtual Display subsystem and information on VDD functions for use by display drivers, see About Virtual Display Device. For information about VDD services available to mini-VDDs see About Virtual Display Device Services.
The sample mini-VDDs that come with the Device Driver Kit (DDK) provide a good starting point for building your own mini-VDD. This chapter is intended to augment the information that can be found in the sample source and header files. This chapter and the samples use the following terminology:
CB data structure | Windows creates the CB data structure for each VM started in the system. Your mini-VDD allocates space in the CB data area to save register and mode states on a per-VM basis. The data that your mini-VDD saves in the CB data area in the space that you have allocated varies for every mini-VDD. |
CRTC owner and MemC owner | The CRTC owner VM is the VM that owns the screen mode. If you are running on the Windows desktop, then the Windows VM is the CRTC owner. If you are running a full-screen MS-DOS session, then that MS-DOS session's VM is the CRTC owner. If you are running a MS-DOS session in a window, then the CRTC owner is Windows but the MemC owner is the MS-DOS VM. This distinction is necessary when restoring register states. When you restore the register state of a MS-DOS VM running in a window, it means that you are getting ready to virtualize the VGA by using the off-screen memory. Your VGA hardware must be setup to write to this memory in exactly the same way as if the VGA was running in native VGA mode. But you must also preserve the appearance of the Windows screen which is being displayed on the visible screen. Thus, the screen looks like it is running in Windows hi-res packed pixel mode from the user's perspective, but the CPU sees the video memory as a 4 plane VGA. Therefore, you can restore those states from the CRTC owner that preserve the appearance of the screen while restoring those states from the MemC owner that control how the CPU sees the video memory. |
Magic number | The VDD's entry point that is returned in the BX register from the call Interrupt 2Fh, Function 1683h. |