ReactOS 0.4.15-dev-7842-g558ab78
pc.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Boot Video Driver for VGA-compatible cards
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: VGA definitions
5 * COPYRIGHT: Copyright 2007 Alex Ionescu <alex.ionescu@reactos.org>
6 */
7
8#pragma once
9
11extern ULONG_PTR VgaBase;
13extern USHORT VGA_640x480[];
14extern UCHAR PixelMask[8];
15
16#define __inpb(Port) \
17 READ_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)))
18
19#define __inpw(Port) \
20 READ_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)))
21
22#define __outpb(Port, Value) \
23 WRITE_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)), (UCHAR)(Value))
24
25#define __outpw(Port, Value) \
26 WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)), (USHORT)(Value))
27
28VOID
32
33VOID
35
37VOID
39 _In_ ULONG Left,
42{
43 PUCHAR PixelPosition;
44
45 /* Calculate the pixel position */
46 PixelPosition = (PUCHAR)(VgaBase + (Left >> 3) + (Top * (SCREEN_WIDTH / 8)));
47
48 /* Select the bitmask register and write the mask */
50
51 /* Dummy read to load latch registers */
52 (VOID)READ_REGISTER_UCHAR(PixelPosition);
53
54 /* Set the new color */
55 WRITE_REGISTER_UCHAR(PixelPosition, Color);
56}
57
58VOID
60 _In_ ULONG CurrentTop,
61 _In_ ULONG TopDelta,
62 _In_ BOOLEAN Restore);
63
64VOID
66 _In_ ULONG Scroll);
67
68VOID
70 _In_ CHAR Character,
71 _In_ ULONG Left,
73 _In_ ULONG TextColor,
74 _In_ ULONG BackColor);
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
static LPHIST_ENTRY Top
Definition: history.c:53
#define GRAPH_ADDRESS_PORT
Definition: vga.h:81
#define IND_BIT_MASK
Definition: vga.h:114
#define VGA_BASE_IO_PORT
Definition: vga.h:38
ASMGENDATA Table[]
Definition: genincdata.c:61
#define _In_
Definition: ms_sal.h:308
int Count
Definition: noreturn.cpp:7
#define SCREEN_WIDTH
Definition: pc98video.c:27
ULONG_PTR VgaRegisterBase
Definition: vga.c:68
VOID PreserveRow(_In_ ULONG CurrentTop, _In_ ULONG TopDelta, _In_ BOOLEAN Restore)
Definition: bootvid.c:111
#define __outpw(Port, Value)
Definition: pc.h:25
VOID PrepareForSetPixel(VOID)
Definition: vga.c:90
USHORT VGA_640x480[]
Definition: bootdata.c:46
ULONG_PTR VgaBase
Definition: vga.c:69
FORCEINLINE VOID SetPixel(_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
Definition: pc.h:38
USHORT AT_Initialization[]
Definition: bootdata.c:15
VOID DisplayCharacter(_In_ CHAR Character, _In_ ULONG Left, _In_ ULONG Top, _In_ ULONG TextColor, _In_ ULONG BackColor)
Definition: bootvid.c:19
VOID DoScroll(_In_ ULONG Scroll)
Definition: bootvid.c:64
VOID InitPaletteWithTable(_In_ PULONG Table, _In_ ULONG Count)
Definition: bootvid.c:172
UCHAR PixelMask[8]
Definition: vga.c:37
unsigned short USHORT
Definition: pedump.c:61
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG_PTR
Definition: typedefs.h:65
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define FORCEINLINE
Definition: wdftypes.h:67
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175