VOGONS


40 Column Text Mode Issues

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 320 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Great Hierophant wrote:

Well, it was too late to change the CGA specifications, but the exclusive display monitor the device was supposed to use, the 5153 Color Graphics Display, could be changed.

The CGA specification had little to do with it, as, as already pointed out in this forum, the CGA sends a 4 bit digital signal to the monitor. The monitor then does the D/A conversion, and produces a certain color.

Great Hierophant wrote:

When IBM designed the EGA, it did so with the intent to make it fully-backwards compatible with the CGA and CGA monitors.

I'm not sure they did. I know of no EGA card with a CGA connector, did the original EGA have this? EGA has no I-line, but emulates this through its 6 color lines (RrGgBb). Theoratically, it's possible to connect a CGA monitor to an EGA card, but I doubt IBM intended for this to be commonplace.

Great Hierophant wrote:

This meant that in 200-line modes, the EGA would have to be restricted to the 16-color CGA palette even though EGA could generate 64 colors. If IBM allowed the programmer to manipulate the palette registers in the 200-line modes, it would not show the proper color on a CGA monitor.

Yeah, and you can easily 'blow up' your CGA monitor by switching to 350 line mode. I really doubt this is why IBM decided not to support 64 colors in 320x200 mode. I could be wrong though, of course.

Great Hierophant wrote:

(I would guess that for text modes you would have to set a dipswitch so that the EGA uses a 200-line text mode instead of the usual 350-line text mode, otherwise you would need a second monitor for the text mode or risk damaging your CGA monitor.)

I know of no such dipswitch on the original EGA card. Are you sure you are not making this up as you go?

JAL

Reply 321 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie
`Moe` wrote:

Did it occur to anyone that G could be somewhere between 0.66 and 0.33? I assume there are analog circuits involved at some point, so that might be possible (and might explain why people recall it one way or the other, subjectivity getting in the way)

