Mode 3 is 80x25 text mode. You mean mode 4. The registers are set as follows:
Clocking mode: 09h Map mask: 03h Character map: 00h Memory mode: 02h Output register: 63h CRTC registers: 2Dh, 27h, 28h, 90h, 2Ah, 80h, 0BFh, 1Fh, 0, 0C1h, 0, 0, 0, 0, 0, 0, 9Ch, 8Eh, 8Fh, 14h, 0, 96h, 0B9h, 0A2h, 0FFh Attribute controller registers: 0, 13h, 15h, 17h, 2, 4, 6, 7, 10h, 11h, 12h, 13h, 14h, 15h, 16h, 17h, 1, 0, 3, 0 Graphics registers: 0, 0, 0, 0, 0, 30h, 0fh, 0, 0ffh
You read the VGA registers like this: - To read an attribute controller register, write the index normally and read the data from port 3C1h. - To read the output register, read from port 3CCh. - To read color registers, write the starting index to port 3C7h and read color triplets sequentially from port 3C9h. - To read any other register, write the index normally and read the data from the corresponding data port.
|