reenigne wrote:Here's my "160 colour" patch so far. I realized that it actually only uses at most 64 distinct colours in 2bpp modes, so with a bit more work it might be possible to use a (1,4,7,8,7,4,1) kernel instead of the (1,1,1,1) one - this would smooth out the edges of some of the colour transitions a bit.
I don't know if I dislike the "blockier" colored edges (more apparent in mode 6 vs. the old technique). I think they stand out since I'm looking at scaled-up pixels on a flat-panel monitor, rather than a 200-line CRT, but otherwise not that bad. Would be neat to have this patch in one of the D3D-enhanced builds down the line, and use it with the CRT pixel shader.
I added new/old CGA card selection to the config file, but I haven't tried out the new CGA card yet.
I've incorporated all the logic delays that I can sensibly model. The delays for 2bpp aren't quite as sophisticated as those for 1bpp, but they're as accurate as I can manage within the confines of a paletted algorithm.
Using robertmo's patched build (that is, without the minor 1.5-degree correction from your last post) - a few things I've noticed so far:
1. In mode 6 / white foreground, there's now a distinct difference between the new and old CGA types: with cga=new, colors are the same as in the previous patch or cga2ntsc; with cga=old, the hue once again looks like it does in upatched DOSBox, i.e. 15 degrees away. Essentially the same effect as the -15 degree hack in current SVN.
Assuming that this is a result of your added logic delays, it might explain something about the clone card which inspired that hack - perhaps it was a "new"-type card that used port 0x3d9 bit 5 to trigger "old" CGA emulation, at least in mode 6. Kind of a weird thing to do, but maybe I'm looking at it wrong.
2. In mode 4 the colors are changed as well, but again the change is almost imperceptible with cga=new and very apparent with cga=old. See attached image - in particular, some of the blue shades in this specific palette are now green.
If there's a game that uses these colors for e.g. sky or water, that could hint at which card type it was targeting... can't think of one off the top of my head (looks like the cyan-magenta palette was far more common), but could be useful for testing.
3. Is there any downside to letting the "cga" property be "Changeable::Always"? Would make it easier to toggle from the internal command prompt.
All in all this is looking very good - the more prominent fringing may need some getting used to, and more configurable options could make it more flexible, but I'd say it's close enough to meeting the goal for DOSBox.
[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]