Let me try to clear things up a bit. There are two ways a game can utilize the artifacts of a composite monitor:
1. Select the black and white 640x200 graphics mode, then enable the color burst bit. Some games however set BIOS mode 4 (320x200 mode 4), then write directly to the port registers to set the 640x200 mode. This is done so that the BIOS text output functions will print the font at double-width. This is emulated by MESS and DosBox. This is used by all Sierra games after 1983.
2. Select the 320x200 4-color mode (BIOS mode 4), then arrange the dots in such a way that the artifacts that will inevitably result on a composite monitor result in a desired result. Of course, games with "normal" (i.e. not composite-optimized) graphics also select BIOS mode 4 if they don't want the "alternate" palette, and those will have unnecessary artifacts on a composite monitor. This method is only emulated by MESS. This is used by some Sierra games until 1983, as well as Ultima 2 and 3, and most ingeniously, Microsoft Decathlon.
BIOS Mode 5 on the other hand appears monochrome (notice the difference between "monochrome" and "black&white") on a composite monitor, so there are no artifacts.
How is an emulator to decide whether to emulate composite artifacts or not?
a) Artifacts must be emulated when port 0x3d8 contains 0x1a (see 1.).
b) Artifacts must never be emulated when port 0x3d8 contains 0x1e (original BIOS mode 6) or 0x2e (BIOS mode 5).
c) Artifacts may or may not be needed when port 0x3d8 contains 0x2a (BIOS mode 4). This can only be decided by the user (i.e. "empirically") (see 2.).
d) Artifacts should not be emulated in any text modes. Although a real composite monitor would show artifacts in color text modes, there's nothing to be gained from them.
Obviously, only point c) requires user cooperation, everything else can be decided by the emulator. This does not have to be solved by separating "machine=cga" into "machine=cgargb" and "machine=cgacomposite"; I also could imagine switching between RGB and composite display using a function key, which of course would only be needed in mode 4 (or to be more precise, when port 0x3d8=0x2a, see c)). I actually would prefer that solution, though I'm aware that QBix doesn't like to add more function keys. 😀
However, in the current CVS, when machine=cga and composite is ON, instead of showing composite colors, you just see what you'd see if machine=vga (or on a regular VGA screen).
I just debugged the executable. The "COMPOSITE ON" is even more of a hoax than I actually thought. Even with "COMPOSITE ON", the game remains in regular BIOS mode 4, the method described above in 1. is not used at all. All the game does with "COMPOSITE ON" is select BIOS mode 4, but write the Tandy pixel data, instead of the regular CGA pixel data, to video memory. What a bunch of nonsense! Forget about the "COMPOSITE ON", it's not good for anything.
Only when you switch to b&w CGA mode inside the game (Shift-B), you get composite colors (although Qbix might have fixed that),
Right. B/W mode is just the normal colorless BIOS mode 6, regardless of the PREFS "COMPOSITE" setting. That DosBox showed composite colors is the bug mentioned within this thread.
When machine=tandy, by the way, and the game is in Tandy mode (Shift-T), you just get the same EGA colors this game normally shows. I don't know if it's correct.
Well, of course it is. I don't know why people assume that Tandy graphics are any different from EGA graphics, at least concerning the colors displayed (the memory layout is of course completely different).
I think MESS totally botched the Tandy emulation for this game, because you just see the same 4 colors you'd see on a regular VGA when the game is in CGA mode (Shift-C) and composite is ON.
Yes, MESS messes up that mode. DosBox displays it correctly color-wise, but the aspect ratio is wrong.
The logo looks more peach than pink,
That's what I meant to say, but didn't. 😉
So, does MESS do it "correctly"?
Yes. MESS' composite emulation is ok color-wise, all it needs is a hue control and a better luma filter that keeps the text readable. Nevertheless, I can't learn anything from the MESS source because it doesn't actually calculate the color values like I do, but just has the output from a TV-card hard-coded as hexadecimal RGB values into the source, obscuring the way these colors came about.
I thought that when a CGA game does not have any specific support for composite mode, what you'd get on a composite monitor is just the regular 4 colors graphics but with artifacts.
That's what I said, isn't it.
Do you think DOSBox's algorithm should support this mode too?
No, I'm working on that. Remember my Ultima 3 pictures on the QuestStudios board?
Btw, you used the demo of the original version, not the enhanced version, right?
Yes. I once had the full original version, but somehow I can't find it anymore.
So, as long as there's no seperation, there can't be support in DOSBox for the composite mode of games like Ulysses and Serenia?
Not without giving up the sharp RGB-like display of mode 4.