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 */
53 return LlbKeypadGetChar();
55 return LlbKeyboardGetChar();
60 LlbFwVideoSetDisplayMode(IN PCHAR DisplayModeName
,
63 /* Return text mode */
68 LlbFwVideoGetDisplaySize(OUT PULONG Width
,
72 /* Query static settings */
73 *Width
= LlbHwGetScreenWidth() / 8;
74 *Height
= LlbHwGetScreenHeight() / 16;
76 /* Depth is always 16 bpp */
81 LlbFwVideoClearScreen(IN UCHAR Attr
)
83 /* Clear the screen */
84 LlbVideoClearScreen(TRUE
);
88 LlbFwVideoPutChar(IN INT c
,
93 ULONG Color
, BackColor
;
96 /* Convert EGA index to color used by hardware */
97 Color
= LlbHwVideoCreateColor(ColorPalette
[Attr
& 0xF][0],
98 ColorPalette
[Attr
& 0xF][1],
99 ColorPalette
[Attr
& 0xF][2]);
100 BackColor
= LlbHwVideoCreateColor(ColorPalette
[Attr
>> 4][0],
101 ColorPalette
[Attr
>> 4][1],
102 ColorPalette
[Attr
>> 4][2]);
104 /* Compute buffer address */
105 Buffer
= (PUSHORT
)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y
* 16)) + (X
* 8);
108 LlbVideoDrawChar(c
, Buffer
, Color
, BackColor
);
115 /* Call existing function */