home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / graphics / monitor.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  5KB  |  173 lines

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