VOGONS

Common searches


Reply 620 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
Scali wrote:

Perhaps you could make this a user-configurable option? So the user can select whether to have the 7.16 MHz signal intact, or to filter it out?

This would be my preference (though first I have to get the CGA simulation to output accurately at 7.16MHz). However, there is resistance to adding new special keys/controls to mainline DOSBox for tweaking composite output knobs - even if they aren't bound by default, they are confusing for users and clutter up the mapper screen. Perhaps it would be possible to add one new control which cycles through hue/contrast/brightness/saturation/sharpness and controls what the functions that are currently bound to hue-increase/hue-decrease do.

Scali wrote:

As for the above screenshot from the Tandy with the CGA card... Was that an old style or new style CGA card (was it even a real IBM at all?), since that would affect the colour appearance.

There's no difference between old and new CGA for BIOS mode 6 (at least up to brightness/contrast/saturation/hue tweaks) but I believe we've previously established that Servo's CGA card is new-style (compare http://www.mobygames.com/game/pc-booter/below … eShotId,132866/ and http://nerdlypleasures.blogspot.co.uk/2013/11 … e-graphics.html).

Scali wrote:

I haven't looked at your patch yet, but I assume you have included support for both types of CGA,

I did.

Scali wrote:

and you tried to calibrate each routine against the real thing.

I don't have a new-style CGA card to calibrate against, but it should be accurate since (if the schematics are to be believed) the differences between cards are relatively easy to model.

Reply 621 of 758, by Scali

User metadata
Rank l33t
Rank
l33t
reenigne wrote:

There's no difference between old and new CGA for BIOS mode 6

Well, I suppose the differences only manifest themselves when you change the background colour? Because the color burst signal itself is the same... but the background is generated with the DAC-ladder circuit which is different?
Which is probably not something that most games do.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 622 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
Scali wrote:
reenigne wrote:

There's no difference between old and new CGA for BIOS mode 6

Well, I suppose the differences only manifest themselves when you change the background colour?

Yes, I should have qualified "with a white or grey palette". With palette 1-6 or 9-14 the colours will differ between the two models.

Scali wrote:

Which is probably not something that most games do.

I can't think of any that do this offhand (though if there is one, somebody here will know it).

Reply 623 of 758, by VileR

User metadata
Rank l33t
Rank
l33t

There is a difference in mode 6 between old-style/new-style CGA - IIRC it works out to about 15 degrees in hue? With the white palette, colors #4 and #8 differ most perceptibly (purplish and brown on old-style, red and green on new-style).

reenigne wrote:

How's this? Same CGA simulation as before (plus mode-dependent hue tweak) but instead of a (1,4,7,8,7,4,1) kernel I used a (1,1,1,1,1,1,1,1) kernel for chroma, subtracted the result from the composite signal and filtered the remainder with a (1,2,1) kernel for luma giving (I think) about 50% more luma bandwidth at the cost of halving the chroma bandwidth.

Hmmm, much sharper!
Well, the 1024-color flowergirl image doesn't really benefit from it, but that's more *my* fault for not keeping edge artifacts in mind... for most game graphics, though, this new method does seem preferrable, and text especially is improved.

(BTW, the 1024-color CRTC trickery isn't part of this patch - how'd you get that one to work?) :)

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 624 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
VileRancour wrote:

(BTW, the 1024-color CRTC trickery isn't part of this patch - how'd you get that one to work?) 😀

I just hacked DOSBox's CGA ROM data so that scanline 1 is the same as scanline 0 for characters 0xb0 and 0xb1 and displayed the data using the 512-colour program 😀

A better patch that will allow the proper CGA 1K colour trick to work is not too far down the TODO list now...

Reply 625 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
reenigne wrote:

first I have to get the CGA simulation to output accurately at 7.16MHz

Here we go. Adding the 7.16MHz component back in does decrease the colour accuracy imperceptably, but I think I've made up for that by making some improvements to the calibration process.

reenigne wrote:

Perhaps it would be possible to add one new control which cycles through hue/contrast/brightness/saturation/sharpness and controls what the functions that are currently bound to hue-increase/hue-decrease do.

This latest patch does this. The controls are:
Alt+Ctrl+F1/Alt+Ctrl+F2 - cycle through hue, saturation, contrast, brightness and sharpness.
Atl+Ctrl+F3/Alt+Ctrl+F4 - change the value of the selected control.

I didn't remove the old F11/Alt+F11 hue controls at the same time, so I had to move a couple of things down in the mapper to make room for the new controls.

Turning the sharpness up to 100% does give a slight improvement to legibility of 80-column text (at the expense of adding 1 pixel vertical stripes) but (as I expected) the fact that the 3.58MHz colour carrier has been filtered out means that the legibility isn't perfect.

One other change that this version has is that the chroma sampling is now symmetrical so that both luma and chroma are centered in the same place. It's a pretty minor thing (not really noticeable unless you zoom in on a side-by-side comparison and know what you're looking for).

I might have a go at a comb filter next since that's something that was mentioned on this thread before. It won't make a lot of difference since the integer number of color carrier cycles per scanline in a CGA signal means that you can't improve horizontal luma resolution at the expense of vertical chroma resolution (the idea behind the comb filter) but there is one game which would be marginally improved by it. It's a bit tricky to do, though, since DOSBox currently renders scanline-by-scanline but comb filtering requires data from the next scanline in order to render the current one.

Attachments

  • Filename
    dosbox_sharpness.patch
    File size
    26.12 KiB
    Downloads
    60 downloads
    File license
    Fair use/fair dealing exception
  • Filename
    dosbox_sharpness.zip
    File size
    1.13 MiB
    Downloads
    65 downloads
    File license
    Fair use/fair dealing exception

Reply 626 of 758, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I don't have time to test this, but I thought I should mention that Ctrl+Alt+Fx may not be a good combo to use because it switches between various text mode consoles and the graphical desktop environment session on Linux.

Reply 627 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
HunterZ wrote:

I don't have time to test this, but I thought I should mention that Ctrl+Alt+Fx may not be a good combo to use because it switches between various text mode consoles and the graphical desktop environment session on Linux.

Oh, good point. I picked those because they were suggested by robertmo earlier in the thread. Well, they're easy enough to change if somebody suggests better ones.

Reply 628 of 758, by VileR

User metadata
Rank l33t
Rank
l33t

Played around with the latest patch and noticed a couple of things:

- mode 5 is shown in color, unlike current SVN (given the new method, I assume that a fix wouldn't be trivial?)
- in new CGA mode, the default brightness/contrast values may be a little off (high white is 239,239,239)

Other than that, looks great to me. Sharpness=100 does make the text somewhat nicer, although it looks good enough at 0, too:

sharpness000.png
Filename
sharpness000.png
File size
10.57 KiB
Views
1030 views
File license
Fair use/fair dealing exception
sharpness100.png
Filename
sharpness100.png
File size
8.64 KiB
Views
1030 views
File license
Fair use/fair dealing exception

By the way, should sharpness be limited to around 0-200 or so? (right now it's possible to set negative/arbitrarily high values.)

reenigne wrote:

Oh, good point. I picked those because they were suggested by robertmo earlier in the thread. Well, they're easy enough to change if somebody suggests better ones.

We can keep all the adjustments without adding any key mappings at all - just modifying the existing ones. Example:

- F12 = composite emulation: auto/on/off (same as current)
- Ctrl+Alt+F11 = select property to adjust: CGA type, brightness, contrast, saturation, hue, sharpness (currently: toggle CGA type)
- F11 / Alt+F11 = adjust the currently selected property (currently: adjust hue)

Alternatively, we can keep them all while using even *fewer* keys than current SVN:

- F12 = select property to adjust: composite auto/on/off (default), CGA type, brightness, contrast, saturation, hue, sharpness
- F11 / Alt+F11 = adjust the currently selected property

That would definitely be usable (if the console messages are clear enough), and is fully featured while keeping the mappear lean, so most parties should be satisfied I think.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 629 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
VileRancour wrote:

- mode 5 is shown in color, unlike current SVN (given the new method, I assume that a fix wouldn't be trivial?)

Whoops - actually it's quite trivial (I just completely forgot about it since it doesn't work terribly well on real hardware). I've fixed it in the attached patch (though not tested it yet).

VileRancour wrote:

- in new CGA mode, the default brightness/contrast values may be a little off (high white is 239,239,239)

Also fixed. Good catch - turned out to be a minor problem with the luma of many of the new CGA colours.

VileRancour wrote:

- F12 = composite emulation: auto/on/off (same as current)
- Ctrl+Alt+F11 = select property to adjust: CGA type, brightness, contrast, saturation, hue, sharpness (currently: toggle CGA type)
- F11 / Alt+F11 = adjust the currently selected property (currently: adjust hue)

Good idea - I've implemented this in the attached patch.

Attachments

Reply 630 of 758, by VileR

User metadata
Rank l33t
Rank
l33t
reenigne wrote:

Whoops - actually it's quite trivial (I just completely forgot about it since it doesn't work terribly well on real hardware). I've fixed it in the attached patch (though not tested it yet).

Hmm, this appears to work as expected for old CGA, but not for new CGA... the latter should represent the 16 RGBI colors as 16 greyscale levels in BW mode, but it looks the same as old CGA:

cga40pal_001.png
Filename
cga40pal_001.png
File size
7.34 KiB
Views
979 views
File license
Fair use/fair dealing exception

Other than that, works like a charm 😀

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 631 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
VileRancour wrote:

Hmm, this appears to work as expected for old CGA, but not for new CGA... the latter should represent the 16 RGBI colors as 16 greyscale levels in BW mode, but it looks the same as old CGA:

Whoops again - I took out too much. This one should be right.

Attachments

Reply 632 of 758, by VileR

User metadata
Rank l33t
Rank
l33t

Yep, BW mode looks correct for new CGA now - nice!

cga40pal_002.png
Filename
cga40pal_002.png
File size
10.8 KiB
Views
942 views
File license
Fair use/fair dealing exception

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 633 of 758, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

This is amazing. Composite color in text mode. I can only get the 8088MPH demo to run just past the point where it says No Blitter, No Copper, No VIC-II, What are we going to do? Is there some way to get further?

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 634 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
Great Hierophant wrote:

This is amazing. Composite color in text mode. I can only get the 8088MPH demo to run just past the point where it says No Blitter, No Copper, No VIC-II, What are we going to do? Is there some way to get further?

Not yet. You can skip past that section by holding down Alt+F12 for a bit and find some more bits that work, but the 1K colour parts won't work until DOSBox has better CRTC emulation. Implementing this is on my list, but I have a few other things I want to do first so I might not get to it until later on this year.

Reply 636 of 758, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie
HunterZ wrote:

Does this patch support composite color in the early Ultima games? I remember there was some buzz about that a while back.

I haven't tried it in any Ultimas specifically, but with this patch you can see the composite output from any CGA software.

Reply 638 of 758, by VileR

User metadata
Rank l33t
Rank
l33t

Yet another advantage of this new patch (vs. SVN) is that line-wise palette changes are now supported:

hunt.png
Filename
hunt.png
File size
10.98 KiB
Views
882 views
File license
Fair use/fair dealing exception

(new-style CGA - compare to this.)

By the way, this shot was achieved by kicking up contrast and saturation considerably, and lowering the brightness. This seems to give results much closer to the output of real-life new-style CGA cards -- they all share this darker, more saturated look compared to the default settings. Therefore, it may be a good idea to *offset* the default values (for new CGA only) with these adjustments.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 639 of 758, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

On a real IBM PC with an IBM CGA card even I had trouble with Jungle Hunt getting the white status bar text all the time. It would usually cycle its location on the screen each time you died.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog