return;
}
+USHORT ColorPalette[16][3] =
+{
+ {0x00, 0x00, 0x00},
+ {0x00, 0x00, 0xAA},
+ {0x00, 0xAA, 0x00},
+ {0x00, 0xAA, 0xAA},
+ {0xAA, 0x00, 0x00},
+ {0xAA, 0x00, 0xAA},
+ {0xAA, 0x55, 0x00},
+ {0xAA, 0xAA, 0xAA},
+ {0x55, 0x55, 0x55},
+ {0x55, 0x55, 0xFF},
+ {0x55, 0xFF, 0x55},
+ {0x55, 0xFF, 0xFF},
+ {0xFF, 0x55, 0x55},
+ {0xFF, 0x55, 0xFF},
+ {0xFF, 0xFF, 0x55},
+ {0xFF, 0xFF, 0xFF},
+};
+
VOID
LlbFwVideoCopyOffScreenBufferToVRAM(IN PVOID Buffer)
{
- printf("%s is UNIMPLEMENTED", __FUNCTION__);
- while (TRUE);
+ /* No double-buffer is used on ARM */
+ return;
}
VOID
IN ULONG X,
IN ULONG Y)
{
- printf("%s is UNIMPLEMENTED", __FUNCTION__);
- while (TRUE);
+ ULONG Color, BackColor;
+ PUSHORT Buffer;
+
+ /* Convert EGA index to color used by hardware */
+ Color = LlbHwVideoCreateColor(ColorPalette[Attr & 0xF][0],
+ ColorPalette[Attr & 0xF][1],
+ ColorPalette[Attr & 0xF][2]);
+ BackColor = LlbHwVideoCreateColor(ColorPalette[Attr >> 4][0],
+ ColorPalette[Attr >> 4][1],
+ ColorPalette[Attr >> 4][2]);
+
+ /* Compute buffer address */
+ Buffer = (PUSHORT)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y * 8)) + (X * 8);
+
+ /* Draw it */
+ LlbVideoDrawChar(c, Buffer, Color, BackColor);
}
BOOLEAN
return;
}
+VOID
+LlbFwGetTime(VOID)
+{
+ printf("%s is UNIMPLEMENTED", __FUNCTION__);
+ while (TRUE);
+ return;
+}
+
/* EOF */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
-#if 0
-USHORT ColorPalette[16] =
-{
- RGB565(0x00, 0x00, 0x00),
- RGB565(0x00, 0x00, 0xAA),
- RGB565(0x00, 0xAA, 0x00),
- RGB565(0x00, 0xAA, 0xAA),
- RGB565(0xAA, 0x00, 0x00),
- RGB565(0xAA, 0x00, 0xAA),
- RGB565(0xAA, 0x55, 0x00),
- RGB565(0xAA, 0xAA, 0xAA),
- RGB565(0x55, 0x55, 0x55),
- RGB565(0x55, 0x55, 0xFF),
- RGB565(0x55, 0xFF, 0x55),
- RGB565(0x55, 0xFF, 0xFF),
- RGB565(0xFF, 0x55, 0x55),
- RGB565(0xFF, 0x55, 0xFF),
- RGB565(0xFF, 0xFF, 0x55),
- RGB565(0xFF, 0xFF, 0xFF),
-};
-#endif
-
ULONG ScreenCursor;
VOID
NTAPI
LlbVideoDrawChar(IN CHAR c,
- IN ULONG cx,
- IN ULONG cy,
+ IN PUSHORT Buffer,
IN USHORT Color,
IN USHORT BackColor)
{
- PUSHORT Buffer;
PCHAR Pixels;
CHAR Line;
ULONG y, ScreenWidth;
LONG x;
- PUSHORT VideoBuffer;
-
- /* Get screen width and frame buffer */
- ScreenWidth = LlbHwGetScreenWidth();
- VideoBuffer = LlbHwGetFrameBuffer();
- /* Compute starting address on-screen and in the character-array */
- Buffer = VideoBuffer + ScreenWidth * cy + cx;
+ /* Get screen width */
+ ScreenWidth = LlbHwGetScreenWidth();
Pixels = LlbHwBootFont + c * 8;
/* Loop y pixels */
NTAPI
LlbVideoPutChar(IN CHAR c)
{
- ULONG cx, cy, CharsPerLine, BackColor;
+ ULONG cx, cy, CharsPerLine, BackColor, ScreenWidth;
/* Forecolor on this machine */
BackColor = LlbHwVideoCreateColor(14, 0, 82);
/* Amount of characters in a line */
- CharsPerLine = LlbHwGetScreenWidth() / 8;
+ ScreenWidth = LlbHwGetScreenWidth();
+ CharsPerLine = ScreenWidth / 8;
/* Handle new line and scrolling */
if (c == '\n')
cx = (ScreenCursor % CharsPerLine) * 8;
/* Draw the character and increment the cursor */
- LlbVideoDrawChar(c, cx, cy, 0xFFFF, BackColor);
+ LlbVideoDrawChar(c,
+ (PUSHORT)LlbHwGetFrameBuffer() + ScreenWidth * cy + cx,
+ 0xFFFF,
+ BackColor);
ScreenCursor++;
}
}