NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
SI0000Q320J01-04 MB86290 MB86291 MB86291S MB86291A MB86293 COL32 COLOR32 COL16 - Datasheet Archive
MB86290 Series Graphics Driver Users Manual Rev.2.6 FUJITSU LIMITED Copyright©FUJITSU LIMITED 1999-2003 ALL RIGHTS RESERVED
SI0000Q320J01-04 SI0000Q320J01-04 MB86290 MB86290 Series Graphics Driver Users Manual Rev.2.6 FUJITSU LIMITED Copyright©FUJITSU LIMITED 1999-2003 ALL RIGHTS RESERVED 1. The contents of this document are subject to change without notice. Therefore, please confirm that information given in this document is the newest in Fujitsu Limited sales representatives in the case of using. 2. Fujitsu Limited is unable to assume responsibility for infringement of any patent rights or other rights of third parties arising from the use of this information or figures. 3. No part of the publication may be copied reproduced in any form or by any means, or transferred to any third party without prior written consent of Fujitsu Limited. 4. If any products described in this document represent goods or technologies subject to certain restrictions on export under the Foreign Exchange and Foreign Trade Law of Japan, the prior authorization by Japanese government will be required for export of those products from Japan. Revision history Date Rev. Page Feb. 23,2000 1.0 87 Change (1)First release (1)Added API for object coordinates (for MB86291 MB86291) May 18, 2001 1.3 116 (2)Added API for video capture (for MB86291 MB86291) (3)Added API for I2C control (for MB86291S MB86291S) (1)Added the GdcCapSetLPFMode command Jun. 18, 2001 1.4 118 (2)The number of transmission byte is set as the return value of GdcFlush, GdcSync, GdcVFlush, and GdcVSync command (3)Added the GdcVerticalSync command (1)Deleted Aug. 15, 2001 1.5 113 emain,GdcGeoGetFIFOErrorStatus,and GdcGeoClearFIFOErrorStatus command Sept. 13, 2001 1.6 113 (1)Added argument (gdc_type) to the GdcGeoInitialize command (Revision history:1/3) Revision history Date Rev. Page Change (1)Added the GDC_TYPE_MB86291A MB86291A macro to appoint with an argument of the GdcGeoInitialize command (2)Changed the font (3)Added commands for MB86293 MB86293 (4)Added the GdcClipMode command, and delete the GdcSetAttrMisc command of the same function (5)Added argument (gdc_type) to the GdcInitialize command (6)Deleted argument (gdc_type) from the GdcGeoInitialize command (7)Changed argument name (dma_request) of the GdcSetDMAMode command (8)Added the GdcCancelDisplayList command (9)Added a drawing order control mode setting function of main / border / shadow primitive to the GdcGeoSetAttrLine command (10)Changed a sentence of notes (11)Updated by an abstract description of the "Graphics Driver" (12)Added a description of the GdcCapSetVideoCaptureScale command Jun. 13, 2002 1.7 169 (13)Updated from GDC_COL32 COL32 to GDC_COLOR32 COLOR32 by a type description of an argument used with the following commands - GdcColorTransparent command - GdcColor command - GdcBackColor command - GdcGeoShadowColor command - GdcGeoShadowBackColor command - GdcGeoBorderColor command - GdcGeoBorderBackColor command (14)Deleted the GdcColorI command and the GdcBackColorI command (8 bits and 16 bits color can be set by the GdcColor and the GdcBackColor respectively) (15)Changed a type of an argument used with the following commands from the GDC_COL16 COL16 to the GDC_COLOR32 COLOR32 - GdcSetTextureBorder command - GdcBltColorTransparent command (16)Because could clear a Display List FIFO error only by reset, deleted the GdcClearFIFOErrorStatus command (Revision history:2/3) Revision history Date Rev. Page Change (17)The following commands used in order to delete the GdcSync and the GdcVSync command and to check drawing end instead are added Jun. 13, 2002 1.7 169 - GdcGetPixelEngineStatus - GdcGeoGetPixelEngineStatus - GdcGetLocalDisplayListTransferStatus Jun. 27, 2002 2.3 171 (1)Description of the GdcGeoLoadMatrix command is corrected. (1)Added a description of the following commands can be specified "GDC_DIPS_LAYER_L*" macro to be argument - GdcDispPos - GdcDispDoFlip Oct. 8, 2002 2.4 174 - GdcColorZeroMode (2)Added macros for specifying the logical arithmetic mode of the shadow, the border, and the non top-left primitive to be the argument of the GdcSetRop command (3)Description of the return value of the GdcGeoSetLogOutMode command is corrected to void type (1)Supported the MB86294 MB86294 functions (2)Added the GDC_TYPE_MB86294 MB86294 macro to appoint with an argument of the GdcInitialize command (3)Description Apr. 24, 2003 2.6 175 of the shadow composition primitive of the GdcGeoShadowXY command is corrected. (4)Deleted the description about enlargement from explanation of the GdcCapSetVideoCaptureScale command. (5)Added description of the GdcI2CGetClock and the GdcI2CGetData commands (Revision history:3/3) Copyright(c)FUJITSU LIMITED 1999-2003 Introduction Introduction *A purpose and a target reader of this document This document describes the mechanisms of MB86290 MB86290 Series Graphics Driver (the "Graphics Driver") and application interfaces. This document is written for an engineer developing a graphics application using the "Graphics Driver". A description of this document has premised the reader who has understood specification of MB86290 MB86290 Series Graphics Controller (the "Graphics Controller") and technology about graphics. If needed refer to the specification of Graphics Controller, or graphics-related books. Graphics*Graphics-related technology which will be the requisite for an understanding of this document Device coordinate system, object coordinate system, coordinate transformation, conversion matrix, clipping, polygon, shading, Z-buffer method, shade surface elimination, texture mapping, tilling, anti-aliasing, alpha blending, chrome-key composition, palette color, etc. *Specifications of the "Graphics Controller" Controller" For hardware specifications of the "Graphics Controller" and programming, refer to the following documents. - Graphics Controller Specifications - Application Note These documents are prepared for every "Graphics Controller". Each "Graphics Controller" and document names are described in the table 1. Table 1. List of documents List Graphics Controller Document title MB86290A MB86290A MB86290A MB86290A Graphics Controller Hardware Specifications Cremson Application Note MB86291/86291S MB86291/86291S MB86291 MB86291 Graphics Controller Specifications MB86291 MB86291 Application Note I2C Interface Specification MB86291A MB86291A MB86291A MB86291A Graphics Controller Specifications MB86291 MB86291 Application Note MB86292/86292S MB86292/86292S MB86292 MB86292 Graphics Controller Specifications MB86292 MB86292 Application Note I2C Interface Specification MB86293 MB86293 MB86293 MB86293 Graphics Controller Specifications MB86294/86294S MB86294/86294S MB86294 MB86294 Graphics Controller Specifications I2C Interface Specification A specific "Graphics Controller" group may be shown as follows in this document. MB86291 MB86291 or later : Graphics Controller MB86291/86292 MB86291/86292 : MB86291/86291S/86291A/86292/86292S MB86291/86291S/86291A/86292/86292S Graphics Controller MB86293 MB86293 or later : MB86293/86294/86294S MB86293/86294/86294S Graphics Controller or later MB86290 MB86290 Series Graphics Driver Users Manual Copyright(c)FUJITSU LIMITED 1999-2003 Index 1 MB86290 MB86290 SERIES GRAPHICS DRIVER OVERVIEW . 1 1.1 OVERVIEW . 1 2 OPERATION OF MB86290 MB86290 SERIES GRAPHICS DRIVER . 2 2.1 RENDERING SCHEME . 2 2.2 M ANAGEMENT OF DISPLAY LIST. 3 2.3 TRANSFER OF DISPLAY LIST . 5 2.3.1 Methods of Display List transfer . 5 2.3.2 Trigger of Display List transfer . 5 2.4 SYNC MODE AND ASYNC MODE . 6 2.5 SYSTEM DEPENDENT COMMANDS . 7 3 FOR APPLICATION PROGRAM DEVELOPMENT . 9 3.1 M ANDATORY OPERATIONS. 9 3.1.1 Header files . 9 3.1.2 Gets Display List buffer. 9 3.1.3 Creates system dependent commands . 9 3.2 REMINDER. 10 3.2.1 Prohibition of re-entrant . 10 4 DRIVER COMMANDS . 11 4.1 SYSTEM CONTROL COMMANDS . 12 4.2 DISPLAY COMMANDS . 14 4.3 COLOR CONTROL COMMANDS . 15 4.4 CURSOR CONTROL COMMANDS . 16 4.5 DRAWING FRAME CONTROL COMMANDS . 17 4.6 PRIMITIVE DRAWING CONTROL COMMANDS FOR DEVICE COORDINATES . 18 4.7 PRIMITIVE DRAWING CONTROL COMMANDS FOR OBJECT COORDINATES . 19 4.8 DRAWING ATTRIBUTE CONTROL COMMANDS . 20 4.9 ATTRIBUTE CONTROL COMMANDS FOR OBJECT COORDINATE . 21 4.10 TEXTURE PATTERN M ANAGEMENT COMMANDS . 23 4.11 BINARY PATTERN DRAWING COMMANDS . 24 4.12 BLT COMMANDS. 25 4.13 VIDEO CAPTURE CONTROL COMMANDS . 26 2 4.14 I C CONTROL COMMANDS . 27 5 DATA FORMAT . 28 5.1 DATA TYPE . 28 MB86290 MB86290 Series Graphics Driver Users Manual -i- Copyright(c)FUJITSU LIMITED 1999-2003 5.2 DATA STRUCTURE . 29 5.2.1 GDC_FIXED32 FIXED32 [32 bits fixed point] . 29 5.2.2 GDC_FIXED_SCALE [Capture scale] . 29 5.2.3 GDC_COLOR32 COLOR32 [32 bits color]. 30 5.2.4 GDC_COL32 COL32 [Palette color]. 30 5.2.5 GDC_COL16 COL16 [16 bits color] . 31 5.2.6 GDC_COL8 [8 bits color] . 31 5.2.7 GDC_VERTEX [GDC_SFLOAT format vertex data structure] . 32 6 DRIVER COMMAND REFERENCE . 33 6.1 EXPLANATORY NOTES . 33 6.2 SYSTEM CONTROL COMMANDS . 34 6.2.1 GdcInitialize ["Graphics driver" initialization]. 34 6.2.2 GdcQueryVersion [Version number check] . 35 6.2.3 GdcSetInternalClock [Changes internal clock frequency] . 36 6.2.4 GdcInitDevice [Initializes the "Graphics Controller"] . 37 6.2.5 GdcGeoInitialize [Initialize geometry engine]. 38 6.2.6 GdcFlush [Drawing by Display List (Async)]. 38 6.2.7 GdcVFlush [Vertical blanking interval palling (Async)] . 39 6.2.8 GdcVerticalSync [Adds vertical blanking interval command]. 39 6.2.9 GdcInterrupt [Interrupt request to host CPU] . 40 6.2.10 GdcExecMode [Sets execution mode]. 40 6.2.11 GdcSetDMAMode [Sets DMA mode]. 41 6.2.12 GdcGetFIFOStatus [Gets Display List FIFO status] . 42 6.2.13 GdcGetFIFORemain [Gets number of Display List FIFO open entries] . 42 6.2.14 GdcGetFIFOErrorStatus [Gets Display List FIFO error status] . 43 6.2.15 GdcGetInterruptStatus [Gets interrupt status] . 44 6.2.16 GdcGeoGetInterruptStatus [Gets interrupt status for MB86291 MB86291 or later] . 45 6.2.17 GdcClearInterruptStatus [Clears interrupt status for MB86290A MB86290A]. 46 6.2.18 GdcGeoClearInterruptStatus [Clears interrupt status for MB86291 MB86291 or later]. 47 6.2.19 GdcSetInterruptMask [Sets interrupt mask for MB86290A MB86290A]. 48 6.2.20 GdcGeoSetInterruptMask [Sets interrupt mask for MB86291 MB86291 or later] . 49 6.2.21 GdcGeoGetFIFOStatus [Gets geometry Display List FIFO status] . 50 6.2.22 GdcGeoGetFIFORemain [Gets number of geometry Display List FIFO open entries] . 50 6.2.23 GdcSetMemoryMode [Sets memory interface mode]. 51 6.2.24 GdcSoftwareReset [Resets by software] . 51 6.2.25 GdcGetErrCode [Gets error code] . 52 6.2.26 GdcSetRegisterLocation [Changes address of registers location] . 53 6.2.27 GdcSetBurstMode [Sets burst transfer mode of drawing] . 53 MB86290 MB86290 Series Graphics Driver Users Manual - ii - Copyright(c)FUJITSU LIMITED 1999-2003 6.2.28 GdcQueryChipID [Queries about chip ID]. 54 6.2.29 GdcCancelDisplayList [Cancels Display List] . 54 6.2.30 GdcGetPixelEngineStatus [Gets pixel engine status]. 55 6.2.31 GdcGeoGetPixelEngineStatus [Gets geometry pixel engine status]. 56 6.2.32 GdcGetLocalDisplayListTransferStatus [Gets Local Display List transfer status] . 56 6.3 DISPLAY COMMANDS . 57 6.3.1 GdcDispClock [Sets display clock mode] . 57 6.3.2 GdcDispTiming [Sets display timing parameters] . 57 6.3.3 GdcDispTimingWindow [Sets W-layer display position] . 58 6.3.4 GdcDispDividePos [Sets border position of screen partition] . 58 6.3.5 GdcDispDimension [Sets display frame attribute] . 59 6.3.6 GdcDispOn [Asserts video signal output] . 61 6.3.7 GdcDispOff [Negates video signal output]. 61 6.3.8 GdcDispLayerOn [Asserts screen display] . 62 6.3.9 GdcDispLayerOff [Negates screen display]. 63 6.3.10 GdcDispPos [Sets display start position] . 64 6.3.11 GdcDispDoFlip [Flips display bank] . 65 6.3.12 GdcOverlayPriorityMode [Sets overlay display mode] . 66 6.3.13 GdcOverlayBlend [Sets blend parameter for overlay blend] . 67 6.3.14 GdcDispDisplayMode [Sets display mode]. 68 6.3.15 GdcDispDisplayLayerMode [Sets layer display mode]. 69 6.3.16 GdcDispSetBackColor [Sets background color] . 70 6.3.17 GdcDispSetLayerWindow [Sets position and size of the window mode layer]. 70 6.3.18 GdcLayerOverlayPriorityMode [Sets overlay display mode in every layer]. 71 6.3.19 GdcLayerOverlayBlend [Sets blend mode in every layer] . 72 6.3.20 GdcDispLayerOrder [Sets layer display order] . 74 6.4 COLOR CONTROL COMMANDS . 75 6.4.1 GdcColorPalette [Sets palette colors]. 75 6.4.2 GdcColorTransparent [Sets transparent color] . 76 6.4.3 GdcColorZeroMode [Sets color code 0 mode] . 77 6.4.4 GdcChromaKeyMode [Sets Chroma-key mode] . 78 6.4.5 GdcColorKey [Sets key color for Chroma-key] . 78 6.4.6 GdcColorPaletteOffset [Sets of the color palette offset] . 79 6.5 CURSOR CONTROL COMMANDS . 81 6.5.1 GdcCursorAddress [Sets cursor pattern memory address]. 81 6.5.2 GdcCursorPattern [Sets cursor pattern] . 81 6.5.3 GdcCursorDisplay [Controls cursor display] . 82 6.5.4 GdcCursorPos [Sets cursor display position] . 82 6.5.5 GdcCursorPriority [Sets cursor display priority mode] . 83 MB86290 MB86290 Series Graphics Driver Users Manual - iii - Copyright(c)FUJITSU LIMITED 1999-2003 6.5.6 GdcCursorColorTransparent [Sets cursor transparent color] . 83 6.5.7 GdcCursorColorZeroMode [Sets cursor color code 0 mode] . 84 6.6 DRAWING FRAME CONTROL COMMANDS . 85 6.6.1 GdcDrawDimension [Sets drawing frame]. 85 6.6.2 GdcSetZPrecision [Sets precision of Z value] . 85 6.6.3 GdcBufferCreateZ [Sets Z buffer base address] . 86 6.6.4 GdcBufferCreateC [Sets base address of polygon drawing flag buffer]. 86 6.6.5 GdcBufferClearZ [Clears Z buffer] . 86 6.6.6 GdcBufferClearC [Clears polygon drawing flag buffer]. 87 6.6.7 GdcDrawClipFrame [Sets drawing clip border]. 87 6.6.8 GdcSetAlphaMapBase [Sets base address of alpha map area] . 88 6.7 PRIMITIVE DRAWING COMMANDS FOR DEVICE COORDINATES. 89 6.7.1 GdcPrimType [Starts drawing procedure]. 89 6.7.2 GdcPrimEnd [Completes drawing procedure] . 89 6.7.3 GdcTexCoord2D / 2Df / 2DNf [Sets coordinates of 2D texture] . 90 6.7.4 GdcTexCoord3D / 3Df / 3DNf [Sets coordinates of 3D texture] . 91 6.7.5 GdcDrawVertex2D / 2Di [Sets coordinates of 2D vertex] . 92 6.7.6 GdcDrawVertex3D / 3Df [Sets coordinates of 3D vertex]. 93 6.7.7 GdcDrawPrimitive [Draws multiple 3D triangles] . 94 6.8 PRIMITIVE DRAWING CONTROL COMMANDS FOR OBJECT COORDINATES . 95 6.8.1 GdcGeoPrimType [Starts drawing procedure]. 95 6.8.2 GdcGeoPrimEnd [Completes drawing procedure]. 95 6.8.3 GdcGeoDrawVertex2D / 2Df / 2Di [Sets XY coordinates of vertex ] . 96 6.8.4 GdcGeoDrawVertex3D / 3Df / 3Di [Sets XYZ coordinates of vertex] . 97 6.8.5 GdcGeoTexCoord2DN / 2DNf [Sets texture coordinates] . 98 6.8.6 GdcVertexColor3f / 32 [Sets color of vertex] . 99 6.9 DRAWING ATTRIBUTE CONTROL COMMANDS . 100 6.9.1 GdcColor [Sets vertex color/foreground color]. 100 6.9.2 GdcBackColor [Sets background color]. 101 6.9.3 GdcClipMode [Sets clipping mode]. 101 6.9.4 GdcSetAttrLine [Sets line drawing attribute] . 102 6.9.5 GdcSetAttrSurf [Sets surface drawing attribute] . 106 6.9.6 GdcSetAttrTexture [Sets texture mapping attribute] . 110 6.9.7 GdcSetAttrBlt [Sets BitBlt attribute] . 112 6.9.8 GdcSetAlpha [Sets alpha blend ratio]. 113 6.9.9 GdcSetLinePattern [Sets broken line pattern] . 113 6.9.10 GdcSetTextureBorder [Sets texture border color] . 114 6.9.11 GdcSetRop [Sets logical calculation mode]. 115 6.10 ATTRIBUTE CONTROL COMMANDS FOR OBJECT COORDINATES . 117 MB86290 MB86290 Series Graphics Driver Users Manual - iv - Copyright(c)FUJITSU LIMITED 1999-2003 6.10.1 GdcGeoSetAttrMisc [Sets miscellaneous attribute] . 117 6.10.2 GdcGeoSetAttrLine [Sets line drawing attribute for object coordinates] . 119 6.10.3 GdcGeoSetAttrSurf [Sets surface drawing attribute for object coordinates] . 122 6.10.4 GdcGeoLoadMatrix[f] [Sets matrix]. 124 6.10.5 GdcGeoNdcDcViewportCoef[f] [Sets coefficients of NdcDc transformation for XY]. 125 6.10.6 GdcGeoNdcDcDepthCoef[f] [Sets coefficients of NdcDc transformation for Z]. 125 6.10.7 GdcGeoViewVolumeXYClip[f] [Sets view volume boundary for XY] . 126 6.10.8 GdcGeoViewVolumeZClip[f] [Sets view volume boundary for Z] . 126 6.10.9 GdcGeoViewVolumeWminClip[f] [Sets view volume boundary for w] . 127 6.10.10 GdcGeoSetLogOutBase [Sets base address for log output of device coordinates] . 128 6.10.11 GdcGeoSetLogOutMode [Sets log output mode of the device coordinates] . 129 6.10.12 GdcGeoShadowXY [Sets xy offset of shadow] . 130 6.10.13 GdcGeoOverlapZ [Sets Z value of primitives (body / shadow / border / correction in top-left rule non-applicable mode)]. 131 6.10.14 GdcGeoShadowColor [Sets color or shadow]. 132 6.10.15 GdcGeoShadowBackColor [Sets background color of shadow]. 133 6.10.16 GdcGeoBorderColor [Sets color or border]. 134 6.10.17 GdcGeoBorderBackColor [Sets background color of border] . 135 6.11 TEXTURE PATTERN CONTROL COMMANDS . 136 6.11.1 GdcTextureMemoryMode [Sets texture memory mode]. 136 6.11.2 GdcTextureLoadInt [Loads texture/tile pattern to internal texture memory] . 136 6.11.3 GdcTextureLoadExt [Loads texture pattern to the graphics memory] . 137 6.11.4 GdcTextureLoadExt8 [Loads 8bpp texture pattern to the graphics memory]. 137 6.11.5 GdcTextureLoadExt16 [Loads 16bpp texture pattern to the graphics memory]. 138 6.11.6 GdcTextureLoadExt24 [Loads 24bpp texture pattern to the graphics memory]. 138 6.11.7 GdcTextureLoadInt16Fast [Loads texture pattern to internal texture memory]. 139 6.11.8 GdcTextureLoadExt16Fast [Loads texture pattern to the graphics memory]. 139 6.11.9 GdcTextureDimension [Sets texture / tile information] . 140 6.11.10 GdcBltTexture [Loads Blt texture to internal texture memory for MB86290A MB86290A] . 142 6.11.11 GdcGeoBltTexture [Loads Blt texture to internal texture memory for MB86291 MB86291 or later] . 143 6.12 BINARY PATTERN DRAWING COMMANDS . 144 6.12.1 GdcBitPatternDraw [Draws binary pattern]. 144 6.12.2 GdcBitPatternMode [Sets enlarge/shrink mode] . 145 6.13 BLT COMMANDS. 146 6.13.1 GdcBltCopy [Copies BitBlt pattern in current drawing frame]. 146 6.13.2 GdcBltCopyAlt, GdcBltCopyAltSync [Copies BitBlt pattern between any drawing frame] . 147 6.13.3 GdcBltDraw [Draws BitBlt pattern] . 148 6.13.4 GdcBltFill [Fills BitBlt field] . 149 6.13.5 GdcBltColorTransparent [Sets transparent color of transparent BitBlt] . 149 MB86290 MB86290 Series Graphics Driver Users Manual -v- Copyright(c)FUJITSU LIMITED 1999-2003 6.13.6 GdcBltCopyAltAlpha [Copies BitBlt pattern with alpha blending] . 150 6.14 VIDEO CAPTURE COMMANDS . 151 6.14.1 GdcCapSetVideoCaptureMode [Sets mode of video capture] . 151 6.14.2 GdcCapGetErrorStatus [Gets error status of video capture] . 152 6.14.3 GdcCapClearErrorStatus [Clears error status of video capture] . 152 6.14.4 GdcCapSetVideoCaptureBuffer [Sets video capture buffer] . 153 6.14.5 GdcCapSetImageArea [Sets range of image] . 153 6.14.6 GdcCapSetDisplaySize [Sets dimension of captured image for scaling] . 154 6.14.7 GdcCapGetImageAddress [Gets address of captured image] . 154 6.14.8 GdcCapSetWindowMode [Sets W(L1) layer mode] . 155 6.14.9 GdcCapSetVideoCaptureScale [Sets scale of video capture]. 156 6.14.10 GdcCapSetAttrMisc [Sets attribute of video capture]. 157 6.14.11 GdcCapSetInputDataCountNTSC [Sets the video capture buffer for NTSC] . 158 6.14.12 GdcCapSetInputDataCountPAL [Sets the video capture buffer for PAL] . 158 6.14.13 GdcCapSetLPFMode [Sets low pass filter mode] . 159 2 6.15 I C CONTROL COMMANDS . 160 2 6.15.1 GdcI2CGetBusStatus [Gets I C bus status] . 160 2 6.15.2 GdcI2CSetBusControl [Controls I C bus] . 161 2 6.15.3 GdcI2CGetBusControlStatus [Gets I C bus control status] . 162 2 6.15.4 GdcI2CSetClock [Sets I C clock] . 163 2 6.15.5 GdcI2CGetClock [Gets I C clock control status]. 164 6.15.6 GdcI2CSetData [Sets transfer data] . 165 6.15.7 GdcI2CGetData [Gets transfer data] . 165 7 SYSTEM DEPENDENT COMMANDS. 166 7.1 SYSTEM DEPENDENT COMMANDS . 166 8 SYSTEM DEPENDENT COMMANDS INTERFACE . 167 8.1 EXPLANATORY NOTES . 167 8.2 COMMAND INTERFACE . 168 8.2.1 GdcSetDisplayListBuffer [Sets Display List buffer]. 168 8.2.2 GdcFlushDisplayList [Transfers a Display List] . 170 8.2.3 GdcGetHostRegisterAddress [Gets host interface register area address]. 175 8.2.4 GdcGetDispRegisterAddress [Gets display control register area address]. 175 8.2.5 GdcGetDrawRegisterAddress [Gets drawing control register area address] . 175 MB86290 MB86290 Series Graphics Driver Users Manual - vi - Copyright(c)FUJITSU LIMITED 1999-2003 1 MB86290 MB86290 Series Graphics Driver Overview This section describes abstract of the MB86290 MB86290 Series Graphics Driver. 1.1 Overview The MB86290 MB86290 Series Graphics Driver (the "Graphics Driver") is a set of commands to assist graphics application programs utilizing the MB86290 MB86290 Series Graphics Controller (the "Graphics Controller"). Each command to use the "Graphics Driver" from a graphics application program is called driver command. Abstract of the "Graphics Driver" is shown by figure 1.1. By using this Graphics Driver, graphics application programs can be made without concerning the code to access to hardware registers and management of Display List (refer to "2.1 Rendering Scheme"). Graphics Application Program C language interface Initializing command Drawing command etc. Driver command MB86290 MB86290 Series Graphics Driver Display List / Register access MB86290 MB86290 Series Graphics Controller Figure 1.1 Overview of the " Graphics Driver" Driver" MB86290 MB86290 Series Graphics Driver Users Manual 1 Copyright(c)FUJITSU LIMITED 1999-2003 2 Operation of MB86290 MB86290 Series Graphics Driver This section describes rendering scheme by the "Graphics Driver". 2.1 Rendering Scheme Drawing operation of the "Graphics Controller" is started by sending respective command and it's parameters. To draw one object, multiple commands need to be sent. Typically a bunch of commands to be required to draw one object are set together and transferred consecutively in effective ways such as DMA transfer or transfer of Local Display List. This bunch of commands is called Display List. Rendering scheme is shown in the figure 2.1. The drawing function of the "Graphics Driver" once stores the generated Display List in Display List buffer (refer to "2.2 Management of Display List") in order to transmit a Display List collectively by DMA etc (1). Then, transferring to the "Graphics Controller" is started with Display List transferring command (2). Graphics Application Program Call Display List buffer Call Display List (1) Drawing Display List command transfer command MB86290 MB86290 Series Graphics Driver (2) Trigger DMA MB86290 MB86290 Series Graphics Controller Prepared by application designer Figure 2.1 Rendering scheme MB86290 MB86290 Series Graphics Driver Users Manual 2 Copyright(c)FUJITSU LIMITED 1999-2003 2.2 Management of Display List The "Graphics Driver" stores generated Display List to Display List buffer and manages them. The Display List buffer is a certain amount of memory area allocated on either the local memory (the graphics memory) of the "Graphics Controller" or the host CPU memory. Acquisition of this area is done by graphics application program. Created Display List is stored in the Display List buffer till either obvious transfer order of it is made by the application program or no more open space will be available in the Display List buffer. (The trigger timing of Display List transfer is referred to "2.3.2 Trigger of a Display List transfer"). Display List buffer has the method of using the whole as one area, and the method of dividing two and using (refer to figure 2.2). 1 block configuration and 2 blocks configuration are described in the following. (1)1 block configuration In 1 block configuration, the whole Display List buffer is used as one area. If the Display List buffer is configured in 1 block, once the Display List transfer is started, following Display List creation cannot be started until current transfer operation will complete and the buffer will be open. (2)2 blocks configuration In 2 blocks configuration, each block is used alternatively. In 2 blocks configuration, when 1 block is completely full of Display List, transfer is started. But prior to wait this transfer start, following Display List can be stored into the alternative block. The biggest advantage of this 2 blocks configuration is that the host CPU can create a new Display List while the "Graphics Controller" executes rendering operations according to the current Display List. To make this scheme, the Display List needs to be transferred to the "Graphics Controller" via DMA or transfer of Local Display List. MB86290 MB86290 Series Graphics Driver Users Manual 3 Copyright(c)FUJITSU LIMITED 1999-2003 (1 ) 1 b lo ck con fig u ra tion (2 ) 2 b lock s con fig u ra tion M a in m em o ry o r g ra p h ics m e m o ry M a in m em ory or g ra p h ics m em ory D isp la y L is t b u ffer n /2 b y te B lock 1 n b yte D isp la y L is t D isp la y L is t b u ffer b u ffer B lock 1 B lock 2 E x p la n a tory n o te s Tra n sfer to th e "G ra p h ics C on troller" S tore b y th e "G ra p h ics D riv er" F i g u r e 2 . 2 C o n f ig u r a t i o n o f D i s p l a y L i s t b u f f e r MB86290 MB86290 Series Graphics Driver Users Manual 4 n /2 b y te Copyright(c)FUJITSU LIMITED 1999-2003 2.3 Transfer of Display List 2.3.1 Methods of Display List transfer For the Display List transfer, the following three options are available. Depends on the target system configuration, each application designer should choose the most appropriate option: - DMA transfer - Transfer of Local Display List - Display List write by host CPU 2.3.2 Trigger of Display List transfer Display List transfer is started by the following events: - GdcFlush command call - GdcVFlush command call - Not enough space available in the Display List buffer to fill the Display List to be generated at the execution of respective driver command MB86290 MB86290 Series Graphics Driver Users Manual 5 Copyright(c)FUJITSU LIMITED 1999-2003 2.4 Sync Mode and Async Mode The "Graphics Driver" has two operation modes, Sync mode and Async mode. Default mode is async mode. Switching of Sync mode and Async mode is performed by the GdcExecMode command. (1)Async mode In Async mode, each driver command returns back to the application right after it's set of Display List to the Display List buffer. Display List transfer is performed in the condition as described in "2.3.2 Trigger of Display List transfer". In this mode, Display List creation by the "Graphics Driver", Display List transfer to the "Graphics Controller" and rendering, and it's execution work independently. (2)Sync mode In Sync mode, regardless the method of the Display List transfer, each driver command transfers it's generated Display List to the "Graphics Controller" immediately, and returns back to the application after the completion of the "Graphics Controller" rendering operations according to the Display List. This mode is mainly used in the debug of graphics application programs. MB86290 MB86290 Series Graphics Driver Users Manual 6 Copyright(c)FUJITSU LIMITED 1999-2003 2.5 System Dependent Commands The system dependents command is a command to process procedures such as DMA transfer that depends on a target system and a graphics application program in the "Graphics Driver". The relationship between system dependent commands and the "Graphics Driver" is shown in the figure 2.5. The system dependent commands must be designed by each application designer according to the command interface specified by the "Graphics Driver". (the command interface of the system dependent commands is referred to "8. System Dependent Commands Interface".) The following procedures must be implemented in the system depend commands. (1) Acquisition of the mapping address of the "Graphics Controller" register areas Gets the address allocation information of the "Graphics Controller" register areas and feed these information back to the "Graphics Driver" to access to various registers of the "Graphics Controller". (2) Setting of the Display List buffer Informs the address allocation and size of the Display List buffer created by the application program to the "Graphics Driver". (3) Display List transfer Transfers Display List to the "Graphics Controller" according to method of "2.3.1 Methods of Display List transfer." MB86290 MB86290 Series Graphics Driver Users Manual 7 Copyright(c)FUJITSU LIMITED 1999-2003 MB86290 MB86290 Series Graphics Driver Display List buffer Transfer Display List command Initializing command Call Call Address information Graphics Controller mapping Display List Call Address information Display List buffer information DMA transaction Trigger DMA information System dependent commands MB86290 MB86290 Series Graphics Controller Prepared by application designer Driver" Figure 2.5 System dependent commands and relation with the "Graphics Driver" MB86290 MB86290 Series Graphics Driver Users Manual 8 Copyright(c)FUJITSU LIMITED 1999-2003 3 For Application Program Development This section describes mandatory operations and reminders in the application program development utilizing the "Graphics Driver". 3.1 Mandatory Operations 3.1.1 Header files The "Graphics Driver" is prepared the following header files to application designers. Whenever driver command is called, gdc.h must be included. Since the gdctypes.h is already included in the gdc.h, application designers do not need to include it directly. - gdc.h : Declaration of driver command prototype - gdctypes.h : Definition of the data type applied in the "Graphics Driver" 3.1.2 Gets Display List buffer The Display List buffer must be acquired by the application program. The buffer size should be 32byte boundary. When DMA is applied to transfer Display List, the address allocation of the buffer and the block size must be aware. The address allocation and the buffer size should be defined not to conflict any source address restrictions of the DMA controller (if any). When DMA is adopted, always the source address is the top address of each Display List buffer block (if the Display List buffer is configured in 2 blocks, DMA transfer source address of the 1st block is a top address of Display List buffer. And DMA transfer source address of the 2nd block is "top address+1/2 byte count of the total Display List buffer). 3.1.3 Creates system dependent commands The system dependent commands should be designed according to the command interface specified in "8. System Dependent Commands". MB86290 MB86290 Series Graphics Driver Users Manual 9 Copyright(c)FUJITSU LIMITED 1999-2003 3.2 Reminder 3.2.1 Prohibition of re-entrant The "Graphics Driver" is not supported to re-entrant. NOT to call the "Graphics Driver" from multiple tasks. If multiple tasks call the "Graphics Driver" simultaneously, these calling conventions must be managed exclusively, and avoid driver command call from one task before the completion of the driver command operation called by the other task. MB86290 MB86290 Series Graphics Driver Users Manual 10 Copyright(c)FUJITSU LIMITED 1999-2003 4 Driver Commands This section describes each "Graphics Controller" can use any driver commands. Driver commands are shown in the following. - System control commands - Display commands - Color control commands - Cursor control commands - Drawing frame control commands - Primitive drawing control commands for device coordinates - Primitive drawing control commands for object coordinates - Drawing attribute control commands - Attribute control commands for object coordinates - Texture pattern management commands - Binary pattern drawing commands - Blt commands - Video capture control commands - I2C control commands MB86290 MB86290 Series Graphics Driver Users Manual 11 Copyright(c)FUJITSU LIMITED 1999-2003 4.1 System Control Commands System control commands list is shown in the table 4.1. Table 4.1 System control commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcInitialize "Graphics Driver" initialization Y Y Y 2 GdcQueryVersion Version number check of the Y Y Y "Graphics Driver" 3 GdcSetInternalClock Changes internal clock frequency N N Y 4 GdcInitDevice Initializes the "Graphics Controller" Y Y Y 5 GdcGeoInitialize Initialize geometry engine N Y Y 6 GdcFlush Drawing by Display List (Async) Y Y Y 7 GdcVFlush Vertical blanking interval palling Y Y Y Y Y Y (Async) 8 GdcVerticalSync Adds vertical blanking interval command 9 GdcInterrupt Interrupts request to host CPU Y Y Y 10 GdcExecMode Sets execution mode of Display List Y Y Y operation 11 GdcSetDMAMode Sets DMA mode Y Y Y 12 GdcGetFIFOStatus Gets Display List FIFO status Y Y Y 13 GdcGetFIFORemain Gets number of Display List FIFO Y Y Y open entries 14 GdcGetFIFOErrorStatus Gets Display List FIFO error status Y Y Y 15 GdcGetInterruptStatus Gets interrupt status Y N N 16 GdcGeoGetInterruptStatus Gets interrupt status N Y Y 17 GdcClearInterruptStatus Clears interrupt status for Y N N MB86290A MB86290A (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 12 Copyright(c)FUJITSU LIMITED 1999-2003 No. Command name Function Graphics Controller (*1) 290A GdcGeoClearInterruptStatus Clears interrupt status 293/ 292 18 291/ 294 N Y Y Y N N N Y Y N Y Y N Y Y Y Y Y for MB86291 MB86291 or later 19 GdcSetInterruptMask Sets interrupt mask for MB86290A MB86290A 20 GdcGeoSetInterruptMask Sets interrupt mask for MB86291 MB86291 or later 21 GdcGeoGetFIFOStatus Gets geometry Display List FIFO status 22 GdcGeoGetFIFORemain Gets number of geometry Display List FIFO open entries 23 GdcSetMemoryMode Sets memory interface mode 24 GdcSoftwareReset Resets by software Y Y Y 25 GdcGetErrCode Gets error code Y Y Y 26 GdcSetRegisterLocation Changes address of N N Y N N Y registers location 27 GdcSetBurstMode Sets burst transfer mode of drawing 28 GdcQueryChipID Queries about chip ID N N Y 29 GdcCancelDisplayList Cancels Display List Y Y Y 30 GdcGetPixelEngineStatus Gets pixel engine status Y N N 31 GdcGeoGetPixelEngineStatus Gets geometry pixel N Y Y Y Y Y engine status 32 GdcGetLocalDisplayListTransferStatus Gets transfer of Local Display List status (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 13 Copyright(c)FUJITSU LIMITED 1999-2003 4.2 Display Commands Display commands list is shown in the table 4.2. Table 4.2 Display commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcDispClock Sets display clock mode Y Y Y 2 GdcDispTiming Sets display timing parameters Y Y Y 3 GdcDispTimingWindow Sets W-layer display position Y Y Y 4 GdcDispDividePos Sets border position of screen Y Y Y partition 5 GdcDispDimension Sets display frame attribute Y Y Y 6 GdcDispOn Asserts video signal output Y Y Y 7 GdcDispOff Negates video signal output Y Y Y 8 GdcDispLayerOn Asserts screen display Y Y Y 9 GdcDispLayerOff Negates screen display Y Y Y 10 GdcDispPos Sets display start position Y Y Y 11 GdcDispDoFlip Flips display bank Y Y Y 12 GdcOverlayPriorityMode Sets overlay display mode Y Y Y 13 GdcOverlayBlend Sets blend parameter for overlay Y Y Y blend 14 GdcDispDisplayMode Sets display mode N N Y 15 GdcDispDisplayLayerMode Sets layer display mode N N Y 16 GdcDispSetBackColor Sets background color N N Y 17 GdcDispSetLayerWindow Sets position and size of the N N Y N N Y window mode layer 18 GdcLayerOverlayPriorityMode Sets overlay display mode in every layer 19 GdcLayerOverlayBlend Sets blend mode in every layer N N Y 20 GdcDisplLayerOrder Sets layer display order N N Y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 14 Copyright(c)FUJITSU LIMITED 1999-2003 4.3 Color Control Commands Color control commands list is shown in the table 4.3. Table 4.3 Color control commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcColorPalette Sets palette colors Y Y Y 2 GdcColorTransparent Sets transparent color Y Y Y 3 GdcColorZeroMode Sets color code 0 mode Y Y Y 4 GdcChromaKeyMode Sets Chroma-key mode Y Y Y 5 GdcColorKey Sets key color for Chroma-key Y Y Y 6 GdcColorPaletteOffset Sets of the color palette offset N N Y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 15 Copyright(c)FUJITSU LIMITED 1999-2003 4.4 Cursor Control Commands Cursor control commands list is shown in the table 4.4. Table 4.4 Cursor control commands list No. Command name Function Graphics Controller (*1) 290A GdcCursorAddress Sets cursor pattern memory 293/ 292 1 291/ 294 Y Y Y address 2 GdcCursorPattern Sets cursor pattern Y Y Y 3 GdcCursorDisplay Controls cursor display Y Y Y 4 GdcCursorPos Sets cursor display position Y Y Y 5 GdcCursorPriority Sets cursor display priority mode Y Y Y 6 GdcCursorColorTransparent Sets cursor transparent color Y Y Y 7 GdcCursorColorZeroMode Sets cursor color code 0 mode Y Y Y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 16 Copyright(c)FUJITSU LIMITED 1999-2003 4.5 Drawing Frame Control Commands Drawing frame control commands list is shown in the table 4.5. Table 4.5 Drawing frame control commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcDrawDimension Sets drawing frame Y Y Y 2 GdcSetZPrecision Sets precision of Z value N N Y 3 GdcBufferCreateZ Sets Z buffer start address Y Y Y 4 GdcBufferCreateC Sets start address of polygon drawing Y Y Y flag buffer 5 GdcBufferClearZ Clears Z buffer Y Y Y 6 GdcBufferClearC Clears polygon drawing flag buffer Y Y Y 7 GdcDrawClipFrame Sets drawing clip border Y Y Y 8 GdcSetAlphaMapBase Sets alpha map area start address N N Y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 17 Copyright(c)FUJITSU LIMITED 1999-2003 4.6 Primitive Drawing Control Commands for Device Coordinates Primitive drawing control commands for device coordinates list is shown in the table 4.6. coordinates Table 4.6 Primitive drawing control commands for device coordinates list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcPrimType Sets drawing procedure Y Y Y 2 GdcPrimEnd Completes drawing procedure Y Y Y 3 GdcTexCoord2D Sets coordinates of 2D texture Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y (GDC_FIXED32 FIXED32 type) 4 GdcTexCoord2Df Sets coordinates of 2D texture (GDC_SFLOAT type) 5 GdcTexCoord2DNf Sets normalized coordinates of 2D texture (GDC_SFLOAT type) 6 GdcTexCoord3D Sets coordinates of 3D texture (GDC_FIXED32 FIXED32 type) 7 GdcTexCoord3Df Sets coordinates of 3D texture (GDC_SFLOAT type) 8 GdcTexCoord3DNf Sets normalized coordinates of 3D texture (GDC_SFLOAT type) 9 GdcDrawVertex2D Sets coordinates of 2D vertex (GDC_FIXED32 FIXED32 type) 10 GdcDrawVertex2Di Sets coordinates of 2D vertex (GDC_LONG type) 11 GdcDrawVertex3D Sets coordinates of 3D vertex (GDC_FIXED32 FIXED32 type) 12 GdcDrawVertex3Df Sets coordinates of 3D vertex (GDC_SFLOAT type) 13 GdcDrawPrimitive Draws multiple 3D triangles (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 18 Copyright(c)FUJITSU LIMITED 1999-2003 4.7 Primitive Drawing Control Commands for Object Coordinates Primitive drawing control commands for object coordinates list is shown in the table 4.7. Table 4.7 Primitive drawing control commands for object coordinates list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcGeoPrimType Sets drawing procedure N Y Y 2 GdcGeoPrimEnd Completes drawing procedure N Y Y 3 GdcGeoDrawVertex2D Sets XY coordinates of vertex N Y Y N Y Y N Y Y N Y Y N Y Y N Y Y N Y Y N Y Y N Y Y N Y Y (GDC_FIXED32 FIXED32 type) 4 GdcGeoDrawVertex2Df Sets XY coordinates of vertex (GDC_SFLOAT type) 5 GdcGeoDrawVertex2Di Sets XY coordinates of vertex (GDC_LONG type) 6 GdcGeoDrawVertex3D Sets XYZ coordinates of vertex (GDC_FIXED32 FIXED32 type) 7 GdcGeoDrawVertex3Df Sets XYZ coordinates of vertex (GDC_SFLOAT type) 8 GdcGeoDrawVertex3Di Sets XYZ coordinates of vertex (GDC_LONG type) 9 GdcGeoTexCoord2DN Sets texture coordinates (GDC_FIXED32 FIXED32 type) 10 GdcGeoTexCoord2DNf Sets texture coordinates (GDC_SFLOAT type) 11 GdcVertexColor3f Sets color of vertex (GDC_SFLOAT type) 12 GdcVertexColor32 Sets color of vertex (GDC_COLOR32 COLOR32 type) (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 19 Copyright(c)FUJITSU LIMITED 1999-2003 4.8 Drawing Attribute Control Commands Drawing attribute control commands list is shown in the table 4.8. Table 4.8 Drawing attribute control commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcColor Sets vertex color/foreground color Y Y Y 2 GdcBackColor Sets background color Y Y Y 3 GdcClipMode Sets clipping mode Y Y Y 4 GdcSetAttrLine Sets line drawing attribute Y Y Y 5 GdcSetAttrSurf Sets surface drawing attribute Y Y Y 6 GdcSetAttrTexture Sets texture mapping attribute Y Y Y 7 GdcSetAttrBlt Sets BitBlt attribute Y Y Y 8 GdcSetAlpha Sets alpha blend ratio Y Y Y 9 GdcSetLinePattern Sets broken line pattern Y Y Y 10 GdcSetTextureBorder Sets texture border color Y Y Y 11 GdcSetRop Sets logical calculation mode Y Y Y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 20 Copyright(c)FUJITSU LIMITED 1999-2003 4.9 Attribute Control Commands for Object Coordinate Attribute control commands for object coordinate list is shown in the table 4.9. Table 4.9 Attribute control commands for object coordinate list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcGeoSetAttrMisc Sets miscellaneous attribute N Y Y 2 GdcGeoSetAttrLine Sets line drawing attribute for N Y Y N Y Y N Y Y object coordinates 3 GdcGeoSetAttrSurf Sets surface drawing attribute for object coordinates 4 GdcGeoLoadMatrix Sets matrix (GDC_FIXED32 FIXED32 type) 5 GdcGeoLoadMatrixf Sets matrix (GDC_SFLOAT type) N Y Y 6 GdcGeoNdcDcViewportCoef Sets coefficients of NdcDc N Y Y N Y Y N Y Y N Y Y N Y Y N Y Y N Y Y transformation for xy (GDC_FIXED32 FIXED32 type) 7 GdcGeoNdcDcViewportCoeff Sets coefficients of NdcDc transformation for xy (GDC_SFLOAT type) 8 GdcGeoNdcDcDepthCoef Sets coefficients of NdcDc transformation for z (GDC_FIXED32 FIXED32 type) 9 GdcGeoNdcDcDepthCoeff Sets coefficients of NdcDc transformation for z (GDC_SFLOAT type) 10 GdcGeoViewVolumeXYClip Sets view volume boundary for xy (GDC_FIXED32 FIXED32 type) 11 GdcGeoViewVolumeXYClipf Sets view volume boundary for xy (GDC_SFLOAT type) 12 GdcGeoViewVolumeZClip Sets view volume boundary for z (GDC_FIXED32 FIXED32 type) (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 21 Copyright(c)FUJITSU LIMITED 1999-2003 No. Command name Function Graphics Controller (*1) 290A GdcGeoViewVolumeZClipf Sets view volume boundary for z 293/ 292 13 291/ 294 N Y Y N Y Y N Y Y N N Y N N Y (GDC_SFLOAT type) 14 GdcGeoViewVolumeWminClip Sets view volume boundary for w (GDC_FIXED32 FIXED32 type) 15 GdcGeoViewVolumeWminClipf Sets view volume boundary for w (GDC_SFLOAT type) 16 GdcGeoSetLogOutBase Sets top address for log output of device coordinate 17 GdcGeoSetLogOutMode Sets log output mode of the device coordinate 18 GdcGeoShadowXY Sets xy offset of shadow N N Y 19 GdcGeoOverlapZ Sets Z value of primitives (body / N N Y shadow / border / correction in top-left rule non-applicable mode) 20 GdcGeoShadowColor Sets color of shadow N N Y 21 GdcGeoShadowBackColor Sets background color of shadow N N Y 22 GdcGeoBorderColor Sets color of border N N Y 23 GdcGeoBorderBackColor Sets background color of border N N Y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 22 Copyright(c)FUJITSU LIMITED 1999-2003 4.10 Texture Pattern Management Commands Texture pattern management commands list is shown in the table 4.10. Table 4.10 Texture pattern management commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcTextureMemoryMode Sets texture memory mode Y Y Y 2 GdcTextureLoadInt Loads texture/tile pattern to internal Y Y Y Y Y Y N N Y Y Y Y N N Y N N Y N N Y texture memory 3 GdcTextureLoadExt Loads texture pattern to the graphics memory 4 GdcTextureLoadExt8 Loads 8bpp texture pattern to the graphics memory 5 GdcTextureLoadExt16 Loads 16bpp texture pattern to the graphics memory 6 GdcTextureLoadExt24 Loads 24bpp texture pattern to the graphics memory 7 GdcTextureLoadInt16Fast Loads 16bpp texture pattern to internal texture memory 8 GdcTextureLoadExt16Fast Loads 16bpp texture pattern to the graphics memory 9 GdcTextureDimension Sets texture information Y Y Y 10 GdcBltTexture Loads Blt texture to internal texture Y N N N Y Y memory for MB86290A MB86290A 11 GdcGeoBltTexture Loads Blt texture to internal texture memory for MB86291 MB86291 (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 23 Copyright(c)FUJITSU LIMITED 1999-2003 4.11 Binary Pattern Drawing Commands Binary pattern drawing commands list is shown in the table 4.11. Table 4.11 Binary pattern drawing commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcBitPatternDraw Draws binary pattern Y Y Y 2 GdcBitPatternMode Sets enlarge/shrink mode Y Y Y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 24 Copyright(c)FUJITSU LIMITED 1999-2003 4.12 BLT Commands Blt commands list is shown in the table 4.12. Table 4.12 Blt commands list No. Command name Function Graphics Controller (*1) 290A GdcBltCopy Copies BitBlt pattern within current 293/ 292 1 291/ 294 Y Y Y Y Y Y Y Y Y drawing frame 2 GdcBltCopyAlt Copies BitBlt pattern between any drawing frame (Async) 3 GdcBltCopyAltSync Copies BitBlt pattern between any drawing frame (Sync) 4 GdcBltDraw Draws BitBlt pattern Y Y Y 5 GdcBltFill Fills BitBlt field Y Y Y 6 GdcBltColorTransparent Sets transparent color of transparent N Y Y N N Y BitBlt 7 GdcBltCopyAltAlpha Copies BitBlt pattern with alpha blending (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 25 Copyright(c)FUJITSU LIMITED 1999-2003 4.13 Video Capture Control Commands Video capture control commands list is shown in the table 4.13. Table 4.13 Video capture control commands list No. Command name Graphics Controller (*1) Function 290A 291/ 293/ 292 294 1 GdcCapSetVideoCaptureMode Sets mode of video capture N Y Y 2 GdcCapGetErrorStatus Gets error status of video N Y Y N Y Y capture 3 GdcCapClearErrorStatus Clears error status of video capture 4 GdcCapSetVideoCaptureBuffer Sets video capture buffer N Y Y 5 GdcCapSetImageArea Sets range of image N Y Y 6 GdcCapSetDisplaySize Sets dimension of captured N N Y(*2) N N Y(*2) image for scaling 7 GdcCapGetImageAddress Gets address of captured image 8 GdcCapSetWindowMode Sets W(L1) layer mode N Y Y 9 GdcCapSetVideoCaptureScale Sets scale of video capture N Y Y(*3) 10 GdcCapSetAttrMisc Sets attribute of video capture N Y Y 11 GdcCapSetInputDataCountNTSC Sets number of video capture N Y Y N Y Y N Y Y data for NTSC 12 GdcCapSetInputDataCountPAL Sets number of video capture data for PAL 13 GdcCapSetLPFMode Sets low pass filter mode (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S (*2)MB86294 MB86294 can be used (MB86293 MB86293 can not be used) (*3)MB86293 MB86293 can be used (MB86294 MB86294 can not be used) Y : can be used N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 26 Copyright(c)FUJITSU LIMITED 1999-2003 4.14 I2C Control Commands I2C control commands list is shown in the table 4.14. Table 4.14 I2C control commands list No. Command name Function Graphics Controller (*1) 290A 291/ 293/ 292 294 1 GdcI2CGetBusStatus Gets I2C bus status N y y 2 GdcI2CSetBusControl Controls I2C bus N y y 3 GdcI2CGetBusControlStatus Gets I2C bus control status N y y 4 GdcI2CSetClock Sets I2C clock N y y 5 GdcI2CGetClock N y y 6 GdcI2CSetData Sets transfer data N y y 7 GdcI2CGetData Gets transfer data N y y (*1)290A:MB86290A MB86290A, 291/292:MB86291/86291A/86291S/86292/86292S MB86291/86291A/86291S/86292/86292S, 293/294:MB86293/86294/86294S MB86293/86294/86294S y : These commands can be used only following Graphics Controllers. MB86291S MB86291S,MB86292S MB86292S, or MB86294S MB86294S or later which supported video capture function. N : can not be used MB86290 MB86290 Series Graphics Driver Users Manual 27 Copyright(c)FUJITSU LIMITED 1999-2003 5 Data Format This section describes the data types and data structures specified by "Graphics Driver". 5.1 Data Type Data types to define in the "Graphics Driver" is shown in the table 5.1. Table 5.1 Data type list Format GDC_FIXED32 FIXED32 Description 32 bits signed fixed point (1 bits sign,15 bits integer and 16 bits fraction) GDC_FIXED_SCALE 16 bits unsigned fixed point for Capture Scale (5 bits integer and 11 bits fraction) GDC_SFLOAT 32 bits single precision float (IEEE754 IEEE754 compliant) GDC_ULONG 32 bits unsigned integer GDC_LONG 32 bits signed integer GDC_USHORT 16 bits unsigned integer GDC_SHORT 16 bits signed integer GDC_UCHAR 8 bits signed integer GDC_COLOR32 COLOR32 32 bits unsigned integer (32 bits color format) GDC_COL32 COL32 32 bits unsigned integer (palette color format) GDC_COL16 COL16 16 bits unsigned integer (16 bits color format) GDC_COL8 8 bits unsigned integer (8 bits color format) GDC_LPPCOL32 LPPCOL32 Pointer for GDC_COL32 COL32 format data GDC_LPCOL24 LPCOL24 Pointer for GDC_COLOR32 COLOR32 format data GDC_LPCOL16 LPCOL16 Pointer for GDC_COL16 COL16 format data GDC_LPCOL8 Pointer for GDC_COL8 format data GDC_LPLONG Pointer for GDC_LONG format data GDC_LPBINIMAGE Pointer for 32 bits unsigned integer data (binary pattern data) GDC_VERTEX GDC_SFLOAT format vertex data structure GDC_BOOL True/false(value of GDC_TRUE / GDC_FALSE) [Note] It is not used as a type of the return value of the driver command MB86290 MB86290 Series Graphics Driver Users Manual 28 Copyright(c)FUJITSU LIMITED 1999-2003 5.2 Data Structure Data structures at to define in the "Graphics Driver" is shown in the following. 5.2.1 GDC_FIXED32 FIXED32 [32 bits fixed point] A fixed point data with sign described in sign 1 bit, integer 15 bits, and fraction 16 bits. 31 30 16 S 15 0 I F S: Sign (1 bit) 0:Positive number or zero 1:Negative number I: Integer (15 bits) F: Fraction (16 bits) Figure 5.2.1 GDC_FIXED32 FIXED32 format 5.2.2 GDC_FIXED_SCALE [Capture scale] A capture scale data described in integer 5 bits, fraction 11 bits. It used by the GdcCapSetVideoCaptureScale command. 15 14 13 12 11 10 9 8 I 7 6 5 F I: Integer (5 bits) F: Fraction (11 bits) Figure 5.2.2 GDC_FIXED_SCALE format MB86290 MB86290 Series Graphics Driver Users Manual 29 4 3 2 1 0 Copyright(c)FUJITSU LIMITED 1999-2003 5.2.3 GDC_COLOR32 COLOR32 [32 bits color] A color data described in 8 bits per R, G and B respectively. It used by the GdcVertexColor32 command. 31 30 29 28 27 26 25 24 23 22 21 20 A 15 14 13 12 19 18 17 16 3 2 1 0 R 11 10 9 8 7 6 5 4 G B A:Alpha bit (8 bits) Sets blend ratio of vertex R,G,B: Color bit (8 bits) Figure 5.2.3 GDC_COLOR32 COLOR32 format 5.2.4 GDC_COL32 COL32 [Palette color] A color data described in 6 bits per R, G and B respectively. For C layer palette, bit 31 is an alpha bit. 31 30 29 28 27 26 25 24 A 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 0 0 G 23 22 21 7 6 5 When blend mode is available, sets mode of blend 0:Blending 1:Not blending R,G,B: Color bit (6 bits) Figure 5.2.4 GDC_COL32 COL32 format 30 19 18 4 B 3 2 17 16 0 R A:Alpha bit (1 bit) MB86290 MB86290 Series Graphics Driver Users Manual 20 0 1 0 0 0 Copyright(c)FUJITSU LIMITED 1999-2003 5.2.5 GDC_COL16 COL16 [16 bits color] A color data described in 5 bits per R, B and G respectively. When this color data format is applied to texture, bit 15 is used as an alpha bit. 15 14 A 13 12 11 10 9 8 7 R 6 5 4 3 G B A:Alpha bit (1 bit) When blend mode is available, sets mode of blend or stencil processing 0:Blending or stencil processing 1:Not blending or stencil processing R,G,B: Color bit (5 bits) Figure 5.2.5 GDC_COL16 COL16 format 5.2.6 GDC_COL8 [8 bits color] A index code to refer to color palette in 8 bits. 7 6 5 4 3 2 1 Index code 5.2.6 Figure 5.2.6 GDC_COL8 format MB86290 MB86290 Series Graphics Driver Users Manual 31 2 0 1 0 Copyright(c)FUJITSU LIMITED 1999-2003 5.2.7 GDC_VERTEX [GDC_SFLOAT format vertex data structure] GDC_VERTEX structure is shown in the table 5.2.7. A structure data is packed in vertex coordinates, texture coordinates and RGB value. It used by the GdcDrawPrimitive command. Table 5.2.7 GDC_VERTEX structure 5.2.7 Type Parameter Description GDC_SFLOAT x x coordinates of vertex (for device coordinates) GDC_SFLOAT y y coordinates of vertex (for device coordinates) GDC_SFLOAT z z coordinates of vertex (for device coordinates) GDC_SFLOAT r r value of vertex color GDC_SFLOAT g g value of vertex color GDC_SFLOAT b b value of vertex color GDC_SFLOAT u u texture coordinates of vertex GDC_SFLOAT v v texture coordinates of vertex GDC_SFLOAT rw Reciprocal w texture coordinates of vertex long work Reserved MB86290 MB86290 Series Graphics Driver Users Manual 32 Copyright(c)FUJITSU LIMITED 1999-2003 6 Driver Command Reference This section describes calling conventions interface and processing contents of driver commands. 6.1 Explanatory notes Each item of a driver command reference is described as below. Format Prototype declaration of a command. Parameter Description of a parameter. The "default" in explanation expresses the value set up at the initialization of the "Graphics Driver". Return value The return values and the description of them. Error code The error code and a name of an error when a command ends abnormally. When the command ends normally, the error code is not set. In this case the error code just before is held. The error code is got by the GdcGetErrCode command. This item is omitted if the command has no return values. In some commands errors don't occur even if the commands have the return values. (At the present function, the command has no unusual end.) Description Description of the command. MB86290 MB86290 Series Graphics Driver Users Manual 33 Copyright(c)FUJITSU LIMITED 1999-2003 6.2 System Control Commands 6.2.1 GdcInitialize ["Graphics driver" initialization] Format int GdcInitialize(int gdc_type) Parameter gdc_type A type of the "Graphics Controller" GDC_TYPE_MB86290A MB86290A GDC_TYPE_MB86291 MB86291 GDC_TYPE_MB86291A MB86291A GDC_TYPE_MB86292 MB86292 GDC_TYPE_MB86293 MB86293 GDC_TYPE_MB86294 MB86294 Return value Complete GDC_FALSE Error code GDC_TRUE In case of using MB86290A MB86290A In case of using MB86291/86291S MB86291/86291S In case of using MB86291A MB86291A In case of using MB86292/86292S MB86292/86292S In case of using MB86293 MB86293 In case of using MB86294/86294S MB86294/86294S Incomplete - GDC_ERR_DL_BUF_ALLOC (Failure of Display List buffer acquisition) - GDC_ERR_DL_SIZE (Incorrect buffer size) - GDC_ERR_DL_NUM (Not appropriate block count) Description Initialize the "Graphics Driver". This command precedes all driver commands, and call only once. If this command is called, the following system dependent commands will be called inside. - GdcSetDisplayListBuffer command - GdcGetHostRegisterAddress command - GdcGetDispRegisterAddress command - GdcGetDrawRegisterAddress command For details about initialization processing of the "Graphics Driver", refer to "initialize.c" file in sample directory. This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 34 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.2 GdcQueryVersion [Version number check] Format void GdcQueryVersion (int *version, int *level) Parameter version Pointer to store version number level Pointer to store level number Return value None Description Indicates current version and level number of the "Graphics Driver". Version number and level number are numerical value. For example, when the version number is 1, and the level number is 10, the following numbers are stored in each parameter. *version = 1 *level = 10 This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 35 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.3 GdcSetInternalClock [Changes internal clock frequency] Format void GdcSetInternalClock(GDC_ULONG geo_clock, GDC_ULONG other_clock) Parameter geo_clock Clock frequency for geometry engine GDC_CLOCK_166MHZ 166MHZ GDC_CLOCK_133MHZ 133MHZ 133MHz GDC_CLOCK_100MHZ 100MHZ other_clock 166MHz 100MHz Clock frequency for besides geometry engine GDC_CLOCK_133MHZ 133MHZ 133MHz GDC_CLOCK_100MHZ 100MHZ 100MHz Return value None Description Sets internal clock frequency. The combination of parameters are shown in the table 6.2.3. Table 6.2.3 Internal clock frequency combinations geo_clock 166MHz 100MHz 133MHz OK OK NG 100MHz other_clock 133MHz OK OK OK OK:Possible NG:Impossible (not supported) Be sure to execute this command just after initialization by the GdcInitialize command of the "Graphics Driver". In order to steady status of the "Graphics Controller", 200 microsecond intervals are necessary after setting internal clock frequency before executing the following procedures. This command is for MB86293 MB86293 or later. MB86290 MB86290 Series Graphics Driver Users Manual 36 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.4 GdcInitDevice [Initializes the "Graphics Controller"] Format int Parameter None Return value GDC_TRUE Complete GDC_FALSE Incomplete Description GdcInitDevice (void) Initializes each register of the "Graphics Controller". Be sure to execute this command once before calling other driver commands. However, be sure to execute the following commands before calling the GdcInitDevice command. - GdcInitialize command - GdcSetInternalClock command - GdcSoftwareReset command - GdcSetRegisterLocation command - GdcSetMemoryMode command - GdcSetBurstMode command This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 37 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.5 GdcGeoInitialize [Initialize geometry engine] Format int GdcGeoInitialize(void) Parameter None Return value GDC_TRUE Complete GDC_FALSE Incomplete Error code GDC_ERR_NOT_READY ("Graphics Driver" is not initialized) Description Initializes internal resources in the geometric engine. When using drawing commands for object coordinates, be sure to call this command after initializing the "Graphics Driver". However, be sure to execute the following commands before calling the GdcGeoInitialize command. - GdcInitialize command - GdcSetInternalClock command - GdcSoftwareReset command - GdcSetRegisterLocation command - GdcSetMemoryMode command - GdcSetBurstMode command - GdcInitDevice command This command is for MB86291 MB86291 or later. 6.2.6 GdcFlush [Drawing by Display List (Async)] Format GDC_ULONG GdcFlush(void) Parameter None Return value The transmitted number of byte Description Transfers a Display List in the Display List buffer to the "Graphics Controller". If DMA is applied, this command is completed without waiting for the end of the list transfer. If CPU writes the Display List to the "Graphics Controller", this command is completed after the end of the list transfer. The transmitted number of byte is set to return value. This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 38 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.7 GdcVFlush [Vertical blanking interval palling (Async)] Format GDC_ULONG GdcVFlush(void) Parameter None Return value The transmitted number of byte Description Transfers a Display List after attaching a command for waiting Sync command (*1) to the end of it. When the Sync command is executed, the "Graphics Controller" synchronize the next operation with the vertical blanking interval. By means of this function, disorder of display caused by flipping can be avoided when flipping of drawing frame (the GdcDispDoFlip command). Similar to the GdcFlush command, this command does not wait for the completion of MB86290 MB86290 Series' all Display List operations. Therefore, the completion of the Sync command is not guaranteed after returning from this command. In order to detect the completion of the Sync command, use an interrupt for termination of drawing and so on. The interrupt can be issued by executing GdcInterrupt before this GdcVFlush command. The transmitted number of byte is set to return value. This command can be used by all "Graphics Controller". (*1) Sync command: It waits for drawing processing of the "Graphics Controller" until a vertical blanking interval period comes. Note This command dose not guarantee the punctual synchronous ness with the vertical blanking interval. In order to detect the punctual vertical blanking interval, use VSYNC interrupt. 6.2.8 GdcVerticalSync [Adds vertical blanking interval command] Format int GdcVerticalSync(void) Parameter None Return value GDC_TRUE Complete GDC_FALSE Incomplete Error code GDC_ERR_NOT_READY ("Graphics Driver" is not initialized) Description Attaches a command for waiting VSYNC (Sync command ) to the end of a Display List. Transmission of a Display List is not performed. This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 39 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.9 GdcInterrupt [Interrupt request to host CPU] Format int GdcInterrupt(void) Parameter None Return value GDC_TRUE Complete GDC_FALSE Incomplete Error code GDC_ERR_NOT_READY ("Graphics Driver" is not initialized) Description Generates an interrupt request. When the "Graphics Driver" works in sync mode, an interrupt request is generated immediately after the execution of this command. In async mode, a command to generate an interrupt request is put in a Display List. This command can be used by all "Graphics Controller". 6.2.10 GdcExecMode [Sets execution mode] Format void Parameter sync GdcExecMode (GDC_UCHAR sync) Sync/Async mode selection GDC_EXECMODE_SYNC GDC_EXECMODE_ASYNC Return value None Description Sync mode Async mode Sets operation mode of the Display List execution. This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 40 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.11 GdcSetDMAMode [Sets DMA mode] Format int GdcSetDMAMode(int tran_unit, int dma_request, int address_mode, int ack_mode) Parameter tran_unit Unit of DMA transfer GDC_DMA_TRANUNIT_4 GDC_DMA_TRANUNIT_32 dma_request 4 byte 32 byte DMA request GDC_DMA_REQUEST_NEGATE During transferring, when the "Graphics Controller" cannot receive data, DMA request is invalid (negate), and if it will be in the state where data is receivable, it will be valid (assert) GDC_DMA_REQUEST_NO_NEGATE Not negate while DMA is transferring Display List address_mode Address mode of external DMA request GDC_DMA_ADDRMODE_DUAL GDC_DMA_ADDRMODE_SINGLE ack_mode Dual address mode Single address mode ACK mode GDC_DMA_ACKMODE Uses ACK (detect DMA request at a low level signal) GDC_DMA_NO_ACKMODE Not use ACK (detect DMA request at an edge) Return value GDC_TRUE Complete GDC_FALSE Incomplete Error code GDC_ERR_INVALID_PARAMETER(Invalid parameter is specified) Description Sets DMA transfer mode to DSU (DMA Set Up) register. This command can be used by all "Graphics Controller". However, "ack_mode" is available only for the MB86293 MB86293 or later. In case of MB86290A/291/292 MB86290A/291/292, sets GDC_DMA_ACKMODE (uses ACK) to "ack_mode". MB86290 MB86290 Series Graphics Driver Users Manual 41 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.12 GdcGetFIFOStatus [Gets Display List FIFO status] Format GDC_ULONG GdcGetFIFOStatus(void) Parameter None Return value Display List FIFO status (IFSR register value) in the following format: bit 31 - 2 1 0 0 - x x x bit 0: =1 Display List FIFO is full =0 Display List FIFO is not full =1 More than half entries of Display List FIFO are empty =0 More than half entries of Display List FIFO are not empty bit 2: =0 Valid data not exists in Display List FIFO bit 1: Valid data exists in Display List FIFO =1 All other bits:0 Figure 6.2.12 Display List FIFO status Description Reads IFSR (Input FIFO Status Register) and returns current Display List FIFO status. This command can be used by all "Graphics Controller". 6.2.13 GdcGetFIFORemain [Gets number of Display List FIFO open entries] Format GDC_ULONG GdcGetFIFORemain(void) Parameter None Return value Number of open entries in the Display List FIFO Description Reads IFCNT (Input FIFO CouNTer) register and returns the number of open entries in the Display List FIFO. This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 42 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.14 GdcGetFIFOErrorStatus [Gets Display List FIFO error status] Format GDC_ULONG GdcGetFIFOErrorStatus(void) Parameter None Return value Display List FIFO error status (IFSR register value) in the following format: bit 31 - 2 1 0 0 - x x x bit 0: Command error (type code is not normal) No=0, Yes=1 bit 1: Packet error (command code is not normal) No=0, Yes=1 bit 2: FIFO overflow No=0, Yes=1 All other bits:0 Figure 6.2.14 Display List FIFO error status Description Reads EST (Error Status Register) and returns Display List FIFO error status. This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 43 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.15 GdcGetInterruptStatus [Gets interrupt status] Format GDC_UCHAR GdcGetInterruptStatus (void) Parameter None Return value Interrupts status (IST register value) in the following format: bit 7 - 4 3 2 1 0 0 - x x x x x bit 0: Command execution error interrupt Yes=1, No=0 bit 1: Command complete interrupt Yes=1, No=0 bit 2: VSYNC interrupt Yes=1, No=0 bit 3: Frame sync interrupt Yes=1, No=0 bit 4: External sync error interrupt Yes=1, No=0 All other bits:0 Figure 6.2.15 Interrupt status Description Reads IST (Interrupt Status Register) and return interrupt status. This command is only for MB86290A MB86290A. When the "Graphics Controller" is MB86291 MB86291 or later, GdcGeoGetInterruptStatus must be used. MB86290 MB86290 Series Graphics Driver Users Manual 44 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.16 GdcGeoGetInterruptStatus [Gets interrupt status for MB86291 MB86291 or later] Format GDC_ULONG GdcGeoGetInterruptStatus(void) Parameter None Return value Interrupts status (IST register value) in the following format: bit 31 - 4 3 2 1 0 0 - x x x x x bit0: Command execution error interrupt Yes =1, No =0 bit1: Command complete interrupt Yes =1, No =0 bit2: VSYNC interrupt Yes =1, No =0 bit3: Frame sync interrupt Yes =1, No =0 bit4: External sync error interrupt Yes =1, No =0 All other bits:1 Figure 6.2.16 Interrupt status Interrupt Description Reads IST (Interrupt Status Register) and return interrupt status. This command is for MB86291 MB86291 or later. When the "Graphics Controller" is MB86290A MB86290A, GdcGetInterruptStatus must be used. MB86290 MB86290 Series Graphics Driver Users Manual 45 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.17 GdcClearInterruptStatus [Clears interrupt status for MB86290A MB86290A] Format void Parameter GdcClearInterruptStatus (GDC_UCHAR clear) clear Clear pattern (shown below) bit 7 - 4 3 2 1 0 1 - x x x x x bit 0: Command execution error interrupt Clear=0, Hold=1 bit 1: Command complete interrupt Clear=0, Hold=1 bit 2: VSYNC interrupt Clear=0, Hold=1 bit 3: Frame sync interrupt Clear=0, Hold=1 bit 4: External sync error interrupt Clear=0, Hold=1 All other bits:1 Figure 6.2.17 Clear pattern format Return value None Description Clears the interrupt event indicated by 0-4 bits in ISR (Interrupt Status Register) by the clear pattern specified as above. To clear an interrupt event, respective bit in the clear pattern for that event is set to 0 and all other bits are set to 1. This command is only for MB86290A MB86290A. When the "Graphics Controller" is MB86291 MB86291 or later, the GdcGeoClearInterruptStatus command must be used. MB86290 MB86290 Series Graphics Driver Users Manual 46 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.18 GdcGeoClearInterruptStatus [Clears interrupt status for MB86291 MB86291 or later] Format void Parameter GdcGeoClearInterruptStatus(GDC_ULONG clear) clear Clear pattern (shown below) Return value bit 31 - 4 3 2 1 0 1 - x x x x x bit0: Command execution error interrupt Clear =0, Hold =1 bit1: Command complete interrupt Clear =0, Hold =1 bit2: VSYNC interrupt Clear =0, Hold =1 bit3: Frame sync interrupt Clear =0, Hold =1 bit4: External sync error interrupt Clear =0, Hold =1 All other bits:1 Figure 6.2.18 Clear pattern format Return value None Description Clears a request of interrupt, indicated by IST (Interrupt STatus) register, with clear pattern. To clear an interrupt event, respective bit in the clear pattern for that event is set to 0 and all other bits are set to 1. This command is for MB86291 MB86291 or later. When the "Graphics Controller" is MB86290A MB86290A, the GdcClearInterruptStatus command must be used. MB86290 MB86290 Series Graphics Driver Users Manual 47 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.19 GdcSetInterruptMask [Sets interrupt mask for MB86290A MB86290A] Format void Parameter GdcSetInterruptMask (GDC_UCHAR mask) mask Mask pattern (shown below) bit 7 - 4 3 2 1 0 0 - x x x x x bit 0: Command error interrupt Mask=1, Enable=0 bit 1: Command complete interrupt Mask=1, Enable=0 bit 2: VSYNC interrupt Mask=1, Enable=0 bit 3: Frame sync interrupt Mask=1, Enable=0 bit 4: External sync error interrupt Mask=1, Enable=0 All other bits:0 6.2.19 Figure 6.2.19 Mask pattern format Return value None Description Sets interrupt mask pattern to IMASK (Interrupt MASK) register to disable interrupt requests generated by the respective events. This command is only for MB86290A MB86290A. When the "Graphics Controller" is MB86291 MB86291 or later, the GdcGeoSetInterruptMask command must be used. MB86290 MB86290 Series Graphics Driver Users Manual 48 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.20 GdcGeoSetInterruptMask [Sets interrupt mask for MB86291 MB86291 or later] Format void Parameter GdcGeoSetInterruptMask(GDC_ULONG mask) mask Mask pattern (shown below) bit 31 - 4 3 2 1 0 0 - x x x x x bit0: Command execution error interrupt Mask =0, Enable =1 bit1: Command complete interrupt Mask =0, Enable =1 bit2: VSYNC interrupt Mask =0, Enable =1 bit3: Frame sync interrupt Mask =0, Enable =1 bit4: External sync error interrupt Mask =0, Enable =1 All other bits:0 Figure 6.2.20 Mask pattern format Return value None Description Sets interrupt mask pattern to IMASK(Interrupt MASK) to disable interrupt requests generated by the respective events. This command is for MB86291 MB86291 or later. When the "Graphics Controller" is MB86290A MB86290A, the GdcSetInterruptMask command must be used. MB86290 MB86290 Series Graphics Driver Users Manual 49 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.21 GdcGeoGetFIFOStatus [Gets geometry Display List FIFO status] Format GDC_ULONG GdcGeoGetFIFOStatus(void) Parameter None Return value Geometry Display List FIFO status in the following format: bit 31 - 2 1 0 0 - x x x bit 0: =1 Geometry Display List FIFO is full =0 Geometry Display List FIFO is not full =1 More than half entries of geometry Display List FIFO are empty =0 More than half entries of geometry Display List FIFO are not empty bit 2: =0 Valid data not exists in geometry Display List FIFO bit 1: Valid data exists in geometry Display List FIFO =1 All other bits:0 Figure 6.2.21 Display List FIFO status Description Returns current geometry Display List FIFO status. This command is for MB86291 MB86291 or later. 6.2.22 GdcGeoGetFIFORemain [Gets number of geometry Display List FIFO open entries] Format GDC_ULONG GdcGeoGetFIFORemain(void) Parameter None Return value Number of open entries in the geometry Display List FIFO Description Returns the number of open entries in the geometry Display List FIFO. This command is for MB86291 MB86291 or later. MB86290 MB86290 Series Graphics Driver Users Manual 50 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.23 GdcSetMemoryMode [Sets memory interface mode] Format void GdcSetMemoryMode (GDC_ULONG memorymode) Parameter memorymode Return value None Description Sets memorymode value to MMR (Memory I/F Mode Register) and defines the Mode information of memory interface (MMR register set data) operation mode of memory interface. Detail of the memorymode is referred to the MB86290 MB86290 Series hardware specifications. This command can be used by all "Graphics Controller". 6.2.24 GdcSoftwareReset [Resets by software] Format void GdcSoftwareReset (void) Parameter None Return value None Description Sets "1" to SRST (Software ReSet) register and execute software reset. In addition, cancels Display List stored in Display List buffer. In order to steady status of the "Graphics Controller", 32 bus clock cycles intervals are necessary after software reset before executing the following procedures. This command can be used by all "Graphics Controller". MB86290 MB86290 Series Graphics Driver Users Manual 51 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.25 GdcGetErrCode [Gets error code] Format int GdcGetErrCode (void) Parameter None Return value Error code Description Returns an error code when a driver command abnormally ends. Currently this command is applicable to GdcInitialize command only. This command can be used by all "Graphics Controller". Error code GDC_ERR_DL_BUF_ALLOC Failure of Display List buffer acquisition GDC_ERR_DL_SIZE Incorrect buffer size A Display List buffer size for 1 block is not a multiply of 32byte, or less than the minimum GDC_ERR_DL_NUM applicable size Not appropriate block count GDC_ERR_DATA_TOO_BIG Block count is other than 1, 2 GDC_ERR_INVALID_LAYER Too large data GDC_ERR_INVALID_BANK Invalid layer is specified GDC_ERR_INVALID_COLOR_MODE Invalid bank is specified GDC_ERR_INVALID_CURSOR_NUMBER Invalid color mode is specified GDC_ERR_ILLEGAL_DIMENSION Invalid cursor number is specified GDC_ERR_INVALID_ATTRIBUTE Illegal vertical/horizontal size of pattern data GDC_ERR_INVALID_PRIMITIVE Invalid attribute is specified GDC_ERR_CREMSON_OPEN_FAILED Invalid primitive is specified GDC_ERR_ILLEGAL_VERTEX_COUNT Fail to initialize "Graphics Controller" GDC_ERR_ILLEGAL_LINE_WIDTH Illegal number of vertex GDC_ERR_NOT_READY Illegal width of line GDC_ERR_INVALID_PARAMETER "Graphics Driver" is not initialized Invalid parameter is specified MB86290 MB86290 Series Graphics Driver Users Manual 52 Copyright(c)FUJITSU LIMITED 1999-2003 6.2.26 GdcSetRegisterLocation [Changes address of registers location] Format void GdcSetRegisterLocation (GDC_ULONG locate) Parameter locate Register location GDC_REG_LOCATE_CENTER Center location GDC_REG_LOCATE_BOTTOM The last location Return value None Description In SH-3/SH-4 mode sets this parameter when changing the register location from center (0x1fc0000) to the last (0x3fc0000). Execute this command after having called the following commands. Be sure to execute the following commands before calling the GdcSetRegisterLocation command. - GdcInitialize command - GdcSetInternalClock command - GdcSoftwareReset command In order to steady status of the "Graphics Controller", 20 bus clock cycles intervals are necessary after changes address of register location before executing the following procedures. This command is for MB86293 MB86293 or later. 6.2.27 GdcSetBurstMode [Sets burst transfer mode of drawing] Format void Parameter mode GdcSetBurstMode(GDC_ULONG mode) Burst transfer mode GDC_ENABLE Enable GDC_DISABLE Disable Return value None Description Sets burst transfer mode of drawing. If the bus occupation rate of drawing becomes high, all the 6 layers may not be displayed. In this case, sets burst transfer mode to disable. Be sure to execute the GdcSetMemoryMode commands before calling this comman