1 #ifndef GRAPHICS_MONITOR_H 2 #define GRAPHICS_MONITOR_H 3 4 /* 5 graphics monitorspec definitions 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef EXEC_SEMAPHORES_H 11 # include <exec/semaphores.h> 12 #endif 13 14 #ifndef GRAPHICS_GFXNODES_H 15 # include <graphics/gfxnodes.h> 16 #endif 17 18 #ifndef GRAPHICS_GFX_H 19 # include <graphics/gfx.h> 20 #endif 21 22 #pragma pack(2) 23 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)(VOID); 39 LONG (*ms_translate)(VOID); 40 LONG (*ms_scale)(VOID); 41 UWORD ms_xoffset; 42 UWORD ms_yoffset; 43 struct Rectangle ms_LegalView; 44 LONG (*ms_maxoscan)(VOID); 45 LONG (*ms_videoscan)(VOID); 46 UWORD DeniseMinDisplayColumn; 47 ULONG DisplayCompatible; 48 struct List DisplayInfoDataBase; 49 struct SignalSemaphore DisplayInfoDataBaseSemaphore; 50 LONG (*ms_MrgCop)(VOID); 51 LONG (*ms_LoadView)(VOID); 52 LONG (*ms_KillView)(VOID); 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 #define REQUEST_NTSC (1<<MSB_REQUEST_NTSC) 73 #define REQUEST_PAL (1<<MSB_REQUEST_PAL) 74 #define REQUEST_SPECIAL (1<<MSB_REQUEST_SPECIAL) 75 #define REQUEST_A2024 (1<<MSB_REQUEST_A2024) 76 77 #define DEFAULT_MONITOR_NAME "default.monitor" 78 #define NTSC_MONITOR_NAME "ntsc.monitor" 79 #define PAL_MONITOR_NAME "pal.monitor" 80 #define VGA_MONITOR_NAME "vga.monitor" 81 #define VGA70_MONITOR_NAME "vga70.monitor" 82 #define STANDARD_MONITOR_MASK (REQUEST_NTSC | REQUEST_PAL) 83 84 #define STANDARD_NTSC_ROWS 262 85 #define STANDARD_PAL_ROWS 312 86 #define STANDARD_COLORCLOCKS 226 87 #define STANDARD_DENISE_MAX 455 88 #define STANDARD_DENISE_MIN 93 89 #define STANDARD_NTSC_BEAMCON (0x0000) 90 #define STANDARD_PAL_BEAMCON (DISPLAYPAL) 91 92 #define SPECIAL_BEAMCON (VARVBLANK | LOLDIS | VARVSYNC | VARHSYNC | VARBEAM | CSBLANK | VSYNCTRUE) 93 94 #define MIN_NTSC_ROW 21 95 #define MIN_PAL_ROW 29 96 #define STANDARD_VIEW_X 0x81 97 #define STANDARD_VIEW_Y 0x2C 98 #define STANDARD_HBSTRT 0x06 99 #define STANDARD_HSSTRT 0x0B 100 #define STANDARD_HSSTOP 0x1C 101 #define STANDARD_HBSTOP 0x2C 102 #define STANDARD_VBSTRT 0x0122 103 #define STANDARD_VSSTRT 0x02A6 104 #define STANDARD_VSSTOP 0x03AA 105 #define STANDARD_VBSTOP 0x1066 106 107 #define VGA_COLORCLOCKS (STANDARD_COLORCLOCKS/2) 108 #define VGA_TOTAL_ROWS (STANDARD_NTSC_ROWS*2) 109 #define VGA_DENISE_MIN 59 110 #define MIN_VGA_ROW 29 111 #define VGA_HBSTRT 0x08 112 #define VGA_HSSTRT 0x0E 113 #define VGA_HSSTOP 0x1C 114 #define VGA_HBSTOP 0x1E 115 #define VGA_VBSTRT 0x0000 116 #define VGA_VSSTRT 0x0153 117 #define VGA_VSSTOP 0x0235 118 #define VGA_VBSTOP 0x0CCD 119 120 121 #define VGA70_COLORCLOCKS (STANDARD_COLORCLOCKS/2) 122 #define VGA70_TOTAL_ROWS 449 123 #define VGA70_DENISE_MIN 59 124 #define MIN_VGA70_ROW 35 125 #define VGA70_HBSTRT 0x08 126 #define VGA70_HSSTRT 0x0E 127 #define VGA70_HSSTOP 0x1C 128 #define VGA70_HBSTOP 0x1E 129 #define VGA70_VBSTRT 0x0000 130 #define VGA70_VSSTRT 0x02A6 131 #define VGA70_VSSTOP 0x0388 132 #define VGA70_VBSTOP 0x0F73 133 134 #define VGA70_BEAMCON (SPECIAL_BEAMCON ^ VSYNCTRUE) 135 136 #define BROADCAST_HBSTRT 0x01 137 #define BROADCAST_HSSTRT 0x06 138 #define BROADCAST_HSSTOP 0x17 139 #define BROADCAST_HBSTOP 0x27 140 #define BROADCAST_VBSTRT 0x0000 141 #define BROADCAST_VSSTRT 0x02A6 142 #define BROADCAST_VSSTOP 0x054C 143 #define BROADCAST_VBSTOP 0x1C40 144 #define BROADCAST_BEAMCON (LOLDIS | CSBLANK) 145 146 #define RATIO_FIXEDPART 4 147 #define RATIO_UNITY (1<<RATIO_FIXEDPART) 148 149 struct AnalogSignalInterval 150 { 151 UWORD asi_Start; 152 UWORD asi_Stop; 153 }; 154 155 struct SpecialMonitor 156 { 157 struct ExtendedNode spm_Node; 158 UWORD spm_Flags; 159 LONG (*do_monitor)(VOID); 160 LONG (*reserved1)(VOID); 161 LONG (*reserved2)(VOID); 162 LONG (*reserved3)(VOID); 163 struct AnalogSignalInterval hblank; 164 struct AnalogSignalInterval vblank; 165 struct AnalogSignalInterval hsync; 166 struct AnalogSignalInterval vsync; 167 }; 168 169 170 #pragma pack() 171 172 #endif /* GRAPHICS_MONITOR_H */