ReactOS 0.4.16-dev-2104-gb84fa49
pc.h File Reference
#include "vga.h"
Include dependency graph for pc.h:

Go to the source code of this file.

Macros

#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))
 

Functions

VOID InitPaletteWithTable (_In_reads_(Count) const ULONG *Table, _In_ ULONG Count)
 
VOID PrepareForSetPixel (VOID)
 
FORCEINLINE VOID SetPixel (_In_ ULONG Left, _In_ ULONG Top, _In_ UCHAR Color)
 

Variables

ULONG_PTR VgaRegisterBase
 
ULONG_PTR VgaBase
 
const USHORT AT_Initialization []
 
const USHORT VGA_640x480 []
 
const UCHAR PixelMask [8]
 

Macro Definition Documentation

◆ __inpb

#define __inpb (   Port)     READ_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)))

Definition at line 18 of file pc.h.

◆ __inpw

#define __inpw (   Port)     READ_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)))

Definition at line 21 of file pc.h.

◆ __outpb

#define __outpb (   Port,
  Value 
)     WRITE_PORT_UCHAR((PUCHAR)(VgaRegisterBase + (Port)), (UCHAR)(Value))

Definition at line 24 of file pc.h.

◆ __outpw

#define __outpw (   Port,
  Value 
)     WRITE_PORT_USHORT((PUSHORT)(VgaRegisterBase + (Port)), (USHORT)(Value))

Definition at line 27 of file pc.h.

Function Documentation

◆ InitPaletteWithTable()

VOID InitPaletteWithTable ( _In_reads_(Count) const ULONG Table,
_In_ ULONG  Count 
)

Definition at line 220 of file bootvid.c.

223{
225}
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15

◆ PrepareForSetPixel()

VOID PrepareForSetPixel ( VOID  )

Definition at line 90 of file vga.c.

91{
92 /* Switch to mode 10 */
93 ReadWriteMode(10);
94
95 /* Clear the 4 planes (we're already in unchained mode here) */
97
98 /* Select the color don't care register */
100}
static VOID ReadWriteMode(_In_ UCHAR Mode)
Definition: vga.c:74
#define SEQ_ADDRESS_PORT
Definition: vga.h:69
#define GRAPH_ADDRESS_PORT
Definition: vga.h:81
#define VGA_BASE_IO_PORT
Definition: vga.h:38
#define __outpw(Port, Value)
Definition: pc.h:27

◆ SetPixel()

FORCEINLINE VOID SetPixel ( _In_ ULONG  Left,
_In_ ULONG  Top,
_In_ UCHAR  Color 
)

Definition at line 40 of file pc.h.

44{
45 PUCHAR PixelPosition;
46
47 /* Calculate the pixel position */
48 PixelPosition = (PUCHAR)(VgaBase + (Left >> 3) + (Top * (SCREEN_WIDTH / 8)));
49
50 /* Select the bitmask register and write the mask */
52
53 /* Dummy read to load latch registers */
54 (VOID)READ_REGISTER_UCHAR(PixelPosition);
55
56 /* Set the new color */
57 WRITE_REGISTER_UCHAR(PixelPosition, Color);
58}
#define VOID
Definition: acefi.h:82
static LPHIST_ENTRY Top
Definition: history.c:53
#define IND_BIT_MASK
Definition: vga.h:114
#define SCREEN_WIDTH
Definition: pc98video.c:24
ULONG_PTR VgaBase
Definition: vga.c:69
const UCHAR PixelMask[8]
Definition: vga.c:37
unsigned char * PUCHAR
Definition: typedefs.h:53
NTKERNELAPI VOID NTAPI WRITE_REGISTER_UCHAR(IN PUCHAR Register, IN UCHAR Value)
NTKERNELAPI UCHAR NTAPI READ_REGISTER_UCHAR(IN PUCHAR Register)

Variable Documentation

◆ AT_Initialization

const USHORT AT_Initialization[]
extern

Definition at line 16 of file bootdata.c.

Referenced by ResetDisplay(), and VidInitialize().

◆ PixelMask

const UCHAR PixelMask[8]
extern

Definition at line 37 of file vga.c.

Referenced by ConsoleEfiGopIsPixelFormatSupported(), DisplayCharacter(), and SetPixel().

◆ VGA_640x480

const USHORT VGA_640x480[]
extern

Definition at line 47 of file bootdata.c.

Referenced by ResetDisplay(), and VidInitialize().

◆ VgaBase

◆ VgaRegisterBase

ULONG_PTR VgaRegisterBase
extern

Definition at line 68 of file vga.c.

Referenced by VgaInterpretCmdStream(), and VidInitialize().