OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [initial/] [orpmon/] [include/] [screen.h] - Blame information for rev 1778

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 809 simons
#ifndef SCREEN_H
2
#define SCREEN_H
3
 
4
#if CRT_ENABLED
5
#define RESX 640
6
#define RESY 480
7
#define CHAR_WIDTH 8
8
#define CHAR_HEIGHT 12
9
#define COLOR_BLACK 0x00
10
#define COLOR_WHITE 0xFF
11
 
12
#define CHARSX (RESX/CHAR_WIDTH)
13
#define CHARSY (RESY/CHAR_HEIGHT)
14
 
15
#define CRT_REG        (CRT_BASE_ADD + 0)
16
#define CRT_PALLETE    (CRT_BASE_ADD + 0x400)
17
#define CRT_BUFFER_REG (CRT_BASE_ADD + 4)
18
#define PUT_PIXEL(x, y, color) (*(((unsigned char *)FB_BASE_ADD) + (y) * RESY + (x)) = (color))
19
#define SET_PALLETE(i, r, g, b) (*(((unsigned long *)CRT_PALLETE) + (i) * 4) = ((r) << 4) | ((g) << 8) | ((b) << 12))
20
 
21
void put_char_xy (int x, int y, char c);
22
void put_char (char c);
23
void put_string (char *s);
24
void screen_clear (void);
25
void screen_init (void);
26
void screen_putc (char);
27
 
28
extern unsigned long fg_color;
29
extern unsigned long bg_color;
30
extern int cx;
31
extern int cy;
32
 
33
#endif /* CRT_ENABLED */
34
#endif
35
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.