2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: boot/armllb/fw.c
5 * PURPOSE: LLB Firmware Routines (accessible by OS Loader)
6 * PROGRAMMERS: ReactOS Portable Systems Group
11 USHORT ColorPalette
[16][3] =
34 /* Just call directly the video function */
45 return LlbHwKbdReady();
51 /* Return the key pressed */
52 return LlbKeyboardGetChar();
56 LlbFwVideoSetDisplayMode(IN PCHAR DisplayModeName
,
59 /* Return text mode */
64 LlbFwVideoGetDisplaySize(OUT PULONG Width
,
68 /* Query static settings */
69 *Width
= LlbHwGetScreenWidth() / 8;
70 *Height
= LlbHwGetScreenHeight() / 16;
72 /* Depth is always 16 bpp */
77 LlbFwVideoClearScreen(IN UCHAR Attr
)
79 /* Clear the screen */
80 LlbVideoClearScreen(TRUE
);
84 LlbFwVideoPutChar(IN INT c
,
89 ULONG Color
, BackColor
;
92 /* Convert EGA index to color used by hardware */
93 Color
= LlbHwVideoCreateColor(ColorPalette
[Attr
& 0xF][0],
94 ColorPalette
[Attr
& 0xF][1],
95 ColorPalette
[Attr
& 0xF][2]);
96 BackColor
= LlbHwVideoCreateColor(ColorPalette
[Attr
>> 4][0],
97 ColorPalette
[Attr
>> 4][1],
98 ColorPalette
[Attr
>> 4][2]);
100 /* Compute buffer address */
101 Buffer
= (PUSHORT
)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y
* 16)) + (X
* 8);
104 LlbVideoDrawChar(c
, Buffer
, Color
, BackColor
);
111 /* Call existing function */