This is an incomplete, ongoing hobby project of mine to get these consoles’ video signals and colors to look more accurate on RetroArch. The main things unique to this are its customizeable video signal and its emulation of the color corrections found in real jungle chips’ data sheets. The US presets aim to emulate the colors of the Sony KV-20M10 and KV-20S11, without their Dynamic Color feature.
Previous version (2024-10-16)
Latest version (2024-12-16) (You might like the previous version better.)
My latest releases have been using my own new NTSC shader called Patchy NTSC, which combines the first three of these four features. (Fyi, my username is going to be changed to “Patchy” in the near future, so please try not to get into the habit of calling my shader Patchy.)
- NTSC video signal artifacts and RF noise. Genesis/MegaDrive, SNES/SFC, and NES/FC are supported, for RF, Composite, S-Video, and Component video signals. The shader carefully encodes the signal, optionally adds RF noise, and carefully decodes the signal to get close to the same artifacts as original hardware, albeit at a serious performance cost, especially if using RF. Advanced users are encouraged to use the shader’s settings to try to replicate more consoles’ signals. Settings to adjust sharpness, noise severity, and the noise RNG seed are included as well. NES signal emulation requires you to set Mesen’s color palette to “Raw”, which looks like just red and green. SNES and Genesis presets automatically detect when the game changes resolution. To get the intended artifacts, make sure you set your emulator to crop equal amounts of overscan on both sides. PS1 support might be coming soon.
- Color alteration caused by the jungle chip. If you’ve seen the CXA2025AS NES palette, that’s one of the jungle chips you can choose (number 7 in the settings), except you can use it on Genesis now, and you can adjust the settings for contrast, brightness, color, and tint.
- Gamma and phosphor gamut. Gamma is handled using the BT.1886 EOTF function. The phosphor gamut is done using Chthon’s precomputed lookup tables with (what is claimed to be) state-of-the-art gamut compression, resulting in good phosphor gamut emulation without much performance cost. Afterglow is simulated using code from crt-guest-advanced, even if you choose a different CRT shader like Royale or Hyllian.
- The CRT display itself. A few different “sanitized” CRT shader presets are included, which have settings that disable color and signal alteration to the best extent I can. The purpose of that is to give my shaders full control of the NTSC signal and color emulation, without the CRT display emulation interfering with that. That said, those CRT shaders are still being worked on separately by their own authors, and if you update them, you might have to update my sanitized settings for them. To use this, you can pick the “SignalOnly” preset that corresponds to your emulator and append a sanitized version of your favorite CRT shader to it. If you customize one of these sanitized presets, be careful not to change anything that could alter the output colors or signal, such as Gamma, LUTs, or some of Hyllian’s features.
Here are the major credits for this project (though, not everything listed here is in my latest version):
- aliaspider - GTU-famicom, an NES video signal emulator, which helped me understand how the NES’s video signal works. My earlier posts used this for lowpass filtering, and this used to be directly copied into Patchy NTSC as one of its low pass filter options. The code was difficult for me to understand at the time because of how it had been written, but I have since realized that this is taking the integral of a basic raised-cosine window function (or “Hann Window”).
- dannyld - Source of the settings in ntsc-md-rainbows, a preset for mame-hlsl’s NTSC passes that approximates the Genesis’s NTSC color carrier timings, although better results can be obtained from their own thread which perform more filtering through gtu and crt-guest-advanced. Because of this, my patchy-ntsc shaders were initially made to be a more versatile, more extensible way to simulate NTSC artifacts with customizable color carrier timings and frequency filters.
- Dogway - Grade, a large shader that performs many steps to simulate CRT colors. The shader does have many features, but at the time of writing this, only its EOTF (a.k.a. gamma) function and SMS blue lift have made it into patchy-ntsc.
- ChthonVII - gamutthingy, a program for generating LUTs based on existing CRTs’ phosphor gamuts with state-of-the-art gamut mapping, and one shader file called trilinearLUT.slang that samples these LUTs in the correct way. This is far superior to the gamut compression found in Dogway’s grading shader, though that’s not entirely Dogway’s fault.
- Guest - crt-guest-advanced, in my opinion the best-looking CRT shader in RetroArch. Also, a gaussian blur shader, which I used to use for lowpassing. I have included two different personal presets for crt-guest-advanced, but I haven’t tested them on the latest verion in some time.
- lidnariq - Posted measured voltages of their NES onto nesdev, including attenuated voltages.
- I forget who, but someone posted estimated NES hue error amounts on nesdev. The 2C02G amount of 5 degrees appears to be a close match to a video capture of my real NES.
- EMMIR (LMP88959) - Created NTSC-CRT, written in C. In my source code, you can see my failed attempt at directly porting the 3-band equalizer from NTSC-CRT. Other than this, I don’t have much to say about it.