1 #include <internal/i386/io.h>
5 void outxay(USHORT ad
, UCHAR x
, UCHAR y
)
7 USHORT xy
= (x
<< 8) + y
;
9 VideoPortWritePortUshort((PUSHORT
)ad
, xy
);
12 void setMode(VideoMode mode
)
15 unsigned int y
, c
, a
, m
, n
;
17 VideoPortWritePortUchar((PUCHAR
)MISC
, mode
.Misc
);
18 VideoPortWritePortUchar((PUCHAR
)STATUS
, 0);
19 VideoPortWritePortUchar((PUCHAR
)FEATURE
, mode
.Feature
);
23 outxay(SEQ
, mode
.Seq
[x
], x
);
26 VideoPortWritePortUshort((PUSHORT
)CRTC
, 0x11);
27 VideoPortWritePortUshort((PUSHORT
)CRTC
, (mode
.Crtc
[0x11] & 0x7f));
31 outxay(CRTC
, mode
.Crtc
[x
], x
);
36 outxay(GRAPHICS
, mode
.Gfx
[x
], x
);
39 x
=VideoPortReadPortUchar((PUCHAR
)FEATURE
);
43 VideoPortWritePortUchar((PUCHAR
)ATTRIB
, x
);
44 VideoPortWritePortUchar((PUCHAR
)ATTRIB
, mode
.Attrib
[x
]);
47 x
=VideoPortReadPortUchar((PUCHAR
)STATUS
);
49 VideoPortWritePortUchar((PUCHAR
)ATTRIB
, 0x20);
53 0xa000, /* 0xe3, */ 0xc3, 0x00,
55 {0x02, 0x01, 0x0f, 0x00, 0x06 },
57 {0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0x0b, 0x3e, 0x00, 0x40, 0x00, 0x00,
58 0x00, 0x00, 0x00, 0x59, 0xea, 0x8c, 0xdf, 0x28, 0x00, 0xe7, 0x04, 0xe3,
61 {0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x0f, 0xff},
63 {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
64 0x0c, 0x0d, 0x0e, 0x0f, 0x81, 0x00, 0x0f, 0x00, 0x00}
70 {0x03, 0x01, 0x0f, 0x00, 0x0e},
72 {0x5f, 0x4f, 0x50, 0x82, 0x54, 0x80, 0xbf, 0x1f, 0x00, 0x41, 0x00, 0x00,
73 0x00, 0x00, 0x00, 0x00, 0x9c, 0x0e, 0x8f, 0x28, 0x40, 0x96, 0xb9, 0xa3,
76 {0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x07, 0x0f, 0xff},
78 {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,
79 0x0c, 0x0d, 0x0e, 0x0f, 0x41, 0x00, 0x0f, 0x00, 0x00}
86 // FIXME: Use Vidport to map the memory properly
87 vidmem
= (char *)(0xd0000000 + 0xa0000);
91 WRITE_PORT_USHORT((PUSHORT
)0x3C4, 0x0f02); // index=MASK MAP, write to all bitplanes
93 // RtlZeroMemory(vidmem, 38400);
94 RtlZeroMemory(vidmem
, 64000);