Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.
-
Upload
vanessa-richardson -
Category
Documents
-
view
216 -
download
0
Transcript of Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.
![Page 1: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/1.jpg)
Using HiColor graphics
Introduction to the 15bpp/16bpp SuperVGA graphics modes
![Page 2: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/2.jpg)
15-bit color-format
R R R R R G G G G G B B B B B
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Each pixel is controlled by a two-byte element of display memory according to the format shown above (‘little endian’ convention)
![Page 3: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/3.jpg)
Radeon’s 15bpp VESA modes
• mode 0x010D: 15-bpp 320x200• mode 0x0193: 15-bpp 320x240• mode 0x01A3: 15-bpp 400x300• mode 0x01B3: 15-bpp 512x384• mode 0x01C3: 15-bpp 640x350 • mode 0x0183: 15-bpp 640x400 • mode 0x0110: 15-bpp 640x480• mode 0x0113: 15-bpp 800x600• mode 0x0116: 15-bpp 1024x768• mode 0x0119: 15-bpp 1280x1024
![Page 4: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/4.jpg)
16-bit color-format
R R R R R G G G G G G B B B B B
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Each pixel is controlled by a two-byte element of display memory according to the format shown above (‘little endian’ convention)
![Page 5: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/5.jpg)
Radeon’s 16bpp VESA modes
• mode 0x010E: 16-bpp 320x200 • mode 0x0194: 16-bpp 320x240 • mode 0x01A4: 16-bpp 400x300 • mode 0x01B4: 16-bpp 512x384 • mode 0x01C4: 16-bpp 640x350 • mode 0x0184: 16-bpp 640x400 • mode 0x0111: 16-bpp 640x480 • mode 0x0114: 16-bpp 800x600 • mode 0x0117: 16-bpp 1024x768 • mode 0x011A: 16-bpp 1280x1024
![Page 6: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/6.jpg)
Application programming
unsigned short *vram;
vram = (unsigned short *)0xA0000000;
// For 15bpp color-format
unsigned short red = (0x1F << 10);
unsigned short green = (0x1F << 5);
unsigned short blue = (0x1F << 0);
unsigned short white = 0x7FFF;
![Page 7: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/7.jpg)
In-class exercise #1
• Write a ‘bare-bones’ graphics application that draws a border around the screen
• For each of the seven color-combinations named below, draw an array of colored boxes that shows all of the 32 possible intensities of that color:– pure red, pure green, pure blue– blue-and-green, blue-and-red, green-and-red– red-and-green-and-blue
![Page 8: Using HiColor graphics Introduction to the 15bpp/16bpp SuperVGA graphics modes.](https://reader036.fdocuments.us/reader036/viewer/2022082517/56649edd5503460f94bee171/html5/thumbnails/8.jpg)
In-class exercise #2
• Revise our ‘wfmodel1.cpp’ demo-program so that it uses 15bpp color-format instead of 8bpp color-format (but keep the same 640-by-480 screen-resolution)