[BOOTVID] Diverse enhancements.
[reactos.git] / drivers / base / bootvid / precomp.h
1 #ifndef _BOOTVID_PCH_
2 #define _BOOTVID_PCH_
3
4 #include <ntifs.h>
5 #include <ndk/halfuncs.h>
6 #include <drivers/bootvid/bootvid.h>
7
8 /* Define if FontData has upside down characters */
9 #undef CHAR_GEN_UPSIDE_DOWN
10
11 #define BOOTCHAR_HEIGHT 13
12
13 #ifndef _M_ARM
14 #include "vga.h"
15 #endif /* _M_ARM */
16
17 /* Bitmap Header */
18 typedef struct tagBITMAPINFOHEADER
19 {
20 ULONG biSize;
21 LONG biWidth;
22 LONG biHeight;
23 USHORT biPlanes;
24 USHORT biBitCount;
25 ULONG biCompression;
26 ULONG biSizeImage;
27 LONG biXPelsPerMeter;
28 LONG biYPelsPerMeter;
29 ULONG biClrUsed;
30 ULONG biClrImportant;
31 } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
32
33 /* Supported bitmap compression formats */
34 #define BI_RGB 0
35 #define BI_RLE4 2
36
37 VOID
38 NTAPI
39 InitializePalette(VOID);
40
41 /* Globals */
42 #ifndef _M_ARM
43 extern ULONG curr_x;
44 extern ULONG curr_y;
45 extern ULONG_PTR VgaRegisterBase;
46 extern ULONG_PTR VgaBase;
47 extern USHORT AT_Initialization[];
48 extern USHORT VGA_640x480[];
49 #endif /* _M_ARM */
50 extern UCHAR FontData[256 * BOOTCHAR_HEIGHT];
51
52 #define __inpb(Port) \
53 READ_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)))
54
55 #define __inpw(Port) \
56 READ_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)))
57
58 #define __outpb(Port, Value) \
59 WRITE_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)), (UCHAR)(Value))
60
61 #define __outpw(Port, Value) \
62 WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)), (USHORT)(Value))
63
64 #endif /* _BOOTVID_PCH_ */