4 /* ---- VGA registers ---- */
5 #define VGA_AC_PORT 0x3c0
6 #define VGA_AC_RD_PORT 0x3c1
7 #define VGA_SC_ADDR_PORT 0x3c4
8 #define VGA_SC_DATA_PORT 0x3c5
9 #define VGA_GC_ADDR_PORT 0x3ce
10 #define VGA_GC_DATA_PORT 0x3cf
11 #define VGA_CRTC_PORT 0x3d4
12 #define VGA_CRTC_ADDR_PORT 0x3d4
13 #define VGA_CRTC_DATA_PORT 0x3d5
14 #define VGA_STAT0_PORT 0x3c2
15 #define VGA_STAT1_PORT 0x3da
16 #define VGA_MISC_PORT 0x3c2
17 #define VGA_MISC_RD_PORT 0x3cc
19 /* attribute controller registers */
20 #define VGA_AC_EN 0x20
21 #define VGA_AC_MODE_REG 0x10
23 /* sequence controller registers */
24 #define VGA_SC_RESET_REG 0x00
25 #define VGA_SC_CLOCK_REG 0x01
26 #define VGA_SC_MAPMASK_REG 0x02
27 #define VGA_SC_MEMMODE_REG 0x04
29 /* graphics controller registers */
30 #define VGA_GC_SR_REG 0x00
31 #define VGA_GC_SREN_REG 0x01
32 #define VGA_GC_ROT_REG 0x03
33 #define VGA_GC_MODE_REG 0x05
34 #define VGA_GC_MASK_REG 0x08
36 /* attribute controller mode register (10h) bits */
37 #define VGA_AC_MODE_GFX 0x01
38 #define VGA_AC_MODE_MONO 0x02
39 #define VGA_AC_MODE_LGE 0x04
40 #define VGA_AC_MODE_BLINK 0x08
41 #define VGA_AC_MODE_PIXPAN 0x20
42 #define VGA_AC_MODE_8BIT 0x40
44 /* misc register bits */
45 #define VGA_MISC_COLOR 0x01
46 #define VGA_MISC_CPUEN 0x02
47 #define VGA_MISC_CLK25 0
48 #define VGA_MISC_CLK28 0x04
49 #define VGA_MISC_PG1 0x20
50 #define VGA_MISC_400 0
51 #define VGA_MISC_350 0x40
52 #define VGA_MISC_480 0xc0
56 #define CRTC_HTOTAL_REG 0x00
57 #define CRTC_HEND_REG 0x01
58 #define CRTC_HBLSTART_REG 0x02
59 #define CRTC_HBLEND_REG 0x03
60 #define CRTC_HRETSTART_REG 0x04
61 #define CRTC_HRETEND_REG 0x05
62 #define CRTC_VTOTAL_REG 0x06
63 #define CRTC_OVF_REG 0x07
64 #define CRTC_PRESET_REG 0x08
65 #define CRTC_MAXSCAN_REG 0x09
66 #define CRTC_CURSTART_REG 0x0a
67 #define CRTC_CUREND_REG 0x0b
68 #define CRTC_STARTH_REG 0x0c
69 #define CRTC_STARTL_REG 0x0d
70 #define CRTC_CURH_REG 0x0e
71 #define CRTC_CURL_REG 0x0f
72 #define CRTC_VRETSTART_REG 0x10
73 #define CRTC_VRETEND_REG 0x11
74 #define CRTC_VEND_REG 0x12
75 #define CRTC_OFFSET_REG 0x13
76 #define CRTC_UL_REG 0x14
77 #define CRTC_VBLSTART_REG 0x15
78 #define CRTC_VBLEND_REG 0x16
79 #define CRTC_MODE_REG 0x17
80 #define CRTC_LCMP_REG 0x18
82 /* CRTC register bits */
83 #define CRTC_VRETEND_PR 0x80
85 #endif /* VGAREGS_H_ */