The Scanline Classic Shader

I couldn’t help but notice the high compression levels in your *.jpeg screenshots. You can use IrFanView to set a filesize target of 4095KB and it will calculate the minimum amount of compression required to achieve that target.

1 Like

Thanks. I was just relying on PNG-8 format. I will see next time if JPEG will give a better result.

1 Like

I’ve been playing around with composite on the Mega Drive. I am relying on the Mega Drive timing documented here:

https://archive.ph/gdC4x

I believe most games run in the H320F mode. In order to restore the dot pattern from the RGB we get from the emulator, we need the number of lines per field (262), horizontal frequency (15.980112 kHz for H320F), and the amount of inactive pixels (100 for H320F mode corresponding to 420 total pixels per line). Horizontal frequency affects the ‘angle’ of rainbow artifacts by changing the dot pattern shift per line. In this case there is not supposed to be any shift per line so we see this colorful prismatic effect on NTSC Mega Drives. Lines and inactive pixels affect the distribution and number of dots we get for each pixel.

The monochrome mode of Scanline Classics NTSC shaders allows us to see the restored dot pattern.

There is some debate about how much the rainbow pattern is supposed to be seen through on an actual television. I have seen a lot of examples, both direct captures and controlled photographs, and they show a wide variation. The components that make up video filters for this are prone to aging, degradation, and poor tolerance. Couple that with the number of questionable mods people have applied to hardware makes matching it perfectly a moving target

Starting with the strongest filtering, Y encoding filter set to 1.8 MHz, we see that the rainbow artifacts are virtually nonexistant, but the picture is also very soft. I am using the feedback decoding filter in Scanline Classic for all these screenshots. This cutoff is based on an analysis of a Japanese Mega Drive or Genesis schematic assuming good isolation between Y input and output for the video encoding chip.

If we set the filter to 3.6 MHz, the rainbow effect becomes quite strong:

Without any encoding filters at all, we get this effect:

It’s quite possible that when the Mega Drives were new, the effect wasn’t as strong, but with aging the effect has become more apparent. A setting of anywhere between 1.8 MHz and 3.6 MHz seems reasonable.

Updates are available in dev branch.

5 Likes