- changed VGA register offset and bits
Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@614 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -242,18 +242,37 @@ void _ser_putchar(char c)
|
||||
|
||||
void cg_writechar(char c)
|
||||
{
|
||||
volatile UINT32 *pCG_data = (UINT32*)sys_vga_data;
|
||||
volatile UINT32 *pCG_ctrl = (UINT32*)sys_vga_ctrl;
|
||||
volatile UINT32 *pCG_ascii = (UINT32*)sys_vga_ascii;
|
||||
|
||||
while (!(*pCG_data & 1));
|
||||
*pCG_data = (UINT32)c;
|
||||
while (!(*pCG_ctrl & sys_vga_bit_cgrdy));
|
||||
*pCG_ascii = (UINT32)c;
|
||||
}
|
||||
|
||||
void cg_clr_line(void)
|
||||
{
|
||||
volatile UINT32 *pCG_clrline = (UINT32*)sys_vga_clrline;
|
||||
volatile UINT32 *pCG_ctrl = (UINT32*)sys_vga_ctrl;
|
||||
|
||||
while (!(*pCG_ctrl & sys_vga_bit_cgrdy));
|
||||
*pCG_ctrl |= sys_vga_bit_clrline;
|
||||
}
|
||||
|
||||
void cg_clr_screen(void)
|
||||
{
|
||||
volatile UINT32 *pCG_ctrl = (UINT32*)sys_vga_ctrl;
|
||||
volatile UINT32 *pCG_x = (UINT32*)sys_vga_posx;
|
||||
volatile UINT32 *pCG_y = (UINT32*)sys_vga_posy;
|
||||
|
||||
while (!(*pCG_ctrl & sys_vga_bit_cgrdy));
|
||||
*pCG_ctrl |= sys_vga_bit_clrscr;
|
||||
|
||||
// Cursor home
|
||||
while (!(*pCG_ctrl & sys_vga_bit_cgrdy));
|
||||
*pCG_x = 0;
|
||||
|
||||
while (!(*pCG_ctrl & sys_vga_bit_cgrdy));
|
||||
*pCG_y = 0;
|
||||
|
||||
while (!(*pCG_clrline & 1));
|
||||
*pCG_clrline = 1;
|
||||
}
|
||||
|
||||
void _cg_putchar(char c)
|
||||
|
||||
Reference in New Issue
Block a user