Page 2 of 2

Re: [Patch] CGA monochrome & selectable mono display

Posted: Sat 17 Jun, 2017 1:36 pm
by basic2004
ppgrainbow wrote:Monochrome VGA is simply a grayscale version of a real VGA screen. Here's a example: http://www.computernerdkev.heliohost.or ... 0035,s.jpg

Monochrome EGA displays can have up to 16 grayscale shades (16 colours out of 64 palette colours). Monochrome VGA displays can have up to 64 grayscale shades (as opposed to 256 colours out of 262,144 palette colours). For monochrome super VGA displays, you can truly have up to 256 grays (as opposed to having 16-bit or 24-bit colours). Here's a example of what a monochrome super VGA monitor looks like: https://www.recycledgoods.com/miracle-m ... or-15-pin/

Here's a article regarding the Monochrome Experience - CGA, EGA and VGA: http://nerdlypleasures.blogspot.com/201 ... a-and.html
I see. Monochrome EGA and VGA, both showing simply grayscale screen like below, is it?
[EDIT] this picture has expired, sorry...

I think these to monochrome easier way, insert to screen rendering process, not display mode configuration...
rendering EGA/VGA screen to grayscale and change palette like various monochrome screens.
and this way can render color CGA to grayscale, too.
or using shader (CG for D3D, GLSL for OpenGL) from PCem.

Re: [Patch] CGA monochrome & selectable mono display

Posted: Sat 17 Jun, 2017 5:44 pm
by ppgrainbow
basic2004 wrote:
ppgrainbow wrote:Monochrome VGA is simply a grayscale version of a real VGA screen. Here's a example: http://www.computernerdkev.heliohost.or ... 0035,s.jpg

Monochrome EGA displays can have up to 16 grayscale shades (16 colours out of 64 palette colours). Monochrome VGA displays can have up to 64 grayscale shades (as opposed to 256 colours out of 262,144 palette colours). For monochrome super VGA displays, you can truly have up to 256 grays (as opposed to having 16-bit or 24-bit colours). Here's a example of what a monochrome super VGA monitor looks like: https://www.recycledgoods.com/miracle-m ... or-15-pin/

Here's a article regarding the Monochrome Experience - CGA, EGA and VGA: http://nerdlypleasures.blogspot.com/201 ... a-and.html
I see. Monochrome EGA and VGA, both showing simply grayscale screen like below, is it?
Image

I think these to monochrome easier way, insert to screen rendering process, not display mode configuration...
rendering EGA/VGA screen to grayscale and change palette like various monochrome screens.
and this way can render color CGA to grayscale, too.
or using shader (CG for D3D, GLSL for OpenGL) from PCem.
That would sound like a brilliant idea to implement monochrome EGA/VGA support with selectable mono display. Did you know that there is a gas plasma version of these displays? I believe that gas plasma displays consist of shades of yellow to brown as well as red.

Re: [Patch] CGA monochrome & selectable mono display

Posted: Thu 13 Jul, 2017 12:09 pm
by basic2004
ppgrainbow wrote:That would sound like a brilliant idea to implement monochrome EGA/VGA support with selectable mono display. Did you know that there is a gas plasma version of these displays? I believe that gas plasma displays consist of shades of yellow to brown as well as red.
Latest PCem-wx-SDL2 supports OpenGL3 and GLSL shaders.
Use shader to emulate EGA/VGA monochrome monitor easier.
amber.jpg
amber.jpg (40.23 KiB) Viewed 14321 times
green.jpg
green.jpg (36.51 KiB) Viewed 14321 times
paperwhite.jpg
paperwhite.jpg (38.83 KiB) Viewed 14321 times
Sorry for late answer.

Re: [Patch] CGA monochrome & selectable mono display

Posted: Thu 13 Jul, 2017 12:15 pm
by basic2004
I made these palettes injected to grayBT601 shader, original works by Aybe. Thanks to him.
https://github.com/aybe/RetroArch-shaders

