[Patch] CGA monochrome & selectable mono display

Discussion of development and patch submission.
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Sat 17 Jun, 2017 1:36 pm

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.
Last edited by basic2004 on Thu 13 Jul, 2017 12:20 pm, edited 2 times in total.
User avatar
ppgrainbow
Posts: 402
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: [Patch] CGA monochrome & selectable mono display

Postby ppgrainbow » Sat 17 Jun, 2017 5:44 pm

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.
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Thu 13 Jul, 2017 12:09 pm

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 943 times

green.jpg
green.jpg (36.51 KiB) Viewed 943 times

paperwhite.jpg
paperwhite.jpg (38.83 KiB) Viewed 943 times

Sorry for late answer.
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Thu 13 Jul, 2017 12:15 pm

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 15 times
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Thu 13 Jul, 2017 4:27 pm

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 919 times

shaders-emulate-monochrome-monitor-amber-take2.zip
(766 Bytes) Downloaded 12 times
User avatar
omarsis81
Posts: 545
Joined: Thu 17 Dec, 2015 6:20 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby omarsis81 » Thu 13 Jul, 2017 4:34 pm

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
User avatar
ppgrainbow
Posts: 402
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: [Patch] CGA monochrome & selectable mono display

Postby ppgrainbow » Sat 15 Jul, 2017 11:40 pm

Awesome work on getting the shaders to work on EGA/VGA emulated displays! :)
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Sun 16 Jul, 2017 6:00 am

Modified amber display shader again.
Optimized for text, tested with CGA_COMP.

amber-burst-contrast.png
amber-burst-contrast.png (14.21 KiB) Viewed 829 times

amber-burst.jpg
amber-burst.jpg (38.83 KiB) Viewed 830 times

grayscale-amber-burst.zip
(788 Bytes) Downloaded 6 times
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Sun 16 Jul, 2017 6:29 am

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 828 times

grayscale-amber-take3.zip
(782 Bytes) Downloaded 8 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?
User avatar
ppgrainbow
Posts: 402
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: [Patch] CGA monochrome & selectable mono display

Postby ppgrainbow » Sun 16 Jul, 2017 7:06 am

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
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Mon 17 Jul, 2017 4:07 pm

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 794 times

hb3.png
hb3.png (68.93 KiB) Viewed 794 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 13 times


Thanks to bit, Aybe, and all.
ecksemmess
Posts: 122
Joined: Wed 18 Mar, 2015 5:27 am

Re: [Patch] CGA monochrome & selectable mono display

Postby ecksemmess » Tue 18 Jul, 2017 2:10 am

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?
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Tue 18 Jul, 2017 3:46 am

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?
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Tue 18 Jul, 2017 4:39 am

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 759 times

amber-take5-hb3.png
amber-take5-hb3.png (25.42 KiB) Viewed 759 times


Shader is here.
shaders-emulate-monochrome-monitor-fix-amber.zip
(2.25 KiB) Downloaded 14 times
ecksemmess
Posts: 122
Joined: Wed 18 Mar, 2015 5:27 am

Re: [Patch] CGA monochrome & selectable mono display

Postby ecksemmess » Tue 18 Jul, 2017 4:55 pm

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.
basic2004
Posts: 118
Joined: Sun 08 Jan, 2017 5:59 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby basic2004 » Tue 18 Jul, 2017 7:48 pm

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.
User avatar
leilei
Posts: 436
Joined: Fri 25 Apr, 2014 4:47 pm

Re: [Patch] CGA monochrome & selectable mono display

Postby leilei » Tue 18 Jul, 2017 8:29 pm

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

Return to “Development”

Who is online

Users browsing this forum: TheMadLynx and 2 guests