Sony Megatron Colour Video Monitor

So although I’ve been a little quiet of late on this thread largely due to having our new baby son, I have been doing stuff.

Whilst not Retroarch (I hope I’m not banned for posting this) a bit of cross polination with ReShade can’t hurt. So this is a preview of my soon to be released AutoHDR plugin and port of the Sony Megatron to ReShade. You can find the port here:

I’ll be releasing the AutoHDR plugin later as its a bit more involved and requires changes to ReShade to support it. Also the Sony Megatron needs a bit of work to work with different internal resolutions.

Anyway here’s the video:

As always do make sure to play it back in highest quality settings.

8 Likes

ha, no, definitely not. looks great :slight_smile: Reminds me of my buddy’s old HD Wega.

6 Likes

ReShade port and AutoHDR ReShade addon to support it, have gone live here:

They require ReShade 5.2 to work which has not been released yet but you can get the ReShade source and build it yourself if you want an early peek.

4 Likes

@MajorPainTheCactus

There does appear to still be something going on with color, at least in SDR mode.

All the grey bars should be visible. If not, there’s going to be a lot of lost detail in dark scenes. There’s also just a general lack of brightness/vibrancy.

#reference "shaders_slang/hdr/crt-sony-megatron-aeg-CTV-4800-VT-hdr.slangp"
hcrt_hdr = "0.000000"
hcrt_crt_screen_type = "0.000000"
hcrt_crt_resolution = "3.000000"
hcrt_colour_system = "3.000000"
hcrt_gamma_out = "2.495002"
hcrt_red_scanline_min = "0.700000"
hcrt_red_scanline_max = "0.800000"
hcrt_green_scanline_min = "0.700000"
hcrt_green_scanline_max = "0.800000"
hcrt_blue_scanline_min = "0.700000"
hcrt_blue_scanline_max = "0.800000"
1 Like

When I zoom into the white parts of these screenshots, I see a magenta-green subpixel pattern. Is it supposed to look like that?

2 Likes

Yes. It’s how the shader achieves a realistic high-TVL phosphor mask.

3 Likes

Magenta green is RxBxGx

Assuming the subpixels are RGB.

3 Likes

I finally went to try this out now that 5.2 is released and it’s saying “[SonyMegatron.fx] failed to compile” with “error X3535: Bitwise operations not supported on target ps_3_0”. Am I doing something wrong? Maybe it needs to be updated?

Also the AutoHDR directions are a bit unclear or at least don’t seem to reflect the current version from what I can tell. I don’t see anything about addon paths, is that required for SonyMegatron.fx to work and that’s why it fails to compile?

1 Like

Good evening @nesguy! Hope you’re well so this is possibly due to your gamma out value. At the very least pushing up the brightness might help. One thing I would say is that I’m pretty sure I never did an SDR version of the above preset so if you need SDR you’ll need to change the settings accordingly - usually I push up the brightness a bit for SDR versions.

EDIT: when I get a chance I’ll try out those SDR settings and see what I get.

1 Like

Firstly thanks for trying this out! Ok so that is odd as the shader shouldn’t be targeting ps_3_0 - that’s like Nvidia GTX 6800 time back in 2004. Are you trying this on a really old game perhaps? Im guessing so seen as this is a retro CRT shader after all! Just to rule things out have you got a modern game you can try this out on i.e a direct 10, 11, 12 game?

So with regards to the AutoHDR add-on you need the ‘add-on’ version of Reshade. There should be another link for that version on the Reshade website. Once you install that version you’ll see a add-on tab and under that at the very top is a add-on path.

Let me know how you get on!

One thing I will say is that Reshade doesn’t support different internal resolutions of buffers as well as RetroArch so it may need a little fiddling of the two height and width variables in the shader to make it look right for a particular game.

I’m currently working on a large add-on for ReShade and may make this sort of thing a bit more convenient for people - if my changes get accepted that is.

1 Like

Yeah I went to try it on Sonic Mania which I don’t think is really old but I guess it’s DX9, and after looking that’s apparently also the case for most other stuff I’d want to try it with. But I got it loaded up on Blasphemous and it works but it’s still basically unusable for me because of the pixel inversion issues that come with the 100% mask strength and lack of bloom/blur/etc.

I tried adding a bloom shader after it but that doesn’t seem to work well since it’s trying to work off of something that’s already so dark because of the mask. It would be nice if ReShade let you control the mix amount or opacity of each step, like how with some audio processing you have the wet/dry knob for example. I think that would go a long way in making this usable for SDR setups at least.

I’ll try it again once I can hopefully get my hands on that LG 32GQ950 but for now I’ll have to stick with the guest-advanced port. It’s too bad the Royale port doesn’t work well because that’s so much brighter and sharper, but I guess it has issues with the scanlines and stuff.

1 Like

Ah yes this is really a HDR capable display shader - SDR is bright enough on some of those displays and some laptop displays. The real reason I made a SDR version is because of that and for people without a full HDR pipeline i.e using Direct 10, 9, OpenGL and older gfx cards.

