VIDEO - CGA w/ Monochrome Monitor Support

Here you can discuss the development of patches.

VIDEO - CGA w/ Monochrome Monitor Support

Postby VileRancour » 2011-7-05 @ 01:30

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):

Image Image Image

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

Green -
Image

Amber -
Image

Grey -
Image

Green again -
Image
Last edited by VileRancour on 2011-8-03 @ 22:28, edited 1 time in total.
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby VileRancour » 2011-7-05 @ 01:44

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
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby sliderider » 2011-7-05 @ 02:36

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.
User avatar
sliderider
l33t++
 
Posts: 5754
Joined: 2010-6-25 @ 13:02

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby leileilol » 2011-7-05 @ 03:25

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
Voodoo2s aren't 100mhz stock
Geforce256 isn't released as a beta on New Years '99 under the Quadro brand
386DX vs SX isn't about a missing FPU
DOS gaming isn't a bilinear 320x200 16:10
DOS PCs aren't better than the Macintosh
Old PCs aren't 'aesthetic'
User avatar
leileilol
l33t++
 
Posts: 9139
Joined: 2006-12-16 @ 18:03

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby VileRancour » 2011-7-05 @ 07:31

^ 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) :D

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...
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a


Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby sliderider » 2011-7-05 @ 12:35

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?
User avatar
sliderider
l33t++
 
Posts: 5754
Joined: 2010-6-25 @ 13:02

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby wd » 2011-7-05 @ 12:57

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).
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby Great Hierophant » 2011-7-05 @ 14:58

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
User avatar
Great Hierophant
l33t
 
Posts: 2361
Joined: 2003-4-27 @ 08:20

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby VileRancour » 2011-7-05 @ 15:15

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.
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby VileRancour » 2011-7-05 @ 15:45

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.
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby sliderider » 2011-7-05 @ 16:42

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.
User avatar
sliderider
l33t++
 
Posts: 5754
Joined: 2010-6-25 @ 13:02

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby wd » 2011-7-05 @ 17:25

You're confusing "how game creators thought it should be played" and "how the game was perceived back then by an individual".
wd
DOSBox Author
 
Posts: 10818
Joined: 2003-12-03 @ 21:23

Re: CGA w/ Monochrome Monitor Support (Work in Progress...)

Postby VileRancour » 2011-7-06 @ 19:26

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

Rockford in normal CGA -

Image

Compare to monochrome shot from my first post:

Image

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.
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Patch & Test Build - CGA w/ Monochrome Monitor Support

Postby VileRancour » 2011-8-03 @ 22:27

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.
You do not have the required permissions to view the files attached to this post.
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: Patch & Test Build - CGA w/ Monochrome Monitor Support

Postby NY00123 » 2011-8-26 @ 13:36

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.
NY00123
Member
 
Posts: 224
Joined: 2010-2-13 @ 19:42

Re: Patch & Test Build - CGA w/ Monochrome Monitor Support

Postby VileRancour » 2011-8-28 @ 21:46

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  /   (NEW) blog   /   tube
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: Patch & Test Build - CGA w/ Monochrome Monitor Support

Postby gulikoza » 2011-9-01 @ 14:48

I like it, I'll have to find the time to test it :wink:. It might look good with the CRT shader :pppt: :pppt:
User avatar
gulikoza
Oldbie
 
Posts: 1700
Joined: 2004-6-25 @ 14:53

Re: Patch & Test Build - CGA w/ Monochrome Monitor Support

Postby VileRancour » 2011-9-07 @ 14:44

gulikoza wrote:might look good with the CRT shader :pppt: :pppt:

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

(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).

Image
web  /   (NEW) blog   /   tube
User avatar
VileRancour
Oldbie
 
Posts: 1598
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: Patch & Test Build - CGA w/ Monochrome Monitor Support

Postby ykhwong » 2011-9-07 @ 18:16

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.
ykhwong
Oldbie
 
Posts: 627
Joined: 2004-3-17 @ 15:35

Next

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 2 guests