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)
9 /* DEFINITIONS ***************************************************************/
15 #define TAG_BLUE 'EULB'
17 typedef struct _CFHEADER
19 ULONG Signature
; // File signature 'MSCF' (CAB_SIGNATURE)
20 ULONG Reserved1
; // Reserved field
21 ULONG CabinetSize
; // Cabinet file size
22 ULONG Reserved2
; // Reserved field
23 ULONG FileTableOffset
; // Offset of first CFFILE
24 ULONG Reserved3
; // Reserved field
25 USHORT Version
; // Cabinet version (CAB_VERSION)
26 USHORT FolderCount
; // Number of folders
27 USHORT FileCount
; // Number of files
28 USHORT Flags
; // Cabinet flags (CAB_FLAG_*)
29 USHORT SetID
; // Cabinet set id
30 USHORT CabinetNumber
; // Zero-based cabinet number
31 } CFHEADER
, *PCFHEADER
;
33 typedef struct _CFFILE
35 ULONG FileSize
; // Uncompressed file size in bytes
36 ULONG FileOffset
; // Uncompressed offset of file in the folder
37 USHORT FileControlID
; // File control ID (CAB_FILE_*)
38 USHORT FileDate
; // File date stamp, as used by DOS
39 USHORT FileTime
; // File time stamp, as used by DOS
40 USHORT Attributes
; // File attributes (CAB_ATTRIB_*)
41 /* After this is the NULL terminated filename */
44 #define CAB_SIGNATURE 0x4643534D // "MSCF"
46 #define VIDMEM_BASE 0xb8000
47 #define BITPLANE_BASE 0xa0000
49 #define CRTC_COMMAND ((PUCHAR)0x3d4)
50 #define CRTC_DATA ((PUCHAR)0x3d5)
52 #define CRTC_COLUMNS 0x01
53 #define CRTC_OVERFLOW 0x07
54 #define CRTC_ROWS 0x12
55 #define CRTC_SCANLINES 0x09
56 #define CRTC_CURSORSTART 0x0a
57 #define CRTC_CURSOREND 0x0b
58 #define CRTC_CURSORPOSHI 0x0e
59 #define CRTC_CURSORPOSLO 0x0f
61 #define SEQ_COMMAND ((PUCHAR)0x3c4)
62 #define SEQ_DATA ((PUCHAR)0x3c5)
64 #define GCT_COMMAND ((PUCHAR)0x3ce)
65 #define GCT_DATA ((PUCHAR)0x3cf)
68 #define SEQ_RESET 0x00
69 #define SEQ_ENABLE_WRT_PLANE 0x02
70 #define SEQ_MEM_MODE 0x04
72 /* GCT regs numbers */
73 #define GCT_READ_PLANE 0x04
74 #define GCT_RW_MODES 0x05
75 #define GCT_GRAPH_MODE 0x06
77 #define ATTRC_WRITEREG ((PUCHAR)0x3c0)
78 #define ATTRC_READREG ((PUCHAR)0x3c1)
79 #define ATTRC_INPST1 ((PUCHAR)0x3da)
83 #define MISC (PUCHAR)0x3c2
84 #define SEQ (PUCHAR)0x3c4
85 #define SEQDATA (PUCHAR)0x3c5
86 #define CRTC (PUCHAR)0x3d4
87 #define CRTCDATA (PUCHAR)0x3d5
88 #define GRAPHICS (PUCHAR)0x3ce
89 #define GRAPHICSDATA (PUCHAR)0x3cf
90 #define ATTRIB (PUCHAR)0x3c0
91 #define STATUS (PUCHAR)0x3da
92 #define PELMASK (PUCHAR)0x3c6
93 #define PELINDEX (PUCHAR)0x3c8
94 #define PELDATA (PUCHAR)0x3c9
96 void ScrLoadFontTable(UINT32 CodePage
);
97 NTSTATUS
ExtractFont(UINT32 CodePage
, PUCHAR FontBitField
);