Calculating VGA 'pitch'?

How do I calculate the size of 1 Graphics row (e.g. in 320x200 the offset register's value is 0x20, which combined with the memory size register of the VGA results in 320 bytes per row)?

It's called a pitch here: http://wiki.osdev.org/Drawing_In_Protected_Mode#Location

Used info:
VGA's offset register (0x20 in 320x200 256 color graphics)
VGA's DW/Byte mode registers (CRT's Underline location & Mode control register, it's processed internally to 1,2 or 4 bytes size)

My src atm: http://www.osdever.net/FreeVGA/vga/vgafx.htm
Last edited on
Topic archived. No new replies allowed.