Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.7 KiB

  1. /******************************Module*Header*******************************\
  2. *
  3. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4. * !! !!
  5. * !! WARNING: NOT DDK SAMPLE CODE !!
  6. * !! !!
  7. * !! This source code is provided for completeness only and should not be !!
  8. * !! used as sample code for display driver development. Only those sources !!
  9. * !! marked as sample code for a given driver component should be used for !!
  10. * !! development purposes. !!
  11. * !! !!
  12. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  13. *
  14. * Module Name: ramdac.h
  15. *
  16. * Content:
  17. *
  18. * Copyright (c) 1994-1999 3Dlabs Inc. Ltd. All rights reserved.
  19. * Copyright (c) 1995-2003 Microsoft Corporation. All rights reserved.
  20. \*****************************************************************************/
  21. // RAMDAC registers live on 64 bit boundaries. Leave it up to individual
  22. // RAMDAC definitions to determine what registers are available and how
  23. // many bits wide the registers really are.
  24. //
  25. typedef struct {
  26. volatile unsigned long reg;
  27. volatile unsigned long pad;
  28. } RAMDAC_REG;
  29. #include "rgb525.h"
  30. #include "tvp3026.h"
  31. #include "tvp4020.h"
  32. #include "p2rd.h"
  33. #include "p3rd.h"
  34. //
  35. // Supported RAMDAC definitions.
  36. //
  37. #define RGB525_RAMDAC 0
  38. #define RGB526_RAMDAC 1
  39. #define RGB526DB_RAMDAC 2
  40. #define RGB528_RAMDAC 3
  41. #define RGB528A_RAMDAC 4
  42. #define RGB524_RAMDAC 6
  43. #define RGB524A_RAMDAC 7
  44. #define TVP3026_RAMDAC 50
  45. #define TVP3030_RAMDAC 51
  46. #define TVP4020_RAMDAC 100
  47. #define P2RD_RAMDAC 200
  48. #define P3RD_RAMDAC 201
  49. // P3R3DX_VIDEO is defined in video.c (gldd dir)
  50. #if MINIVDD || (P3R3DX_VIDEO == 1)
  51. #define VideoPortWriteRegisterUlong(dst, value) (*((volatile unsigned long *) dst)) = value
  52. #else
  53. // Use emits to turn 16 bit instructions into 32 bit instructions.
  54. // _asm _emit 66h _asm xor bx,bx -> xor ebx, ebx
  55. #define VideoPortWriteRegisterUlong(dst, value) { \
  56. DWORD lVal = value, *lDst = dst; \
  57. _asm _emit 66h _asm xor bx,bx \
  58. _asm les bx, lDst \
  59. _asm _emit 66h _asm mov ax, WORD PTR lVal \
  60. _asm _emit 66h _asm mov es:[bx], ax \
  61. }
  62. #endif
  63. #define VideoPortReadRegisterUlong(dst) *((volatile unsigned long *)dst)