Industrial Training




JPEG Display Process Pages-6



JPEG Display Process

Note: Monochrome modes have their CRTC address at 3B4h. Color modes have their CRTC address at 3D4h. Monochrome modes have attributes in which only bit 3 (video) and bit 4 (intensity) of the attribute controller output are significant. Therefore, monochrome text modes have attributes of off, video, high intensity, blink, etc. Monochrome graphics modes are two plane graphics modes and have attributes of off, video, high intensity, and blink. Extended two color modes that have their CRTC address at 3D4h are color modes with one bit per pixel and one plane. The standard VGA modes 06h and 11h would be classified as color modes, while the standard VGA modes 07h and 0Fh would be classified as monochrome modes. </p>

<p>The BytesPerScanline field specifies how many bytes each logical scanline consists of. The logical scanline could be equal to or larger then the displayed scanline.


The WinAAttributes and WinBAttributes describe the characteristics of the CPU windowing scheme such as whether the windows exist and are read/writeable, as follows:

D0 = Window supported

0 = Window is not supported

1 = Window is supported

D1 = Window readable

0 = Window is not readable

1 = Window is readable

D2 = Window writeable

0 = Window is not writeable

1 = Window is writeable

D3-D7 = Reserved


If windowing is not supported (bit D0 = 0 for both Window A and Window B), then an application can assume that the display memory buffer resides at the standard CPU address appropriate for the MemoryModel of the mode.


WinGranularity specifies the smallest boundary, in KB, on which the window can be placed in the video memory. The value of this field is undefined if Bit D0 of the appropriate WinAttributes field is not set.


WinSize specifies the size of the window in KB.

WinASegment and WinBSegment address specify the segment addresses where the windows are located in CPU address space.


WinFuncAddr specifies the address of the CPU video memory windowing function. The windowing function can be invoked either through VESA BIOS function 05h, or by calling the function directly. A direct call will provide faster access to the hardware paging registers than using Int 10h, and is intended to be used by high performance applications. If this field is Null, then Function 05h must be used to set the memory window, if paging is supported.


The XResolution and YResolution specify the width and height of the video mode. In graphics modes, this resolution is in units of pixels. In text modes, this resolution is in units of characters. Note that text mode resolutions, in units of pixels, can be obtained by multiplying XResolution and YResolution by the cell width and height, if the extended information is present.


The XCharCellSize and YCharSellSize specify the size of the character cell in pixels.

The NumberOfPlanes field specifies the number of memory planes available to software in that mode. For standard 16-color VGA graphics, this would be set to 4. For standard packed pixel modes, the field would be set to 1. The BitsPerPixel field specifies the total number of bits that define the color of one pixel. For example, a standard VGA 4 Plane 16-color graphics mode would have a 4 in this field and a packed pixel 256-color graphics mode would specify 8 in this field. The number of bits per pixel per plane can normally be derived by dividing the BitsPerPixel field by the NumberOfPlanes field.


The MemoryModel field specifies the general type of memory organization used in this mode.


The following models have been defined:

00h = Text mode

01h = CGA graphics

02h = Hercules graphics

03h = 4-plane planar

04h = Packed pixel

05h = Non-chain 4, 256 color

06h = Direct Color

07h = YUV

08h-0Fh = Reserved, to be defined by VESA

10h-FFh = To be defined by OEM


In Version 1.1 and earlier of the VESA Super VGA BIOS Extension, OEM defined Direct Color video modes with pixel formats 1:5:5:5, 8:8:8, and 8:8:8:8 were described as a Packed Pixel model with 16, 24, and 32 bits per pixel, respectively. In Version 1.2 and later of the VESA Super VGA BIOS Extension, it is recommended that Direct Color modes use the Direct Color MemoryModel and use the MaskSize and FieldPosition fields of the ModeInfoBlock to describe the pixel format. BitsPerPixel is always defined to be the total memory size of the pixel, in bits.


The NumberOfBanks field specifies the number of banks in which the scan lines are grouped. The remainder from dividing the scan line number by the number of banks is the bank that contains the scan line and the quotient is the scan line number within the bank. For example, CGA graphics modes have two banks and Hercules graphics mode has four banks. For modes that don't have scanline banks (such as VGA modes 0Dh-13h), this field should be set to 1.

The BankSize field specifies the size of a bank (group of scan lines) in units of 1KB. For CGA and Hercules graphics modes this is 8, as each bank is 8192 bytes in length. For modes that don't have scanline banks (such as VGA modes 0Dh-13h), this field should be set to 0.


The NumberOfImagePages field specifies the number of additional complete display images that will fit into the VGA's memory, at one time, in this mode. The application may load more than one image into the VGA's memory if this field is non-zero, and flip the display between them.


