ReactOS  0.4.14-dev-50-g13bb5e2
blue.h
Go to the documentation of this file.
1 /*
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)
7  */
8 
9 #ifndef _BLUE_PCH_
10 #define _BLUE_PCH_
11 
12 #include <wdm.h>
13 
15 
16 // Define material that normally comes from PSDK
17 // This is mandatory to prevent any inclusion of
18 // user-mode stuff.
19 typedef struct tagCOORD {
22 } COORD, *PCOORD;
23 
24 typedef struct tagSMALL_RECT {
29 } SMALL_RECT;
30 
38 
39 typedef struct tagCONSOLE_CURSOR_INFO {
43 
44 #define ENABLE_PROCESSED_OUTPUT 0x0001
45 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
46 
47 #include <blue/ntddblue.h>
48 #include <ndk/inbvfuncs.h>
49 
50 #define TAG_BLUE 'EULB'
51 
52 typedef struct _CFHEADER
53 {
54  ULONG Signature; // File signature 'MSCF' (CAB_SIGNATURE)
55  ULONG Reserved1; // Reserved field
56  ULONG CabinetSize; // Cabinet file size
57  ULONG Reserved2; // Reserved field
58  ULONG FileTableOffset; // Offset of first CFFILE
59  ULONG Reserved3; // Reserved field
60  USHORT Version; // Cabinet version (CAB_VERSION)
61  USHORT FolderCount; // Number of folders
62  USHORT FileCount; // Number of files
63  USHORT Flags; // Cabinet flags (CAB_FLAG_*)
64  USHORT SetID; // Cabinet set id
65  USHORT CabinetNumber; // Zero-based cabinet number
67 
68 typedef struct _CFFILE
69 {
70  ULONG FileSize; // Uncompressed file size in bytes
71  ULONG FileOffset; // Uncompressed offset of file in the folder
72  USHORT FileControlID; // File control ID (CAB_FILE_*)
73  USHORT FileDate; // File date stamp, as used by DOS
74  USHORT FileTime; // File time stamp, as used by DOS
75  USHORT Attributes; // File attributes (CAB_ATTRIB_*)
76  /* After this is the NULL terminated filename */
77 } CFFILE, *PCFFILE;
78 
79 #define CAB_SIGNATURE 0x4643534D // "MSCF"
80 
81 #define VIDMEM_BASE 0xb8000
82 #define BITPLANE_BASE 0xa0000
83 
84 #define CRTC_COMMAND ((PUCHAR)0x3d4)
85 #define CRTC_DATA ((PUCHAR)0x3d5)
86 
87 #define CRTC_COLUMNS 0x01
88 #define CRTC_OVERFLOW 0x07
89 #define CRTC_ROWS 0x12
90 #define CRTC_SCANLINES 0x09
91 #define CRTC_CURSORSTART 0x0a
92 #define CRTC_CURSOREND 0x0b
93 #define CRTC_CURSORPOSHI 0x0e
94 #define CRTC_CURSORPOSLO 0x0f
95 
96 #define SEQ_COMMAND ((PUCHAR)0x3c4)
97 #define SEQ_DATA ((PUCHAR)0x3c5)
98 
99 #define GCT_COMMAND ((PUCHAR)0x3ce)
100 #define GCT_DATA ((PUCHAR)0x3cf)
101 
102 /* SEQ regs numbers*/
103 #define SEQ_RESET 0x00
104 #define SEQ_ENABLE_WRT_PLANE 0x02
105 #define SEQ_MEM_MODE 0x04
106 
107 /* GCT regs numbers */
108 #define GCT_READ_PLANE 0x04
109 #define GCT_RW_MODES 0x05
110 #define GCT_GRAPH_MODE 0x06
111 
112 #define ATTRC_WRITEREG ((PUCHAR)0x3c0)
113 #define ATTRC_READREG ((PUCHAR)0x3c1)
114 #define ATTRC_INPST1 ((PUCHAR)0x3da)
115 
116 #define TAB_WIDTH 8
117 
118 #define MAX_PATH 260
119 
120 #define MISC (PUCHAR)0x3c2
121 #define SEQ (PUCHAR)0x3c4
122 #define SEQDATA (PUCHAR)0x3c5
123 #define CRTC (PUCHAR)0x3d4
124 #define CRTCDATA (PUCHAR)0x3d5
125 #define GRAPHICS (PUCHAR)0x3ce
126 #define GRAPHICSDATA (PUCHAR)0x3cf
127 #define ATTRIB (PUCHAR)0x3c0
128 #define STATUS (PUCHAR)0x3da
129 #define PELMASK (PUCHAR)0x3c6
130 #define PELINDEX (PUCHAR)0x3c8
131 #define PELDATA (PUCHAR)0x3c9
132 
133 void ScrLoadFontTable(UINT32 CodePage);
134 NTSTATUS ExtractFont(UINT32 CodePage, PUCHAR FontBitField);
135 
136 #endif /* _BLUE_PCH_ */
NTSTATUS ExtractFont(UINT32 CodePage, PUCHAR FontBitField)
Definition: font.c:69
struct tagCONSOLE_CURSOR_INFO * PCONSOLE_CURSOR_INFO
struct _CFFILE * PCFFILE
USHORT FileDate
Definition: cabinet.c:119
SHORT X
Definition: blue.h:20
unsigned char * PUCHAR
Definition: retypes.h:3
struct _CFFILE CFFILE
LONG NTSTATUS
Definition: precomp.h:26
struct tagCONSOLE_SCREEN_BUFFER_INFO CONSOLE_SCREEN_BUFFER_INFO
void ScrLoadFontTable(UINT32 CodePage)
Definition: font.c:27
USHORT Version
Definition: cabinet.c:86
USHORT FileTime
Definition: cabinet.c:120
ULONG Reserved3
Definition: cabinet.c:85
ULONG Signature
Definition: cabinet.c:80
struct tagSMALL_RECT SMALL_RECT
USHORT Attributes
Definition: cabinet.c:121
unsigned int UINT32
struct _SECURITY_ATTRIBUTES * PSECURITY_ATTRIBUTES
Definition: blue.h:14
short SHORT
Definition: pedump.c:59
USHORT FileCount
Definition: cabinet.c:88
struct tagCOORD COORD
struct tagCOORD * PCOORD
unsigned char BOOLEAN
SHORT Y
Definition: blue.h:21
USHORT FolderCount
Definition: cabinet.c:87
USHORT CabinetNumber
Definition: cabinet.c:91
SHORT Left
Definition: blue.h:25
BOOLEAN bVisible
Definition: blue.h:41
SHORT Bottom
Definition: blue.h:28
SHORT Top
Definition: blue.h:26
USHORT SetID
Definition: cabinet.c:90
struct _CFHEADER * PCFHEADER
ULONG Reserved1
Definition: cabinet.c:81
ULONG FileOffset
Definition: cabinet.c:117
USHORT Flags
Definition: cabinet.c:89
Definition: bl.h:1338
Definition: blue.h:19
struct _CFHEADER CFHEADER
unsigned short USHORT
Definition: pedump.c:61
ULONG CabinetSize
Definition: cabinet.c:82
unsigned int ULONG
Definition: retypes.h:1
ULONG FileSize
Definition: cabinet.c:116
SHORT Right
Definition: blue.h:27
struct tagCONSOLE_SCREEN_BUFFER_INFO * PCONSOLE_SCREEN_BUFFER_INFO
ULONG FileTableOffset
Definition: cabinet.c:84
struct tagCONSOLE_CURSOR_INFO CONSOLE_CURSOR_INFO
ULONG Reserved2
Definition: cabinet.c:83
USHORT FileControlID
Definition: blue.h:72