summaryrefslogtreecommitdiff
path: root/os/mpc/screen.h
blob: 8f8288a80ae37d0e096d2173a4d2718677cb4d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
enum {
	Pcolours	= 256,		/* Palette */
	Pred		= 0,
	Pgreen		= 1,
	Pblue		= 2,

	Pblack		= 0x00,
	Pwhite		= 0xFF,
};

typedef struct Cursor Cursor;
struct	Cursor
{
	Point	offset;
	uchar	clr[2*16];
	uchar	set[2*16];
};

/*
 * MPC8xx LCD controller
 */
typedef struct LCDconfig {
	long	freq;	/* ideal panel frequency in Hz */
	int	wbl;	/* wait between lines (shift/clk cycles) */
	int	vpw;	/* vertical sync pulse width (lines) */
	int	wbf;	/* wait between frames (lines) */
	int	ac;	/* AC timing (frames) */
	ulong	flags;
	ulong	notpdpar;	/* reset mask for pdpar */
} LCDconfig;

enum {
	/* lccr flags stored in LCDconfig.flags */
	ClockLow = 1<<11,
	OELow = 1<<10,
	HsyncLow = 1<<9,
	VsyncLow = 1<<8,
	DataLow = 1<<7,
	Passive8 = 1<<4,
	DualScan = 1<<3,
	IsColour = 1<<2,
	IsTFT = 1<<1,
};

/*
 * physical graphics device properties set by archlcdmode
 */
typedef struct Mode {
	int	x;
	int	y;
	int	d;

	uchar*	aperture;
	int	apsize;
	LCDconfig	lcd;
} Mode;

int	archlcdmode(Mode*);
extern	Point	mousexy(void);
extern void	blankscreen(int);