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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [mp3/] [sw/] [console-xess/] [screen.h] - Blame information for rev 1777

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

Line No. Rev Author Line
1 268 lampret
#ifndef SCREEN_H
2
#define SCREEN_H
3
 
4
#define RESX 640
5
#define RESY 480
6
#define CHAR_WIDTH 8
7
#define CHAR_HEIGHT 12
8
#define COLOR_BLACK 0x00
9
#define COLOR_WHITE 0xFF
10
 
11
#define CHARSX (RESX/CHAR_WIDTH)
12
#define CHARSY (RESY/CHAR_HEIGHT)
13
 
14
#define SCREEN_BUFFER     (0x80100000)
15
#define SCREEN_REG        (0xc0000000)
16
#define SCREEN_PALLETE    (0x80000400)
17
#define SCREEN_BUFFER_REG (0xc0000004)
18
#define PUT_PIXEL(x, y, color) (*(((unsigned char *)SCREEN_BUFFER) + (y) * RESY + (x)) = (color))
19
#define SET_PALLETE(i, r, g, b) (*(((unsigned long *)SCREEN_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 ();
25
void screen_init ();
26
 
27
extern unsigned long fg_color;
28
extern unsigned long bg_color;
29
extern int cx;
30
extern int cy;
31
 
32
#endif

powered by: WebSVN 2.1.0

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