It very probably is between 0.66 an 0.33, at least on many (or some) clones. I, for some reason, vividly recall the falling pommegranates in Round42 on (my friend's) EGA being much darker than on (my) CGA clone, as their default color contrasted less on CGA than on EGA with the bright red they gained when shot at. This makes sense as the EGA monitor, having RrGgBb probably did not make any changes to the colors as the CGA monitor did (based on the RGBI).

JAL

Reply 322 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t
jal wrote:
The CGA specification had little to do with it, as, as already pointed out in this forum, the CGA sends a 4 bit digital signal t […]
Show full quote
Great Hierophant wrote:

Well, it was too late to change the CGA specifications, but the exclusive display monitor the device was supposed to use, the 5153 Color Graphics Display, could be changed.

The CGA specification had little to do with it, as, as already pointed out in this forum, the CGA sends a 4 bit digital signal to the monitor. The monitor then does the D/A conversion, and produces a certain color.

Great Hierophant wrote:

When IBM designed the EGA, it did so with the intent to make it fully-backwards compatible with the CGA and CGA monitors.

I'm not sure they did. I know of no EGA card with a CGA connector, did the original EGA have this? EGA has no I-line, but emulates this through its 6 color lines (RrGgBb). Theoratically, it's possible to connect a CGA monitor to an EGA card, but I doubt IBM intended for this to be commonplace.

Great Hierophant wrote:

This meant that in 200-line modes, the EGA would have to be restricted to the 16-color CGA palette even though EGA could generate 64 colors. If IBM allowed the programmer to manipulate the palette registers in the 200-line modes, it would not show the proper color on a CGA monitor.

Yeah, and you can easily 'blow up' your CGA monitor by switching to 350 line mode. I really doubt this is why IBM decided not to support 64 colors in 320x200 mode. I could be wrong though, of course.

Great Hierophant wrote:

(I would guess that for text modes you would have to set a dipswitch so that the EGA uses a 200-line text mode instead of the usual 350-line text mode, otherwise you would need a second monitor for the text mode or risk damaging your CGA monitor.)

I know of no such dipswitch on the original EGA card. Are you sure you are not making this up as you go?

JAL

The CGA specification has a great deal to do with it. In RGBI terms, the CGA is outputting the red and green bits for the "brown" color. It should appear as yellow if the monitor was following the spec exactly. It would be easier to follow the spec than to make the hardware show a color outside the spec. The CGA spec says that if there is a logical 1 on the R, G, or B line, you turn the gun on two-thirds for that pixel, otherwise you don't. If there is a logical 1 on the I line, you increase the intensity of all guns by an additional third. Very simple compared to the idea if you get a 0110 from the CGA, you show a color that is 2/3R and 1/3G.

If you connect a CGA or MDA monitor to an EGA card, it must conform to the CGA or MDA pinout standard. Otherwise it would show the wrong colors. Maybe the clone manufacturers didn't care, but IBM's customers would have (the EGA and its monitor both being very expensive.) I believe the EGA can change the character of its output pins to suit the individual display device according to the display adapter switch.

If you recall, the IBM PC and XT has a jumper block to set the video display device. It has four settings, MDA, 40-Column CGA, 80-Column CGA and EGA/VGA (adapters w/on-board BIOS.) If you were to use an EGA card in one of these machines with a CGA monitor, you should set the dipswitch to 80-Column CGA and it should appear in 200 lines and save your monitor. As for the IBM PC AT, I believe it would work similarly because it has a similar switch and fine adjustments can be made with the AT Setup disks.

Reply 323 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Great Hierophant wrote:

If you recall, the IBM PC and XT has a jumper block to set the video display device. It has four settings, MDA, 40-Column CGA, 80-Column CGA and EGA/VGA (adapters w/on-board BIOS.)

This is becoming a tedious discussion, as you do not seem to have your facts straight. First of all, show me the 'CGA specification' you are referring to (a URL preferably), so we can check whether anything is said about the expected D/A conversion of the monitor connected.

Secondly, there has never been an EGA jumper in the original PC or XT, simple because these computers predated the EGA (by 3 and 1 year, respectively). And iirc, the PC and XT had DIP switches, not jumpers.

JAL

Reply 324 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Secondly, there has never been an EGA jumper in the original PC or XT, simple because these computers predated the EGA (by 3 and 1 year, respectively). And iirc, the PC and XT had DIP switches, not jumpers.

The PC and XT have DIP switches, but there is a set of two (for four possibilities) to select the video adapter. One setting selects an MDA Text Mode, another selects a 40 Column CGA Text Mode, a third selects an 80 Column CGA Text Mode and a fourth lets a video card with an onboard BIOS select the mode. EGA and VGA cards have their own BIOS to do, among other things, select the mode. The IBM PC and XT BIOSes can only set up video modes for the MDA and CGA cards. It cannot autodetect either card. The PC and the XT do the same thing for hard drives, having no BIOS support for them it scans the ISA slots for the hard drive controller with on-board BIOS. IBM may not have had an inkling of the EGA or VGA card when they were designing the PC, but had enough sense to build in some forward compatibility.

Why is this important? If you have an MDA card in your system, you don't want the BIOS sending it the data for the CGA text modes. This would be disastrous for the fixed frequency MDA monitor. As soon as you turned the system on you could fry your monitor. The same thing would apply if you had a CGA card in the system and the switch was set to send the MDA data to it. While the EGA card can handle either the MDA or CGA modes, it probably sets them up differently from either card and thats what its onboard BIOS does. If the switch is not set to the proper position, who knows what would happen. If you have a spare monitor feel free to try it out and see.

Try Mueller for a more detailed discussion.

Reply 325 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Great Hierophant wrote:

The PC and XT have DIP switches, but there is a set of two (for four possibilities) to select the video adapter. One setting selects an MDA Text Mode, another selects a 40 Column CGA Text Mode, a third selects an 80 Column CGA Text Mode and a fourth lets a video card with an onboard BIOS select the mode.

Okay, thanks for clearing that up. Still, is there any evidence people used to connect their CGA monitor to an EGA card? Was that at all possible (maybe with some converter in between)?

JAL

Reply 327 of 457, by 5u3

User metadata
Rank Oldbie
Rank
Oldbie

Wow! This whole thread has been very interesting so far 😀

NewRisingSun wrote:

My old Tseng ET4000 had port-perfect CGA emulation; in EGA/VGA mode, color 6 of course was brown, but in CGA mode, it was dark yellow.

Did you use an analog or a digital monitor when observing this?
I just tested three different ET4000 cards, one of them indeed displays yellow for color 6 in CGA mode. This particular card features a 9-pin TTL output as well as the normal VGA connector, which might explain the phenomenon. Looks like the yellow color was intended for the digital output, while it shows up on the VGA because of a design glitch.

Jal wrote:

Still, is there any evidence people used to connect their CGA monitor to an EGA card? Was that at all possible (maybe with some converter in between)?

My ET4000 (produced in the year 1989 according to the manual) has DIP switches to configure the digital output for IBM 5151, 5153 and 5154 displays. This feature was not uncommon back then, it may as well have been implemented on the original EGA card.

Just to add another (useless) observation from the past: I have used an ITT clone CGA monitor and a Sony Trinitron monitor (which supported analog and TTL) together with a clone CGA board: They displayed different hues for the color 6 (on the Sony it was much better distinguishable from red), but both variants were clearly brown, not yellow.

Reply 329 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Wow! This whole thread has been very interesting so far Happy

All seventeen pages of it? I never thought I would get five responses when I made the first post three months ago.

Ideally, if we wish to have color benc. This can be done with the proper outlay. hmarks, we should conduct a palette test (using text mode) using the following devices and an oscilliscope to determine the true displayed color:

CGA + 5153
PCjr. + 4863
5140 + 5145
EGA + 5154
PS/2 + 8512

The first is the true CGA color, the second shows the color as displayed on the PCjr. (and Tandys), the third on the CGA portion of the PC Convertible, the fourth the CGA emulation of the EGA and the fifth the CGA emulation on the VGA. Anything else should be irrelevant

Reply 331 of 457, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
Great Hierphant wrote:

we should conduct a palette test (using text mode) using the following devices and an oscilliscope

That'd be a waste of time. I just want to know if the original 5153 displayed color 6 as yellow or not. If yes, it should display that way with "machine=cga". If not, at least I'd like to have a "yellow6=true/false" switch in the config file to make it yellow.
If you really have an oscilloscope and too much free time, better spend it measuring the exact voltage levels output by the NES.

5u3 wrote:

Did you use an analog or a digital monitor when observing this?

Normal VGA monitor, so analog, I guess. My ET4000 (the card itself made by Tseng) only had a VGA output, no extra digital one.

Reply 332 of 457, by SirGraham

User metadata
Rank Newbie
Rank
Newbie
Great Hierophant wrote:

All seventeen pages of it? I never thought I would get five responses when I made the first post three months ago.

That's because each time the thread becomes silent for a few days, I post a new message that keeps it alive for weeks 😁

By the way, how were you able to produce this screenshot:

1133401287005by.png

??
I couldn't get this palette, no matter what emulator or hardware I used (I always get the palette seen in the second screenshot you posted, which you called "brown", but always seemed more like orange to me...). I also noticed that DosFreak posted a screenshot of the DOS version of KQ1AGI with a similar palette on page 2 of this thread.

In the last few pages of this thread you all focused on technical details of CGAs regarding colors, but you ignored the neat KQ3 CGA effect I mentioned on page 14 ("If you had CGA and the wizard used a powerful spell, the entire screen shook. (This was an intentional special effect.) This was accomplished by tweaking the CGA registers to scroll the screen left and right rapidly.") Did you just miss it, or did you ignore it because it's a false piece of trivia, or it's just not interesting?

NewRisingSun: I didn't want to post off-topic stuff here, so I sent you a private message with two short and simple Sierra-related questions that I thought you may be able to answer. Please answer them, if it's not too hard. Thanks.

Reply 333 of 457, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
SirGraham wrote:

NewRisingSun: I didn't want to post off-topic stuff here,

I'm not sure what the topic is any more... I'm thinking of renaming the thread title to something like "composite CGA emulation and related issues".

Also, this is the 333rd reply in this thread 😜

Reply 334 of 457, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
SirGraham wrote:

Did you just miss it, or did you ignore it because it's a false piece of trivia, or it's just not interesting?

What's there to say about it? AGI games shake the screen, yeah. SQ2 shakes the screen on EGA and CGA when you get knocked out after boarding the shuttle; same with KQ3, I suppose.

This thread went off-topic well into the first page. I guess with the composite color emulation finished, it has become an all-purpose thread. Give it a few more pages, and we'll be exchanging cooking recipes. I like my eggs sunny side up.

Reply 335 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I created the picture by taking a normal screenshot with DOSBox and using Infranview to double the green component of palette color 6.

I think that the shaking and the games that I identified that are still not working on the first page, essentially require a proper emulation of the MC6845 CRT Controller. This is the final frontier of CGA emulation, and I don't know how advanced DOSBox's emulation of the chip is.

As for the brown/yellow color, one of my contacts should be able to give me the answer. I hope to have it soon.

But what about the grays? I hear that on some digital monitors the difference between black and dark gray or dark gray and light gray are nigh indistinguishable. The grays on the IBM PCJr.'s montior are distinguishable. If it turns out that the 5153 displays brown, then it would unlikely have this problem either.

Moreover, there was absolutely no need for IBM to change the specs from the 5153 to the 4863. Both monitors show the same number of colors and share the same scan frequencies. Why rock the boat?

Reply 336 of 457, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I find this thread highly usefull. I've never really dug into the specifics of CGA/MCGA/VGA/SVGA/Tandy/etc. Just the # of colors for each one and which of my games supported which. About all I can contribute is to continue plugging away at my compatibility list which will hopefully someday have a list of all video modes supported for each DOS games.....which will hopefully lead to more "perfect" DosBox video emulation.

Oh, and I don't have any cooking recipes except for ones I find on the internet.....or in Robert Rodrigueze's movies. 😀

How To Ask Questions The Smart Way
Make your games work offline

Reply 337 of 457, by canadacow

User metadata
Rank Member
Rank
Member
jal wrote:
Great Hierophant wrote:

The PC and XT have DIP switches, but there is a set of two (for four possibilities) to select the video adapter. One setting selects an MDA Text Mode, another selects a 40 Column CGA Text Mode, a third selects an 80 Column CGA Text Mode and a fourth lets a video card with an onboard BIOS select the mode.

Okay, thanks for clearing that up. Still, is there any evidence people used to connect their CGA monitor to an EGA card? Was that at all possible (maybe with some converter in between)?

JAL

Yes, there is evidence. Back in the late 80's/early 90's, before I had enough money to buy an EGA monitor, I obtained an EGA card and connected it almost without problems using my CGA monitor. The only catch was that 640x350x16 did not display on the monitor. The monitor would completely lose sync and I'm sure that wasn't very good for it. 320x200x16 and 640x200x16 worked just fine, however.

Not many games used 640x350x16 (EGARoids and Lemmings are the only two that I can name off the top of my head) so it was a pretty decent stopgap solution.

Reply 338 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie
canadacow wrote:

Yes, there is evidence. Back in the late 80's/early 90's, before I had enough money to buy an EGA monitor, I obtained an EGA card and connected it almost without problems using my CGA monitor. The only catch was that 640x350x16 did not display on the monitor. The monitor would completely lose sync and I'm sure that wasn't very good for it. 320x200x16 and 640x200x16 worked just fine, however.

What I forgot is that EGA and CGA had the same pinout, so that the monitors could be switched, at least physically. Pinouts can e.g. be found here:

http://pinouts.ru/data/CGA_pinout.shtml
http://pinouts.ru/data/EGA_pinout.shtml

The CGA intensity and EGA secondary green overlap, so the EGA will have to now which monitor is attached in order to display the proper colors.

@Canadacow: did you recall setting a jumper/dipswitch to allow the CGA monitor to be connected, or did it autodetect?

JAL

Reply 339 of 457, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
Great Hierophant wrote:

require a proper emulation of the MC6845 CRT Controller.

You just need to emulate the overscan and CRT registers 2 and 7. I already emulate it in composite color mode.

Great Hierophant wrote:

But what about the grays? I hear that on some digital monitors the difference between black and dark gray or dark gray and light gray are nigh indistinguishable.

That's a question of monitor gamma, not of the digital signal applied to it. I think every monitor has a "brightness" control, which should rectify the problem. Also keep in mind that as the picture tube ages, the gamma relationship worsens; so what you see on these ancient monitors today is maybe not how they originally looked.

Great Hierophant wrote:

Moreover, there was absolutely no need for IBM to change the specs from the 5153 to the 4863. Both monitors show the same number of colors and share the same scan frequencies. Why rock the boat?

Well, on a CGA with its 4-color mode in palette 0, dark yellow is more useful than brown, because brown looks too much like red. Whereas on a system that can do 16 color graphics in RGB, brown is more useful to have than yellow, in my opinion.