1#ifndef __CMD2D_H__
2#define __CMD2D_H__
3
4/*
5 * commands the 2d microcode offers
6 */
7
8#define CMD_SETUP					32
9#define CMD_SET_PIX_REG				2
10#define CMD_RECT_SOLID				1
11#define CMD_RECT_SOLID_ROP			41
12#define CMD_SET_FGCOLOR				50
13#define CMD_DD_RECT_SOLID			38
14#define CMD_SCREEN_BLT				12
15#define CMD_DD_SCREEN_BLT			37
16#define CMD_BITBLT_MS_COLOR			7
17#define CMD_BITBLT_MS_MONO			22
18#define CMD_LOAD_COLOR_BRUSH		5
19#define CMD_RECT_COLOR_BRUSH		6
20#define CMD_RECT_COLOR_BRUSH_ROP	24
21#define CMD_LOAD_MONO_BRUSH			4
22#define CMD_RECT_MONO_BRUSH			3
23#define CMD_RECT_MONO_BRUSH_ROP		42
24#define CMD_SET_PIXEL				34
25#define CMD_GET_PIXEL				9
26#define CMD_LINE_SOLID				20
27#define CMD_LINE_STYLE				21
28#define CMD_SCAN_LINE_SOLID			15
29#define CMD_BSCAN_SOLID				19
30#define CMD_BSCAN_COLOR				14
31#define CMD_BSCAN_MONO				13
32#define CMD_ENDSCAN					18
33#define CMD_SCANLINE_COLOR_BRUSH	17
34#define CMD_SCANLINE_MONO_BRUSH		16
35#define CMD_STRETCH_BLT				23
36#define CMD_DD_STRETCH_BLT			39
37#define CMD_LOAD_COLOR_TABLE		25
38#define CMD_BLTDIB1					26
39#define CMD_BLTDIB4					27
40#define CMD_BLTDIB8					28
41#define CMD_BLTRLE4					30
42#define CMD_BLTRLE8					31
43#define CMD_SET_PALETTE				33
44#define CMD_SETCLIPPING				36
45#define CMD_DRAWGLYPHS				35
46#define CMD_DD_YUV2RGB				43
47#define CMD_DD_YUV2RGBCk			44
48
49
50
51/*
52 * pixel formats (R: red, G: green, B: blue, I: intensity/index, A: alpha)
53 *
54 * <ml>: this is redundant; one should use the enums in vtypes.h.
55 */
56
57#define FMT_SOURCE					0
58#define FMT_8_332_RGB				1
59#define FMT_8_I						2
60#define FMT_8_A						3
61#define FMT_16_565_RGB				4
62#define FMT_16_4444_ARGB			5
63#define FMT_16_1555_ARGB			6
64#define FMT_4I_565_RGB				8
65#define FMT_4I_444_ARGB				9
66#define FMT_4I_1555_ARGB			0xa
67#define FMT_32_8888_ARGB			0xc
68#define FMT_32_888_Y0CrY1Cb			0xd
69
70
71
72/*
73 * stride values for address calculation
74 */
75
76#define STRIDE0_0					0
77#define STRIDE0_8					1
78#define STRIDE0_9					2
79#define STRIDE0_10					3
80#define STRIDE0_2					4
81#define STRIDE1_0					0
82#define STRIDE1_4					1
83#define STRIDE1_5					2
84#define STRIDE1_6					3
85#define STRIDE1_7					4
86#define STRIDE1_10					5
87#define STRIDE1_11					6
88#define STRIDE1_12					7
89
90
91
92/*
93 * raster operations (S: source, D: destination, N: not)
94 */
95
96#define ROP_ALLBITS0				0
97#define ROP_NOR_SD					1
98#define ROP_AND_NSD					2
99#define ROP_NOT_S					3
100#define ROP_AND_SND					4
101#define ROP_NOT_D					5
102#define ROP_XOR_SD					6
103#define ROP_NAND_SD					7
104#define ROP_AND_SD					8
105#define ROP_XNOR_SD					9
106#define ROP_D						0xa
107#define ROP_OR_NSD					0xb
108#define ROP_S						0xc
109#define ROP_OR_SND					0xd
110#define ROP_OR_SD					0xe
111#define ROP_ALLBITS1				0xf
112
113
114
115/*
116 * ... modes
117 */
118
119#define MODE_TRANSPARENT			0
120#define MODE_OPAQUE					1
121
122
123
124/*
125 * 8x8 predefined monochrome brushes
126 */
127
128#define HS_HORIZONTAL				0
129#define HS_VERTICAL					1
130#define HS_FDIAGONAL				2
131#define HS_BDIAGONAL				3
132#define HS_CROSS					4
133#define HS_DIAGCROSS				5
134
135
136
137/*
138 * pen styles for styled lined
139 */
140
141#define PS_DASH						1
142#define PS_DOT						2
143#define PS_DASHDOT					3
144#define PS_DASHDOTDOT				4
145
146/* end of __CMD2D_H__ */
147#endif
148