ReactOS 0.4.15-dev-7674-gc0b4db1
fw.c
Go to the documentation of this file.
1/*
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
7 */
8
9#include "precomp.h"
10
12{
13 {0x00, 0x00, 0x00},
14 {0x00, 0x00, 0xAA},
15 {0x00, 0xAA, 0x00},
16 {0x00, 0xAA, 0xAA},
17 {0xAA, 0x00, 0x00},
18 {0xAA, 0x00, 0xAA},
19 {0xAA, 0x55, 0x00},
20 {0xAA, 0xAA, 0xAA},
21 {0x55, 0x55, 0x55},
22 {0x55, 0x55, 0xFF},
23 {0x55, 0xFF, 0x55},
24 {0x55, 0xFF, 0xFF},
25 {0xFF, 0x55, 0x55},
26 {0xFF, 0x55, 0xFF},
27 {0xFF, 0xFF, 0x55},
28 {0xFF, 0xFF, 0xFF},
29};
30
31VOID
33{
34 /* Just call directly the video function */
36
37 /* DEBUG ONLY */
39}
40
43{
44 /* Check RX buffer */
45 return LlbHwKbdReady();
46}
47
48INT
50{
51 /* Return the key pressed */
52#ifdef _ZOOM2_
53 return LlbKeypadGetChar();
54#else
55 return LlbKeyboardGetChar();
56#endif
57}
58
62{
63 /* Return text mode */
64 return 0;
65}
66
67VOID
71{
72 /* Query static settings */
75
76 /* Depth is always 16 bpp */
77 *Depth = 16;
78}
79
80VOID
82{
83 /* Clear the screen */
85}
86
87VOID
89 IN UCHAR Attr,
90 IN ULONG X,
91 IN ULONG Y)
92{
93 ULONG Color, BackColor;
95
96 /* Convert EGA index to color used by hardware */
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]);
103
104 /* Compute buffer address */
105 Buffer = (PUSHORT)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y * 16)) + (X * 8);
106
107 /* Draw it */
108 LlbVideoDrawChar(c, Buffer, Color, BackColor);
109}
110
111
114{
115 /* Call existing function */
116 return LlbGetTime();
117}
118
119/* EOF */
unsigned char BOOLEAN
CHAR NTAPI LlbKeyboardGetChar(VOID)
Definition: keyboard.c:225
CHAR NTAPI LlbKeypadGetChar(VOID)
Definition: matrix.c:29
VOID NTAPI LlbSerialPutChar(IN CHAR c)
Definition: serial.c:13
TIMEINFO *NTAPI LlbGetTime(VOID)
Definition: time.c:84
VOID NTAPI LlbVideoPutChar(IN UCHAR c)
Definition: video.c:349
VOID NTAPI LlbVideoDrawChar(IN UCHAR c, IN PUSHORT Buffer, IN USHORT Color, IN USHORT BackColor)
Definition: video.c:277
VOID NTAPI LlbVideoClearScreen(IN BOOLEAN OsLoader)
Definition: video.c:310
Definition: bufpool.h:45
#define TRUE
Definition: types.h:120
#define Y(I)
ULONG LlbFwVideoSetDisplayMode(IN PCHAR DisplayModeName, IN BOOLEAN Init)
Definition: fw.c:60
VOID LlbFwPutChar(INT Ch)
Definition: fw.c:32
VOID LlbFwVideoClearScreen(IN UCHAR Attr)
Definition: fw.c:81
VOID LlbFwVideoGetDisplaySize(OUT PULONG Width, OUT PULONG Height, OUT PULONG Depth)
Definition: fw.c:68
BOOLEAN LlbFwKbHit(VOID)
Definition: fw.c:42
INT LlbFwGetCh(VOID)
Definition: fw.c:49
VOID LlbFwVideoPutChar(IN INT c, IN UCHAR Attr, IN ULONG X, IN ULONG Y)
Definition: fw.c:88
TIMEINFO * LlbFwGetTime(VOID)
Definition: fw.c:113
const GLubyte * c
Definition: glext.h:8905
ULONG NTAPI LlbHwVideoCreateColor(IN ULONG Red, IN ULONG Green, IN ULONG Blue)
Definition: hwinfo.c:83
BOOLEAN NTAPI LlbHwKbdReady(VOID)
Definition: hwinfo.c:48
PVOID NTAPI LlbHwGetFrameBuffer(VOID)
Definition: hwinfo.c:76
ULONG NTAPI LlbHwGetScreenWidth(VOID)
Definition: hwinfo.c:62
ULONG NTAPI LlbHwGetScreenHeight(VOID)
Definition: hwinfo.c:69
unsigned short USHORT
Definition: pedump.c:61
#define Ch(x, y, z)
Definition: sha2.c:141
Definition: fw.h:10
uint32_t * PULONG
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
uint16_t * PUSHORT
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:819
unsigned char UCHAR
Definition: xmlstorage.h:181