Sony Megatron Colour Video Monitor

This is actually a GX so only 4K.

I’m just as perplexed as you @MajorPainTheCactus. :astonished:

Any takes on how @Dennis1 can seemingly get excellent RGB phosphor layout quality with a regular RWBG OLED subpixel layout panel @MajorPainTheCactus?

1 Like

Yes but we’re talking about consoles here that produce an image - this gets us back to what I was saying at the start: the signal output by the console is gamma corrected so that the TV can just pass it through and thus it must have been the console that did the correcting in its tv output circuitry/display chip. Certainly developers werent gamma correcting graphics/textures on a snes like they did on an xb360 say. So if that is true did all the console manufacturers ignore the tv standards - again it seems odd theyd do that.

Yes, but it is the emulators/cores that are doing the correcting/encoding in this context, whether they do so 100% accurately for Megatron’s purposes or not.

Megatron is the display.

So, ideally, i would say this is what we want to be happening gamma-wise for CRT-based consoles:

  • The “console” (emulator/core) uses a hardware accurate encoding gamma, whatever that may be.
  • The “display” (Megatron) uses a CRT accurate decoding gamma (pure power gamma in the 2.1-2.5 range.)

In reality, our “console” might not be using the correct gamma encode function, but we can’t change that by decoding the incorrectly encoded image using the inverse of the correct gamma encode function.

We could add an option to use a piecewise sRGB decoding gamma i suppose? Since that would presumably be the single most common “incorrect” encoding gamma produced by emulators/cores. As a bonus, this could also be useful for some more modern PC games that look their best with piecewise sRGB.

2 Likes

I’m not sure I agree with your analogy 100%.

I see the emulator/core as providing only the raw unencoded and unprocessed video source and Megatron or any other CRT Shader as having the responsibility of handling both the video output encoding stages and also the “display” functionality of simulating various CRT TVs.

In fact this is what all those NTSC filters/Shaders are about.

If this wasn’t the case and Megatron was just the “display” and everything else was done at the emulator/core level then Sega Genesis games would have blending and transparency just by “hooking up” the emulator/core to the “display”.

However this is not the case unless we add TV system filters to the output stage of the core or as shaders.

If what you say is correct then you should be able to use one preset with any emulator and have acceptable Gamma/Saturation.

In practice, if you take a preset that’s highly tuned for SNES Core output and you use it on an NES Core, it’s going to look very oversaturated.

Similarly, if you take that same SNES tuned preset and try to use it to play CPS1 games, it’s going to look a bit too bright and washed out.

So the shader has a role to play from even before the video signal leaves the box, all the way through the various TV inputs and finally for display on those virtual phosphors.

1 Like

Keep in mind that we are talking about gamma specifically in this case. Emulators/cores don’t necessarily simulate NTSC signal degradation, but they absolutely aren’t producing raw output with no gamma encoding whatsoever in at least most cases.

If they were, simply hooking a PC up to a CRT wouldn’t produce such good results.

2 Likes

CyberLab Megatron 4K HDR Game SNES Composite Smooth.slangp

1 Like

I just measured the primary colors with my i1 Pro 2 spectrophotometer and there are pretty big differences between Windows 11 Auto HDR and the built in HDR in the Megatron shader within Retroarch.

To compare, first I used W11 Auto HDR in conjunction with the Megatron Reshade shader (neutral preset) with color system set to r709 in the shader menu. My TV is set to color temperature warm1, which is still a lot cooler than 6500K when used without a shader (warm 2 measures also slightly above 7000K).

And this is what I measure with W11 AutoHDR:

With the Retroarch Megatron shader (default HDR preset) and its own HDR tonemapping and also color system set to r709 and same TV color temp I get this:

This is exactly what I saw with my eyes before measuring, there is too much yellow in the green with the Megatron HDR tonemapping.

Also what I noticed is, that whitepoint is too far off the black body curve towards magenta. The whitepoint with Windows 11 Auto HDR is much closer to the black body curve and should also be more accurate, as my TV is set to warm 1 and should be close to 9000K.

The whitepoint with W11 Auto HDR measures around 9800K and with Megatron HDR around 6600K. I think, that 6600K is too warm for my LG OLED with color temperature set to warm 1.

Sure, the Windows 11 AutoHDR oversaturates colors more beyond Rec709, which is also not accurate, but in summary, to me the tonemapping looks just better and coherent with more pure green without shifting to yellow and a whitepoint that’s much closer to the color temperature set by the TV (when measured without the shader) and also much closer to the black body curve without the magenta shift, which otherwise gives the picture a pinkish tint, which I noticed right from the beginning using the Megatron shader with its own HDR TM.

