zoukankan      html  css  js  c++  java
  • VBE_INFO(获取VBE信息)

    File:      VBE_INFO.txt
    Name:      获取VBE信息
    Author:    zyl910
    Blog:      http://blog.csdn.net/zyl910/
    Version:   V1.0
    Updata:    2006-11-5

    下载(注意修改下载后的扩展名)


      这个程序用于获取VBE(VESA BIOS EXTENSION)信息,对编写SVGA程序很有帮助,还可用来检测显卡性能。


    测试结果节选
    ~~~~~~~~~~~~

    机器: VMware Workstation 5.5.2 build-29772
    显卡: VMware SVGA II
    [VBE]
    VbeSignature     : VESA
    VbeVersion       : 0x0200
    OemStringPtr     : V M ware, Inc. VBE support 2.0
    Capabilities     : 0x00000003
     D0=1 DAC width is switchable to 8 bits per primary color
     D1=1 Controller is not VGA compatible
     D2=0 Normal RAMDAC operation
     D3=0 No hardware stereoscopic signaling support
     D4=0 Stereo signaling supported via external VESA stereo connector
    VideoModePtr     : C000:5FA7
    TotalMemory      : 0x0100 (16384KB)
    OemSoftwareRev   : 0x0200
    OemVendorNamePtr : VMware, Inc
    OemProductNamePtr: VMware virtual machine
    OemProductRevPtr : 2.0
    [VBE Mode List]
    Mode Resolution  Attr MemoryModel
    0120:  [G]  320 *   200 *  8 00BB 04 - Packed pixel
    0121:  [G]  320 *   400 *  8 00BB 04 - Packed pixel
    0122:  [G]  640 *   400 *  8 00BB 04 - Packed pixel
    0123:  [G]  640 *   480 *  8 00BB 04 - Packed pixel
    0124:  [G]  800 *   600 *  8 00BB 04 - Packed pixel
    0125:  [G] 1024 *   768 *  8 00BB 04 - Packed pixel
    0126:  [G] 1152 *   864 *  8 00BB 04 - Packed pixel
    0127:  [G] 1280 *   960 *  8 00BB 04 - Packed pixel
    0128:  [G] 1280 *  1024 *  8 00BB 04 - Packed pixel
    0129:  [G] 1400 *  1050 *  8 00BB 04 - Packed pixel
    012A:  [G] 1600 *  1200 *  8 00BB 04 - Packed pixel
    012B:  [G] 1792 *  1344 *  8 00BB 04 - Packed pixel
    012C:  [G] 1856 *  1392 *  8 00BB 04 - Packed pixel
    012D:  [G] 1920 *  1440 *  8 00BB 04 - Packed pixel
    012E:  [G]  320 *   200 * 16 00BB 06 - Direct Color
    012F:  [G]  320 *   400 * 16 00BB 06 - Direct Color
    0130:  [G]  640 *   400 * 16 00BB 06 - Direct Color
    0131:  [G]  640 *   480 * 16 00BB 06 - Direct Color
    0132:  [G]  800 *   600 * 16 00BB 06 - Direct Color
    0133:  [G] 1024 *   768 * 16 00BB 06 - Direct Color
    0134:  [G] 1152 *   864 * 16 00BB 06 - Direct Color
    0135:  [G] 1280 *   960 * 16 00BB 06 - Direct Color
    0136:  [G] 1280 *  1024 * 16 00BB 06 - Direct Color
    0137:  [G] 1400 *  1050 * 16 00BB 06 - Direct Color
    0138:  [G] 1600 *  1200 * 16 00BB 06 - Direct Color
    0139:  [G] 1792 *  1344 * 16 00BB 06 - Direct Color
    013A:  [G] 1856 *  1392 * 16 00BB 06 - Direct Color
    013B:  [G] 1920 *  1440 * 16 00BB 06 - Direct Color
    013C:  [G]  320 *   200 * 32 00BB 06 - Direct Color
    013D:  [G]  320 *   400 * 32 00BB 06 - Direct Color
    013E:  [G]  640 *   400 * 32 00BB 06 - Direct Color
    013F:  [G]  640 *   480 * 32 00BB 06 - Direct Color
    0140:  [G]  800 *   600 * 32 00BB 06 - Direct Color
    0141:  [G] 1024 *   768 * 32 00BB 06 - Direct Color
    0142:  [G] 1152 *   864 * 32 00BB 06 - Direct Color
    0143:  [G] 1280 *   960 * 32 00BB 06 - Direct Color
    0144:  [G] 1280 *  1024 * 32 00BB 06 - Direct Color
    0145:  [G] 1400 *  1050 * 32 00BB 06 - Direct Color
    0146:  [G] 1600 *  1200 * 32 00BB 06 - Direct Color
    0147:  [G] 1792 *  1344 * 32 00BB 06 - Direct Color
    0148:  [G] 1856 *  1392 * 32 00BB 06 - Direct Color
    0149:  [G] 1920 *  1440 * 32 00BB 06 - Direct Color
    0100:  [G]  640 *   400 *  8 00BB 04 - Packed pixel
    0101:  [G]  640 *   480 *  8 00BB 04 - Packed pixel
    0103:  [G]  800 *   600 *  8 00BB 04 - Packed pixel
    0105:  [G] 1024 *   768 *  8 00BB 04 - Packed pixel
    0107:  [G] 1280 *  1024 *  8 00BB 04 - Packed pixel
    010E:  [G]  320 *   200 * 16 00BB 06 - Direct Color
    0111:  [G]  640 *   480 * 16 00BB 06 - Direct Color
    0114:  [G]  800 *   600 * 16 00BB 06 - Direct Color
    0117:  [G] 1024 *   768 * 16 00BB 06 - Direct Color
    011A:  [G] 1280 *  1024 * 16 00BB 06 - Direct Color
    [Mode: 120h]
    ModeAttributes      : 0x00BB
     D0=1 Mode supported in hardware
     D1=1 Reserved(Must 1)
     D2=0 TTY Output functions not supported by BIOS
     D3=1 Color mode
     D4=1 Graphics mode
     D5=1 VGA compatible mode: No
     D6=0 VGA compatible windowed memory mode is available: Yes
     D7=1 Linear frame buffer mode is available: Yes
     D8=0 Double scan mode is available: No
     D9=0 Interlaced mode is available: No
     D10=0 Hardware triple buffering support: No
     D11=0 Hardware stereoscopic display support: No
     D12=0 Dual display start address support: No
    WinAAttributes      : 0x07
    WinBAttributes      : 0x00
    WinGranularity      : 0x0040 (64KB)
    WinSize             : 0x0040 (64KB)
    WinASegment         : 0xA000
    WinBSegment         : 0x0000
    WinFuncPtr          : C000:6ED3
    BytesPerScanLine    : 320
    XResolution         : 320
    YResolution         : 200
    XCharSize           : 16
    YCharSize           : 8
    NumberOfPlanes      : 1
    BitsPerPixel        : 8
    NumberOfBanks       : 1
    MemoryModel         : 04 - Packed pixel
    BankSize            : 0x0000 (0KB)
    NumberOfImagePages  : 0
    RedMaskSize         : 8
    RedFieldPosition    : 0
    GreenMaskSize       : 8
    GreenFieldPosition  : 0
    BlueMaskSize        : 8
    BlueFieldPosition   : 0
    RsvdMaskSize        : 0
    RsvdFieldPosition   : 0
    DirectColorModeInfo : 00
    PhysBasePtr         : F0000000
    OffScreenMemOffset  : 0
    OffScreenMemSize    : 0
    LinBytesPerScanLine : 0
    BnkNumberOfImagePages: 0
    LinNumberOfImagePages: 0
    LinRedMaskSize      : 0
    LinRedFieldPosition : 0
    LinGreenMaskSize    : 0
    LinGreenFieldPosition: 0
    LinBlueMaskSize     : 0
    LinBlueFieldPosition: 0
    LinRsvdMaskSize     : 0
    LinRsvdFieldPosition: 0
    MaxPixelClock       : 0

    机器: Virtual PC 5.2(Build 418)
    显卡: S3 Trio32/64 PCI (732/764)
    [VBE]
    VbeSignature     : VESA
    VbeVersion       : 0x0200
    OemStringPtr     : IBM SVGA BIOS, (C) 1993 International Business Machines
    Capabilities     : 0x01000000
     D0=0 DAC is fixed width, with 6 bits per primary color
     D1=0 Controller is VGA compatible
     D2=0 Normal RAMDAC operation
     D3=0 No hardware stereoscopic signaling support
     D4=0 Stereo signaling supported via external VESA stereo connector
    VideoModePtr     : C800:0177
    TotalMemory      : 0x0040 (4096KB)
    OemSoftwareRev   : 0x0000
    OemVendorNamePtr : (null)
    OemProductNamePtr: (null)
    OemProductRevPtr : (null)
    [VBE Mode List]
    Mode Resolution  Attr MemoryModel
    0100:  [G]  640 *   400 *  8 009B 04
    0101:  [G]  640 *   480 *  8 009B 04
    0102:  [G]  800 *   600 *  4 009B 03
    0103:  [G]  800 *   600 *  8 009B 04
    0104:  [G] 1024 *   768 *  4 009B 03
    0105:  [G] 1024 *   768 *  8 009B 04
    0106:  [G] 1280 *  1024 *  4 009B 03
    0107:  [G] 1280 *  1024 *  8 009B 04
    0112:  [G]  640 *   480 * 32 009B 06
    0113:  [T]32770 * 36866 *  1 9B02 01
    0114:  [G]  800 *   600 * 16 009B 06
    0115:  [G]  800 *   600 * 32 009B 06
    0116:  [T]32770 * 36866 *  1 9B02 01
    0117:  [G] 1024 *   768 * 16 009B 06
    0118:  [G] 1024 *   768 * 32 009B 06
    0119:  [T]32770 * 36866 *  1 9B02 01
    011A:  [G] 1280 *  1024 * 16 009B 06
    011C:  [G] 1024 *   768 *  4 009B 04
    011D:  [G] 1024 *   768 *  8 009B 04
    0120:  [G] 1600 *  1200 *  8 009B 04
    0122:  [G] 1600 *  1200 * 16 009B 06
    0123:  [G] 1600 *  1200 * 16 009B 06
    0124:  [G] 1600 *  1024 *  8 009B 04
    0126:  [G]  800 *   512 *  8 009B 04
    0127:  [G]  800 *   512 * 16 009B 06
    0128:  [G]  800 *   512 * 32 009B 06
    0129:  [G]  896 *   600 *  8 009B 04
    012A:  [G]  896 *   600 * 16 009B 06
    012B:  [G]  896 *   600 * 32 009B 06
    012C:  [G] 1152 *   768 *  8 009B 04
    012D:  [G] 1152 *   768 * 16 009B 06
    012E:  [G] 1152 *   768 * 32 009B 06
    [Mode: 100h]
    ModeAttributes      : 0x009B
     D0=1 Mode supported in hardware
     D1=1 Reserved(Must 1)
     D2=0 TTY Output functions not supported by BIOS
     D3=1 Color mode
     D4=1 Graphics mode
     D5=0 VGA compatible mode: Yes
     D6=0 VGA compatible windowed memory mode is available: Yes
     D7=1 Linear frame buffer mode is available: Yes
     D8=0 Double scan mode is available: No
     D9=0 Interlaced mode is available: No
     D10=0 Hardware triple buffering support: No
     D11=0 Hardware stereoscopic display support: No
     D12=0 Dual display start address support: No
    WinAAttributes      : 0x07
    WinBAttributes      : 0x00
    WinGranularity      : 0x0040 (64KB)
    WinSize             : 0x0040 (64KB)
    WinASegment         : 0xA000
    WinBSegment         : 0x0000
    WinFuncPtr          : C800:1DEE
    BytesPerScanLine    : 640
    XResolution         : 640
    YResolution         : 400
    XCharSize           : 8
    YCharSize           : 16
    NumberOfPlanes      : 1
    BitsPerPixel        : 8
    NumberOfBanks       : 1
    MemoryModel         : 04 - Packed pixel
    BankSize            : 0x0000 (0KB)
    NumberOfImagePages  : 0
    RedMaskSize         : 0
    RedFieldPosition    : 0
    GreenMaskSize       : 0
    GreenFieldPosition  : 0
    BlueMaskSize        : 0
    BlueFieldPosition   : 0
    RsvdMaskSize        : 0
    RsvdFieldPosition   : 0
    DirectColorModeInfo : 00
    PhysBasePtr         : F8000000
    OffScreenMemOffset  : 256000
    OffScreenMemSize    : 3846
    LinBytesPerScanLine : 0
    BnkNumberOfImagePages: 0
    LinNumberOfImagePages: 0
    LinRedMaskSize      : 0
    LinRedFieldPosition : 0
    LinGreenMaskSize    : 0
    LinGreenFieldPosition: 0
    LinBlueMaskSize     : 0
    LinBlueFieldPosition: 0
    LinRsvdMaskSize     : 0
    LinRsvdFieldPosition: 0
    MaxPixelClock       : 0

    机器: 真实机器
    显卡: NVIDIA RIVA TNT2 Model 64
    [VBE]
    VbeSignature     : VESA
    VbeVersion       : 0x0300
    OemStringPtr     : NVidia
    Capabilities     : 0x00000001
     D0=1 DAC width is switchable to 8 bits per primary color
     D1=0 Controller is VGA compatible
     D2=0 Normal RAMDAC operation
     D3=0 No hardware stereoscopic signaling support
     D4=0 Stereo signaling supported via external VESA stereo connector
    VideoModePtr     : 074B:FE12
    TotalMemory      : 0x0200 (32768KB)
    OemSoftwareRev   : 0x0000
    OemVendorNamePtr : (null)
    OemProductNamePtr: (null)
    OemProductRevPtr : (null)
    [VBE Mode List]
    Mode Resolution  Attr MemoryModel
    0100:  [G]  640 *   400 *  8 039F 04 - Packed pixel
    0101:  [G]  640 *   480 *  8 039F 04 - Packed pixel
    0102:  [G]  800 *   600 *  4 031F 03 - Planar
    0103:  [G]  800 *   600 *  8 039F 04 - Packed pixel
    0104:  [G] 1024 *   768 *  4 031F 03 - Planar
    0105:  [G] 1024 *   768 *  8 039F 04 - Packed pixel
    0106:  [G] 1280 *  1024 *  4 031F 03 - Planar
    0107:  [G] 1280 *  1024 *  8 039F 04 - Packed pixel
    0108:  [T]   80 *    60 *  4 038F 00 - Text mode
    0109:  [T]  132 *    25 *  4 038F 00 - Text mode
    010A:  [T]  132 *    43 *  4 038F 00 - Text mode
    010B:  [T]  132 *    50 *  4 038F 00 - Text mode
    010C:  [T]  132 *    60 *  4 038F 00 - Text mode
    010E:  [G]  320 *   200 * 16 039F 06 - Direct Color
    010F:  [G]  320 *   200 * 32 039F 06 - Direct Color
    0111:  [G]  640 *   480 * 16 039F 06 - Direct Color
    0112:  [G]  640 *   480 * 32 039F 06 - Direct Color
    0114:  [G]  800 *   600 * 16 039F 06 - Direct Color
    0115:  [G]  800 *   600 * 32 039F 06 - Direct Color
    0117:  [G] 1024 *   768 * 16 039F 06 - Direct Color
    0118:  [G] 1024 *   768 * 32 039F 06 - Direct Color
    011A:  [G] 1280 *  1024 * 16 039F 06 - Direct Color
    0130:  [G]  320 *   200 *  8 039F 04 - Packed pixel
    0131:  [G]  320 *   400 *  8 039F 04 - Packed pixel
    0132:  [G]  320 *   400 * 16 039F 06 - Direct Color
    0133:  [G]  320 *   400 * 32 039F 06 - Direct Color
    0134:  [G]  320 *   240 *  8 039F 04 - Packed pixel
    0135:  [G]  320 *   240 * 16 039F 06 - Direct Color
    0136:  [G]  320 *   240 * 32 039F 06 - Direct Color
    013D:  [G]  640 *   400 * 16 039F 06 - Direct Color
    013E:  [G]  640 *   400 * 32 039F 06 - Direct Color
    0145:  [G] 1600 *  1200 *  8 039F 04 - Packed pixel
    0146:  [G] 1600 *  1200 * 16 039F 06 - Direct Color
    [Mode: 100h]
    ModeAttributes      : 0x039F
     D0=1 Mode supported in hardware
     D1=1 Reserved(Must 1)
     D2=1 TTY Output functions supported by BIOS
     D3=1 Color mode
     D4=1 Graphics mode
     D5=0 VGA compatible mode: Yes
     D6=0 VGA compatible windowed memory mode is available: Yes
     D7=1 Linear frame buffer mode is available: Yes
     D8=1 Double scan mode is available: Yes
     D9=1 Interlaced mode is available: Yes
     D10=0 Hardware triple buffering support: No
     D11=0 Hardware stereoscopic display support: No
     D12=0 Dual display start address support: No
    WinAAttributes      : 0x07
    WinBAttributes      : 0x00
    WinGranularity      : 0x0040 (64KB)
    WinSize             : 0x0040 (64KB)
    WinASegment         : 0xA000
    WinBSegment         : 0x0000
    WinFuncPtr          : C000:5C9D
    BytesPerScanLine    : 640
    XResolution         : 640
    YResolution         : 400
    XCharSize           : 8
    YCharSize           : 16
    NumberOfPlanes      : 1
    BitsPerPixel        : 8
    NumberOfBanks       : 1
    MemoryModel         : 04 - Packed pixel
    BankSize            : 0x0000 (0KB)
    NumberOfImagePages  : 15
    RedMaskSize         : 0
    RedFieldPosition    : 0
    GreenMaskSize       : 0
    GreenFieldPosition  : 0
    BlueMaskSize        : 0
    BlueFieldPosition   : 0
    RsvdMaskSize        : 0
    RsvdFieldPosition   : 0
    DirectColorModeInfo : 00
    PhysBasePtr         : F0000000
    OffScreenMemOffset  : 0
    OffScreenMemSize    : 0
    LinBytesPerScanLine : 640
    BnkNumberOfImagePages: 15
    LinNumberOfImagePages: 15
    LinRedMaskSize      : 0
    LinRedFieldPosition : 0
    LinGreenMaskSize    : 0
    LinGreenFieldPosition: 0
    LinBlueMaskSize     : 0
    LinBlueFieldPosition: 0
    LinRsvdMaskSize     : 0
    LinRsvdFieldPosition: 0
    MaxPixelClock       : 229500000

    机器: 真实机器
    显卡: NVIDIA GeForce2 MX/MX 400
    [VBE]
    VbeSignature     : VESA
    VbeVersion       : 0x0300
    OemStringPtr     : NVidia
    Capabilities     : 0x00000001
     D0=1 DAC width is switchable to 8 bits per primary color
     D1=0 Controller is VGA compatible
     D2=0 Normal RAMDAC operation
     D3=0 No hardware stereoscopic signaling support
     D4=0 Stereo signaling supported via external VESA stereo connector
    VideoModePtr     : 07C5:FE12
    TotalMemory      : 0x0200 (32768KB)
    OemSoftwareRev   : 0x0000
    OemVendorNamePtr : (null)
    OemProductNamePtr: (null)
    OemProductRevPtr : (null)
    [VBE Mode List]
    Mode Resolution  Attr MemoryModel
    0100:  [G]  640 *   400 *  8 039F 04 - Packed pixel
    0101:  [G]  640 *   480 *  8 039F 04 - Packed pixel
    0102:  [G]  800 *   600 *  4 031F 03 - Planar
    0103:  [G]  800 *   600 *  8 039F 04 - Packed pixel
    0104:  [G] 1024 *   768 *  4 031F 03 - Planar
    0105:  [G] 1024 *   768 *  8 039F 04 - Packed pixel
    0106:  [G] 1280 *  1024 *  4 031F 03 - Planar
    0107:  [G] 1280 *  1024 *  8 039F 04 - Packed pixel
    0108:  [T]   80 *    60 *  4 038F 00 - Text mode
    0109:  [T]  132 *    25 *  4 038F 00 - Text mode
    010A:  [T]  132 *    43 *  4 038F 00 - Text mode
    010B:  [T]  132 *    50 *  4 038F 00 - Text mode
    010C:  [T]  132 *    60 *  4 038F 00 - Text mode
    010E:  [G]  320 *   200 * 16 039F 06 - Direct Color
    010F:  [G]  320 *   200 * 32 039F 06 - Direct Color
    0111:  [G]  640 *   480 * 16 039F 06 - Direct Color
    0112:  [G]  640 *   480 * 32 039F 06 - Direct Color
    0114:  [G]  800 *   600 * 16 039F 06 - Direct Color
    0115:  [G]  800 *   600 * 32 039F 06 - Direct Color
    0117:  [G] 1024 *   768 * 16 039F 06 - Direct Color
    0118:  [G] 1024 *   768 * 32 039F 06 - Direct Color
    011A:  [G] 1280 *  1024 * 16 039F 06 - Direct Color
    0130:  [G]  320 *   200 *  8 039F 04 - Packed pixel
    0131:  [G]  320 *   400 *  8 039F 04 - Packed pixel
    0132:  [G]  320 *   400 * 16 039F 06 - Direct Color
    0133:  [G]  320 *   400 * 32 039F 06 - Direct Color
    0134:  [G]  320 *   240 *  8 039F 04 - Packed pixel
    0135:  [G]  320 *   240 * 16 039F 06 - Direct Color
    0136:  [G]  320 *   240 * 32 039F 06 - Direct Color
    013D:  [G]  640 *   400 * 16 039F 06 - Direct Color
    013E:  [G]  640 *   400 * 32 039F 06 - Direct Color
    0145:  [G] 1600 *  1200 *  8 039F 04 - Packed pixel
    0146:  [G] 1600 *  1200 * 16 039F 06 - Direct Color
    [Mode: 100h]
    ModeAttributes      : 0x039F
     D0=1 Mode supported in hardware
     D1=1 Reserved(Must 1)
     D2=1 TTY Output functions supported by BIOS
     D3=1 Color mode
     D4=1 Graphics mode
     D5=0 VGA compatible mode: Yes
     D6=0 VGA compatible windowed memory mode is available: Yes
     D7=1 Linear frame buffer mode is available: Yes
     D8=1 Double scan mode is available: Yes
     D9=1 Interlaced mode is available: Yes
     D10=0 Hardware triple buffering support: No
     D11=0 Hardware stereoscopic display support: No
     D12=0 Dual display start address support: No
    WinAAttributes      : 0x07
    WinBAttributes      : 0x00
    WinGranularity      : 0x0040 (64KB)
    WinSize             : 0x0040 (64KB)
    WinASegment         : 0xA000
    WinBSegment         : 0x0000
    WinFuncPtr          : C000:6D95
    BytesPerScanLine    : 640
    XResolution         : 640
    YResolution         : 400
    XCharSize           : 8
    YCharSize           : 16
    NumberOfPlanes      : 1
    BitsPerPixel        : 8
    NumberOfBanks       : 1
    MemoryModel         : 04 - Packed pixel
    BankSize            : 0x0000 (0KB)
    NumberOfImagePages  : 15
    RedMaskSize         : 0
    RedFieldPosition    : 0
    GreenMaskSize       : 0
    GreenFieldPosition  : 0
    BlueMaskSize        : 0
    BlueFieldPosition   : 0
    RsvdMaskSize        : 0
    RsvdFieldPosition   : 0
    DirectColorModeInfo : 00
    PhysBasePtr         : E0000000
    OffScreenMemOffset  : 0
    OffScreenMemSize    : 0
    LinBytesPerScanLine : 640
    BnkNumberOfImagePages: 15
    LinNumberOfImagePages: 15
    LinRedMaskSize      : 0
    LinRedFieldPosition : 0
    LinGreenMaskSize    : 0
    LinGreenFieldPosition: 0
    LinBlueMaskSize     : 0
    LinBlueFieldPosition: 0
    LinRsvdMaskSize     : 0
    LinRsvdFieldPosition: 0
    MaxPixelClock       : 229500000

    机器: 真实机器
    显卡: NVIDIA GeForce4 MX/MX 440
    [VBE]
    VbeSignature     : VESA
    VbeVersion       : 0x0300
    OemStringPtr     : NVIDIA
    Capabilities     : 0x00000001
     D0=1 DAC width is switchable to 8 bits per primary color
     D1=0 Controller is VGA compatible
     D2=0 Normal RAMDAC operation
     D3=0 No hardware stereoscopic signaling support
     D4=0 Stereo signaling supported via external VESA stereo connector
    VideoModePtr     : 0FEC:FE12
    TotalMemory      : 0x0400 (65536KB)
    OemSoftwareRev   : 0x0000
    OemVendorNamePtr : (null)
    OemProductNamePtr: (null)
    OemProductRevPtr : (null)
    [VBE Mode List]
    Mode Resolution  Attr MemoryModel
    0100:  [G]  640 *   400 *  8 039F 04 - Packed pixel
    0101:  [G]  640 *   480 *  8 039F 04 - Packed pixel
    0102:  [G]  800 *   600 *  4 031F 03 - Planar
    0103:  [G]  800 *   600 *  8 039F 04 - Packed pixel
    0104:  [G] 1024 *   768 *  4 031F 03 - Planar
    0105:  [G] 1024 *   768 *  8 039F 04 - Packed pixel
    0106:  [G] 1280 *  1024 *  4 031F 03 - Planar
    0107:  [G] 1280 *  1024 *  8 039F 04 - Packed pixel
    0108:  [T]   80 *    60 *  4 038F 00 - Text mode
    0109:  [T]  132 *    25 *  4 038F 00 - Text mode
    010A:  [T]  132 *    43 *  4 038F 00 - Text mode
    010B:  [T]  132 *    50 *  4 038F 00 - Text mode
    010C:  [T]  132 *    60 *  4 038F 00 - Text mode
    010E:  [G]  320 *   200 * 16 039F 06 - Direct Color
    010F:  [G]  320 *   200 * 32 039F 06 - Direct Color
    0111:  [G]  640 *   480 * 16 039F 06 - Direct Color
    0112:  [G]  640 *   480 * 32 039F 06 - Direct Color
    0114:  [G]  800 *   600 * 16 039F 06 - Direct Color
    0115:  [G]  800 *   600 * 32 039F 06 - Direct Color
    0117:  [G] 1024 *   768 * 16 039F 06 - Direct Color
    0118:  [G] 1024 *   768 * 32 039F 06 - Direct Color
    011A:  [G] 1280 *  1024 * 16 039F 06 - Direct Color
    011B:  [G] 1280 *  1024 * 32 039F 06 - Direct Color
    0130:  [G]  320 *   200 *  8 039F 04 - Packed pixel
    0131:  [G]  320 *   400 *  8 039F 04 - Packed pixel
    0132:  [G]  320 *   400 * 16 039F 06 - Direct Color
    0133:  [G]  320 *   400 * 32 039F 06 - Direct Color
    0134:  [G]  320 *   240 *  8 039F 04 - Packed pixel
    0135:  [G]  320 *   240 * 16 039F 06 - Direct Color
    0136:  [G]  320 *   240 * 32 039F 06 - Direct Color
    013D:  [G]  640 *   400 * 16 039F 06 - Direct Color
    013E:  [G]  640 *   400 * 32 039F 06 - Direct Color
    0145:  [G] 1600 *  1200 *  8 039F 04 - Packed pixel
    0146:  [G] 1600 *  1200 * 16 039F 06 - Direct Color
    0147:  [G] 1400 *  1050 *  8 039F 04 - Packed pixel
    0148:  [G] 1400 *  1050 * 16 039F 06 - Direct Color
    0152:  [G] 2048 *  1536 * 32 03DB 06 - Direct Color
    [Mode: 100h]
    ModeAttributes      : 0x039F
     D0=1 Mode supported in hardware
     D1=1 Reserved(Must 1)
     D2=1 TTY Output functions supported by BIOS
     D3=1 Color mode
     D4=1 Graphics mode
     D5=0 VGA compatible mode: Yes
     D6=0 VGA compatible windowed memory mode is available: Yes
     D7=1 Linear frame buffer mode is available: Yes
     D8=1 Double scan mode is available: Yes
     D9=1 Interlaced mode is available: Yes
     D10=0 Hardware triple buffering support: No
     D11=0 Hardware stereoscopic display support: No
     D12=0 Dual display start address support: No
    WinAAttributes      : 0x07
    WinBAttributes      : 0x00
    WinGranularity      : 0x0040 (64KB)
    WinSize             : 0x0040 (64KB)
    WinASegment         : 0xA000
    WinBSegment         : 0x0000
    WinFuncPtr          : C000:9FBD
    BytesPerScanLine    : 640
    XResolution         : 640
    YResolution         : 400
    XCharSize           : 8
    YCharSize           : 16
    NumberOfPlanes      : 1
    BitsPerPixel        : 8
    NumberOfBanks       : 1
    MemoryModel         : 04 - Packed pixel
    BankSize            : 0x0000 (0KB)
    NumberOfImagePages  : 14
    RedMaskSize         : 0
    RedFieldPosition    : 0
    GreenMaskSize       : 0
    GreenFieldPosition  : 0
    BlueMaskSize        : 0
    BlueFieldPosition   : 0
    RsvdMaskSize        : 0
    RsvdFieldPosition   : 0
    DirectColorModeInfo : 00
    PhysBasePtr         : D4000000
    OffScreenMemOffset  : 0
    OffScreenMemSize    : 0
    LinBytesPerScanLine : 640
    BnkNumberOfImagePages: 14
    LinNumberOfImagePages: 14
    LinRedMaskSize      : 0
    LinRedFieldPosition : 0
    LinGreenMaskSize    : 0
    LinGreenFieldPosition: 0
    LinBlueMaskSize     : 0
    LinBlueFieldPosition: 0
    LinRsvdMaskSize     : 0
    LinRsvdFieldPosition: 0
    MaxPixelClock       : 229500000

    机器: 真实机器
    显卡: Hercules 3D Prophet 4500
    [VBE]
    VbeSignature     : VESA
    VbeVersion       : 0x0300
    OemStringPtr     : PowerVR KYRO II Bios Rev 01.107

    Copyright Imagination Technologies,1998-2001

    Hercules 3D Prophet 4500
    Capabilities     : 0x00000000
     D0=0 DAC is fixed width, with 6 bits per primary color
     D1=0 Controller is VGA compatible
     D2=0 Normal RAMDAC operation
     D3=0 No hardware stereoscopic signaling support
     D4=0 Stereo signaling supported via external VESA stereo connector
    VideoModePtr     : C000:78CB
    TotalMemory      : 0x14B9 (339520KB) ;实际上只有64MB,再加上物理内存256MB
    OemSoftwareRev   : 0x0000
    OemVendorNamePtr : (null)
    OemProductNamePtr: (null)
    OemProductRevPtr : (null)
    [VBE Mode List]
    Mode Resolution  Attr MemoryModel
    0138:  [G] 1600 *  1200 *  8 00BB 04 - Packed pixel
    0139:  [G] 1600 *  1200 * 15 00BB 06 - Direct Color
    013A:  [G] 1600 *  1200 * 16 00BB 06 - Direct Color
    013C:  [G] 1600 *  1200 * 32 00FB 06 - Direct Color
    0107:  [G] 1280 *  1024 *  8 00BB 04 - Packed pixel
    0119:  [G] 1280 *  1024 * 15 00BB 06 - Direct Color
    011A:  [G] 1280 *  1024 * 16 00BB 06 - Direct Color
    011B:  [G] 1280 *  1024 * 32 00FB 06 - Direct Color
    0132:  [G] 1280 *   960 *  8 00BB 04 - Packed pixel
    0133:  [G] 1280 *   960 * 15 00BB 06 - Direct Color
    0134:  [G] 1280 *   960 * 16 00BB 06 - Direct Color
    0136:  [G] 1280 *   960 * 32 00FB 06 - Direct Color
    012D:  [G] 1152 *   864 *  8 00BB 04 - Packed pixel
    012E:  [G] 1152 *   864 * 15 00BB 06 - Direct Color
    012F:  [G] 1152 *   864 * 16 00BB 06 - Direct Color
    0131:  [G] 1152 *   864 * 32 00BB 06 - Direct Color
    0105:  [G] 1024 *   768 *  8 00BB 04 - Packed pixel
    0116:  [G] 1024 *   768 * 15 00BB 06 - Direct Color
    0117:  [G] 1024 *   768 * 16 00BB 06 - Direct Color
    0118:  [G] 1024 *   768 * 32 00BB 06 - Direct Color
    0103:  [G]  800 *   600 *  8 00BB 04 - Packed pixel
    0113:  [G]  800 *   600 * 15 00BB 06 - Direct Color
    0114:  [G]  800 *   600 * 16 00BB 06 - Direct Color
    0115:  [G]  800 *   600 * 32 00BB 06 - Direct Color
    0102:  [G]  800 *   600 *  4 003B 03 - Planar
    0101:  [G]  640 *   480 *  8 00BB 04 - Packed pixel
    0110:  [G]  640 *   480 * 15 00BB 06 - Direct Color
    0111:  [G]  640 *   480 * 16 00BB 06 - Direct Color
    0112:  [G]  640 *   480 * 32 00BB 06 - Direct Color
    0100:  [G]  640 *   400 *  8 00BB 04 - Packed pixel
    0126:  [G]  640 *   400 * 15 00BB 06 - Direct Color
    0127:  [G]  640 *   400 * 16 00BB 06 - Direct Color
    0129:  [G]  640 *   400 * 32 00BB 06 - Direct Color
    0121:  [G]  512 *   384 *  8 00BB 04 - Packed pixel
    0122:  [G]  512 *   384 * 15 00BB 06 - Direct Color
    0123:  [G]  512 *   384 * 16 00BB 06 - Direct Color
    0125:  [G]  512 *   384 * 32 00BB 06 - Direct Color
    010C:  [G]  320 *   200 *  8 00BB 04 - Packed pixel
    010D:  [G]  320 *   200 * 15 00BB 06 - Direct Color
    010E:  [G]  320 *   200 * 16 00BB 06 - Direct Color
    010F:  [G]  320 *   200 * 32 00BB 06 - Direct Color
    [Mode: 138h]
    ModeAttributes      : 0x00BB
     D0=1 Mode supported in hardware
     D1=1 Reserved(Must 1)
     D2=0 TTY Output functions not supported by BIOS
     D3=1 Color mode
     D4=1 Graphics mode
     D5=1 VGA compatible mode: No
     D6=0 VGA compatible windowed memory mode is available: Yes
     D7=1 Linear frame buffer mode is available: Yes
     D8=0 Double scan mode is available: No
     D9=0 Interlaced mode is available: No
     D10=0 Hardware triple buffering support: No
     D11=0 Hardware stereoscopic display support: No
     D12=0 Dual display start address support: No
    WinAAttributes      : 0x07
    WinBAttributes      : 0x00
    WinGranularity      : 0x0040 (64KB)
    WinSize             : 0x0040 (64KB)
    WinASegment         : 0xA000
    WinBSegment         : 0x0000
    WinFuncPtr          : C000:80E8
    BytesPerScanLine    : 1600
    XResolution         : 1600
    YResolution         : 1200
    XCharSize           : 8
    YCharSize           : 8
    NumberOfPlanes      : 1
    BitsPerPixel        : 8
    NumberOfBanks       : 1
    MemoryModel         : 04 - Packed pixel
    BankSize            : 0x0000 (0KB)
    NumberOfImagePages  : 175
    RedMaskSize         : 0
    RedFieldPosition    : 0
    GreenMaskSize       : 0
    GreenFieldPosition  : 0
    BlueMaskSize        : 0
    BlueFieldPosition   : 0
    RsvdMaskSize        : 0
    RsvdFieldPosition   : 0
    DirectColorModeInfo : 00
    PhysBasePtr         : D0000000
    OffScreenMemOffset  : 0
    OffScreenMemSize    : 0
    LinBytesPerScanLine : 1600
    BnkNumberOfImagePages: 175
    LinNumberOfImagePages: 175
    LinRedMaskSize      : 0
    LinRedFieldPosition : 0
    LinGreenMaskSize    : 0
    LinGreenFieldPosition: 0
    LinBlueMaskSize     : 0
    LinBlueFieldPosition: 0
    LinRsvdMaskSize     : 0
    LinRsvdFieldPosition: 0
    MaxPixelClock       : 220000000

    源代码
    ~~~~~~
     

    /*
    File:      VBE_INFO.c
    Name:      获取VBE信息
    Author:    zyl910
    Blog:      http://blog.csdn.net/zyl910/
    Version:   V1.0
    Updata:    2006-11-5
    */

    #include <conio.h>
    #include <stdio.h>
    #include <dos.h>
    #include <mem.h>
    #include <math.h>

    typedef unsigned char BYTE;
    typedef unsigned short WORD;
    typedef unsigned long DWORD;
    typedef signed long LONG;
    typedef unsigned int UINT;
    typedef unsigned char UCHAR;
    typedef short SWORD;
     
    /* VESA 信息块 */
    typedef struct tagVBE_INFO
    {
     char   VbeSignature[4];      /* VESA标志: 'VESA', 'VBE2' */
     WORD   VbeVersion;           /* VESA 版本号 */
     char far *OemStringPtr;         /* 制造商字串指针 */
     DWORD     Capabilities;         /* 视频显示能力 */
     WORD far *VideoModePtr;         /* 扩展显示模式集指针 */
     WORD      TotalMemory;          /* 显示卡显存,单位为64KB*/
     /*VBE 2.0*/
     WORD      OemSoftwareRev;       /*VBE软件的OEM修订版本号*/
     char far *OemVendorNamePtr;     /*指向显示卡制造厂商的字符串指针*/
     char far *OemProductNamePtr;    /*指向显示卡产品名称的字符串指针*/
     char far *OemProductRevPtr;     /*指向显示卡修订版本号或产品等级的字符串指针*/
     BYTE      reserved[222];        /*保留*/
     BYTE      OemData[256];
    }VBE_INFO;

    typedef void (far * VBE_WINPROC)(void);
    typedef struct tagVBE_MODE_INFO
    {
     /* Mandatory information for all VBE revisions */
     WORD        ModeAttributes;         /* 模式属性 */
     BYTE        WinAAttributes;         /* 窗口 A 属性 */
     BYTE        WinBAttributes;         /* 窗口 B 属性 */
     WORD        WinGranularity;         /* 窗口页粒度, KB为单位*/
     WORD        WinSize;                /* 窗口大小, KB为单位*/
     WORD        WinASegment;            /* 窗口 A 起始段地址 */
     WORD        WinBSegment;            /* 窗口 B 起始段地址 */
     VBE_WINPROC WinFuncPtr;             /* 换页调用指针 */
     WORD        BytesPerScanLine;       /* 每条扫描线所占的字节数 */
     /*Mandatory information for VBE 1.2 and above */
     WORD        XResolution;            /* 水平分辨率 */
     WORD        YResolution;            /* 垂直分辨率 */
     BYTE        XCharSize;              /* 字符宽度 */
     BYTE        YCharSize;              /* 字符高度 */
     BYTE        NumberOfPlanes;         /* 存储器位面个数 */
     BYTE        BitsPerPixel;           /* 每个像素所占位数 */
     BYTE        NumberOfBanks;          /* 显示段个数 */
     BYTE        MemoryModel;            /* 存储器模式类型 */
     BYTE        BankSize;               /* 显示段的大小,以KB为单位 */
     BYTE        NumberOfImagePages;     /* 可同时载入的最大满屏图像数 */
     BYTE        reserve1;               /* 为页面功能保留 */
     /*Direct Color fields(required for direct/6 and YUV/7 memory models)*/
     BYTE        RedMaskSize;            /* 红色所占的位数 */
     BYTE        RedFieldPosition;       /* 红色的最低有效位位置 */
     BYTE        GreenMaskSize;          /* 绿色所占的位数 */
     BYTE        GreenFieldPosition;     /* 绿色的最低有效位位置 */
     BYTE        BlueMaskSize;           /* 蓝色所占的位数 */
     BYTE        BlueFieldPosition;      /* 蓝色的最低有效位位置 */
     BYTE        RsvdMaskSize;           /* 保留色所占的位数 */
     BYTE        RsvdFieldPosition;      /* 保留色的最低有效位位置 */
     BYTE        DirectColorModeInfo;    /* 直接颜色模式的属性 */
     /*Mandatory information for VBE 2.0 and above*/
     DWORD       PhysBasePtr;            /* 可使用大的帧缓存时32位的物理地址指针 */
     DWORD       OffScreenMemOffset;     /* 帧缓存首址的32位偏移量 */
     WORD        OffScreenMemSize;       /* 可用的,连续的显示缓冲区长度,KB为单位 */
     /*Mandatory information for VBE 3.0 and above*/
     WORD        LinBytesPerScanLine;    /* 线性缓冲区扫描线的长度,以字节为单位 */
     BYTE        BnkNumberOfImagePages;  /* 使用窗口功能时显示页面数 */
     BYTE        LinNumberOfImagePages;  /* 使用大的线性缓冲区时显示页面数 */
     BYTE        LinRedMaskSize;         /* 使用大的线性缓冲区时红色所占的位数 */
     BYTE        LinRedFieldPosition;    /* 使用大的线性缓冲区时红色的最低有效位位置 */
     BYTE        LinGreenMaskSize;       /* 使用大的线性缓冲区时绿色所占的位数 */
     BYTE        LinGreenFieldPosition;  /* 使用大的线性缓冲区时绿色的最低有效位位置 */
     BYTE        LinBlueMaskSize;        /* 使用大的线性缓冲区时蓝色所占的位数 */
     BYTE        LinBlueFieldPosition;   /* 使用大的线性缓冲区时蓝色的最低有效位位置 */
     BYTE        LinRsvdMaskSize;        /* 使用大的线性缓冲区时保留色所占的位数 */
     BYTE        LinRsvdFieldPosition;   /* 使用大的线性缓冲区时保留色的最低有效位位置 */
            DWORD       MaxPixelClock;          /* maximum pixel clock (in Hz) for graphics mode */
     BYTE        reserve2[190];          /* 保留 */
    }VBE_MODE_INFO;
    #define VideoBase 0xa000
    #define WaitVR() while(!(inportb(0x3da)&0x08))
     
     
    typedef struct tagDETAIL_INT
    {
     int iValue;
     char* szDetail;
    }DETAIL_INT;
    typedef struct tagDETAIL_BIT
    {
     int iValue;
     char* szDetail[2];
    }DETAIL_BIT;

    void PrintVBEError(FILE* pFile, WORD err)
    {
     const DETAIL_INT detailError[] ={
      {0, "Function call successful"},
      {1, "Function call failed"},
      {2, "Function is not supported in the current hardware configuration"},
      {3, "Function call invalid in current video mode"}
     };
     int i;
     fprintf(pFile, "%s(", (err & 0xff)==0x4F? "supported" : "not supported");
     err >>= 8;
     for(i=0; i<sizeof(detailError)/sizeof(detailError[0]); i++)
     {
      if (err == detailError[i].iValue)
      {
       fprintf(pFile, "%s)", detailError[i].szDetail);
       return;
      }
     }
     fprintf(pFile, "unknown)");
    }
    void PrintVBEINFO(FILE* pFile, VBE_INFO* pInfo)
    {
     const DETAIL_BIT detailCapabilities[] ={
      {0, "DAC is fixed width, with 6 bits per primary color", "DAC width is switchable to 8 bits per primary color"},
      {1, "Controller is VGA compatible", "Controller is not VGA compatible"},
      {2, "Normal RAMDAC operation", "When programming large blocks of information to the RAMDAC, use the blank bit in Function 09h."},
      {3, "No hardware stereoscopic signaling support", "Hardware stereoscopic signaling supported by controller"},
      {4, "Stereo signaling supported via external VESA stereo connector", "Stereo signaling supported via VESA EVC connector"}
     };
     int i;
     int idx;
     fprintf(pFile, "[VBE]/n");
     fprintf(pFile, "VbeSignature     : %4.4s/n", pInfo->VbeSignature);
     fprintf(pFile, "VbeVersion       : 0x%4.4X/n", pInfo->VbeVersion);
     fprintf(pFile, "OemStringPtr     : %Fs/n", pInfo->OemStringPtr);
     fprintf(pFile, "Capabilities     : 0x%8.8lX/n", pInfo->Capabilities);
     for(i=0; i<sizeof(detailCapabilities)/sizeof(detailCapabilities[0]); i++)
     {
      idx = ( (pInfo->Capabilities & (1 << detailCapabilities[i].iValue)) != 0 );
      fprintf(pFile, "/tD%d=%1d/t%s/n", detailCapabilities[i].iValue, idx, detailCapabilities[i].szDetail[idx]);
     }
     fprintf(pFile, "VideoModePtr     : %Fp/n", pInfo->VideoModePtr);
     fprintf(pFile, "TotalMemory      : 0x%4.4X/t(%ldKB)/n", pInfo->TotalMemory, pInfo->TotalMemory * (DWORD)64);
     fprintf(pFile, "OemSoftwareRev   : 0x%4.4X/n", pInfo->OemSoftwareRev);
     fprintf(pFile, "OemVendorNamePtr : %Fs/n", pInfo->OemVendorNamePtr);
     fprintf(pFile, "OemProductNamePtr: %Fs/n", pInfo->OemProductNamePtr);
     fprintf(pFile, "OemProductRevPtr : %Fs/n", pInfo->OemProductRevPtr);
     fprintf(pFile, "/n");
    }
    void PrintVBEMemoryModel(FILE* pFile, BYTE MemoryModel)
    {
     const DETAIL_INT detailTable[] ={
      {0, "Text mode"},
      {1, "CGA graphics"},
      {2, "Hercules graphics"},
      {3, "Planar"},
      {4, "Packed pixel"},
      {5, "Non-chain 4, 256 color"},
      {6, "Direct Color"},
      {7, "YUV"},
     };
     int i;
     for(i=0; i<sizeof(detailTable)/sizeof(detailTable[0]); i++)
     {
      if (MemoryModel == detailTable[i].iValue)
      {
       fprintf(pFile, "%s", detailTable[i].szDetail);
       return;
      }
     }
     fprintf(pFile, "unknown");
    }
    void PrintVBEMODEINFO(FILE* pFile, VBE_MODE_INFO* pInfo, WORD dwMode)
    {
     const DETAIL_BIT detailModeAttributes[] ={
      {0, "Mode not supported in hardware", "Mode supported in hardware"},
      {1, "Reserved(Must 1)", "Reserved(Must 1)"},
      {2, "TTY Output functions not supported by BIOS", "TTY Output functions supported by BIOS"},
      {3, "Monochrome mode", "Color mode"},
      {4, "Text mode", "Graphics mode"},
      {5, "VGA compatible mode: Yes", "VGA compatible mode: No"},
      {6, "VGA compatible windowed memory mode is available: Yes", "VGA compatible windowed memory mode is available: No"},
      {7, "Linear frame buffer mode is available: No", "Linear frame buffer mode is available: Yes"},
      {8, "Double scan mode is available: No", "Double scan mode is available: Yes"},
      {9, "Interlaced mode is available: No", "Interlaced mode is available: Yes"},
      {10, "Hardware triple buffering support: No", "Hardware triple buffering support: Yes"},
      {11, "Hardware stereoscopic display support: No", "Hardware stereoscopic display support: Yes"},
      {12, "Dual display start address support: No", "Dual display start address support: Yes"}
     };
     int i;
     int idx;
     fprintf(pFile, "[Mode: %Xh]/n", dwMode);
     fprintf(pFile, "ModeAttributes      : 0x%4.4X/n", pInfo->ModeAttributes);
     for(i=0; i<sizeof(detailModeAttributes)/sizeof(detailModeAttributes[0]); i++)
     {
      idx = ( (pInfo->ModeAttributes & (1 << detailModeAttributes[i].iValue)) != 0 );
      fprintf(pFile, "/tD%d=%1d/t%s/n", detailModeAttributes[i].iValue, idx, detailModeAttributes[i].szDetail[idx]);
     }
     fprintf(pFile, "WinAAttributes      : 0x%2.2X/n", pInfo->WinAAttributes);
     fprintf(pFile, "WinBAttributes      : 0x%2.2X/n", pInfo->WinBAttributes);
     fprintf(pFile, "WinGranularity      : 0x%4.4X/t(%dKB)/n", pInfo->WinGranularity, pInfo->WinGranularity);
     fprintf(pFile, "WinSize             : 0x%4.4X/t(%dKB)/n", pInfo->WinSize, pInfo->WinSize);
     fprintf(pFile, "WinASegment         : 0x%4.4X/n", pInfo->WinASegment);
     fprintf(pFile, "WinBSegment         : 0x%4.4X/n", pInfo->WinBSegment);
     fprintf(pFile, "WinFuncPtr          : %Fp/n", pInfo->WinFuncPtr);
     fprintf(pFile, "BytesPerScanLine    : %u/n", pInfo->BytesPerScanLine);
            /*Mandatory information for VBE 1.2 and above */
     fprintf(pFile, "XResolution         : %u/n", pInfo->XResolution);
     fprintf(pFile, "YResolution         : %u/n", pInfo->YResolution);
     fprintf(pFile, "XCharSize           : %u/n", pInfo->XCharSize);
     fprintf(pFile, "YCharSize           : %u/n", pInfo->YCharSize);
     fprintf(pFile, "NumberOfPlanes      : %u/n", pInfo->NumberOfPlanes);
     fprintf(pFile, "BitsPerPixel        : %u/n", pInfo->BitsPerPixel);
     fprintf(pFile, "NumberOfBanks       : %u/n", pInfo->NumberOfBanks);
     fprintf(pFile, "MemoryModel         : %2.2X - ", pInfo->MemoryModel);
      PrintVBEMemoryModel(pFile, pInfo->MemoryModel);
     fprintf(pFile, "/n");
     fprintf(pFile, "BankSize            : 0x%4.4X/t(%dKB)/n", pInfo->BankSize, pInfo->BankSize);
     fprintf(pFile, "NumberOfImagePages  : %u/n", pInfo->NumberOfImagePages);
     /*Direct Color fields(required for direct/6 and YUV/7 memory models)*/
     fprintf(pFile, "RedMaskSize         : %u/n", pInfo->RedMaskSize);
     fprintf(pFile, "RedFieldPosition    : %u/n", pInfo->RedFieldPosition);
     fprintf(pFile, "GreenMaskSize       : %u/n", pInfo->GreenMaskSize);
     fprintf(pFile, "GreenFieldPosition  : %u/n", pInfo->GreenFieldPosition);
     fprintf(pFile, "BlueMaskSize        : %u/n", pInfo->BlueMaskSize);
     fprintf(pFile, "BlueFieldPosition   : %u/n", pInfo->BlueFieldPosition);
     fprintf(pFile, "RsvdMaskSize        : %u/n", pInfo->RsvdMaskSize);
     fprintf(pFile, "RsvdFieldPosition   : %u/n", pInfo->RsvdFieldPosition);
     fprintf(pFile, "DirectColorModeInfo : %2.2X/n", pInfo->DirectColorModeInfo);
     /*Mandatory information for VBE 2.0 and above*/
     fprintf(pFile, "PhysBasePtr         : %8.8lX/n", pInfo->PhysBasePtr);
     fprintf(pFile, "OffScreenMemOffset  : %lu/n", pInfo->OffScreenMemOffset);
     fprintf(pFile, "OffScreenMemSize    : %u/n", pInfo->OffScreenMemSize);
     /*Mandatory information for VBE 3.0 and above*/
     fprintf(pFile, "LinBytesPerScanLine : %u/n", pInfo->LinBytesPerScanLine);
     fprintf(pFile, "BnkNumberOfImagePages: %u/n", pInfo->BnkNumberOfImagePages);
     fprintf(pFile, "LinNumberOfImagePages: %u/n", pInfo->LinNumberOfImagePages);
     fprintf(pFile, "LinRedMaskSize      : %u/n", pInfo->LinRedMaskSize);
     fprintf(pFile, "LinRedFieldPosition : %u/n", pInfo->LinRedFieldPosition);
     fprintf(pFile, "LinGreenMaskSize    : %u/n", pInfo->LinGreenMaskSize);
     fprintf(pFile, "LinGreenFieldPosition: %u/n", pInfo->LinGreenFieldPosition);
     fprintf(pFile, "LinBlueMaskSize     : %u/n", pInfo->LinBlueMaskSize);
     fprintf(pFile, "LinBlueFieldPosition: %u/n", pInfo->LinBlueFieldPosition);
     fprintf(pFile, "LinRsvdMaskSize     : %u/n", pInfo->LinRsvdMaskSize);
     fprintf(pFile, "LinRsvdFieldPosition: %u/n", pInfo->LinRsvdFieldPosition);
     fprintf(pFile, "MaxPixelClock       : %lu/n", pInfo->MaxPixelClock);
     fprintf(pFile, "/n");
    }
    WORD vbegetmodeinfo(WORD dwMode, VBE_MODE_INFO* pInfo)
    {
     _ES = FP_SEG(pInfo);
     _DI = FP_OFF(pInfo);
     _CX = dwMode;
     _AX = 0x4F01;
     geninterrupt(0x10);
     return _AX;
    }
    int main(void)
    {
     VBE_INFO vbeinfo;
     VBE_MODE_INFO modeinfo;
     WORD far * lpMode;
     WORD rc;
     int i;
     printf("VBE Info V1.0/n");
     printf("Author:    zyl910/n");
     printf("Blog:      http://blog.csdn.net/zyl910//n");
     printf("Version:   V1.0/n");
     printf("Updata:    2006-11-5/n");
     printf("/n");
     /* VBE Info */
     memset(&vbeinfo, 0, sizeof(vbeinfo));
     _ES = FP_SEG(&vbeinfo);
     _DI = FP_OFF(&vbeinfo);
     _AX = 0x4F00;
     geninterrupt(0x10);
     rc = _AX;
     if (rc != 0x004F)
     {
      printf("Status(%4.4X): ", rc);
      PrintVBEError(stdout, rc);
      printf("/n");
      printf("VBE is not exist!/n");
      return 1;
     }
     PrintVBEINFO(stdout, &vbeinfo);
     /* VBE Mode List */
     printf("[VBE Mode List]/n");
     printf("Mode/tResolution/t/tAttr/tMemoryModel/n");
     lpMode = vbeinfo.VideoModePtr;
     while(*lpMode != (WORD)-1)
     {
      memset(&modeinfo, 0, sizeof(modeinfo));
      rc = vbegetmodeinfo(*lpMode, &modeinfo);
      printf("%04.4X: ", *lpMode);
      printf("/t[%c]", (modeinfo.ModeAttributes & (1<<4))? 'G' : 'T');
      printf("%5u * %5u * %2u", modeinfo.XResolution, modeinfo.YResolution, modeinfo.BitsPerPixel);
      printf("/t%4.4X", modeinfo.ModeAttributes);
      printf("/t%2.2X - ", modeinfo.MemoryModel);
      PrintVBEMemoryModel(stdout, modeinfo.MemoryModel);
      printf("/n");
      /* Next */
      lpMode++;
     }
     printf("/n");
     /* VBE Mode Info */
     lpMode = vbeinfo.VideoModePtr;
     while(*lpMode != (WORD)-1)
     {
      memset(&modeinfo, 0, sizeof(modeinfo));
      rc = vbegetmodeinfo(*lpMode, &modeinfo);
      PrintVBEMODEINFO(stdout, &modeinfo, *lpMode);
      /* Next */
      lpMode++;
     }
     /* Other Mode List */
     printf("[Other Mode List]/n");
     printf("Mode/tResolution/t/tAttr/tMemoryModel/n");
     for(i=0; i<0x100; i++)
     {
      memset(&modeinfo, 0, sizeof(modeinfo));
      rc = vbegetmodeinfo(i, &modeinfo);
      if(rc == 0x004F)
      {
       printf("%04.4X: ", i);
       printf("/t[%c]", (modeinfo.ModeAttributes & (1<<4))? 'G' : 'T');
       printf("%5u * %5u * %2u", modeinfo.XResolution, modeinfo.YResolution, modeinfo.BitsPerPixel);
       printf("/t%4.4X", modeinfo.ModeAttributes);
       printf("/t%2.2X - ", modeinfo.MemoryModel);
       PrintVBEMemoryModel(stdout, modeinfo.MemoryModel);
       printf("/n");
      }
     }
     printf("/n");
     /* Other Mode Info */
     for(i=0; i<0x100; i++)
     {
      memset(&modeinfo, 0, sizeof(modeinfo));
      rc = vbegetmodeinfo(i, &modeinfo);
      if(rc == 0x004F)
      {
       PrintVBEMODEINFO(stdout, &modeinfo, i);
      }
     }
     return 0;
    }

    作者:zyl910
    版权声明:自由转载-非商用-非衍生-保持署名 | Creative Commons BY-NC-ND 3.0.
  • 相关阅读:
    pm2中文文档
    大前端技能图谱
    手把手教你用express搭建个人博客(二)
    javascript this讲解
    手把手教你用express搭建个人博客(一)
    使用国内手机号注册Google帐号的方法(2020-12-13亲测有效)
    常见浏览器修改User-Agent的方法
    Debian 9 Stretch国内常用镜像源
    Nginx核心模块内置变量
    tmux基本操作
  • 原文地址:https://www.cnblogs.com/zyl910/p/2186633.html
Copyright © 2011-2022 走看看