dr.zeissler wrote:Any idea, why xenon2 in CGA is only b/w ?
dr.zeissler wrote:Any idea, why xenon2 in CGA is only b/w ?derSammler wrote:Because it uses 640x200 and dithering. They probably borrowed that mode from the Atari ST version.
reenigne wrote:I wrote one, which you can get at http://www.reenigne.org/misc/cgaart.zip. .
dr.zeissler wrote:reenigne wrote:I wrote one, which you can get at http://www.reenigne.org/misc/cgaart.zip. .
Does not work on my iMac with wine.
dr.zeissler wrote:I get an "GetLogicalProcessorInformation" error in "KERNEL32.DLL"
B. The Color Graphics Adapter (CGA) (1981)
This was the other video adapter choice for IBM PC buyers, and was far more suited to games than text. However, as a gaming adapter it was weak, inferior to almost every other home computer on the market at first glance. The mode that at least 95% of games use is the 320x200 mode 04h. In this mode the programmer could use 4 colors from two predefined palettes,
palette 1: background/cyan/magenta/white or
palette 0: background/red/green/brown.
The background’s default color was black, but could be changed to any of the 16 colors.
No border would be displayed because the background and border colors are shared in this mode.
The palette could be set to alternate intensity so that the palettes consisted of
palette 1: background/light cyan/light magenta/bright white and
palette 0: background/light red/light green/yellow.
By disabling the color burst bit, a third rarely used RGBI palette of background/cyan/red/white can be obtained.
Its high intensity variant would be background/light cyan/light red/bright white.
IBM defined these palettes; they are not based on the Motorola chip. A 4 shades of gray palette could have been selected using mode 05h, which was a grayscale version of mode 04h. This only could be viewed through a connection to a composite monitor. However, IBM PCs were designed to hook up to RGB TTL monitors (15.75kHz horizontal scan frequency), which are much crisper than NTSC display devices, which many other computers of the time hooked up to. IBM’s color display was model 5153. The encoding scheme is 1 bit for Intensity 1 bit for R, G, B, in high to low order. Each byte of graphics data represents the color of 4 pixels. The high resolution 2 color mode 06h, with a 640x200 resolution, is usually black and bright white, but the user can change the foreground pixels to any of the 16 colors, but the background color will remain black. (In later adapters the background color may also be set.) The 16 colors are:
- Code: Select all
Color Hex Value R G B
Black 00h 0 0 0
Blue 01h 0 0 170
Green 02h 0 170 0
Cyan 03h 0 170 170
Red 04h 170 0 0
Magenta 05h 170 0 170
Brown 06h 170 85 0
White (Light Gray) 07h 170 170 170
Dark Gray (Light Black) 08h 85 85 85
Light Blue 09h 85 85 255
Light Green 0Ah 85 255 85
Light Cyan 0Bh 85 255 255
Light Red 0Ch 255 85 85
Light Magenta 0Dh 255 85 255
Yellow (Light Brown) 0Eh 255 255 85
Bright White 0Fh 255 255 255
Naturally, many programmers thought that these choices were horrible and they had other ideas. In addition to an RGB out to a digital color monitor, IBM’s CGA cards had a composite out that could be used to connect to a composite monitor. This would allow the programmer to access a new mode, a 160x200 mode with 16 colors, using the same method as the Apple II. This mode was a supported feature although not a BIOS mode, but useless without an original CGA or some EGA cards because it uses the NTSC color burst signal and timing to select the color. Today, if the mode is selected it in a game modern display adapters will adopt it to the 640x200x2 mode, which it was derived from.
The worst problem is when the programmers tried for the full 16 colors on an RGB monitor. The good thing was that the CGA’s text modes allowed for 16 foreground and 16 background colors to be set in the character’s attribute byte. The border color could be set to any of 16 colors. So the programmers used certain ASCII characters to approximate pixel graphics. However, as an 8x8 character is a bit inflexible, many programmers used hacks to cut down the characters to more useable sizes. These modes use very low or awkward resolutions. One method is to use the 40 or 80 column text modes and shorten the cell sizes to two lines, giving an 8x2 character cell to work with. Using 40 column modes gives the user two graphic pages on a CGA card, unlike the graphic modes. Using the 80-column mode and the left vertical bar, ASCII 211, will give an effective 2x2 pixel size with two pixels in each “column.” This is the 160x100 graphics mode. Also, other programmers tried to get more than 4 colors out of the 320x200 mode through hacks, such as switching palettes in mid-frame and tweaking the palette to cyan, red, white. These hacks are very difficult to reproduce without a card with 100% register compatibility with the CGA. An 8088 processor running at 4.77272MHz is also critical for these hacks.
The CGA was limited in other ways. It was not quick at all, considering it was usually pared with a very inefficient 4.77272Mhz 8088, which often meant flickering images because the card cannot draw to the screen fast enough. If the programmer wrote to the screen too quickly in the 80-column text mode, snow on the screen would be the result due to single ported memory that can only read or write, not both, at the same time. The CPU would be writing to the video memory at the same time as the video display circuitry was trying to read to the video memory, so the video display circuitry would get a random result that would translate into white lines a character cell wide. Snow can be reduced by waiting for vertical retrace or using the BIOS to write to the video RAM, but both methods were much slower. IBM’s CGA card has 16KB of video memory interlaced into two 8KB banks. This was a brain buster for programmers because they had to draw and store their graphics in an interlaced fashion, even lines before odd lines and skip 192 bytes per bank. Why IBM designed it in this way remains a mystery. Finally, the 8x8 pixel format for text (which only had the blink attribute in hardware but could simulate boldness and inverse to an extent) made for some very unsightly text, especially for those characters with descenders, g, j, p, q, y that go underneath the line. But for 1981 through 1985, the CGA was the only affordable color graphics available for most PCs. The high price of PCs combined with this weak video hardware led to few PC exclusive games and a lot of inferior ports. Its character ROM is 4KB, used for a 5x7 single dot font (abandoned in VGA) and 7x7 double dot font, both using 256 patterns, selected by a dipswitch on the cart. It uses a 16KB video RAM buffer starting at $B0000.
- Code: Select all
Alphanumeric Modes:
Mode Cell Column Colors Buffer H/V Resolution Pages
Size /Row
00h 8x8 40x25 16 grays B8000h 15.75kHz/60Hz 8
01h 8x8 40x25 16 B8000h 15.75kHz/60Hz 8
02h 8x8 80x25 16 grays B8000h 15.75kHz/60Hz 4
03h 8x8 80x25 16 B8000h 15.75kHz/60Hz 4
- Code: Select all
All Points Addressable Modes:
Mode Resolution Colors Buffer H/V Resolution Pages
04h 320x200 4 preset B8000h 15.75kHz/60Hz 1
05h 320x200 4 grays B8000h 15.75kHz/60Hz 1
06h 640x200 2/16 B8000h 15.75kHz/60Hz 1#
# 16 colors are only available with the color composite signal and reduces the effective resolution to 160x200. It is not a BIOS mode.
dr.zeissler wrote:Some interesting Information written by G.H. thx for that!
By disabling the color burst bit, a third rarely used RGBI palette of background/cyan/red/white can be obtained.
A 4 shades of gray palette could have been selected using mode 05h, which was a grayscale version of mode 04h.
However, IBM PCs were designed to hook up to RGB TTL monitors (15.75kHz horizontal scan frequency), which are much crisper than NTSC display devices, which many other computers of the time hooked up to.
The 16 colors are:
- Code: Select all
Color Hex Value R G B
Black 00h 0 0 0
Blue 01h 0 0 170
Green 02h 0 170 0
Cyan 03h 0 170 170
Red 04h 170 0 0
Magenta 05h 170 0 170
Brown 06h 170 85 0
White (Light Gray) 07h 170 170 170
Dark Gray (Light Black) 08h 85 85 85
Light Blue 09h 85 85 255
Light Green 0Ah 85 255 85
Light Cyan 0Bh 85 255 255
Light Red 0Ch 255 85 85
Light Magenta 0Dh 255 85 255
Yellow (Light Brown) 0Eh 255 255 85
Bright White 0Fh 255 255 255
Naturally, many programmers thought that these choices were horrible and they had other ideas. In addition to an RGB out to a digital color monitor, IBM’s CGA cards had a composite out that could be used to connect to a composite monitor.
This would allow the programmer to access a new mode, a 160x200 mode with 16 colors, using the same method as the Apple II.
Today, if the mode is selected it in a game modern display adapters will adopt it to the 640x200x2 mode, which it was derived from.
The worst problem is when the programmers tried for the full 16 colors on an RGB monitor.
These hacks are very difficult to reproduce without a card with 100% register compatibility with the CGA.
An 8088 processor running at 4.77272MHz is also critical for these hacks.
It was not quick at all, considering it was usually pared with a very inefficient 4.77272Mhz 8088, which often meant flickering images because the card cannot draw to the screen fast enough.
If the programmer wrote to the screen too quickly in the 80-column text mode, snow on the screen would be the result
due to single ported memory that can only read or write, not both, at the same time.
Snow can be reduced by waiting for vertical retrace or using the BIOS to write to the video RAM, but both methods were much slower.
IBM’s CGA card has 16KB of video memory interlaced into two 8KB banks.
This was a brain buster for programmers because they had to draw and store their graphics in an interlaced fashion,
Why IBM designed it in this way remains a mystery.
Its character ROM is 4KB, used for a 5x7 single dot font (abandoned in VGA) and 7x7 double dot font, both using 256 patterns, selected by a dipswitch on the cart.
It uses a 16KB video RAM buffer starting at $B0000.
- Code: Select all
00h 8x8 40x25 16 grays B8000h 15.75kHz/60Hz 8
- Code: Select all
04h 320x200 4 preset B8000h 15.75kHz/60Hz 1
05h 320x200 4 grays B8000h 15.75kHz/60Hz 1
06h 640x200 2/16 B8000h 15.75kHz/60Hz 1#
# 16 colors are only available with the color composite signal and reduces the effective resolution to 160x200. It is not a BIOS mode.
The 16 colors are:
- Code: Select all
Color Hex Value R G B
Black 00h 0 0 0
Blue 01h 0 0 170
Green 02h 0 170 0
Cyan 03h 0 170 170
Red 04h 170 0 0
Magenta 05h 170 0 170
Brown 06h 170 85 0
White (Light Gray) 07h 170 170 170
Dark Gray (Light Black) 08h 85 85 85
Light Blue 09h 85 85 255
Light Green 0Ah 85 255 85
Light Cyan 0Bh 85 255 255
Light Red 0Ch 255 85 85
Light Magenta 0Dh 255 85 255
Yellow (Light Brown) 0Eh 255 255 85
Bright White 0Fh 255 255 255
Naturally, many programmers thought that these choices were horrible
dr.zeissler wrote:CGA-ANSI-ART is one of the main targets here, especially if it uses some srolling-features in software or hardware (if possible).
dr.zeissler wrote:I remember a "test-program" that scrolls white text in 80colums-mode simultaniously horizontal and vertical completly stutterfree. (on my Scheinder EuroPC with CGA Color Monitor 1990)
Currently I have no ANSI-ASCII-ART for CGA collected, but that would be very nice if suitable software can be found that works with a small XT and CGA.
Users browsing this forum: No registered users and 4 guests