2 * PROJECT: ReactOS Setup Driver
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: drivers/setup/blue/font.h
5 * PURPOSE: Loading specific fonts into VGA
6 * PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org)
11 typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
, *PSECURITY_ATTRIBUTES
;
13 // Define material that normally comes from PSDK
14 // This is mandatory to prevent any inclusion of
16 typedef struct tagCOORD
{
21 typedef struct tagSMALL_RECT
{
28 typedef struct tagCONSOLE_SCREEN_BUFFER_INFO
{
30 COORD dwCursorPosition
;
33 COORD dwMaximumWindowSize
;
34 } CONSOLE_SCREEN_BUFFER_INFO
, *PCONSOLE_SCREEN_BUFFER_INFO
;
36 typedef struct tagCONSOLE_CURSOR_INFO
{
39 } CONSOLE_CURSOR_INFO
, *PCONSOLE_CURSOR_INFO
;
41 #define ENABLE_PROCESSED_OUTPUT 0x0001
42 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
44 #include <blue/ntddblue.h>
45 #include <ndk/inbvfuncs.h>
47 #define TAG_BLUE 'EULB'
49 typedef struct _CFHEADER
51 ULONG Signature
; // File signature 'MSCF' (CAB_SIGNATURE)
52 ULONG Reserved1
; // Reserved field
53 ULONG CabinetSize
; // Cabinet file size
54 ULONG Reserved2
; // Reserved field
55 ULONG FileTableOffset
; // Offset of first CFFILE
56 ULONG Reserved3
; // Reserved field
57 USHORT Version
; // Cabinet version (CAB_VERSION)
58 USHORT FolderCount
; // Number of folders
59 USHORT FileCount
; // Number of files
60 USHORT Flags
; // Cabinet flags (CAB_FLAG_*)
61 USHORT SetID
; // Cabinet set id
62 USHORT CabinetNumber
; // Zero-based cabinet number
63 } CFHEADER
, *PCFHEADER
;
65 typedef struct _CFFILE
67 ULONG FileSize
; // Uncompressed file size in bytes
68 ULONG FileOffset
; // Uncompressed offset of file in the folder
69 USHORT FileControlID
; // File control ID (CAB_FILE_*)
70 USHORT FileDate
; // File date stamp, as used by DOS
71 USHORT FileTime
; // File time stamp, as used by DOS
72 USHORT Attributes
; // File attributes (CAB_ATTRIB_*)
73 /* After this is the NULL terminated filename */
76 #define CAB_SIGNATURE 0x4643534D // "MSCF"
78 #define VIDMEM_BASE 0xb8000
79 #define BITPLANE_BASE 0xa0000
81 #define CRTC_COMMAND ((PUCHAR)0x3d4)
82 #define CRTC_DATA ((PUCHAR)0x3d5)
84 #define CRTC_COLUMNS 0x01
85 #define CRTC_OVERFLOW 0x07
86 #define CRTC_ROWS 0x12
87 #define CRTC_SCANLINES 0x09
88 #define CRTC_CURSORSTART 0x0a
89 #define CRTC_CURSOREND 0x0b
90 #define CRTC_CURSORPOSHI 0x0e
91 #define CRTC_CURSORPOSLO 0x0f
93 #define SEQ_COMMAND ((PUCHAR)0x3c4)
94 #define SEQ_DATA ((PUCHAR)0x3c5)
96 #define GCT_COMMAND ((PUCHAR)0x3ce)
97 #define GCT_DATA ((PUCHAR)0x3cf)
100 #define SEQ_RESET 0x00
101 #define SEQ_ENABLE_WRT_PLANE 0x02
102 #define SEQ_MEM_MODE 0x04
104 /* GCT regs numbers */
105 #define GCT_READ_PLANE 0x04
106 #define GCT_RW_MODES 0x05
107 #define GCT_GRAPH_MODE 0x06
109 #define ATTRC_WRITEREG ((PUCHAR)0x3c0)
110 #define ATTRC_READREG ((PUCHAR)0x3c1)
111 #define ATTRC_INPST1 ((PUCHAR)0x3da)
117 #define MISC (PUCHAR)0x3c2
118 #define SEQ (PUCHAR)0x3c4
119 #define SEQDATA (PUCHAR)0x3c5
120 #define CRTC (PUCHAR)0x3d4
121 #define CRTCDATA (PUCHAR)0x3d5
122 #define GRAPHICS (PUCHAR)0x3ce
123 #define GRAPHICSDATA (PUCHAR)0x3cf
124 #define ATTRIB (PUCHAR)0x3c0
125 #define STATUS (PUCHAR)0x3da
126 #define PELMASK (PUCHAR)0x3c6
127 #define PELINDEX (PUCHAR)0x3c8
128 #define PELDATA (PUCHAR)0x3c9
130 void ScrLoadFontTable(UINT32 CodePage
);
131 NTSTATUS
ExtractFont(UINT32 CodePage
, PUCHAR FontBitField
);