xref: /reactos/drivers/base/bootvid/precomp.h (revision bd712186)
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 #define BOOTCHAR_WIDTH  8 // Each character line is encoded in a UCHAR.
13 
14 /*
15  * Screen resolution (for default VGA)
16  */
17 #define SCREEN_WIDTH    640
18 #define SCREEN_HEIGHT   480
19 
20 #ifndef _M_ARM
21 #include "vga.h"
22 #endif /* _M_ARM */
23 
24 /* Bitmap Header */
25 typedef struct tagBITMAPINFOHEADER
26 {
27     ULONG biSize;
28     LONG biWidth;
29     LONG biHeight;
30     USHORT biPlanes;
31     USHORT biBitCount;
32     ULONG biCompression;
33     ULONG biSizeImage;
34     LONG biXPelsPerMeter;
35     LONG biYPelsPerMeter;
36     ULONG biClrUsed;
37     ULONG biClrImportant;
38 } BITMAPINFOHEADER, *PBITMAPINFOHEADER;
39 
40 /* Supported bitmap compression formats */
41 #define BI_RGB  0
42 #define BI_RLE4 2
43 
44 VOID
45 NTAPI
46 InitializePalette(VOID);
47 
48 /* Globals */
49 #ifndef _M_ARM
50 extern ULONG curr_x;
51 extern ULONG curr_y;
52 extern ULONG_PTR VgaRegisterBase;
53 extern ULONG_PTR VgaBase;
54 extern USHORT AT_Initialization[];
55 extern USHORT VGA_640x480[];
56 #endif /* _M_ARM */
57 extern UCHAR FontData[256 * BOOTCHAR_HEIGHT];
58 
59 #define __inpb(Port) \
60     READ_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)))
61 
62 #define __inpw(Port) \
63     READ_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)))
64 
65 #define __outpb(Port, Value) \
66     WRITE_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)), (UCHAR)(Value))
67 
68 #define __outpw(Port, Value) \
69     WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)), (USHORT)(Value))
70 
71 #endif /* _BOOTVID_PCH_ */
72