I would love to see, that MajorPainTheCactus also compares Windows 11 Auto HDR with the Megatron HDR tonemapping, if time allows and give us some feedback what he thinks about it :smiling_face_with_three_hearts: :grin:

2 Likes

@ Cyber

I also did not forget to send you some closeup screenshots from the RGB Aperture Grille mask, so you can see that my WRGB OLED works correct with RGB subpixel layout, which you may have wondered about.

I noticed, that the reshade port of Megatron and the Retroarch Megatron shader gave me different results of the subpixel structure, which I have to investigate further.

I will later post some comparison between the two with the same settings.

2 Likes

What I’m more interested in is how. What settings did you use to get it to look like that? What you have demonstrated is nothing short of a milestone and it’s something that I’ve been searching for for a very long time here.

At one point it was believed that LG OLED TV subpixel structure was useless for proper CRT Mask emulation so B&W Masks were recommended and widely included in Shaders.

I researched and worked on it and stumbled across by accident that the Guest Shaders actually provide evenly structured CRT Masks/Phosphors if the BGR mask layout was used. Guest’s implementation seems to be actually RBG even though it’s called BGR.

I agitated and I advocated for something similar to be included in Sony Megatron Colour Video Monitor. I even modified the code myself to prove my case. Now we have the RWBG Mask Layout for LG OLED TVs available.

You’ve shown a sort of proof of concept, that it really is possible to get good enough looking RGB phosphors out of the LG OLED TVs so I’m really excited to have that accomplishment be followed up on and made available to the wider community and by extension myself of course.

So to me, this is like the biggest thing since sliced bread.

Which one gave the proper looking RGB Phosphors, Megatron for Reshade or Megatron for RetroArch?

I also agree with your suspicions regarding colour and tonemapping. When I first started tweaking, I could remember thinking that the shade of green in Super Mario World was a bit more “limey” than I remember and initially I found that some of my reds looked a little more rusty.

Colours do look slightly better in the Colour Accurate mode though but that turns on extra (unsightly for me) subpixels so that totally kills the illusion of having RGB Phosphor Triads like a CRT, maybe with your research, input and some tweaks the accuracy gap can be further mitigated.

I’m looking forward to this.

@MajorPainTheCactus I understand that you have some serious responsibilities IRL and challenges when it comes to spare time to work on these things, I just want to say that I hope you don’t feel pressured, overwhelmed or obligated with respect to maintaining and improving this wonderful gift you have given to the world.

For me you can take your time and as long as it takes to get to whatever it is you see us talking about here.

I wish you and your family all the best in all of your endeavours.

@Dennis1 this topic is so important to me that I have an entire thread dedicated to it here:

2 Likes

This RetroArch Megatron CIE graph was taken with Mask Accurate and “Display’s Subpixel Layout” set to RGB, correct?

If so, please check Colour Accurate with RWBG (OLED) as well.

I would also check RetroArch’s internal HDR settings without shaders active (use the same luminance and paper white settings you are using for Megatron with Expand Gamut turned off).

1 Like

Wait, make sure Original/Vivid is set to Original in RetroArch Megatron. I think it might just be this causing the color skew, even, now that i’m taking a second look at your graph.

Original is Rec 709, Vivid is an “Expanded” 709 that pulls green and red primaries towards P3, as i showed in this post.

2 Likes

@ Cyber

I just made some screenshots with my smartphone off the LG GX OLED TV. All shots from the Retroarch Megatron shader.

This is with the Megatron Default Preset, Aperture Grille, Mask accurate, RGB subpixel layout and 300 TVL:

This is with the Megatron Default Preset, Slot Mask, Mask accurate, RGB subpixel layout and 300 TVL:

This is with the Virtua Fighter Preset, Slot Mask, Mask accurate, RGB subpixel layout and 300 TVL:

As you can see, there are no issues with the Aperture Grille and RGB subpixel layout. To my surprise, I discovered, that the Virtua Fighter preset has a very nice slot mask, which I was not getting with the Megatron Default Preset.

Despite the blue subpixels slightly overlapping the green subpixels, resulting in a very fine cyan colored line, this looks great to me! I thought I could only use Aperture Grille with the Megatron shader due to the weird looking Slot Mask in the Default Preset, but this changed my mind. You just have to compare all presets and see what works best here. I read before, that other users had also issues with the weirld looking Slot Mask, so I would suggest to try a different Preset such as the Virtua Fighter one.

Also the maximum luminance and paperwhite values are very different in the Virtua Fighter preset when compared to the Megatron Default preset.

In the VF preset I can’t go over 300 nits paperwhite, as this results in overblown highlights and clipping, as with the MT default preset I can go all the way up to 800 nits paperwhite, while still looking good.

