home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / graphics / monitor.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  3.7 KB  |  157 lines

  1. #ifndef GRAPHICS_MONITOR_H
  2. #define GRAPHICS_MONITOR_H
  3. /*
  4. ** $Filename: graphics/monitor.h $
  5. ** $Release: 2.04 Includes, V37.4 $
  6. ** $Revision: 37.0 $
  7. ** $Date: 91/01/07 $
  8. **
  9. ** graphics monitorspec definintions
  10. **
  11. ** (C) Copyright 1985-1991 Commodore-Amiga, Inc.
  12. ** All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_SEMAPHORES_H
  16. #include <exec/semaphores.h>
  17. #endif
  18.  
  19. #ifndef GRAPHICS_GFXNODES_H
  20. #include <graphics/gfxnodes.h>
  21. #endif
  22.  
  23. #ifndef GRAPHICS_GFX_H
  24. #include <graphics/gfx.h>
  25. #endif
  26.  
  27. struct MonitorSpec
  28. {
  29.  struct ExtendedNode ms_Node;
  30.  UWORD ms_Flags;
  31.  LONG ratioh;
  32.  LONG ratiov;
  33.  UWORD total_rows;
  34.  UWORD total_colorclocks;
  35.  UWORD DeniseMaxDisplayColumn;
  36.  UWORD BeamCon0;
  37.  UWORD min_row;
  38.  struct SpecialMonitor *ms_Special;
  39.  UWORD ms_OpenCount;
  40.  LONG (*ms_transform)();
  41.  LONG (*ms_translate)();
  42.  LONG (*ms_scale)();
  43.  UWORD ms_xoffset;
  44.  UWORD ms_yoffset;
  45.  struct Rectangle ms_LegalView;
  46.  LONG (*ms_maxoscan)(); 
  47.  LONG (*ms_videoscan)(); 
  48.  UWORD DeniseMinDisplayColumn;
  49.  ULONG DisplayCompatible;
  50.  struct List DisplayInfoDataBase;
  51.  struct SignalSemaphore DisplayInfoDataBaseSemaphore;
  52.  ULONG ms_reserved00;
  53.  ULONG ms_reserved01;
  54. };
  55.  
  56. #define TO_MONITOR 0
  57. #define FROM_MONITOR 1
  58. #define STANDARD_XOFFSET 9
  59. #define STANDARD_YOFFSET 0
  60. #define REQUEST_NTSC 1
  61. #define REQUEST_PAL 2
  62. #define REQUEST_SPECIAL 4
  63. #define REQUEST_A2024 8
  64.  
  65. #define DEFAULT_MONITOR_NAME "default.monitor"
  66. #define NTSC_MONITOR_NAME "ntsc.monitor"
  67. #define PAL_MONITOR_NAME "pal.monitor"
  68. #define STANDARD_MONITOR_MASK ( REQUEST_NTSC | REQUEST_PAL )
  69.  
  70. #define STANDARD_NTSC_ROWS 262
  71. #define STANDARD_PAL_ROWS 312
  72. #define STANDARD_COLORCLOCKS 226
  73. #define STANDARD_DENISE_MAX 455
  74. #define STANDARD_DENISE_MIN 93
  75. #define STANDARD_NTSC_BEAMCON ( 0x0000 )
  76. #define STANDARD_PAL_BEAMCON ( DISPLAYPAL )
  77.  
  78. #define SPECIAL_BEAMCON ( VARVBLANK | LOLDIS | VARVSYNC | VARBEAM | CSBLANK )
  79.  
  80. #define MIN_NTSC_ROW 21
  81. #define MIN_PAL_ROW 29
  82. #define STANDARD_VIEW_X 0x81
  83. #define STANDARD_VIEW_Y 0x2C
  84. #define STANDARD_HBSTRT 0x06
  85. #define STANDARD_HSSTRT 0x0B
  86. #define STANDARD_HSSTOP 0x1C
  87. #define STANDARD_HBSTOP 0x2C
  88. #define STANDARD_VBSTRT 0x0122
  89. #define STANDARD_VSSTRT 0x02A6
  90. #define STANDARD_VSSTOP 0x03AA
  91. #define STANDARD_VBSTOP 0x1066
  92.  
  93. #define VGA_COLORCLOCKS (STANDARD_COLORCLOCKS/2)
  94. #define VGA_TOTAL_ROWS (STANDARD_NTSC_ROWS*2)
  95. #define VGA_DENISE_MIN 59
  96. #define MIN_VGA_ROW 29
  97. #define VGA_HBSTRT 0x08
  98. #define VGA_HSSTRT 0x0E
  99. #define VGA_HSSTOP 0x1C
  100. #define VGA_HBSTOP 0x1E
  101. #define VGA_VBSTRT 0x0000
  102. #define VGA_VSSTRT 0x0153
  103. #define VGA_VSSTOP 0x0235
  104. #define VGA_VBSTOP 0x0CCD
  105.  
  106. #define VGA_MONITOR_NAME "vga.monitor"
  107.  
  108. #define VGA70_COLORCLOCKS (STANDARD_COLORCLOCKS/2)
  109. #define VGA70_TOTAL_ROWS 449
  110. #define VGA70_DENISE_MIN 59
  111. #define MIN_VGA70_ROW 35
  112. #define VGA70_HBSTRT 0x08
  113. #define VGA70_HSSTRT 0x0E
  114. #define VGA70_HSSTOP 0x1C
  115. #define VGA70_HBSTOP 0x1E
  116. #define VGA70_VBSTRT 0x0000
  117. #define VGA70_VSSTRT 0x02A6
  118. #define VGA70_VSSTOP 0x0388
  119. #define VGA70_VBSTOP 0x0F73
  120.  
  121. #define VGA70_BEAMCON (SPECIAL_BEAMCON ^ VSYNCTRUE)
  122. #define VGA70_MONITOR_NAME "vga70.monitor"
  123.  
  124. #define BROADCAST_HBSTRT 0x01
  125. #define BROADCAST_HSSTRT 0x06
  126. #define BROADCAST_HSSTOP 0x17
  127. #define BROADCAST_HBSTOP 0x27
  128. #define BROADCAST_VBSTRT 0x0000
  129. #define BROADCAST_VSSTRT 0x02A6
  130. #define BROADCAST_VSSTOP 0x054C
  131. #define BROADCAST_VBSTOP 0x1C40
  132. #define BROADCAST_BEAMCON ( LOLDIS | CSBLANK )
  133. #define RATIO_FIXEDPART 4
  134. #define RATIO_UNITY (1 << RATIO_FIXEDPART)
  135.  
  136. struct AnalogSignalInterval
  137. {
  138.  UWORD asi_Start;
  139.  UWORD asi_Stop;
  140. };
  141.  
  142. struct SpecialMonitor
  143. {
  144.  struct ExtendedNode spm_Node;
  145.  UWORD spm_Flags;
  146.  int (*do_monitor)();
  147.  int (*reserved1)();
  148.  int (*reserved2)();
  149.  int (*reserved3)();
  150.  struct AnalogSignalInterval hblank;
  151.  struct AnalogSignalInterval vblank;
  152.  struct AnalogSignalInterval hsync;
  153.  struct AnalogSignalInterval vsync;
  154. };
  155.  
  156. #endif 
  157.