The Reserved field has been defined to support a future VESA BIOS extension feature and will always be set to one in this version.


The RedMaskSize, GreenMaskSize, BlueMaskSize, and RsvdMaskSize fields define the size, in bits, of the red, green, and blue components of a direct color pixel. A bit mask can be constructed from the MaskSize fields using simple shift arithmetic. For example, the MaskSize values for a Direct Color 5:6:5 mode would be 5, 6, 5, and 0, for the red, green, blue, and reserved fields, respectively. Note that in the YUV MemoryModel, the red field is used for V, the green field is used for Y, and the blue field is used for U. The MaskSize fields should be set to 0 in modes using a MemoryModel that does not have pixels with component fields.


The RedFieldPosition, GreenFieldPosition, BlueFieldPosition, and RsvdFieldPosition fields define the bit position within the direct color pixel or YUV pixel of the least significant bit of the respective color component. A color value can be aligned with its pixel field by shifting the value left by the FieldPosition. For example, the FieldPosition values for a Direct Color 5:6:5 mode would be 11, 5, 0, and 0, for the red, green, blue, and reserved fields, respectively. Note that in the YUV MemoryModel, the red field is used for V, the green field is used for Y, and the blue field is used for U. The FieldPosition fields should be set to 0 in modes using a MemoryModel that does not have pixels with component fields.


The DirectColorModeInfo field describes important characteristics of direct color modes. Bit D0 specifies whether the color ramp of the DAC is fixed or programmable. If the color ramp is fixed, then it can not be changed. If the color ramp is programmable, it is assumed that the red, green, and blue lookup tables can be loaded using a standard VGA DAC color registers BIOS call (AX=1012h). Bit D1 specifies whether the bits in the Rsvd field of the direct color pixel can be used by the application or are reserved, and thus unusable.


D0 = Color ramp is fixed/programmable

0 = Color ramp is fixed

1 = Color ramp is programmable

D1 = Bits in Rsvd field are usable/reserved

0 = Bits in Rsvd field are reserved

1 = Bits in Rsvd field are usable by the application


Notes

Version 1.1 and later VESA BIOS extensions will zero out all unused fields in the Mode Information Block, always returning exactly 256 bytes. This facilitates upward compatibility with future versions of the standard, as any newly added fields will be designed such that values of zero will indicate nominal defaults or non-implementation of optional features (for example, a field containing a bit-mask of extended capabilities would reflect the absence of all such capabilities). Applications that wish to be backwards compatible to Version 1.0 VESA BIOS extensions should pre-initialize the 256 byte buffer before calling Return Super VGA mode information.


Function 02h - Set Super VGA video mode

This function initializes a video mode. The BX register contains the mode to set. The format of VESA mode numbers is described in chapter 2. If the mode cannot be set, the BIOS should leave the video environment unchanged and return a failure error code.


Input: AH = 4Fh Super VGA support

AL = 02h Set Super VGA video mode

BX = Video mode

D0-D14 = Video mode

D15 = Clear memory flag

0 = Clear video memory

1 = Don't clear video memory


Output: AX = Status

(All other registers are preserved)

Function 03h - Return current video mode

This function returns the current video mode in BX. The format of VESA video mode numbers is described in chapter 2 of this document.


Input: AH = 4Fh Super VGA support

AL = 03h Return current video mode


Output: AX = Status

BX = Current video mode

(All other registers are preserved)

Notes

In a standard VGA BIOS, function 0Fh (Read current video state) returns the current video mode in the AL register. In D7 of AL, it also returns the status of the memory clear bit (D7 of 40:87). This bit is set if the mode was set without clearing memory. In this Super VGA function, the memory clear bit will not be returned in BX since the purpose of the function is to return the video mode only. If an application wants to obtain the memory clear bit, it should call VGA BIOS function 0Fh.


Function 05h - CPU Video Memory Window Control

This function sets or gets the position of the specified window in the video memory. The function allows direct access to the hardware paging registers. To use this function properly, the software should use VESA BIOS Function 01h (Return Super VGA mode information) to determine the size, location, and granularity of the windows.


Input: AH = 4Fh Super VGA support

AL = 05h Super VGA video memory window control

BH = 00h Select Super VGA video memory window

BL = Window number

0 = Window A

1 = Window B

DX = Window position in video memory

(in window granularity units)


Output: AX = Status

(See notes below)


Input: AH = 4Fh Super VGA support

AL = 05h Super VGA video memory window control

BH = 01h Return Super VGA video memory window

BL = Window number

0 = Window A

1 = Window B


Output: AX = Status

DX = Window position in video memory



Hi I am Pluto.