Bottom line is, that the Megatron shader is very versatile and all presets work very differently. Also while reshade has a Megatron setting called “Neutral” which has the saturation slider at a value of 0, the Retroarch Megatron shader has no Neutral preset and only the Preset called Megatron Default, which I thought would be the same. But when I go into the settings here, the saturation value is set @ 0.45 which oversaturates colors.

So the reshade Neutral preset and the Retroarch Default preset are not the same and these are some of the differences between the reshade and Retroarch ports and I think I would discover even more, if I dig deeper.

3 Likes

Yes, with RGB SP Layout.

Also I compared Vivid and Original, but they measure almost the same. I will check later with RWBG SP layout and RA internal HDR settings without shader active as you suggested.

2 Likes

It shouldn’t be a factor when Megatron is active, but ensure that “Expand Gamut” is off in RetroArch’s HDR settings as well.

Because that CIE graph you posted looks like it lands more or less exactly on the Expanded709 primaries…

2 Likes

Mhmm, Megatron should override those settings, i just wanted to be sure.

You have lilium’s ReShade_HDR_shaders installed, right? What does your CIE graph in the analysis shader look like for Retroarch Megatron?

2 Likes

You are right, the Retroarch HDR settings have no impact when the shader is active. I don’t have lilium’s reshade shaders installed, only the Megatron ones.

I could also measure the Megatron reshade port with the AutoHDR plugin from MajorPainTheCactus again on a different emulator to see if the colors will me tonemapped differently outside of RetroArch.

But it will be complex, because I noticed too, that all Presets of the Megatron shader act differently in regards to colors too. I hope that MajorPainTheCactus (I will call him shortly MPTC in future, because to write his name everytime is pain enough :grin:) will also have a look why the whitepoint and green primary are off the targets.

And it would be very nice, if he could implement the same looking Slot Mask from the Virtua Fighter RetroArch preset into reshade too, because it looks very nice and I couldn’t get such a good result with the reshade presets (the VF preset isn’t available via reshade). The Megatron masks within Retroarch look pretty different in each preset, which makes the whole thing very complex to be honest and also as I wrote before do the colors look different in each preset, which makes it mandatory to test every preset and setting independently.

2 Likes

Today I created a Reshade Megatron Preset, which should get as close to a Consumer Sony Trintron TV as possible. Not only in terms of the Aperture Grille mask, but also colorwise.

Sony Trinitron:

Reshade Megatron shader + Windows 11 Auto HDR:

My phone camera distorts the colors a bit, in reality they look virtually the same like on the picture with the Sony TV. I think the Megatron shader nails it with W11 AutoHDR.

What do you guys think?

I also tried something funny today. I downloaded some old 90s TV advertises and some clips from old TV series like “The Fall guy” and A-Team etc. from Youtube, which many of you may know from childhood.

I watched it within Retroarch and Megatron reshade + W11 AutoHDR and I reallly thought I am watching on a CRT TV. The content I downloaded has some compression artifacts, but the shader cleans out the image so well, that even this is enjoyable.

And I also “tuned” the Reshade Megatron shader with an additional applied shader from Retroarch to soften the image ever so slightly, because I think that it looks just a bit too sharp and digital without this.

I first tried just to activate the bilinear video option within Retroarch, but this was too soft to my eyes. So I deactivated bilinear scaling and tested every single shader which is just for softening the image to my taste and I stuck with the shader:

“controlled_sharpness.slangp” which can be found in the shader folder “pixel-art-scaling”

This shader on top of the Megatron softens the image only that much, that it just removes the digitally appearing harshness. Really enjoyable and authentic looking stuff on my OLED.

I also compared how the Aperture Grille mask looks with different resolutions and TV lines within the Megatron menu and I think, that the resolution set to 8K and 800 TVL looks the best. As far as I understand, this combination results effective in 400 TVL on my 4K OLED, as the vertical resolution is half on a 4K TV. As there is no 400 TVL setting in Megatron, 8K and 800 TVL can achieve the same thing here.

The Aperture Grille mask looks just right for me like this, because it is not as coarse as 300 TVL (with 300 TVL the RGB phosphors appear slightly too big for me on a 55 inch TV), but also not too fine to look like a Sony BVM or PVM.

To get rid of any “rainbowing” artifacts with white letters etc. I set the red horizontal deconvergence to -1.00 and blue h. deconvergence to 1.00.

Try it out guys, you will be surprised how well this works with all content.

6 Likes

Since as far as i know, settings are equivalent, that’s pretty easy to port over:

Sega_Virtua_Fighter_HDR.ini

PreprocessorDefinitions=
[email protected]
[email protected]

[SonyMegatron.fx]
HCRT_HDR=1.000000
HCRT_CRT_SCREEN_TYPE=2.000000
HCRT_CRT_RESOLUTION=1.000000
HCRT_EXPAND_GAMUT=0.000000