However I havent obviously taken into account directx 9 using ps_3_0 shaders. This should be relatively easy to fix in ReShade so I’ll add that support and let you know.

2 Likes

So I finally got around to obtaining an active DP-to-HDMI cable, which means I can finally use this shader in its full 4K@60Hz glory… or I would, except my current rig’s integrated graphics are terribad and cannot handle this shader without increasing max swapchain images to 3, and even then JUST barely for NES, so I’ll have to hold off until I put in a dedicated GPU, which won’t be long now.

That said, I went ahead and messed around with it a bit anyway, and I noticed a couple of things. For starters, why is the BCYRX mask (the BGR version of the 8K RYCBX mask) not enabled for aperture grille, even though it’s available for slot mask? Is it an oversight? I went ahead and fixed it in the code, and it looks VERY nice on my BGR panel, even though it’s “meant” for 8K. I believe I have a new favorite mask to use once my GPU comes in.

As for the other masks, they’re either too dark on my display (it’s HDR capable, but Lakka doesn’t support it, and even if it did, my new cable probably doesn’t, and in any case judging from the little HDR content I’ve played on this TV, it hardly gets brighter at all, being kind of a cheapo 4K TV), or in the case of the high TVL masks result in nasty artifacts off to the sides of the image, which means the panel probably doesn’t like high frequency subpixel patterns. Fine by me, they’re too sharp for my liking anyway.

So yeah, so far so good. Hopefully the GPU will do the trick and actually allow me to use this at 4K without problems.

3 Likes

Is that still the UHD 630? I’d be interested in some shader benchmarks. Assuming integer Scaling and core provided ratio, can you run e.g. DOS 320x200 or 640x480 (even less active pixels) at 60? Edit: Actually, I realize now that the difference between low-res DOS and NES would be minimal, assuming overscan for the NES is off (DOS: 2000 vertical, NES without overscan: 2016, with overscan the full 2160). Basically, just some figures with different resolutions would be interesting to me, cause I might get a cheap 4k TV in coming weeks myself, and initially no powerful GPU is going to be connected to it either.

2 Likes

Yeah 4K is still a stretch for most integrated graphics chipsets especially when you add in shaders. As far as I’ve measured it’s one of the fastest shaders out there - only zfast (or whatever it’s name is) is faster but that’s doing very little in comparison.

Hmm not sure how BCYRX is not enabled for aperture grille - it is an aperture grille mask so that’s very strange. What line did you change?

As for being too dark yes this is a HDR shader - it will work with super bright SDR displays as well though - my Dell xp laptop for example.

As for too sharp for your liking, sure you’re free to like anything obviously but I do find it strange why you’d want anything else for a CRT shader as that’s how CRTs work. 🤷 But I know people have their preference so it’s all good.

Hopefully you can get a full 4K HDR setup and see this shader in its intended way but I’m glad you’ve tried it in the meantime! Let me know how you get on! (I’ll try and fix that bug you mentioned above too)

Check out line 218 of the following bloc in crt-sony-megatron.slang:

   { // 8K
  { kRRGGBBX, kBBGGRRX },      // 300 TVL
  { kRRGGBBX, kBBGGRRX },      // 600 TVL
  { kRYCBX, kRYCBX },          // 800 TVL
  { kRGBX, kBGRX }             // 1000 TVL

}

Notice how for the BGR parameter, it just repeats kRYCBX. Changing it to kBCYRX makes it work as intended. The slot mask version down in line 350 appears correct.

Maybe a poor choice of words on my parts. I just prefer a slightly lower TVL count, more in line with consumer sets than PVMs, is all, and the 5 pixel mask is right within my bounds of preference (think it translates to around 432 TVL at 4K, if I did my math correctly).

2 Likes

Ah yes I remember now that I hadn’t added this - sorry it was the slot mask thing that threw me off.

Got you on the lower TVL thing - I quite like that look too. There’s some amazing shots of over on the retro gaming boards forum of lower TVL PVMs that look great - also look at my presets - I think I have a low TVL PVM preset.

Yes this 1910 PVM preset:

1 Like

Played a bit more with the shader today. Turns out as long as I keep max swapchain images at 3, it can work even with the Dolphin libretro core at native resolution. However, I noticed something very odd, namely that some masks tank performance while others don’t. I noticed this while trying out the 800 TVL RGB mask (which looks wonderful at 4K with 480p content, by the way, and evidently doesn’t make the panel crap itself with artifacts like the 1000 TVL mask does, though it does lose some brightness), and testing out a Green-Magenta-Black mask, which should look very similar, and it does, except for whatever reason it results in slowdown (it goes from full speed to 45 FPS in SSBM on Dolphin), whereas the regular RGB mask does not. I then noticed the 8K RYCBX/BCYRX mask I was testing earlier also resulted in a performance drop, and so do the 1000 TVL GM/MG mask and the BW masks. The only thing that comes to mind is that all these masks use at least one “combined” color pixel (so cyan, magenta, yellow, and/or white). All the other masks run at full speed here.

@MajorPainTheCactus Thoughts? It seems silly that CMY and white mask colors would actually result in a performance drop, but what do I know.

1 Like