CGA programming: Difference between revisions

Content deleted Content added
Sandos (talk | contribs)
m added various links
MenoBot (talk | contribs)
m Bot: Fixing double redirect to List of computer display standards
Tag: Redirect target changed
 
(4 intermediate revisions by 2 users not shown)
Line 1:
#REDIRECT [[List of computer display standards]]
Details about programming for [[CGA]].
 
I will put a more detailed spec about programming CGA here.
 
The video memory for the CGA [[framebuffer]] is supposed to be placed at [[real-mode]] [[segment]] 0xB800. 1 bit per [[pixel]] means that every [[byte]] packs 8 pixels, one for each bit respectively. The [[most significant bit]] controls the left-most pixel.
 
 
The video memory layout in my [[Poqet Pc|Poqet]] for 640x200x1bpp is a bit weird. Firstly, the screen is partitioned into odd and even [[scanline|scanlines]], and odd (if you start numbering them at 1) lines comes first in video memory, and even lines comes last:
 
0: (0,0) ... (639,0)
80: (0,2) ... (639,2)
...
7920: (0,198) ... (639,198)
8000: Pixels 0 - 639 of the indicator-bar (which is 4 pixels high, but only addressable per column)
 
Here are 72 bytes that does I dont know what.
 
8152: (0,1) ... (639,1)
8232: (0,3) ... (639,3)
...
 
I dont know what those "missing" 72 bytes are yet. I also dont know how CGA is normally arranged in memory.
 
This seems to be the way that CGA is supposed to work, judging from [[Windows 2000]]´s CGA-emulation atleast.