VOGONS


40 Column Text Mode Issues

Topic actions

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

Reply 421 of 457, by MobyGamer

User metadata
Rank Member
Rank
Member
Great Hierophant wrote:

The only identified issues that remain unsolved and prompted me to start this thread:

Icon: Quest for the Ring and The Seven Spirits of RA (Icon Demo): Main screens do not display correctly.

Those modes are nothing more than the tweak used for the 160x100 mode, except using 40-col instead of 80-col. That should be a very easy fix.

Reply 422 of 457, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

Sorry to comment on an old thread. I was doing some research recently on CGA, the 6845 CRTC and composite colour in order to improve the PC emulations in MESS - I posted a big page about it at http://www.reenigne.org/crtc.html . JAL pointed me to this conversation and I thought I should mention it here. In particular, there is some information there about how the (original) CGA card generates colours for the composite output which could be used to improve the composite emulation in DOSbox even further, so that it works correctly in modes other than 640x200 with colour 15 in the port 0x3d9 register (not that there is any software I know of that takes advantage of any other composite colour palettes available).

Reply 424 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie

I'm resurrecting this old (and longest ever?) thread, because of this thread. It seems that DOSbox still doesn't support composite mode 4, while it seems the code for it is ready (judging e.g. from here. Is there any reason why it hasn't been implemented?

JAL

Reply 426 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie
wd wrote:

Because this thread was only about telling what doesn't work and nobody ever did something?

Well, NewRisingSun certainly did something, as his algorithm produced the Serenia screen shot. Appearently though it was never included in any official release, which is a shame. Do you know whether the enhancements to the mode 6 composite were included, or also not?

JAL

Reply 427 of 457, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well, NewRisingSun certainly did something

Yes but even though i asked several times to make for example the
tandy dac to sb converter available somehow, i've never seen any
code at all.

The new algorithm regarding composite modes was added by Qbix
(he was in contact with NewRisingSun about that). I don't know if the
missing mode (the one that doesn't set the color burst bit) would require
an even different algorithm.

Reply 428 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t
wd wrote:
The new algorithm regarding composite modes was added by Qbix (he was in contact with NewRisingSun about that). I don't know if […]
Show full quote

The new algorithm regarding composite modes was added by Qbix
(he was in contact with NewRisingSun about that). I don't know if the
missing mode (the one that doesn't set the color burst bit) would require
an even different algorithm.

NWS once told me that it does require a different algorithm because there swas some extra complexity added in 4-color modes. He was never satisfied with his implementation.

Reply 429 of 457, by TeaRex

User metadata
Rank Member
Rank
Member

AFAIK the problem is the interaction of "artifact" and "standard" color with each other, as they are both active at the same time in this mode. In the Mode 6-base composite, there is only "artifact" color, which makes things considerably simpler.

Noob that I am, I'd guess you'd need a real CGA and an oscilloscope (or a good schematic and some serious brains) to figure out how they interact with each other.

tearex

Reply 431 of 457, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

That's my page. I've gone over the CGA schematics with a fine toothed comb. If anybody has any questions about the CGA, 6845-derived CRTC controllers, NTSC or composite color that aren't covered on that page, I'd be happy to answer them.

Reply 432 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

AFAIK the problem is the interaction of "artifact" and "standard" color with each other, as they are both active at the same time in this mode. In the Mode 6-base composite, there is only "artifact" color, which makes things considerably simpler.

That seems to be a good, basic description in a nutshell about the problem.

In Mode 4 you have 3 pre-determined colors and a background color that can take any of the 16 colors available. I believe the problem comes up because each color has a different luminence value (if not hue or saturation.) This was necessary to show graphics on monochromatic and color composite screens without having to use different graphics for each display. Its far from an ideal situation, but it works.

Mode 5 should show the effect very well. Mode 5 = Mode 4 with the color burst bit turned off. On a real CGA card, the palette in RGB mode will change. The composite image, color or monochrome, will show in grayscale, not black & white.

Mode 6 only has two colors. The default is black and white, meaning the model is simpler. But what would happen if the programmer chose a color other than white? Mightn't that complicate the composite color model?

Reply 434 of 457, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

But what would happen if the programmer chose a color other than white? Mightn't that complicate the composite color model?

Yep. In fact, you can get interesting artifact colors in the 320-pixel modes as well.

The best way to think of it is that the composite screen has 1280 sub-pixels horizontally (2 for each pixel in 640-pixel modes or 4 for each pixel in 320-pixel modes). Each of these sub-pixels can be either black, dark grey, light grey or white. But not all patterns are possible - the color of a pixel determines both (or all 4) of the levels of the corresponding sub-pixels.

The sub-pixels determine color in the usual NTSC fashion - the hue corresponds to the phase of the 3.58MHz frequency component of the waveform and the saturation corresponds to the amplitude of this frequency component.

A whlie back I made a map showing all the possible composite colors in all CGA graphics modes (there may be some other artifact colors in text modes). I've uploaded it to http://www.reenigne.org/misc/cga_composite.png. Each row of this image corresponds to one CGA graphics mode/palette combination. Within each row, there are sixteen blocks corresponding to the 16 possible nybbles (2 or 4 pixel combinations). Within each of these blocks, the image shows the RGB output, the raw composite output (sub-pixels) and the processed composite output (NTSC artifact colors). The program I used to make this image is http://www.reenigne.org/misc/composite_test.cpp.

Reply 435 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

That is an extremely comprehensive table. Let me see if I get it right:

Mode 6
1A00-1A0F = 640x200 Color Composite
1E00-1E0F = 640x200 Monochrome Composite

Mode 4
0A00-0A0F= 320x200 Palette 0
0A10-0A1F = 320x200 Palette 0 Intensity
0A20-0A2F = 320x200 Palette 1
0A30-0A3F = 320x200 Palette 1 Intensity

Mode 5
0E20-0E2F = 320x200 Palette Alternate
0E30-0E3F = 320x200 Palette Alternate Intensity

The table shows that throwing the background color into the mix, which can changed in any 320x200 mode, really increases the complexity of the color model.

It is a real shame that nobody seemed to really understand or take advantage of the true complexities of IBM's color composite capabilities at the time.

Reply 437 of 457, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

Yes, exactly.

When I made this table I realized that it might be possible to do some rather spectacular palette effects in by changing the background color. With the right image, it might be possible to do something like the sunset effects in Dune (which were beautiful but did require VGA).

But I guess that only a small fraction of CGA cards were ever connected to composite monitors, so the market for such software would not have been huge.

Reply 438 of 457, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I must confess that such worthy efforts would have gone unnoticed back in the day, only to be hailed twenty years later.

I know that Jungle Hunt and California Games changed the palette in mid frame. Frogger changed the background in mid-frame. Obviously, those techniques could increase the colors available for use and would be feasible with the 4.77MHz 8088. Mode 6 seems to offer an incredible number of colors available, if you could change the palette on a per-line basis. Somehow I doubt that it would be possible to do this at 4.77MHz and make a playable game too.

Reply 439 of 457, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Great Hierophant wrote:

Mode 6 seems to offer an incredible number of colors available, if you could change the palette on a per-line basis. Somehow I doubt that it would be possible to do this at 4.77MHz and make a playable game too.

I think that would be almost impossible indeed. On the other hand, we don't know until someone tries 😀. Gotta get that XT up and running again 😀.

JAL