17#define TOP_BOTTOM_LINES 0
52VidFbPrintFramebufferInfo(
VOID)
54 TRACE(
"Framebuffer format:\n");
63 TRACE(
" ARGB masks: : %08x/%08x/%08x/%08x\n",
119 ERR(
"Invalid framebuffer dimensions\n");
136 ERR(
"Framebuffer doesn't fit inside the video RAM (FB size: %lu, VRAM size: %lu)\n",
142 if (BitsPerPixel != 32)
145 ERR(
"Unsupported %lu bits per pixel format\n", BitsPerPixel);
150 if (BitsPerPixel > 8)
153 (PixelMasks->RedMask == 0 &&
154 PixelMasks->GreenMask == 0 &&
155 PixelMasks->BlueMask == 0
159 switch (BitsPerPixel)
163 BitMasks->
RedMask = 0x00FF0000;
166 BitMasks->
ReservedMask = ((1 << (BitsPerPixel - 24)) - 1) << 24;
199 VidFbPrintFramebufferInfo();
206 TRACE(
"BitsPerPixel = %lu , BppFromMasks = %lu\n", BitsPerPixel, BppFromMasks);
260 const UCHAR* FontPtr;
281 Pixel[Col] = (0 != (FontPtr[
Line] &
Mask) ? FgColor : BgColor);
340VidFbHideShowTextCursor(
BOOLEAN Show)
346VidFbIsPaletteFixed(
VOID)
378#define VGA_CHAR_SIZE 2
380#define FBCONS_WIDTH (framebufInfo.ScreenWidth / CHAR_WIDTH)
381#define FBCONS_HEIGHT ((framebufInfo.ScreenHeight - 2 * TOP_BOTTOM_LINES) / CHAR_HEIGHT)
389 Intensity = (0 == (Attr & 0x08) ? 127 : 255);
392 (0 == (Attr & 0x04) ? 0 : (
Intensity << 16)) |
393 (0 == (Attr & 0x02) ? 0 : (
Intensity << 8)) |
502 for (Row = 0; Row <
Height; ++Row)
504 for (Col = 0; Col <
Width; ++Col)
506 FbConsPutChar(OffScreenBuffer[0], OffScreenBuffer[1], Col, Row);
#define DBG_DEFAULT_CHANNEL(ch)
static WORD Intensity(RGBQUAD clr)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
static ULONG ScreenHeight
ReactOS Framebuffer-specific video device configuration data.
struct _CM_FRAMEBUF_DEVICE_DATA::@3566 PixelMasks
ULONG BitsPerPixel
Pixel depth.
ULONG PixelsPerScanLine
Pitch/stride in pixels.
Physical format of an RGB pixel, specified with per-component bit-masks. A bit being set defines thos...
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
const UCHAR BitmapFont8x16[256 *CHAR_HEIGHT]
VOID FbConsScrollUp(_In_ UCHAR Attr)
VOID FbConsClearScreen(_In_ UCHAR Attr)
VOID FbConsGetDisplaySize(_Out_ PULONG Width, _Out_ PULONG Height, _Out_ PULONG Depth)
Returns the width and height in number of CGA characters/attributes, of a full text-mode CGA-style ch...
ULONG VidFbGetBufferSize(VOID)
Returns the size in bytes, of a full graphics pixel buffer rectangle that can fill the whole visible ...
static FRAMEBUFFER_INFO framebufInfo
VOID VidFbClearScreenColor(_In_ UINT32 Color, _In_ BOOLEAN FullScreen)
VOID VidFbScrollUp(_In_ UINT32 Color, _In_ ULONG Scroll)
ULONG FbConsGetBufferSize(VOID)
Returns the size in bytes, of a full text-mode CGA-style character buffer rectangle that can fill the...
struct _FRAMEBUFFER_INFO FRAMEBUFFER_INFO
static VOID FbConsAttrToColors(_In_ UCHAR Attr, _Out_ PUINT32 FgColor, _Out_ PUINT32 BgColor)
Maps a text-mode CGA-style character attribute to separate foreground and background ARGB colors.
static CM_FRAMEBUF_DEVICE_DATA FrameBufferData
VOID FbConsPutChar(_In_ UCHAR Char, _In_ UCHAR Attr, _In_ ULONG Column, _In_ ULONG Row)
Displays a character with specific text attributes at a given position.
static UINT32 FbConsAttrToSingleColor(_In_ UCHAR Attr)
VOID FbConsOutputChar(_In_ UCHAR Char, _In_ ULONG Column, _In_ ULONG Row, _In_ UINT32 FgColor, _In_ UINT32 BgColor)
Displays a character at a given position with specific foreground and background colors.
VOID VidFbOutputChar(_In_ UCHAR Char, _In_ ULONG X, _In_ ULONG Y, _In_ UINT32 FgColor, _In_ UINT32 BgColor)
Displays a character at a given pixel position with specific foreground and background colors.
VOID VidFbGetDisplaySize(_Out_ PULONG Width, _Out_ PULONG Height, _Out_ PULONG Depth)
Returns the width and height in pixels, of the whole visible area of the graphics framebuffer.
VOID FbConsCopyOffScreenBufferToVRAM(_In_ PVOID Buffer)
Copies a full text-mode CGA-style character buffer rectangle to the console.
struct _FRAMEBUFFER_INFO * PFRAMEBUFFER_INFO
BOOLEAN VidFbInitializeVideo(_Out_opt_ PCM_FRAMEBUF_DEVICE_DATA *pFbData, _In_ ULONG_PTR BaseAddress, _In_ ULONG BufferSize, _In_ UINT32 ScreenWidth, _In_ UINT32 ScreenHeight, _In_ UINT32 PixelsPerScanLine, _In_ UINT32 BitsPerPixel, _In_opt_ PPIXEL_BITMASK PixelMasks)
Initializes internal framebuffer information based on the given parameters.
FORCEINLINE ULONG PixelBitmasksToBpp(_In_ ULONG RedMask, _In_ ULONG GreenMask, _In_ ULONG BlueMask, _In_ ULONG ReservedMask)
Calculates the number of bits per pixel ("PixelDepth") for the given pixel format,...
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth