VOGONS

Common searches


First post, by VileR

User metadata
Rank l33t
Rank
l33t

I've started working on a patch, basically because this is how I remember playing games on my first XT clone.
This setup was very common around these parts anyway - RGB monitors were sort of rare back then (and I live in a PAL country, meaning we couldn't hook up CGA to our TV sets). So a lot of people had to make do with cheap monochrome TTL monitors, green or sometimes grey... amber could be seen too (and was built-in with a lot of old "luggables").

Not sure why some other nostalgic bastard hasn't done this yet, but here is what i'm coming up with so far;

- separate "cga_mono" machine declaration
- the 16 CGA colors are mapped into 16 mono shades (hard coded)
- different brightness/contrast combinations
- alt+F11 cycles between green, amber, and grey + brightness/contrast settings
- color-burst composite mode not supported by cga_mono

The hard-coded settings for shades and brightness/contrast are a toughie. I'm going by memory here, as well as a picture and a video that i managed to find (check out 2:31-2:47 in the video).

Seems that there's no corellation between the RGBi color components and the resulting monochrome shade - there's just an increasing brightness trend based on color index. Also (e.g. for green), we can't use only the green component of the RGB vga palette, since it doesn't yield a wide enough range of brightness... so these palettes are somewhat fanciful, but they do the job. I think most nostalgic bastards could agree they are passable, but of course, any comments would be welcome.

Demonstrating the different brightness/contrast settings, in green mode (using Trixter's CGA_COMP program):

wM61A.png D0K69.png q1IXb.png

And a few game shots (w/tv2x scaler):

Green -
4Vl23.png

Amber -
um5WJ.png

Grey -
N8NdU.png

Green again -
CJlDl.png

Last edited by VileR on 2011-08-03, 22:28. Edited 1 time in total.

Reply 1 of 34, by VileR

User metadata
Rank l33t
Rank
l33t

when this is done, I'd like to submit my test build + a patch, but... well.....

- I'm not a programmer by any stretch, so i obviously don't really know what I'm doing
- I'm working with Visual Studio 2008, only because that guide looked easy over on the wiki
- For now, I'm writing this based on 0.74 sources, rather than latest SVN (again.. the guide....)
- I haven't got the slightest idea how to create .diff files or whatever

So, if anyone could lend a hand here, you would be eternally commemorated in the Awesome Book of Awesome.

Cheers,
VR

Reply 2 of 34, by sliderider

User metadata
Rank l33t++
Rank
l33t++

The question comes up, why emulate a monochrome monitor at all? Monochrome monitors generally had superior text quality for apps, but if you wanted to play games you wanted to do it in color, and the more colors the better. Monochrome monitors were something you tolerated back then because you couldn't afford anything better. That is no longer an issue.

Reply 3 of 34, by leileilol

User metadata
Rank l33t++
Rank
l33t++
sliderider wrote:

The question comes up, why emulate a monochrome monitor at all?

Because for some, it's "The way it's meant to be played".

Bonus points if some GLSL phosphor bloom/flicker magic can happen. I actually do miss the older monochrome CRT screens. I am REALLY liking what i'm seeing so far though

apsosig.png
long live PCem

Reply 4 of 34, by VileR

User metadata
Rank l33t
Rank
l33t

^ Yep, pretty much what leilei says...

Reproducing the feel/functionality of old, outdated stuff that's not really needed today is what retro gaming / emulation are all about, anyway. I suppose that at least some people would appreciate having the option, and basically I figure it can't hurt to have it in.
Of course monochrome CRTs weren't ideal for games, but quite a few games did support Hercules even back then, so there at least some small demand existed. Those CGA mono monitors were just a compromise, but they actually looked a whole lot better than e.g. using SIMCGA (if your game didn't support Hercules natively) 😁

Re: phosphor bloom - I still suck too much at this to handle stuff like GLSL, but who knows. Flicker is another matter, unfortunately you can't really simulate it if we're limited to 60hz on the monitor...

Reply 6 of 34, by sliderider

User metadata
Rank l33t++
Rank
l33t++
leileilol wrote:
sliderider wrote:

The question comes up, why emulate a monochrome monitor at all?

Because for some, it's "The way it's meant to be played".

Bonus points if some GLSL phosphor bloom/flicker magic can happen. I actually do miss the older monochrome CRT screens. I am REALLY liking what i'm seeing so far though

I don't see how that can be when games were clearly written with color monitors in mind. How about grayscale VGA monitors? Should we be playing Quake on those instead of color VGA monitors just because they happened to exist as a lower cost alternative to color VGA?

Reply 7 of 34, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I don't see how that can be when games were clearly written with color monitors in mind.

Quite easy: reproducing what you had available back then. For me seeing sokoban in green
monochrome is much more "YES!" than seeing it in cga colors, same reason why i'd never
play lucas arts with anything different than adlib (even though roland may sound soooooo much
better according to other people).

Reply 8 of 34, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

The hard-coded settings for shades and brightness/contrast are a toughie. I'm going by memory here, as well as a picture and a video that i managed to find (check out 2:31-2:47 in the video).

Seems that there's no corellation between the RGBi color components and the resulting monochrome shade - there's just an increasing brightness trend based on color index. Also (e.g. for green), we can't use only the green component of the RGB vga palette, since it doesn't yield a wide enough range of brightness... so these palettes are somewhat fanciful, but they do the job. I think most nostalgic bastards could agree they are passable, but of course, any comments would be welcome.

There seems to be three methods for CGA monochrome output. First is the official way used by IBM in its PC Portable, which uses the composite video output to a composite monochrome monitor.

Second is the way used by ATI, in which the video card sends a compatible signal to a monochrome TTL monitor. In the video the user is using an IBM 5151 PC Monochrome Display, which was not intended to be compatible with CGA. I do not know that he should be able to get more than two shades of green, three max, plus black. I would suggest its impossible on a TTL monitor with a video pin and an intensity pin.

Third is the way used in the monitor in the picture, where the monitor receives the signal and assigns shades of the color. As color #6 is clearly darker than the colors surrounding it and the rest of the two sets of 8 colors follow a progressive brightness pattern, obviously this monitor was made specifically for CGA.

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

Reply 9 of 34, by VileR

User metadata
Rank l33t
Rank
l33t
sliderider wrote:

...How about grayscale VGA monitors? Should we be playing Quake on those instead of color VGA monitors just because they happened to exist as a lower cost alternative to color VGA?

"Should" is to anyone's taste. An option for mono is just that, an option... it doesn't come at the expense of the color option, or anything.

If "more = better" was some universal absolute, then no one would be playing the original Quake anyway, everyone would be using modern source ports with all the bells and whistles. But even with Quake (and e.g. Doom), there are source ports that deliberately stick to the "old way", so there must be some interest in the original experience that people remember.

Reply 10 of 34, by VileR

User metadata
Rank l33t
Rank
l33t

Back on topic,

so would a patch be interesting, when I finish tweaking this? should all patches be against SVN?

@Great Hierophant - cool, thanks for that info. The guy in the video seems to be getting ~16 shades of "greenscale" on his ATI + 5151 combination (see the "colorbars" section), maybe the card creates different darker shades by cycling TTL on/off voltages at a much higher frequency than full-pixel frequency? not too sure what these things' tolerance is.

Reply 11 of 34, by sliderider

User metadata
Rank l33t++
Rank
l33t++
leileilol wrote:
sliderider wrote:

The question comes up, why emulate a monochrome monitor at all?

Because for some, it's "The way it's meant to be played".

Bonus points if some GLSL phosphor bloom/flicker magic can happen. I actually do miss the older monochrome CRT screens. I am REALLY liking what i'm seeing so far though

If you're not playing a game with all the best options that were available at the time you're obviously NOT playing it the way it was meant to be played. Playing a game from back then in monochrome is like playing Crysis on integrated graphics. Not the intended experience at all.

Reply 13 of 34, by VileR

User metadata
Rank l33t
Rank
l33t

now this is interesting... I've found one game where the CGA mode was clearly "intended" for a monochrome monitor:

Rockford in normal CGA -

AjRmg.png

Compare to monochrome shot from my first post:

um5WJ.png

in the color version, the shading is messed up (check out the cave entrance, the rocks, and the clouds).
The artist obviously relied on color 1 being darker than color 2 in the palette - that doesn't happen with color CGA, only with those monochrome monitors that follow the "progressive brightness" shading map.

anyway, this is just a curiosity - the game has Tandy & EGA modes too, and they look good in color. Guess the developers were just being lazy about CGA and never tested it on a color monitor.

it also kind of complicates the whole deal.... because I'm thinking of changing the shading levels to be more like a composite mono screen (makes more sense for games because the brightness of each shade matches the brightness of the CGA colors - plus as GH has noted, this was the "official IBM way").
I think I'll do that anyway.... still tweaking this thing.

Reply 14 of 34, by VileR

User metadata
Rank l33t
Rank
l33t

I finally found some more time to tinker with this, make it look satisfactory, and create a patch (thanks Qbix for helping with the latter).

win32 test build also attached. To use:

- set machine=cga_mono in the newly created config file
- F11 cycles between green, amber, and grey (similar to machine=hercules)
- ALT+F11 toggles two settings for brightness/contrast.

I've tweaked the palettes further, based on some more net findings and especially info & pics from the fine folks at the Vintage Computer forums.
Those brightness/contrast settings might be somewhat arbitrary, but they behave more or less as they did on that type of monitors, and after testing I feel that they work best for 4-color and 16-color modes, respectively.

This image explains it best, I hope...

Haven't found any bugs or issues myself, but my code could probably be cleaner, so any suggestions are welcome.

patch is against current SVN (at least against http://source.dosbox.com/dosboxsvn.tgz as of a few hours ago).
So if the mods are willing, this could now be moved to the patches forum.

Attachments

  • Filename
    dosbox-SVN-VR.zip
    File size
    783.4 KiB
    Downloads
    327 downloads
    File comment
    Test build, needs SDL.dll (sorry no screenshots, don't know how to compile w/libpng in Visual Studio)
    File license
    Fair use/fair dealing exception
  • Filename
    CGA_MONO.diff
    File size
    8.71 KiB
    Downloads
    327 downloads
    File comment
    patch
    File license
    Fair use/fair dealing exception

Reply 15 of 34, by NY00123

User metadata
Rank Member
Rank
Member

Hmm, there has been no reply here for some time. Guess I'll add mine 😀

While not playing CGA games so much (out of old DOS games in general), I should say this is a great addition! Originally available in Hercules mode, the patch adds the CGA variation.
Playing with this feature can be nice for the ones who want to revive days of playing with a monochrome monitor, long ago. Some may like green, others amber, and more can go with gray-scale.

Reply 16 of 34, by VileR

User metadata
Rank l33t
Rank
l33t

Thanks for posting the first-ever reply since I put up the patch, haha.
Yeah, tough crowd in this thread 😀

For some reason the attachments aren't visible until you log in, unlike the other DOSBox forums, so maybe that's why people aren't seeing them. Figured there would be some interest, based on the previous discussion above.

to the few who did download the patch and/or test build -- any comments? Issues found? Tips on improving the code? Flames over how I've wasted your time? any input is appreciated 😉

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

Reply 18 of 34, by VileR

User metadata
Rank l33t
Rank
l33t
gulikoza wrote:

might look good with the CRT shader 😜 😜

I just tried ykhwong's latest build, which includes both of our patches... and yes, it does!! 😁

(click image for the full size)

By the way, ykhwong's build comes with its own d3dx9.dll, which seems to break things with shaders... Fixed with d3dx9_30.dll from your site (simply renamed it and dropped it in place of the other one).

Rbbiel.jpg

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

Reply 19 of 34, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie
VileRancour wrote:

By the way, ykhwong's build comes with its own d3dx9.dll, which seems to break things with shaders...

I am using d3dx9_42.dll released in 2009 instead. What's the matter with the shaders? I modified several shader files about two months ago so that they should work properly with it.