You can test these shaders with PCem-wx-SDL2.
shaders-emulate-monochrome-monitor.zip
(2.2 KiB) Downloaded 527 times

Re: [Patch] CGA monochrome & selectable mono display

Posted: Thu 13 Jul, 2017 4:27 pm
by basic2004
ppgrainbow wrote:That would sound like a brilliant idea to implement monochrome EGA/VGA support with selectable mono display. Did you know that there is a gas plasma version of these displays? I believe that gas plasma displays consist of shades of yellow to brown as well as red.
I don't know about real amber monitor so I modified again. What's better these amber screens?
Here is modified amber screen shader.
amber2.jpg
amber2.jpg (41.88 KiB) Viewed 14297 times
shaders-emulate-monochrome-monitor-amber-take2.zip
(766 Bytes) Downloaded 374 times

Re: [Patch] CGA monochrome & selectable mono display

Posted: Thu 13 Jul, 2017 4:34 pm
by omarsis81
I never had an Hercules monitor, so I can't really tell which one is better
I have two suggestions: wait until someone with a real hercules monitor can test and compare or you can load games with pictures of real hardware on the internet and compare, like this one:

https://i.ytimg.com/vi/QWb-F3GUB-I/maxresdefault.jpg

Re: [Patch] CGA monochrome & selectable mono display

Posted: Sat 15 Jul, 2017 11:40 pm
by ppgrainbow
Awesome work on getting the shaders to work on EGA/VGA emulated displays! :)

Re: [Patch] CGA monochrome & selectable mono display

Posted: Sun 16 Jul, 2017 6:00 am
by basic2004
Modified amber display shader again.
Optimized for text, tested with CGA_COMP.
amber-burst-contrast.png
amber-burst-contrast.png (14.21 KiB) Viewed 14207 times
amber-burst.jpg
amber-burst.jpg (38.83 KiB) Viewed 14208 times
grayscale-amber-burst.zip
(788 Bytes) Downloaded 433 times

Re: [Patch] CGA monochrome & selectable mono display

Posted: Sun 16 Jul, 2017 6:29 am
by basic2004
I edited again bursted amber monitor shader, use curve instead cutoff in Green value.

I modified

Code: Select all

    _ret_0 = vec4(sqrt(_w), (1.05 * _w) - 0.3, (0.4 * pow(_w, 2)) - 0.2, _c.w);
to

Code: Select all

    _ret_0 = vec4(sqrt(_w), (0.8 * pow(_w, 2)), (0.4 * pow(_w, 2)) - 0.2, _c.w);
amber-take3-contrast.png
amber-take3-contrast.png (14.2 KiB) Viewed 14206 times
grayscale-amber-take3.zip
(782 Bytes) Downloaded 375 times
I think this bursted color was default specification of real amber monitor,
so removed burst and inserted take 3...
But I don't know because I didn't use real amber monitor.
I want to choose one what's better?

Re: [Patch] CGA monochrome & selectable mono display

Posted: Sun 16 Jul, 2017 7:06 am
by ppgrainbow
I'd go for both! The original amber monochrome and the other one where it used the curve to create a gas plasma monochrome effect! :D

Re: [Patch] CGA monochrome & selectable mono display

Posted: Mon 17 Jul, 2017 4:07 pm
by basic2004
Finally, I adjusted all maybe no more modifying.
reduced color burst of amber, and raised some brightness of green monitor.
and reduced some greenish in white monitor.
cga_comp.png
cga_comp.png (32.06 KiB) Viewed 14172 times
hb3.png
hb3.png (68.93 KiB) Viewed 14172 times
I applied for amber monitor.

Code: Select all

    _ret_0 = vec4(pow(_w, 0.6), 0.9 * pow(_w, 2), 0.2 * pow(_w, 6), _c.w);
green monitor.

Code: Select all

    _ret_0 = vec4(0.225 * pow(_w, 4), pow(_w, 0.75), 0.375 * pow(_w, 2), _c.w);
and white monitor.

Code: Select all

    _ret_0 = vec4(pow(_w, 1.05), 0.99 * _w, 0.925 * pow(_w, 0.9), _c.w);
