cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Calculating VGA 'pitch'?
Calculating VGA 'pitch'?
Jan 26, 2013 at 2:42pm UTC
superfury
(225)
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
Jan 26, 2013 at 3:18pm UTC
Topic archived. No new replies allowed.