revert between 56095 -> 55830 in arch
[AROS.git] / compiler / include / graphics / monitor.h
blobddd50d5354a4ffe1893771cf8a25b027b63aeaf8
1 #ifndef GRAPHICS_MONITOR_H
2 #define GRAPHICS_MONITOR_H
4 /*
5 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Monitor definitions
9 Lang: english
12 #ifndef EXEC_SEMAPHORES_H
13 # include <exec/semaphores.h>
14 #endif
15 #ifndef GRAPHICS_GFX_H
16 # include <graphics/gfx.h>
17 #endif
18 #ifndef GRAPHICS_GFXNODES_H
19 # include <graphics/gfxnodes.h>
20 #endif
22 #define DEFAULT_MONITOR_NAME "default.monitor"
23 #define NTSC_MONITOR_NAME "ntsc.monitor"
24 #define PAL_MONITOR_NAME "pal.monitor"
25 #define VGA_MONITOR_NAME "vga.monitor"
27 struct MonitorSpec
29 struct ExtendedNode ms_Node;
31 UWORD ms_Flags; /* Flags, see below */
33 LONG ratioh; /* Fixed point fractions, see the */
34 LONG ratiov; /* RATIO_FIXEDPART and RATIO_UNITY macros */
35 UWORD total_rows; /* Total number of scanlines per frame */
36 UWORD total_colorclocks; /* Total number of color clocks per line (in 1/280 ns units) */
37 UWORD DeniseMaxDisplayColumn;
38 UWORD BeamCon0; /* Value for beamcon0 Amiga(tm) chipset register */
39 UWORD min_row;
41 struct SpecialMonitor * ms_Special; /* Synchro signal timings description (optional) */
43 UWORD ms_OpenCount; /* Driver open count */
44 LONG (* ms_transform)();
45 LONG (* ms_translate)();
46 LONG (* ms_scale)();
47 UWORD ms_xoffset;
48 UWORD ms_yoffset;
50 struct Rectangle ms_LegalView; /* Allowed range for view positioning (right-bottom position included) */
52 LONG (* ms_maxoscan)();
53 LONG (* ms_videoscan)();
54 UWORD DeniseMinDisplayColumn;
55 ULONG DisplayCompatible;
57 struct List DisplayInfoDataBase;
58 struct SignalSemaphore DisplayInfoDataBaseSemaphore;
60 LONG (* ms_MrgCop)(); /* Driver call vectors, unused by AROS */
61 LONG (* ms_LoadView)();
62 LONG (* ms_KillView)();
65 /* An alias for pointer to associated sync object, AROS-specific */
66 #define ms_Object DisplayInfoDataBase.lh_Head
68 /* ms_Flags */
69 #define MSB_REQUEST_NTSC 0
70 #define MSF_REQUEST_NTSC (1<<0)
71 #define MSB_REQUEST_PAL 1
72 #define MSF_REQUEST_PAL (1<<1)
73 #define MSB_REQUEST_SPECIAL 2
74 #define MSF_REQUEST_SPECIAL (1<<2)
75 #define MSB_REQUEST_A2024 3
76 #define MSF_REQUEST_A2024 (1<<3)
77 #define MSB_DOUBLE_SPRITES 4
78 #define MSF_DOUBLE_SPRITES (1<<4)
80 #define STANDARD_MONITOR_MASK (MSF_REQUEST_NTSC | MSF_REQUEST_PAL)
82 #define TO_MONITOR 0
83 #define FROM_MONITOR 1
85 #define STANDARD_XOFFSET 9
86 #define STANDARD_YOFFSET 0
88 /* Some standard/default constants for Amiga(tm) chipset */
89 #define STANDARD_NTSC_ROWS 262
90 #define MIN_NTSC_ROW 21
91 #define STANDARD_PAL_ROWS 312
92 #define MIN_PAL_ROW 29
93 #define STANDARD_NTSC_BEAMCON 0x0000
94 #define STANDARD_PAL_BEAMCON 0x0020
95 #define SPECIAL_BEAMCON (VARVBLANK | VARHSYNC | VARVSYNC | VARBEAM | VSYNCTRUE | LOLDIS | CSBLANK)
96 #define STANDARD_DENISE_MIN 93
97 #define STANDARD_DENISE_MAX 455
98 #define STANDARD_COLORCLOCKS 226
99 #define STANDARD_VIEW_X 0x81
100 #define STANDARD_VIEW_Y 0x2C
101 #define STANDARD_HBSTRT 0x06
102 #define STANDARD_HBSTOP 0x2C
103 #define STANDARD_HSSTRT 0x0B
104 #define STANDARD_HSSTOP 0x1C
105 #define STANDARD_VBSTRT 0x0122
106 #define STANDARD_VBSTOP 0x1066
107 #define STANDARD_VSSTRT 0x02A6
108 #define STANDARD_VSSTOP 0x03AA
110 #define VGA_COLORCLOCKS (STANDARD_COLORCLOCKS / 2)
111 #define VGA_TOTAL_ROWS (STANDARD_NTSC_ROWS * 2)
112 #define VGA_DENISE_MIN 59
113 #define MIN_VGA_ROW 29
114 #define VGA_HBSTRT 0x08
115 #define VGA_HBSTOP 0x1E
116 #define VGA_HSSTRT 0x0E
117 #define VGA_HSSTOP 0x1C
118 #define VGA_VBSTRT 0x0000
119 #define VGA_VBSTOP 0x0CCD
120 #define VGA_VSSTRT 0x0153
121 #define VGA_VSSTOP 0x0235
123 #define BROADCAST_BEAMCON (LOLDIS | CSBLANK)
124 #define BROADCAST_HBSTRT 0x01
125 #define BROADCAST_HBSTOP 0x27
126 #define BROADCAST_HSSTRT 0x06
127 #define BROADCAST_HSSTOP 0x17
128 #define BROADCAST_VBSTRT 0x0000
129 #define BROADCAST_VBSTOP 0x1C40
130 #define BROADCAST_VSSTRT 0x02A6
131 #define BROADCAST_VSSTOP 0x054C
133 #define RATIO_FIXEDPART 4
134 #define RATIO_UNITY (1<<4)
136 struct AnalogSignalInterval
138 UWORD asi_Start;
139 UWORD asi_Stop;
142 struct SpecialMonitor
144 struct ExtendedNode spm_Node;
146 UWORD spm_Flags; /* Reserved, set to 0 */
147 LONG (* do_monitor)(struct MonitorSpec *); /* Driver call vector - set up a video mode */
148 LONG (* reserved1)(); /* Private data, do not touch */
149 LONG (* reserved2)();
150 LONG (* reserved3)();
152 struct AnalogSignalInterval hblank; /* Signal timings by themselves */
153 struct AnalogSignalInterval vblank;
154 struct AnalogSignalInterval hsync;
155 struct AnalogSignalInterval vsync;
158 #endif /* GRAPHICS_MONITOR_H */