Shader is here.
shaders-emulate-monochrome-monitor-finally.zip
(2.25 KiB) Downloaded 391 times
Thanks to bit, Aybe, and all.

Re: [Patch] CGA monochrome & selectable mono display

Posted: Tue 18 Jul, 2017 2:10 am
by ecksemmess
Great work, basic2004! Should the amber really be as red as that, though? My recollection, which is seemingly consistent with what I can see in screenshots and on YouTube, is a bit different from the palette you've chosen--I'd say every shade on the amber should be moved a few notches closer to yellow. What have you used as the basis for your color choices?

Re: [Patch] CGA monochrome & selectable mono display

Posted: Tue 18 Jul, 2017 3:46 am
by basic2004
ecksemmess wrote:Great work, basic2004! Should the amber really be as red as that, though? My recollection, which is seemingly consistent with what I can see in screenshots and on YouTube, is a bit different from the palette you've chosen--I'd say every shade on the amber should be moved a few notches closer to yellow. What have you used as the basis for your color choices?
I saw this page http://www.vogons.org/viewtopic.php?t=29101 and color picked with this image.

Image

picked from this picture's optimize for 16 colors's 'F'. and use curve, light gray to between 6 and 7.

Anyone who make nearer to real screen than this shader?

Re: [Patch] CGA monochrome & selectable mono display

Posted: Tue 18 Jul, 2017 4:39 am
by basic2004
Sorry, my mistake... I modified amber monitor again reduced redish more and adjusted brightness.

Code: Select all

    _ret_0 = vec4(1.25 * pow(_w, 0.725), 0.905 * pow(_w, 1.5), 0.225 * pow(_w, 8), _c.w);
during pick color and compare F and 7 from Optimized for 16-colors modes of amber.
amber_take5_cga_comp.png
amber_take5_cga_comp.png (14.23 KiB) Viewed 14137 times
amber-take5-hb3.png
amber-take5-hb3.png (25.42 KiB) Viewed 14137 times
Shader is here.
shaders-emulate-monochrome-monitor-fix-amber.zip
(2.25 KiB) Downloaded 414 times

Re: [Patch] CGA monochrome & selectable mono display

Posted: Tue 18 Jul, 2017 4:55 pm
by ecksemmess
basic2004: the tweaks shown in your latest post definitely look better to me--good work! :) However, I should warn you that I'm not enough of an expert to be able to tell whether it still needs more tweaking or not. VileRancour is much more knowledgeable about this stuff than probably anyone else you'll meet, so if I were you I would just keep checking your work against his color palettes, as you said you've been using. Your latest attempt does look like a much closer match to those palettes than your previous attempts, so that's good, but it'll be worth double-checking to make sure you got it just right.

Re: [Patch] CGA monochrome & selectable mono display

Posted: Tue 18 Jul, 2017 7:48 pm
by basic2004
ecksemmess wrote:basic2004: the tweaks shown in your latest post definitely look better to me--good work! :) However, I should warn you that I'm not enough of an expert to be able to tell whether it still needs more tweaking or not. VileRancour is much more knowledgeable about this stuff than probably anyone else you'll meet, so if I were you I would just keep checking your work against his color palettes, as you said you've been using. Your latest attempt does look like a much closer match to those palettes than your previous attempts, so that's good, but it'll be worth double-checking to make sure you got it just right.
Yes, I don't have an amber monitor and I've not seen real amber monitor...
25 years ago I used XT and white monitor, and friends and school used green and white. amber was not found in my town.

My turn is ended cause I adjusted many way and many times but I didn't acheive best result... I'm not expert about that.
My best way was picking and comparing nearest value of F and 7, I'll wait who tweaks these better.

Thanks for advice to me.

Re: [Patch] CGA monochrome & selectable mono display

Posted: Tue 18 Jul, 2017 8:29 pm
by leilei
What about old monochrome laptop LCD? :)

Also did old mono laptops then inverted textmode colors through the video bios or was that the screen doing it? Can't really remember...