Mode X and Mode 13 Display Modes

DirectDraw supports both Mode 13 and Mode X display modes. Mode 13 is the linear unflippable 320×200×8 bits per pixel palettized mode known widely by its hexadecimal BIOS mode number: 13. For more information, see Mode 13 Support. Mode X is a hybrid display mode derived from the standard VGA Mode 13. This mode allows the use of up to 256 kilobytes (KB) of display memory (rather than the 64 KB allowed by Mode 13) by using the VGA display adapter's EGA multiple video plane system.

DirectDraw provides two Mode X modes (320×200×8 and 320×240×8) for all display cards. Some cards also support linear low-resolution modes. In linear low-resolution modes, the primary surface can be locked and directly accessed. This is not possible in Mode X modes.

Mode X modes are available only if an application uses the DDSCL_ALLOWMODEX, DDSCL_FULLSCREEN, and DDSCL_EXCLUSIVE flags when calling the IDirectDraw4::SetCooperativeLevel method. If DDSCL_ALLOWMODEX is not specified, the IDirectDraw4::EnumDisplayModes method will not enumerate Mode X modes, and the IDirectDraw4::SetDisplayMode method will fail if a Mode X mode is requested.

Windows 95 and Windows NT/Windows 2000 do not natively support Mode X modes; therefore, when your application is in a Mode X mode, you cannot use the IDirectDrawSurface4::Lock or IDirectDrawSurface4::Blt methods to lock or blit to the primary surface. You also cannot use either the IDirectDrawSurface4::GetDC method on the primary surface, or GDI with a screen DC. Mode X modes are indicated by the DDSCAPS_MODEX flag in the DDSCAPS2 structure, which is part of the DDSURFACEDESC2 structure returned by the IDirectDrawSurface4::GetCaps and IDirectDraw4::EnumDisplayModes methods.