|
|
1.1 ! root 1: /*++ BUILD Version: 0001 // Increment this if a change has global effects ! 2: ! 3: Copyright (c) 1991-1993 Microsoft Corporation ! 4: ! 5: Module Name: ! 6: ! 7: jazzvdeo.h ! 8: ! 9: Abstract: ! 10: ! 11: This header file defines the Jazz display controller registers. ! 12: It currently has support for both the G300 and G364 video cards. ! 13: ! 14: Revision History: ! 15: ! 16: --*/ ! 17: ! 18: // ! 19: // Define value of video id register for different video boards. ! 20: // ! 21: ! 22: #define VIDEO_G300 0 // original g300 video board ! 23: #define VIDEO_G364 1 // id value for g364 video board. ! 24: #define VIDEO_BT_I860 2 // brooktree board with i860. ! 25: ! 26: ! 27: ! 28: // ! 29: // Define video controller parameters. ! 30: // ! 31: ! 32: #define DISPLAY_BITS_PER_PIXEL 8 // display bits per pixel ! 33: #define NUMBER_OF_COLORS 256 // number of colors ! 34: ! 35: #define CURSOR_WIDTH 64 // width of hardware cursor ! 36: #define CURSOR_HEIGHT 64 // height of hardware cursor ! 37: #define CURSOR_BITS_PER_PIXEL 2 // hardware cursor bits per pixel ! 38: #define CURSOR_MAXIMUM \ ! 39: ((CURSOR_WIDTH * CURSOR_HEIGHT * \ ! 40: CURSOR_BITS_PER_PIXEL) / (sizeof(USHORT) * 8)) // max hardware cursor pixels ! 41: ! 42: // ! 43: // G300B Video Controller Definitions. ! 44: // ! 45: // Define video register format. ! 46: // ! 47: ! 48: typedef struct _VIDEO_REGISTER { ! 49: ULONG Long; ! 50: ULONG Fill[1]; ! 51: } VIDEO_REGISTER, *PVIDEO_REGISTER; ! 52: ! 53: // ! 54: // Define video control registers structure. ! 55: // ! 56: ! 57: typedef struct _G300_VIDEO_REGISTERS { ! 58: VIDEO_REGISTER ColorMapData[256]; ! 59: VIDEO_REGISTER Fill1[33]; ! 60: VIDEO_REGISTER HorizonalSync; ! 61: VIDEO_REGISTER BackPorch; ! 62: VIDEO_REGISTER Display; ! 63: VIDEO_REGISTER ShortDisplay; ! 64: VIDEO_REGISTER BroadPulse; ! 65: VIDEO_REGISTER VerticalSync; ! 66: VIDEO_REGISTER VerticalBlank; ! 67: VIDEO_REGISTER VerticalDisplay; ! 68: VIDEO_REGISTER LineTime; ! 69: VIDEO_REGISTER LineStart; ! 70: VIDEO_REGISTER DmaDisplay; ! 71: VIDEO_REGISTER TransferDelay; ! 72: VIDEO_REGISTER Fill2[19]; ! 73: VIDEO_REGISTER PixelMask; ! 74: VIDEO_REGISTER Fill3[31]; ! 75: VIDEO_REGISTER Parameters; ! 76: VIDEO_REGISTER Fill4[31]; ! 77: VIDEO_REGISTER TopOfScreen; ! 78: VIDEO_REGISTER Fill5[31]; ! 79: VIDEO_REGISTER Boot; ! 80: } G300_VIDEO_REGISTERS, *PG300_VIDEO_REGISTERS; ! 81: ! 82: typedef struct _G364_VIDEO_REGISTERS { ! 83: VIDEO_REGISTER Boot; ! 84: VIDEO_REGISTER Fill0[0x1F]; ! 85: VIDEO_REGISTER Fill1; ! 86: VIDEO_REGISTER HorizontalSync; ! 87: VIDEO_REGISTER BackPorch; ! 88: VIDEO_REGISTER Display; ! 89: VIDEO_REGISTER ShortDisplay; ! 90: VIDEO_REGISTER BroadPulse; ! 91: VIDEO_REGISTER VerticalSync; ! 92: VIDEO_REGISTER VerticalPreEqualize; ! 93: VIDEO_REGISTER VerticalPostEqualize; ! 94: VIDEO_REGISTER VerticalBlank; ! 95: VIDEO_REGISTER VerticalDisplay; ! 96: VIDEO_REGISTER LineTime; ! 97: VIDEO_REGISTER LineStart; ! 98: VIDEO_REGISTER DmaDisplay; ! 99: VIDEO_REGISTER TransferDelay; ! 100: VIDEO_REGISTER Fill2; ! 101: VIDEO_REGISTER Fill3[0x10]; ! 102: VIDEO_REGISTER PixelMask; ! 103: VIDEO_REGISTER Fill4[0x1F]; ! 104: VIDEO_REGISTER Parameters; ! 105: VIDEO_REGISTER Fill5[0x1F]; ! 106: VIDEO_REGISTER TopOfScreen; ! 107: VIDEO_REGISTER Fill6[0x1F]; ! 108: VIDEO_REGISTER Fill7; ! 109: VIDEO_REGISTER CursorPalette[3]; ! 110: VIDEO_REGISTER Fill8[0x1C]; ! 111: VIDEO_REGISTER Fill9[0x7]; ! 112: VIDEO_REGISTER CursorPosition; ! 113: VIDEO_REGISTER Fill10[0x18]; ! 114: VIDEO_REGISTER Fill11[0x20]; ! 115: VIDEO_REGISTER ColorMapData[0x100]; ! 116: VIDEO_REGISTER CursorMemory[0x200]; ! 117: } G364_VIDEO_REGISTERS, *PG364_VIDEO_REGISTERS; ! 118: ! 119: ! 120: // ! 121: // Define video controller register values. ! 122: // ! 123: ! 124: #define LINE_START_VALUE 0 // line start timing ! 125: #define G300_PIXEL_MASK_VALUE 0xFF // pixel mask value ! 126: #define G364_PIXEL_MASK_VALUE 0xFFFFFF // pixel mask value ! 127: #define PREEQUALIZE_VALUE 6 // vertical pre-equilize timing ! 128: #define POSTEQUALIZE_VALUE 6 // vertical post-equilize timing ! 129: ! 130: ! 131: // ! 132: // Define video parameter register structure. ! 133: // ! 134: ! 135: typedef struct _G300_VIDEO_PARAMETERS { ! 136: ULONG EnableVideo : 1; ! 137: ULONG Interlace : 1; ! 138: ULONG SlaveMode : 1; ! 139: ULONG PlainWave : 1; ! 140: ULONG SeparateSync : 1; ! 141: ULONG VideoOnly : 1; ! 142: ULONG Fill1 : 1; ! 143: ULONG UcharMode : 1; ! 144: ULONG Mode2 : 1; ! 145: ULONG DelaySync : 3; ! 146: ULONG Black : 1; ! 147: ULONG Fill2 : 1; ! 148: ULONG DisableDma : 1; ! 149: ULONG DisableBlanking : 1; ! 150: ULONG BlankOutput : 1; ! 151: ULONG BitsPerPixel : 2; ! 152: ULONG AddressStep : 2; ! 153: ULONG CcirFormat : 1; ! 154: ULONG Fill3 : 1; ! 155: ULONG DisableDelay : 1; ! 156: ULONG Fill4 : 8; ! 157: } G300_VIDEO_PARAMETERS, *PG300_VIDEO_PARAMETERS; ! 158: ! 159: typedef struct _G364_VIDEO_PARAMETERS { ! 160: ULONG EnableVideo : 1; ! 161: ULONG Interlace : 1; ! 162: ULONG CcirFormat : 1; ! 163: ULONG SlaveMode : 1; ! 164: ULONG PlainSync : 1; ! 165: ULONG SeparateSync : 1; ! 166: ULONG VideoOnly : 1; ! 167: ULONG BlankingPedestal : 1; ! 168: ULONG CBlankOutput : 1; ! 169: ULONG UndelayedCBlank : 1; ! 170: ULONG ForceBlanking : 1; ! 171: ULONG DisableBlanking : 1; ! 172: ULONG AddressStep : 2; ! 173: ULONG DisableDma : 1; ! 174: ULONG DelaySync : 3; ! 175: ULONG Interleaving : 1; ! 176: ULONG DelaySampling : 1; ! 177: ULONG BitsPerPixel : 3; ! 178: ULONG DisableCursor : 1; ! 179: ULONG Fill : 8; ! 180: } G364_VIDEO_PARAMETERS, *PG364_VIDEO_PARAMETERS; ! 181: ! 182: // ! 183: // Define delay synchronization cycles value. ! 184: // ! 185: ! 186: #define G300_DELAY_SYNC_CYCLES 1 // cycles to delay sync and blank ! 187: #define G364_DELAY_SYNC_CYCLES 0 // cycles to delay sync and blank ! 188: ! 189: // ! 190: // Define bits per pixel codes. ! 191: // ! 192: ! 193: #define ONE_BIT_PER_PIXEL 0 // 1-bit per pixel ! 194: #define TWO_BITS_PER_PIXEL 1 // 2-bits per pixel ! 195: #define FOUR_BITS_PER_PIXEL 2 // 4-bits per pixel ! 196: #define EIGHT_BITS_PER_PIXEL 3 // 8-bits per pixel ! 197: ! 198: // ! 199: // For g364 only ! 200: // ! 201: ! 202: #define FIFTEEN_BITS_PER_PIXEL 4 // 15-bits per pixel (RGB = 5,5,5) ! 203: #define SIXTEEN_BITS_PER_PIXEL 5 // 16-bits per pixel (RGB = 6,6,4) ! 204: ! 205: // ! 206: // Colors for the Pointer ! 207: // ! 208: ! 209: #define NUM_G300_POINTER_COLORS 0 // Colors for the pointer are the ! 210: // default display colors ! 211: #define NUM_G364_POINTER_COLORS 2 // The G364 supports two colors ! 212: // (apart from transparent) for the ! 213: // pointer ! 214: ! 215: // ! 216: // Define address step value. ! 217: // ! 218: ! 219: #define G300_ADDRESS_STEP_INCREMENT 1 // vram transfer address increment ! 220: #define G364_ADDRESS_STEP_INCREMENT 3 // vram transfer address increment ! 221: ! 222: ! 223: // ! 224: // Define video boot register structure. ! 225: // ! 226: ! 227: typedef struct _G300_VIDEO_BOOT { ! 228: ULONG Multiplier : 5; ! 229: ULONG ClockSelect : 1; ! 230: ULONG Fill1 : 26; ! 231: } G300_VIDEO_BOOT, *PG300_VIDEO_BOOT; ! 232: ! 233: typedef struct _G364_VIDEO_BOOT { ! 234: ULONG Multiplier : 5; ! 235: ULONG ClockSelect : 1; ! 236: ULONG MicroPort64Bits : 1; ! 237: ULONG Fill1 : 25; ! 238: } G364_VIDEO_BOOT, *PG364_VIDEO_BOOT; ! 239: ! 240: ! 241: // ! 242: // BT431 Cursor Controller Definitions. ! 243: // ! 244: // Define cursor register format. ! 245: // ! 246: ! 247: typedef struct _CURSOR_REGISTER { ! 248: USHORT Short; ! 249: USHORT Fill[3]; ! 250: } CURSOR_REGISTER, *PCURSOR_REGISTER; ! 251: ! 252: // ! 253: // Define cursor control registers structure. ! 254: // ! 255: ! 256: typedef struct _CURSOR_REGISTERS { ! 257: CURSOR_REGISTER AddressPointer0; ! 258: CURSOR_REGISTER AddressPointer1; ! 259: CURSOR_REGISTER CursorMemory; ! 260: CURSOR_REGISTER CursorControl; ! 261: } CURSOR_REGISTERS, *PCURSOR_REGISTERS; ! 262: ! 263: // ! 264: // Define cursor address register values. ! 265: // ! 266: ! 267: #define CURSOR_MEMORY_ADDRESS (0x0 * 0x101) // starting address of cursor memory ! 268: #define CURSOR_CONTROL_ADDRESS (0x0 * 0x101) // cursor command register address ! 269: #define CURSOR_X_LOW_ADDRESS (0x1 * 0x101) // cursor x low address ! 270: #define CURSOR_X_HIGH_ADDRESS (0x2 * 0x101) // cursor x high address ! 271: #define CURSOR_Y_LOW_ADDRESS (0x3 * 0x101) // cursor y low address ! 272: #define CURSOR_Y_HIGH_ADDRESS (0x4 * 0x101) // cursor y high address ! 273: #define WINDOW_X_LOW_ADDRESS (0x5 * 0x101) // window x low address ! 274: #define WINDOW_X_HIGH_ADDRESS (0x6 * 0x101) // window x high address ! 275: #define WINDOW_Y_LOW_ADDRESS (0x7 * 0x101) // window y low address ! 276: #define WINDOW_Y_HIGH_ADDRESS (0x8 * 0x101) // window y high address ! 277: #define WINDOW_WIDTH_LOW_ADDRESS (0x9 * 0x101) // window width low address ! 278: #define WINDOW_WIDTH_HIGH_ADDRESS (0xa * 0x101) // window width high address ! 279: #define WINDOW_HEIGHT_LOW_ADDRESS (0xb * 0x101) // window height low address ! 280: #define WINDOW_HEIGHT_HIGH_ADDRESS (0xc * 0x101) // window height high address ! 281: ! 282: // ! 283: // Define cursor command register structure. ! 284: // ! 285: ! 286: typedef struct _CURSOR_COMMAND { ! 287: USHORT CrossHairThickness1 : 2; ! 288: USHORT MultiplexControl1 : 2; ! 289: USHORT CursorFormat1 : 1; ! 290: USHORT CrossHairEnable1 : 1; ! 291: USHORT CursorEnable1 : 1; ! 292: USHORT Fill1 : 1; ! 293: USHORT CrossHairThickness2 : 2; ! 294: USHORT MultiplexControl2 : 2; ! 295: USHORT CursorFormat2 : 1; ! 296: USHORT CrossHairEnable2 : 1; ! 297: USHORT CursorEnable2 : 1; ! 298: USHORT Fill2 : 1; ! 299: } CURSOR_COMMAND, *PCURSOR_COMMAND; ! 300: ! 301: // ! 302: // Define cross hair thickness values. ! 303: // ! 304: ! 305: #define ONE_PIXEL_THICK 0x0 // one pixel in thickness ! 306: #define THREE_PIXELS_THICK 0x1 // three pixels in thickness ! 307: #define FIVE_PIXELS_THICK 0x2 // five pixels in thickness ! 308: #define SEVEN_PIXELS_THICK 0x3 // seven pixels in thickness ! 309: ! 310: // ! 311: // Define multiplexer control values. ! 312: // ! 313: ! 314: #define ONE_TO_ONE 0x0 // 1:1 multiplexing ! 315: #define FOUR_TO_ONE 0x1 // 4:1 multiplexing ! 316: #define FIVE_TO_ONE 0x2 // 5:1 multiplexing ! 317: ! 318: // ! 319: // Define cursor origin values. ! 320: // ! 321: ! 322: #define CURSOR_X_ORIGIN (((2 * HORIZONAL_SYNC_VALUE) + BACK_PORCH_VALUE) * 4 - 36) ! 323: #define CURSOR_Y_ORIGIN ((VERTICAL_BLANK_VALUE / 2) + 24) ! 324: ! 325: // ! 326: // Define G300 configuration data structure. ! 327: // ! 328: ! 329: typedef struct _JAZZ_G300_CONFIGURATION_DATA { ! 330: USHORT Version; ! 331: USHORT Revision; ! 332: USHORT Irql; ! 333: USHORT Vector; ! 334: ULONG ControlBase; ! 335: ULONG ControlSize; ! 336: ULONG CursorBase; ! 337: ULONG CursorSize; ! 338: ULONG FrameBase; ! 339: ULONG FrameSize; ! 340: } JAZZ_G300_CONFIGURATION_DATA, *PJAZZ_G300_CONFIGURATION_DATA; ! 341: ! 342: typedef JAZZ_G300_CONFIGURATION_DATA JAZZ_G364_CONFIGURATION_DATA; ! 343: typedef PJAZZ_G300_CONFIGURATION_DATA PJAZZ_G364_CONFIGURATION_DATA; ! 344: ! 345: // ! 346: // Define generic display configuration data structure found in ARC ! 347: // machine PROM ! 348: // ! 349: ! 350: typedef struct _MONITOR_CONFIG_DATA { ! 351: USHORT Version; ! 352: USHORT Revision; ! 353: USHORT HorizontalResolution; ! 354: USHORT HorizontalDisplayTime; ! 355: USHORT HorizontalBackPorch; ! 356: USHORT HorizontalFrontPorch; ! 357: USHORT HorizontalSync; ! 358: USHORT VerticalResolution; ! 359: USHORT VerticalBackPorch; ! 360: USHORT VerticalFrontPorch; ! 361: USHORT VerticalSync; ! 362: USHORT HorizontalScreenSize; ! 363: USHORT VerticalScreenSize; ! 364: } MONITOR_CONFIG_DATA, *PMONITOR_CONFIG_DATA;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.