2014-02-06 11:18:34 +00:00
|
|
|
#ifndef _BOOTVID_PCH_
|
|
|
|
#define _BOOTVID_PCH_
|
|
|
|
|
2019-06-23 00:29:01 +00:00
|
|
|
#include <ntifs.h>
|
|
|
|
#include <ndk/halfuncs.h>
|
2014-01-26 20:24:59 +00:00
|
|
|
#include <drivers/bootvid/bootvid.h>
|
2009-10-12 03:35:35 +00:00
|
|
|
|
|
|
|
/* Define if FontData has upside down characters */
|
|
|
|
#undef CHAR_GEN_UPSIDE_DOWN
|
|
|
|
|
2019-12-22 13:09:43 +00:00
|
|
|
#define BOOTCHAR_HEIGHT 13
|
|
|
|
#define BOOTCHAR_WIDTH 8 // Each character line is encoded in a UCHAR.
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Screen resolution (for default VGA)
|
|
|
|
*/
|
|
|
|
#define SCREEN_WIDTH 640
|
|
|
|
#define SCREEN_HEIGHT 480
|
2009-10-12 03:35:35 +00:00
|
|
|
|
2019-06-23 19:05:28 +00:00
|
|
|
#ifndef _M_ARM
|
|
|
|
#include "vga.h"
|
|
|
|
#endif /* _M_ARM */
|
2009-10-12 03:35:35 +00:00
|
|
|
|
2014-01-26 20:24:59 +00:00
|
|
|
/* Bitmap Header */
|
2009-10-12 03:35:35 +00:00
|
|
|
typedef struct tagBITMAPINFOHEADER
|
|
|
|
{
|
|
|
|
ULONG biSize;
|
|
|
|
LONG biWidth;
|
|
|
|
LONG biHeight;
|
|
|
|
USHORT biPlanes;
|
|
|
|
USHORT biBitCount;
|
|
|
|
ULONG biCompression;
|
|
|
|
ULONG biSizeImage;
|
|
|
|
LONG biXPelsPerMeter;
|
|
|
|
LONG biYPelsPerMeter;
|
|
|
|
ULONG biClrUsed;
|
|
|
|
ULONG biClrImportant;
|
|
|
|
} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
|
|
|
|
|
2014-08-31 23:00:29 +00:00
|
|
|
/* Supported bitmap compression formats */
|
|
|
|
#define BI_RGB 0
|
|
|
|
#define BI_RLE4 2
|
|
|
|
|
2009-10-12 03:35:35 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
2014-08-31 23:00:29 +00:00
|
|
|
InitializePalette(VOID);
|
2009-10-12 03:35:35 +00:00
|
|
|
|
2014-01-26 20:24:59 +00:00
|
|
|
/* Globals */
|
2019-06-23 19:05:28 +00:00
|
|
|
#ifndef _M_ARM
|
2009-10-12 03:35:35 +00:00
|
|
|
extern ULONG curr_x;
|
|
|
|
extern ULONG curr_y;
|
|
|
|
extern ULONG_PTR VgaRegisterBase;
|
|
|
|
extern ULONG_PTR VgaBase;
|
2019-06-23 00:29:01 +00:00
|
|
|
extern USHORT AT_Initialization[];
|
2019-06-23 19:05:28 +00:00
|
|
|
extern USHORT VGA_640x480[];
|
|
|
|
#endif /* _M_ARM */
|
2009-10-12 03:35:35 +00:00
|
|
|
extern UCHAR FontData[256 * BOOTCHAR_HEIGHT];
|
2014-02-06 11:18:34 +00:00
|
|
|
|
2019-06-23 00:29:01 +00:00
|
|
|
#define __inpb(Port) \
|
|
|
|
READ_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)))
|
|
|
|
|
|
|
|
#define __inpw(Port) \
|
|
|
|
READ_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)))
|
|
|
|
|
|
|
|
#define __outpb(Port, Value) \
|
|
|
|
WRITE_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)), (UCHAR)(Value))
|
|
|
|
|
|
|
|
#define __outpw(Port, Value) \
|
|
|
|
WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)), (USHORT)(Value))
|
|
|
|
|
2014-02-06 11:18:34 +00:00
|
|
|
#endif /* _BOOTVID_PCH_ */
|