VOGONS


CGA pseudo-graphic modes

Topic actions

Reply 100 of 101, by pshipkov

User metadata
Rank l33t
Rank
l33t

I think softcat talks of hardware scrolling using virtual frame buffer, similar to how ega and vga planar modes can - basically moving the viewport through the larger canvas with preallocated pixels.

cga cannot do the above.
maybe some guru nerds can hack in some partial scrolling in a specific cga graphics mode by messing around with the crtc registers, but thats about it.

retro bits and bytes

Reply 101 of 101, by SoftCat

User metadata
Rank Member
Rank
Member
mkarcher wrote on Today, 05:43:

I don't think so. While the CGA has an 8 bit wide memory bus, the logical organization is still a 16-bit system, fetching a 16-bit word per "character interval". Bits 1..12 are generated from the character counter in the 6845, bit 13 is generated by the character counter in text mode and by the scanline counter in graphics mode. Bit 0 generation is fixed (low on the first fetch, high on the second fetch). In Text mode, this 16-bit system will handle one character and one attribute byte per "character", in 4-color graphics mode, it will handle 8 pixels per "character" and in 2-color graphics mode, it will handle 16 pixels per "character". Increasing the start address will cause the image to scroll horizontally by a whole character, which is 16 pixels in 640x200 mode.

Thank you for your reply!
That is, if we make the video adapter's internal structure 32-bit, we can implement a 640x200, 16-color graphics mode on the same 6845 controller. That's 80 "characters" per line, 32 bits each. A character is 8 pixels wide, with 4 bits for the color code.