Beyond BIOS, direct VGA access uses attribute controller, sequencer, and graphics controller ports unlocked via the feature control register. Mode 13h is easy; high-resolution modes need register sets from VESA or custom tables. For example, writing sequencer index 0x00 to port 0x3C4 begins a register sequence that sets dot clock and memory mode.
Port map basics
c
Loading…
DAC: Port 0x3C8/0x3C9 for palette in 256-color modes
Plane manipulation: Graphics controller maps writes to planes 0-3
Chain-4: Sequencer memory mode affects how bytes hit video RAM
Mistimed register writes produce snow or blank screens
Mode 13h vs planar
Mode 13h is popular for demos because it is linear-enough for byte writes, while 640x480x16 requires four plane passes per pixel. Sequencer memory mode and chain-4 settings determine whether a byte hits one plane or all planes. Always unlock the attribute controller by reading 0x3DA (input status) before writing indexed registers. Snow artifacts mean the CRTC was reprogrammed during active display time.
Why for this exercise
You will switch or tweak a VGA mode using register I/O instead of INT 0x10. This exercise requires documenting index/data port pairs and a concrete register write sequence for one mode.
Compute VGA register values in C from stdin requests (80x25 text mode and mode 13h).