HCRT_RED_VERTICAL_CONVERGENCE=0.200000
HCRT_GREEN_VERTICAL_CONVERGENCE=0.200000
HCRT_BLUE_VERTICAL_CONVERGENCE=-0.230000
HCRT_RED_HORIZONTAL_CONVERGENCE=0.400000
HCRT_GREEN_HORIZONTAL_CONVERGENCE=-0.250000
HCRT_BLUE_HORIZONTAL_CONVERGENCE=-1.000000

HCRT_RED_SCANLINE_MIN=1.0000000
HCRT_RED_SCANLINE_MAX=2.000000
HCRT_RED_SCANLINE_ATTACK=1.000000
HCRT_GREEN_SCANLINE_MIN=1.000000
HCRT_GREEN_SCANLINE_MAX=2.000000
HCRT_GREEN_SCANLINE_ATTACK=1.000000
HCRT_BLUE_SCANLINE_MIN=1.000000
HCRT_BLUE_SCANLINE_MAX=2.000000
HCRT_BLUE_SCANLINE_ATTACK=1.000000

HCRT_RED_BEAM_SHARPNESS=1.000000
HCRT_RED_BEAM_ATTACK=0.0000000
HCRT_GREEN_BEAM_SHARPNESS=1.000000
HCRT_GREEN_BEAM_ATTACK=0.000000
HCRT_BLUE_BEAM_SHARPNESS=1.000000
HCRT_BLUE_BEAM_ATTACK=0.000000

The RetroArch Megatron version of the preset also has expand gamut on, but as previously established, that uses alternate, non-standard Expanded709 primaries.

By the same token, we can also port the Neutral preset from ReShade Megatron back to RetroArch Megatron:

(shaders\shaders_slang\hdr\crt-sony-megatron-neutral-settings.slangp)

#reference "shaders/crt-sony-megatron-hdr.slangp"

hcrt_crt_screen_type = "0.000000"
hcrt_colour_system = "2.000000"
hcrt_contrast = "0.000000"
hcrt_brightness = "0.000000"
hcrt_saturation = "0.000000"
hcrt_gamma_in = "2.220000"
hcrt_expand_gamut = "0.000000"
hcrt_red_scanline_min = "0.500000"
hcrt_red_scanline_max = "1.000000"
hcrt_red_scanline_attack = "0.200000"
hcrt_green_scanline_min = "0.500000"
hcrt_green_scanline_max = "1.000000"
hcrt_green_scanline_attack = "0.200000"
hcrt_blue_scanline_min = "0.500000"
hcrt_blue_scanline_max = "1.000000"
hcrt_blue_scanline_attack = "0.200000"
hcrt_red_beam_sharpness = "1.750000"
hcrt_red_beam_attack = "0.500000"
hcrt_green_beam_sharpness = "1.750000"
hcrt_green_beam_attack = "0.500000"
hcrt_blue_beam_sharpness = "1.750000"
hcrt_blue_beam_attack = "0.500000"

(Note that the Neutral preset uses an alternate Colour System setting by default, specifically rec 601.)

I would strongly recommend prepending an NTSC shader for this purpose instead.

3 Likes

This is fantastic man!

I believe you!

I think you also nailed it with your settings!

This is something that I’d like to do even more. I did it a few times with some old content but found the built-in FFMPEG Core to be quite limiting.

Using ReShade you should be able to use almost any media player, including MPC-HC.

Feel free to give my MegaTron Preset Pack a spin as well, maybe you can tweak the settings in there even further than I have with the type of equipment and knowledge that you seem to possess. I do things mostly by instinct.

This is a HUGE tip here! I’m definitely going to try this out. Didn’t realize it was possible to get some “in-between” mask widths which is something that I had asked about not too long ago.

I really like things to be closer to the 300TVL mark than the 600TVL mark especially when viewing on a 55” from about 7’ away. When it’s too fine, it doesn’t feel or look similar to the way it did on an old 15" or 20" tube from a much closer distance. However, the trade-off is sometimes chunky phosphors that don’t always “fit within the lines”.

I even counted triads on real CRTs to see what was closer in terms of CRT Mask sizes and the finer ones tended to be but I still preferred my less accurate coarse ones. Hopefully this will be the sweet spot!

Thanks for this will try it out. I’ve been playing around with horizontal deconvergence but I don’t quite get its functionality. It can’t move the subpixels in the same way that vertical deconvergence does, it seems as if it offsets the content though.

Feel free to share your full preset or presets.

I agree and in my Preset Pack I have examples with both GDV-NTSC as well as Super-XBR prepended.

I’m in favour!

3 Likes

Edit - Got it working, disregard. :slight_smile:

2 Likes