What's the reason for the missing PPU cycle on even frames?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: What's the reason for the missing PPU cycle on even fram

Post by tokumaru »

psycopathicteen wrote:I find it pretty funny how a lot of Europeans online say that skin colors on NTSC appear as either green or purple, yet, I never seen it happen on any of the TVs I had.
I think this was common with VHS.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: What's the reason for the missing PPU cycle on even fram

Post by psycopathicteen »

It might've happened with rabbit-ear antennas. Those always had lousy reception.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: What's the reason for the missing PPU cycle on even fram

Post by NewRisingSun »

NTSC does have far worse color fidelity than PAL because...
  • ... multipath reception in antennas and signal reflections in impedance-unmatched electrical connections will cause differential (brightness-dependent) phase shift. Differential phase errors cannot be removed by the viewer using the Hue control, as that one will only correct linear phase errors. The beloved NES being a serious offender. The PAL patent on the other hand explicitly mentions its ability to even remove differential phase errors, as my comparison of the PAL NES' output with Simple PAL versus Full PAL demonstrates.
  • ... the very presence of a Hue knob not only in monitors but also in video production equipment meaning one more setting than can and will be improperly adjusted.
  • ... a black level of 7.5 percent that was almost impossible to get right without an oscilloscope in the pre-digital days. Basically everyone else, including all PAL countries, use a black level of zero.
  • ... RGB primaries that were obsolete almost immediately after the standard was adopted yet never formally changed, leading to confusion among everyone about what the correct colorimetry is, and strange correction matrices in production and consumer equipment. For PAL, the European Broadcasting Union simply said in 1970: here are new primaries based on current technology, and here are permissible deviations: use them and shut up. Worked so well that they were used with minimal changes in HDTV (as Rec. 709).
  • ... generally much more lax broadcast and somewhat more lax equipment production standards in NTSC regions (although that's not the fault of the system itself)
I would say though that the "green and purple faces" is mostly a stereotype, as none of the above points would distort the signal to such a great degree. And even if it did, the viewer would simply adjust his set.

Then again, if I look at some YouTube videos...
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: What's the reason for the missing PPU cycle on even fram

Post by psycopathicteen »

... RGB primaries that were obsolete almost immediately after the standard was adopted yet never formally changed, leading to confusion among everyone about what the correct colorimetry is, and strange correction matrices in production and consumer equipment.
I wonder how many people would notice if the colorimetry was different without the correction matrices. If you can get a wider color gamut, you might as well show it off.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: What's the reason for the missing PPU cycle on even fram

Post by Oziphantom »

What makes it worse is that NTSC 4.48 is valid for a direct signal and hence the NES and SNES could have given you NTSC 4.48 out of the back which would solve a lot of the problems XD Still won't get you a proper red that doesn't bleed everywhere but you can't have everything ;)
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: What's the reason for the missing PPU cycle on even fram

Post by psycopathicteen »

Would ntsc 4.48 work with every ntsc tv set?
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: What's the reason for the missing PPU cycle on even fram

Post by Oziphantom »

Don't know. I mean it in the Spec, and they are analogue devices, so if you change the chroma burst signal faster it should "just work", as in its not digital and hence has a yes/no response to everything. I would think at worst if the internal switching can only handle 3.38 you would still get the same you got now, just the NES outputs more data. Might end up looking worse though.
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: What's the reason for the missing PPU cycle on even fram

Post by tepples »

As I understand it, NTSC-only SDTVs are sensitive only to 3.58 MHz chroma.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: What's the reason for the missing PPU cycle on even fram

Post by psycopathicteen »

NewRisingSun wrote:RF video, overall 4.2 MHz bandwidth, equiband YUV decoding at 0.6 MHz.
RF-YUV0.6MHz.png
RF video, overall 4.2 MHz bandwidth, equiband YUV decoding at 1.5 MHz.
RF-YUV1.5MHz.png
RF video, overall 4.2 MHz bandwidth, 1953 NTSC YIQ decoding with I at 1.5 MHz and Q at 0.6 MHz. This one looks really weird in the yellow-green bushes, because the unequal bandwidths result in funky transitory colors that don't appear with equal bandwidths, even when they're low.
RF-YIQ.png
Baseband composite video, unrestricted overall bandwidth, equiband YUV decoding at 1.5 MHz:
Composite-YUV1.5MHz.png
Baseband composite video, unrestricted overall bandwidth, equiband YUV decoding at 3.5 MHz:
Composite-YUV3.58MHz.png
The last one is never used, because as you can see, the high chroma bandwidth basically steals all the luma detail, and so is pointless.
Is the first one have a ".6mhz" filter on both the encoder and decoder side? Also, the last one DOES look familiar, like it's how my old tv looked like.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: What's the reason for the missing PPU cycle on even fram

Post by psycopathicteen »

Does anybody know the formula to convert the original NTSC primaries to sRGB? I remember someone showing a screenshot of the difference between the 2 standards, with the old format having boosted reds.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: What's the reason for the missing PPU cycle on even fram

Post by NewRisingSun »

The formula depends on whether you just want to convert RGB primaries or also from the original Illuminant "C" white point to D65. Use the attached Excel file to calculate from any color space to any other color space. Remarks:
  1. "Linear light signals" are the signals you get when you remove gamma-pre-correction, i.e. LinearR = R^2.2, 0.0 <= R <= 1.0.
  2. "Gamma pre-corrected signals" are the normal RGB values you use. As the article referenced in the file explains, proper conversion requires linear light signals. When you use normal gamma pre-corrected signals, you must specify two chromaticity points for which the inevitably resulting errors will be minimized.
  3. The "Parker (original)" and "Parker (modified)" sheets differ in how white point differences are treated.
  4. The "Common settings" sheet contains a number of color spaces that the literature lists as being "common" for television sets of a particular era, as well as the color spaces defined by the various standards documents. "sRGB" uses "CCIR Rec. 709" primaries and white point D65.
  5. The "Gain/Angle" are the result of folding the NTSC YUV-to-RGB* and "Correction for gamma pre-corrected signals" matrices into one matrix and are the values you would enter for example into Nestopia's NTSC palette generator under "Advanced" (Nestopia for some reason requires Gain to be entered divided by two).
* NTSC is usually described as using YIQ rather than YUV, but it's just the same color space rotated by 33 degrees, and it's easier expressing things in terms of YUV because at least one value will at least nominally be at zero degrees.
Attachments
NTSCPrimaries.7z
(11.7 KiB) Downloaded 212 times
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: What's the reason for the missing PPU cycle on even fram

Post by psycopathicteen »

Is this what I'm looking for?

Code: Select all

Correction for gamma pre-corrected signals									
       R's	   G's	    B's		          V	    U	   Gain	 Angle	
R't=	1.2903	-0.2705	-0.0198	R'-Y'=	1.628	0.066	1.629	87.7	°
G't=	-0.0037	0.9516	0.0521	G'-Y'=	-0.557	-0.269	0.618	244.2	°
B't=	0.0317	-0.1982	1.1665	B'-Y'=	0.151	2.445	2.450	3.5	°
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: What's the reason for the missing PPU cycle on even fram

Post by NewRisingSun »

No, you are converting approximately and not exactly. To convert exactly, convert to linear light signals and use the formula for linear signals:

Code: Select all

// Convert from 1953 NTSC (with D65 white point) to sRGB color space
float R = (r>=0.0812)? pow((r+0.099)/1.099, 1.0/0.45): r/4.500;
float G = (g>=0.0812)? pow((g+0.099)/1.099, 1.0/0.45): g/4.500;
float B = (b>=0.0812)? pow((b+0.099)/1.099, 1.0/0.45): b/4.500;
float newR = 1.4607*R -0.3845*G -0.0761*B;
float newG =-0.0266*R +0.9654*G +0.0612*G;
float newB =-0.0264*R -0.0414*G +1.0678*B;
if (newR<0.0) newR=0.0; if (newR>1.0) newR=1.0;
if (newG<0.0) newG=0.0; if (newG>1.0) newG=1.0;
if (newB<0.0) newB=0.0; if (newB>1.0) newB=1.0;
r = (newR>=0.018)? 1.099*pow(newR, 0.45)-0.099: 4.5*newR;
g = (newG>=0.018)? 1.099*pow(newG, 0.45)-0.099: 4.5*newG;
b = (newB>=0.018)? 1.099*pow(newB, 0.45)-0.099: 4.5*newB;
Notice the gamma conversion formula from SMPTE-170M in the first and last three lines. It is more involved than a standard power function.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: What's the reason for the missing PPU cycle on even fram

Post by psycopathicteen »

I was thinking today about what would be the easiest digital bandpass filter for a system like the NES to do, and I thought that {-1/4, 0, 1/2, 0, -1/4} BPF sampled at 14.32Mhz would be one of the easiest digital filters, so I calculated what would be the -3dB "cutoff" frequency with my calculator and I got:

1.3031574 Mhz

Image

This CAN'T be a coincidence that such a simple digital filter would hit the 1.3 Mhz bandwidth so closely.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: What's the reason for the missing PPU cycle on even fram

Post by lidnariq »

Uh.
Post Reply