added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / compiler / include / graphics / gfxbase.h
blobe397ccbf42a4ff8f37dbdb64f24900cbc8e26357
1 #ifndef GRAPHICS_GFXBASE_H
2 #define GRAPHICS_GFXBASE_H
4 /*
5 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: graphics.library
9 Lang: english
12 #ifndef EXEC_INTERRUPTS_H
13 # include <exec/interrupts.h>
14 #endif
16 #ifndef EXEC_EXECBASE_H
17 # include <exec/execbase.h>
18 #endif
20 #ifndef EXEC_LIBRARIES_H
21 # include <exec/libraries.h>
22 #endif
24 #ifndef EXEC_LISTS_H
25 # include <exec/lists.h>
26 #endif
28 #ifndef GRAPHICS_MONITOR_H
29 # include <graphics/monitor.h>
30 #endif
32 #define GRAPHICSNAME "graphics.library"
34 struct GfxBase
36 /* Standard Library Node */
37 struct Library LibNode;
39 struct View * ActiView;
40 struct copinit * copinit;
41 LONG * cia;
42 LONG * blitter;
43 UWORD * LOFlist;
44 UWORD * SHFlist;
45 struct bltnode * blthd;
46 struct bltnode * blttl;
47 struct bltnode * bsblthd;
48 struct bltnode * bsblttl;
49 struct Interrupt vbsrv;
50 struct Interrupt timsrv;
51 struct Interrupt bltsrv;
53 /* Fonts */
54 struct List TextFonts;
55 struct TextFont * DefaultFont;
57 UWORD Modes;
58 BYTE VBlank;
59 BYTE Debug;
60 WORD BeamSync;
61 WORD system_bplcon0 ;
62 UBYTE SpriteReserved;
63 UBYTE bytereserved;
64 UWORD Flags;
65 WORD BlitLock;
66 WORD BlitNest;
68 struct List BlitWaitQ;
69 struct Task * BlitOwner;
70 struct List TOF_WaitQ;
72 UWORD DisplayFlags; /* see below */
73 struct SimpleSprite ** SimpleSprites;
75 UWORD MaxDisplayRow;
76 UWORD MaxDisplayColumn;
77 UWORD NormalDisplayRows;
78 UWORD NormalDisplayColumns;
79 UWORD NormalDPMX;
80 UWORD NormalDPMY;
82 struct SignalSemaphore * LastChanceMemory;
84 UWORD * LCMptr;
85 UWORD MicrosPerLine;
86 UWORD MinDisplayColumn;
87 UBYTE ChipRevBits0; /* see below */
88 UBYTE MemType;
89 UBYTE crb_reserved[4];
90 UWORD monitor_id;
92 ULONG hedley[8];
93 ULONG hedley_sprites[8];
94 ULONG hedley_sprites1[8];
95 WORD hedley_count;
96 UWORD hedley_flags;
97 WORD hedley_tmp;
99 LONG * hash_table;
100 UWORD current_tot_rows;
101 UWORD current_tot_cclks;
102 UBYTE hedley_hint;
103 UBYTE hedley_hint2;
104 ULONG nreserved[4];
105 LONG * a2024_sync_raster;
106 UWORD control_delta_pal;
107 UWORD control_delta_ntsc;
109 struct MonitorSpec * current_monitor;
110 struct List MonitorList;
111 struct MonitorSpec * default_monitor;
112 struct SignalSemaphore * MonitorListSemaphore;
114 VOID * DisplayInfoDataBase;
115 UWORD TopLine;
116 struct SignalSemaphore * ActiViewCprSemaphore;
118 /* Library Bases */
119 struct Library *UtilBase;
120 struct ExecBase *ExecBase;
122 BYTE * bwshifts;
123 UWORD * StrtFetchMasks;
124 UWORD * StopFetchMasks;
125 UWORD * Overrun;
126 WORD * RealStops;
127 UWORD SpriteWidth;
128 UWORD SpriteFMode;
129 BYTE SoftSprites;
130 BYTE arraywidth;
131 UWORD DefaultSpriteWidth;
132 BYTE SprMoveDisable;
133 UBYTE WantChips;
134 UBYTE BoardMemType;
135 UBYTE Bugs;
136 ULONG * gb_LayersBase;
137 ULONG ColorMask;
138 APTR IVector;
139 APTR IData;
140 ULONG SpecialCounter;
141 APTR DBList;
142 UWORD MonitorFlags;
143 UBYTE ScanDoubledSprites;
144 UBYTE BP3Bits;
146 struct AnalogSignalInterval MonitorVBlank;
147 struct MonitorSpec * natural_monitor;
149 APTR ProgData;
150 UBYTE ExtSprites;
151 UBYTE pad3;
152 UWORD GfxFlags;
153 ULONG VBCounter;
155 struct SignalSemaphore * HashTableSemaphore;
156 ULONG * HWEmul[9];
158 #define ChunkyToPlanarPtr HWEmul[0];
160 /* DisplayFlags */
161 #define NTSC (1<<0)
162 #define GENLOC (1<<1)
163 #define PAL (1<<2)
164 #define TODA_SAFE (1<<3)
165 #define REALLY_PAL (1<<4)
166 #define LPEN_SWAP_FRAMES (1<<5)
168 /* ChipRevBits */
169 #define GFXB_BIG_BLITS 0
170 #define GFXF_BIG_BLITS (1<<0)
171 #define GFXB_HR_AGNUS 0
172 #define GFXF_HR_AGNUS (1<<0)
173 #define GFXB_HR_DENISE 1
174 #define GFXF_HR_DENISE (1<<1)
175 #define GFXB_AA_ALICE 2
176 #define GFXF_AA_ALICE (1<<2)
177 #define GFXB_AA_LISA 3
178 #define GFXF_AA_LISA (1<<3)
179 #define GFXB_AA_MLISA 4
180 #define GFXF_AA_MLISA (1<<4)
182 /* For use in SetChipRev() */
183 #define SETCHIPREV_A GFXF_HR_AGNUS
184 #define SETCHIPREV_ECS (GFXF_HR_AGNUS | GFXF_HR_DENISE)
185 #define SETCHIPREV_AA (SETCHIPREV_ECS | GFXF_AA_ALICE | GFXF_AA_LISA)
186 #define SETCHIPREV_BEST 0xFFFFFFFF
188 #define BUS_16 0
189 #define BUS_32 1
190 #define NML_CAS 0
191 #define DBL_CAS 2
193 #define BANDWIDTH_1X (BUS_16 | NML_CAS)
194 #define BANDWIDTH_2XNML BUS_32
195 #define BANDWIDTH_2XDBL DBL_CAS
196 #define BANDWIDTH_4X (BUS_32 | DBL_CAS)
198 #define BLITMSG_FAULT 4
200 /* PRIVATE */
201 #define NEW_DATABASE 1
203 #endif /* GRAPHICS_GFXBASE_H */